summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-01-16 17:52:29 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2012-01-16 17:53:41 +0100
commit5b250d497fd798c476765b22a2906e1c0ff1e432 (patch)
treefd4215ca375cc2402e536bf670c2977cf64ae2ef
parent2c52e9a5c1d6ef6cbf4577430e14027375465c96 (diff)
parent7a0099183a1c107126bda3b59a47651aac612426 (diff)
Merge remote-tracking branch 'gerrit/master' into containers
-rw-r--r--.gitignore4
-rw-r--r--.gitmodules3
-rw-r--r--LICENSE.LGPL2
-rwxr-xr-xbin/createpackage.bat2
-rwxr-xr-xbin/createpackage.pl2
-rwxr-xr-xbin/elf2e32_qtwrapper.pl2
-rwxr-xr-xbin/findtr2
-rwxr-xr-xbin/fixqt4headers.pl3
-rwxr-xr-xbin/patch_capabilities.pl2
-rwxr-xr-xbin/qtmodule-configtests2
-rwxr-xr-xbin/setcepaths.bat2
-rwxr-xr-xbin/syncqt2
-rwxr-xr-xbin/syncqt.bat2
-rw-r--r--config.tests/mac/coreservices/coreservices.mm2
-rw-r--r--config.tests/mac/corewlan/corewlantest.mm2
-rw-r--r--config.tests/mac/crc/main.cpp2
-rw-r--r--config.tests/mac/xcodeversion.cpp2
-rw-r--r--config.tests/qpa/wayland/wayland.cpp2
-rw-r--r--config.tests/qpa/xcb-poll-for-queued-event/xcb-poll-for-queued-event.cpp2
-rw-r--r--config.tests/qpa/xcb-render/xcb-render.cpp2
-rw-r--r--config.tests/qpa/xcb-xlib/xcb-xlib.cpp2
-rw-r--r--config.tests/qpa/xcb/xcb.cpp2
-rw-r--r--config.tests/qws/ahi/ahi.cpp2
-rw-r--r--config.tests/qws/directfb/directfb.cpp2
-rw-r--r--config.tests/qws/sound/sound.cpp2
-rw-r--r--config.tests/qws/svgalib/svgalib.cpp2
-rw-r--r--config.tests/unix/3dnow/3dnow.cpp2
-rw-r--r--config.tests/unix/alsa/alsatest.cpp2
-rw-r--r--config.tests/unix/avx/avx.cpp2
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.cpp2
-rw-r--r--config.tests/unix/clock-monotonic/clock-monotonic.cpp2
-rw-r--r--config.tests/unix/cups/cups.cpp2
-rw-r--r--config.tests/unix/db2/db2.cpp2
-rw-r--r--config.tests/unix/dbus/dbus.cpp2
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.cpp2
-rw-r--r--config.tests/unix/egl/egl.cpp2
-rw-r--r--config.tests/unix/egl4gles1/egl4gles1.cpp2
-rw-r--r--config.tests/unix/endian/endiantest.cpp2
-rw-r--r--config.tests/unix/floatmath/floatmath.cpp2
-rw-r--r--config.tests/unix/freetype/freetype.cpp2
-rwxr-xr-xconfig.tests/unix/fvisibility.test4
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfotest.cpp2
-rw-r--r--config.tests/unix/getifaddrs/getifaddrs.cpp2
-rw-r--r--config.tests/unix/glib/glib.cpp2
-rw-r--r--config.tests/unix/gnu-libiconv/gnu-libiconv.cpp2
-rw-r--r--config.tests/unix/gstreamer/gstreamer.cpp2
-rw-r--r--config.tests/unix/ibase/ibase.cpp2
-rw-r--r--config.tests/unix/icd/icd.pro3
-rw-r--r--config.tests/unix/iconv/iconv.cpp2
-rw-r--r--config.tests/unix/icu/icu.cpp2
-rw-r--r--config.tests/unix/inotify/inotifytest.cpp2
-rw-r--r--config.tests/unix/iodbc/iodbc.cpp2
-rw-r--r--config.tests/unix/ipv6ifname/ipv6ifname.cpp2
-rw-r--r--config.tests/unix/iwmmxt/iwmmxt.cpp2
-rw-r--r--config.tests/unix/javascriptcore-jit/hwcap_test.cpp2
-rw-r--r--config.tests/unix/libjpeg/libjpeg.cpp2
-rw-r--r--config.tests/unix/libmng/libmng.cpp2
-rw-r--r--config.tests/unix/libpng/libpng.cpp2
-rw-r--r--config.tests/unix/libtiff/libtiff.cpp2
-rw-r--r--config.tests/unix/mmx/mmx.cpp2
-rw-r--r--config.tests/unix/mremap/mremap.cpp2
-rw-r--r--config.tests/unix/mysql/mysql.cpp2
-rw-r--r--config.tests/unix/neon/neon.cpp2
-rw-r--r--config.tests/unix/nis/nis.cpp2
-rw-r--r--config.tests/unix/oci/oci.cpp2
-rw-r--r--config.tests/unix/odbc/odbc.cpp2
-rw-r--r--config.tests/unix/opengldesktop/opengldesktop.cpp2
-rw-r--r--config.tests/unix/opengles1/opengles1.cpp2
-rw-r--r--config.tests/unix/opengles2/opengles2.cpp2
-rw-r--r--config.tests/unix/openssl/openssl.cpp2
-rw-r--r--config.tests/unix/openvg/openvg.cpp2
-rw-r--r--config.tests/unix/psql/psql.cpp2
-rw-r--r--config.tests/unix/ptrsize/ptrsizetest.cpp2
-rw-r--r--config.tests/unix/pulseaudio/pulseaudio.cpp2
-rw-r--r--config.tests/unix/shivavg/shivavg.cpp2
-rw-r--r--config.tests/unix/sqlite/sqlite.cpp2
-rw-r--r--config.tests/unix/sqlite2/sqlite2.cpp2
-rw-r--r--config.tests/unix/sse/sse.cpp2
-rw-r--r--config.tests/unix/sse2/sse2.cpp2
-rw-r--r--config.tests/unix/sse3/sse3.cpp2
-rw-r--r--config.tests/unix/sse4_1/sse4_1.cpp2
-rw-r--r--config.tests/unix/sse4_2/sse4_2.cpp2
-rw-r--r--config.tests/unix/ssse3/ssse3.cpp2
-rw-r--r--config.tests/unix/stdint/main.cpp2
-rw-r--r--config.tests/unix/stl/stltest.cpp2
-rw-r--r--config.tests/unix/tds/tds.cpp2
-rw-r--r--config.tests/unix/tslib/tslib.cpp2
-rw-r--r--config.tests/unix/zlib/zlib.cpp2
-rw-r--r--config.tests/x11/fontconfig/fontconfig.cpp2
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.cpp2
-rw-r--r--config.tests/x11/mitshm/mitshm.cpp2
-rw-r--r--config.tests/x11/notype/notypetest.cpp2
-rw-r--r--config.tests/x11/opengl/opengl.cpp2
-rw-r--r--config.tests/x11/sm/sm.cpp2
-rw-r--r--config.tests/x11/xcursor/xcursor.cpp2
-rw-r--r--config.tests/x11/xfixes/xfixes.cpp2
-rw-r--r--config.tests/x11/xinerama/xinerama.cpp2
-rw-r--r--config.tests/x11/xinput/xinput.cpp2
-rw-r--r--config.tests/x11/xinput2/xinput2.cpp2
-rw-r--r--config.tests/x11/xkb/xkb.cpp2
-rw-r--r--config.tests/x11/xlib/xlib.cpp2
-rw-r--r--config.tests/x11/xrandr/xrandr.cpp2
-rw-r--r--config.tests/x11/xrender/xrender.cpp2
-rw-r--r--config.tests/x11/xshape/xshape.cpp2
-rw-r--r--config.tests/x11/xsync/xsync.cpp2
-rw-r--r--config.tests/x11/xvideo/xvideo.cpp2
-rwxr-xr-xconfigure426
-rw-r--r--configure.exebin1152000 -> 1115648 bytes
-rw-r--r--dist/changes-5.0.0100
-rw-r--r--doc/src/core/containers.qdoc2
-rw-r--r--doc/src/core/implicit-sharing.qdoc2
-rw-r--r--doc/src/core/objectmodel/metaobjects.qdoc2
-rw-r--r--doc/src/core/objectmodel/object.qdoc2
-rw-r--r--doc/src/core/objectmodel/objecttrees.qdoc2
-rw-r--r--doc/src/core/objectmodel/properties.qdoc2
-rw-r--r--doc/src/core/objectmodel/signalsandslots.qdoc2
-rw-r--r--doc/src/core/qtcore.qdoc2
-rw-r--r--doc/src/core/threads-basics.qdoc2
-rw-r--r--doc/src/core/threads.qdoc4
-rw-r--r--doc/src/dbus/qtdbus.qdoc2
-rw-r--r--doc/src/examples/2dpainting.qdoc2
-rw-r--r--doc/src/examples/addressbook.qdoc2
-rw-r--r--doc/src/examples/affine.qdoc2
-rw-r--r--doc/src/examples/analogclock.qdoc2
-rw-r--r--doc/src/examples/animatedtiles.qdoc2
-rw-r--r--doc/src/examples/appchooser.qdoc2
-rw-r--r--doc/src/examples/application.qdoc2
-rw-r--r--doc/src/examples/applicationicon.qdoc2
-rw-r--r--doc/src/examples/arrowpad.qdoc2
-rw-r--r--doc/src/examples/basicdrawing.qdoc2
-rw-r--r--doc/src/examples/basicgraphicslayouts.qdoc2
-rw-r--r--doc/src/examples/basiclayouts.qdoc2
-rw-r--r--doc/src/examples/basicsortfiltermodel.qdoc2
-rw-r--r--doc/src/examples/bearermonitor.qdoc2
-rw-r--r--doc/src/examples/blockingfortuneclient.qdoc2
-rw-r--r--doc/src/examples/blurpicker.qdoc2
-rw-r--r--doc/src/examples/books.qdoc2
-rw-r--r--doc/src/examples/borderlayout.qdoc2
-rw-r--r--doc/src/examples/boxes.qdoc2
-rw-r--r--doc/src/examples/broadcastreceiver.qdoc2
-rw-r--r--doc/src/examples/broadcastsender.qdoc2
-rw-r--r--doc/src/examples/cachedtable.qdoc2
-rw-r--r--doc/src/examples/calculator.qdoc2
-rw-r--r--doc/src/examples/calendar.qdoc2
-rw-r--r--doc/src/examples/calendarwidget.qdoc2
-rw-r--r--doc/src/examples/charactermap.qdoc2
-rw-r--r--doc/src/examples/chart.qdoc2
-rw-r--r--doc/src/examples/chip.qdoc2
-rw-r--r--doc/src/examples/classwizard.qdoc2
-rw-r--r--doc/src/examples/codecs.qdoc2
-rw-r--r--doc/src/examples/codeeditor.qdoc2
-rw-r--r--doc/src/examples/coloreditorfactory.qdoc2
-rw-r--r--doc/src/examples/combowidgetmapper.qdoc2
-rw-r--r--doc/src/examples/completer.qdoc2
-rw-r--r--doc/src/examples/complexpingpong.qdoc2
-rw-r--r--doc/src/examples/composition.qdoc2
-rw-r--r--doc/src/examples/concentriccircles.qdoc2
-rw-r--r--doc/src/examples/configdialog.qdoc2
-rw-r--r--doc/src/examples/contiguouscache.qdoc2
-rw-r--r--doc/src/examples/cube.qdoc2
-rw-r--r--doc/src/examples/customcompleter.qdoc2
-rw-r--r--doc/src/examples/customsortfiltermodel.qdoc2
-rw-r--r--doc/src/examples/customtype.qdoc2
-rw-r--r--doc/src/examples/customtypesending.qdoc2
-rw-r--r--doc/src/examples/dbscreen.qdoc2
-rw-r--r--doc/src/examples/dbus-chat.qdoc2
-rw-r--r--doc/src/examples/deform.qdoc2
-rw-r--r--doc/src/examples/diagramscene.qdoc2
-rw-r--r--doc/src/examples/digiflip.qdoc2
-rw-r--r--doc/src/examples/digitalclock.qdoc2
-rw-r--r--doc/src/examples/dirview.qdoc2
-rw-r--r--doc/src/examples/dockwidgets.qdoc2
-rw-r--r--doc/src/examples/dombookmarks.qdoc2
-rw-r--r--doc/src/examples/dragdroprobot.qdoc2
-rw-r--r--doc/src/examples/draggableicons.qdoc2
-rw-r--r--doc/src/examples/draggabletext.qdoc2
-rw-r--r--doc/src/examples/drilldown.qdoc2
-rw-r--r--doc/src/examples/dropsite.qdoc2
-rw-r--r--doc/src/examples/dynamiclayouts.qdoc2
-rw-r--r--doc/src/examples/easing.qdoc2
-rw-r--r--doc/src/examples/echoplugin.qdoc2
-rw-r--r--doc/src/examples/editabletreemodel.qdoc2
-rw-r--r--doc/src/examples/elasticnodes.qdoc2
-rw-r--r--doc/src/examples/elidedlabel.qdoc2
-rw-r--r--doc/src/examples/embeddeddialogs.qdoc2
-rw-r--r--doc/src/examples/eventtransitions.qdoc2
-rw-r--r--doc/src/examples/extension.qdoc2
-rw-r--r--doc/src/examples/factorial.qdoc2
-rw-r--r--doc/src/examples/fademessage.qdoc2
-rw-r--r--doc/src/examples/fetchmore.qdoc2
-rw-r--r--doc/src/examples/findfiles.qdoc2
-rw-r--r--doc/src/examples/fingerpaint.qdoc2
-rw-r--r--doc/src/examples/flickable.qdoc2
-rw-r--r--doc/src/examples/flightinfo.qdoc2
-rw-r--r--doc/src/examples/flowlayout.qdoc2
-rw-r--r--doc/src/examples/fontsampler.qdoc2
-rw-r--r--doc/src/examples/fortuneclient.qdoc2
-rw-r--r--doc/src/examples/fortuneserver.qdoc2
-rw-r--r--doc/src/examples/framebufferobject2.qdoc2
-rw-r--r--doc/src/examples/fridgemagnets.qdoc2
-rw-r--r--doc/src/examples/frozencolumn.qdoc2
-rw-r--r--doc/src/examples/googlesuggest.qdoc2
-rw-r--r--doc/src/examples/grabber.qdoc2
-rw-r--r--doc/src/examples/gradients.qdoc2
-rw-r--r--doc/src/examples/groupbox.qdoc2
-rw-r--r--doc/src/examples/hellogl.qdoc2
-rw-r--r--doc/src/examples/hellogl_es.qdoc2
-rw-r--r--doc/src/examples/hellotr.qdoc2
-rw-r--r--doc/src/examples/htmlinfo.qdoc2
-rw-r--r--doc/src/examples/http.qdoc2
-rw-r--r--doc/src/examples/i18n.qdoc2
-rw-r--r--doc/src/examples/icons.qdoc2
-rw-r--r--doc/src/examples/imagecomposition.qdoc2
-rw-r--r--doc/src/examples/imagegestures.qdoc2
-rw-r--r--doc/src/examples/imageviewer.qdoc2
-rw-r--r--doc/src/examples/inputpanel.qdoc2
-rw-r--r--doc/src/examples/interview.qdoc2
-rw-r--r--doc/src/examples/licensewizard.qdoc2
-rw-r--r--doc/src/examples/lighting.qdoc2
-rw-r--r--doc/src/examples/lightmaps.qdoc2
-rw-r--r--doc/src/examples/lineedits.qdoc2
-rw-r--r--doc/src/examples/localfortuneclient.qdoc2
-rw-r--r--doc/src/examples/localfortuneserver.qdoc2
-rw-r--r--doc/src/examples/loopback.qdoc2
-rw-r--r--doc/src/examples/macmainwindow.qdoc2
-rw-r--r--doc/src/examples/maemovibration.qdoc2
-rw-r--r--doc/src/examples/mainwindow.qdoc2
-rw-r--r--doc/src/examples/mandelbrot.qdoc2
-rw-r--r--doc/src/examples/masterdetail.qdoc2
-rw-r--r--doc/src/examples/mdi.qdoc2
-rw-r--r--doc/src/examples/menus.qdoc2
-rw-r--r--doc/src/examples/mousecalibration.qdoc2
-rw-r--r--doc/src/examples/moveblocks.qdoc2
-rw-r--r--doc/src/examples/movie.qdoc2
-rw-r--r--doc/src/examples/multicastreceiver.qdoc2
-rw-r--r--doc/src/examples/multicastsender.qdoc2
-rw-r--r--doc/src/examples/multipleinheritance.qdoc2
-rw-r--r--doc/src/examples/network-chat.qdoc2
-rw-r--r--doc/src/examples/orderform.qdoc2
-rw-r--r--doc/src/examples/orientation.qdoc2
-rw-r--r--doc/src/examples/overpainting.qdoc2
-rw-r--r--doc/src/examples/padnavigator.qdoc2
-rw-r--r--doc/src/examples/painterpaths.qdoc2
-rw-r--r--doc/src/examples/pathstroke.qdoc2
-rw-r--r--doc/src/examples/pbuffers.qdoc2
-rw-r--r--doc/src/examples/pbuffers2.qdoc2
-rw-r--r--doc/src/examples/pinchzoom.qdoc2
-rw-r--r--doc/src/examples/pingpong.qdoc2
-rw-r--r--doc/src/examples/pixelator.qdoc2
-rw-r--r--doc/src/examples/plugandpaint.qdoc2
-rw-r--r--doc/src/examples/querymodel.qdoc2
-rw-r--r--doc/src/examples/queuedcustomtype.qdoc2
-rw-r--r--doc/src/examples/raycasting.qdoc2
-rw-r--r--doc/src/examples/recentfiles.qdoc2
-rw-r--r--doc/src/examples/regexp.qdoc2
-rw-r--r--doc/src/examples/relationaltablemodel.qdoc2
-rw-r--r--doc/src/examples/rogue.qdoc2
-rw-r--r--doc/src/examples/rsslisting.qdoc2
-rw-r--r--doc/src/examples/samplebuffers.qdoc2
-rw-r--r--doc/src/examples/saxbookmarks.qdoc2
-rw-r--r--doc/src/examples/screenshot.qdoc2
-rw-r--r--doc/src/examples/scribble.qdoc2
-rw-r--r--doc/src/examples/sdi.qdoc2
-rw-r--r--doc/src/examples/securesocketclient.qdoc2
-rw-r--r--doc/src/examples/semaphores.qdoc2
-rw-r--r--doc/src/examples/settingseditor.qdoc2
-rw-r--r--doc/src/examples/shapedclock.qdoc2
-rw-r--r--doc/src/examples/sharedmemory.qdoc2
-rw-r--r--doc/src/examples/simpledecoration.qdoc2
-rw-r--r--doc/src/examples/simpledommodel.qdoc2
-rw-r--r--doc/src/examples/simpletreemodel.qdoc2
-rw-r--r--doc/src/examples/simplewidgetmapper.qdoc2
-rw-r--r--doc/src/examples/sipdialog.qdoc2
-rw-r--r--doc/src/examples/sliders.qdoc2
-rw-r--r--doc/src/examples/spinboxdelegate.qdoc2
-rw-r--r--doc/src/examples/spinboxes.qdoc2
-rw-r--r--doc/src/examples/spreadsheet.qdoc2
-rw-r--r--doc/src/examples/sqlbrowser.qdoc2
-rw-r--r--doc/src/examples/sqlwidgetmapper.qdoc2
-rw-r--r--doc/src/examples/standarddialogs.qdoc2
-rw-r--r--doc/src/examples/stardelegate.qdoc2
-rw-r--r--doc/src/examples/states.qdoc2
-rw-r--r--doc/src/examples/stickman.qdoc2
-rw-r--r--doc/src/examples/styleexample.qdoc2
-rw-r--r--doc/src/examples/styleplugin.qdoc2
-rw-r--r--doc/src/examples/styles.qdoc2
-rw-r--r--doc/src/examples/stylesheet.qdoc2
-rw-r--r--doc/src/examples/sub-attaq.qdoc2
-rw-r--r--doc/src/examples/svgalib.qdoc2
-rw-r--r--doc/src/examples/symbianvibration.qdoc2
-rw-r--r--doc/src/examples/syntaxhighlighter.qdoc2
-rw-r--r--doc/src/examples/tabdialog.qdoc2
-rw-r--r--doc/src/examples/tablemodel.qdoc2
-rw-r--r--doc/src/examples/tablet.qdoc2
-rw-r--r--doc/src/examples/tetrix.qdoc2
-rw-r--r--doc/src/examples/textedit.qdoc2
-rw-r--r--doc/src/examples/textfinder.qdoc2
-rw-r--r--doc/src/examples/textures.qdoc2
-rw-r--r--doc/src/examples/threadedfortuneserver.qdoc2
-rw-r--r--doc/src/examples/tooltips.qdoc2
-rw-r--r--doc/src/examples/torrent.qdoc2
-rw-r--r--doc/src/examples/trafficlight.qdoc2
-rw-r--r--doc/src/examples/transformations.qdoc2
-rw-r--r--doc/src/examples/treemodelcompleter.qdoc2
-rw-r--r--doc/src/examples/trivialwizard.qdoc2
-rw-r--r--doc/src/examples/trollprint.qdoc2
-rw-r--r--doc/src/examples/twowaybutton.qdoc2
-rw-r--r--doc/src/examples/undo.qdoc2
-rw-r--r--doc/src/examples/undoframework.qdoc2
-rw-r--r--doc/src/examples/waitconditions.qdoc2
-rw-r--r--doc/src/examples/wiggly.qdoc2
-rw-r--r--doc/src/examples/windowflags.qdoc2
-rw-r--r--doc/src/examples/xmlstreamlint.qdoc2
-rw-r--r--doc/src/gui/coordsys.qdoc2
-rw-r--r--doc/src/gui/paintsystem.qdoc2
-rw-r--r--doc/src/gui/qtgui.qdoc2
-rw-r--r--[-rwxr-xr-x]doc/src/images/clock.pngbin16514 -> 16514 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/dummy_tree.pngbin20189 -> 20189 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/example_model.pngbin16577 -> 16577 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/list_table_tree.pngbin85530 -> 85530 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/modelview-header.pngbin30302 -> 30302 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/modelview.pngbin2887 -> 2887 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/qcompleter.pngbin17017 -> 17017 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/readonlytable_role.pngbin27467 -> 27467 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/selection2.pngbin23784 -> 23784 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/standardwidget.pngbin1466 -> 1466 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/tree_2_with_algorithm.pngbin16921 -> 16921 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/treeview.pngbin17173 -> 17173 bytes
-rw-r--r--[-rwxr-xr-x]doc/src/images/widgetmapper.pngbin20145 -> 20145 bytes
-rw-r--r--doc/src/network/files-and-resources/datastreamformat.qdoc2
-rw-r--r--doc/src/network/files-and-resources/resources.qdoc2
-rw-r--r--doc/src/network/network-programming/bearermanagement.qdoc2
-rw-r--r--doc/src/network/network-programming/qtnetwork.qdoc65
-rw-r--r--doc/src/network/network-programming/ssl.qdoc2
-rw-r--r--doc/src/network/qtnetwork.qdoc2
-rw-r--r--doc/src/printsupport/printing.qdoc2
-rw-r--r--doc/src/printsupport/qtprintsupport.qdoc2
-rw-r--r--doc/src/snippets/brush/brush.cpp2
-rw-r--r--doc/src/snippets/brush/gradientcreationsnippet.cpp2
-rw-r--r--doc/src/snippets/buffer/buffer.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_containers.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_coordsys.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_examples_application.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_dropsite.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_examples_hellotr.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_simpledommodel.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_svgalib.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_examples_textfinder.pro2
-rw-r--r--doc/src/snippets/code/doc_src_examples_trollprint.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_groups.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_layout.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_objecttrees.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_properties.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qalgorithms.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qcache.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qiterator.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_qpair.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.pro2
-rw-r--r--doc/src/snippets/code/doc_src_qset.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qsignalspy.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qt4-mainwindow.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qt4-styles.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtcore.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtestevent.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtgui.pro2
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.pro2
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.pro2
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.pro2
-rw-r--r--doc/src/snippets/code/doc_src_qvarlengtharray.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_resources.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_resources.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_styles.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.qdoc2
-rw-r--r--doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp2
-rw-r--r--doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp2
-rw-r--r--doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp6
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_global_qglobal.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qdatastream.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qdir.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qdiriterator.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qfile.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qfileinfo.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qiodevice.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qprocess.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qsettings.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qtemporarydir.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qtextstream.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_io_qurl.cpp6
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qtimer.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qvariant.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_plugin_quuid.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qatomic.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qmutex.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qthread.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qbitarray.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qbytearray.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qdatetime.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qhash.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qlistdata.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qlocale.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qmap.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qpoint.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qqueue.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qrect.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qregexp.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qsize.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qstring.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qtimeline.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qvector.cpp2
-rw-r--r--doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_accessible_qaccessible.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qwizard.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qbitmap.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qicon.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qimage.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qimagereader.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qimagewriter.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qmovie.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qpixmap.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qpixmapcache.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qaction.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qapplication.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qclipboard.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qevent.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qformlayout.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qlayout.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qshortcut.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qsound.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qwidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qbrush.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qcolor.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qdrawutil.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qmatrix.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpainter.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpainterpath.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpen.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qregion.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qregion_unix.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qtransform.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_qproxystyle.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_styles_qstyle.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_styles_qstyleoption.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_text_qfont.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_text_qfontmetrics.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextcursor.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextdocument.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextlayout.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_util_qcompleter.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_util_qdesktopservices.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_util_qundostack.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qframe.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qlabel.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qlineedit.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qmenu.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qmenubar.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qrubberband.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qspinbox.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qsplitter.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qtextedit.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qvalidator.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qworkspace.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qftp.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qhttp.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qhttpmultipart.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qhttppart.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkreply.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkrequest.cpp2
-rw-r--r--doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp2
-rw-r--r--doc/src/snippets/code/src_network_kernel_qhostaddress.cpp2
-rw-r--r--doc/src/snippets/code/src_network_kernel_qhostinfo.cpp2
-rw-r--r--doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp2
-rw-r--r--doc/src/snippets/code/src_network_socket_qabstractsocket.cpp2
-rw-r--r--doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp2
-rw-r--r--doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp2
-rw-r--r--doc/src/snippets/code/src_network_socket_qtcpserver.cpp2
-rw-r--r--doc/src/snippets/code/src_network_socket_qudpsocket.cpp2
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp2
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp2
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslsocket.cpp4
-rw-r--r--doc/src/snippets/code/src_opengl_qgl.cpp2
-rw-r--r--doc/src/snippets/code/src_opengl_qglcolormap.cpp2
-rw-r--r--doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp2
-rw-r--r--doc/src/snippets/code/src_opengl_qglshaderprogram.cpp2
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp2
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusargument.cpp2
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbuscontext.cpp2
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusinterface.cpp2
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp2
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusreply.cpp2
-rw-r--r--doc/src/snippets/code/src_qtestlib_qtestcase.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp2
-rw-r--r--doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp2
-rw-r--r--doc/src/snippets/code/src_xml_dom_qdom.cpp2
-rw-r--r--doc/src/snippets/code/src_xml_sax_qxml.cpp2
-rw-r--r--doc/src/snippets/customstyle/customstyle.cpp2
-rw-r--r--doc/src/snippets/customstyle/customstyle.h2
-rw-r--r--doc/src/snippets/customviewstyle.cpp2
-rw-r--r--doc/src/snippets/dialogs/dialogs.cpp2
-rw-r--r--doc/src/snippets/dockwidgets/mainwindow.cpp2
-rw-r--r--doc/src/snippets/dragging/mainwindow.cpp2
-rw-r--r--doc/src/snippets/droparea.cpp2
-rw-r--r--doc/src/snippets/file/file.cpp2
-rw-r--r--doc/src/snippets/filedialogurls.cpp2
-rw-r--r--doc/src/snippets/fileinfo/main.cpp2
-rw-r--r--doc/src/snippets/graphicssceneadditemsnippet.cpp2
-rw-r--r--doc/src/snippets/image/image.cpp2
-rw-r--r--doc/src/snippets/image/supportedformat.cpp2
-rw-r--r--doc/src/snippets/javastyle.cpp2
-rw-r--r--doc/src/snippets/layouts/layouts.cpp2
-rw-r--r--doc/src/snippets/mainwindowsnippet.cpp2
-rw-r--r--doc/src/snippets/matrix/matrix.cpp2
-rw-r--r--doc/src/snippets/mdiareasnippets.cpp2
-rw-r--r--doc/src/snippets/myscrollarea.cpp2
-rw-r--r--doc/src/snippets/network/tcpwait.cpp2
-rw-r--r--doc/src/snippets/ntfsp.cpp2
-rw-r--r--doc/src/snippets/picture/picture.cpp2
-rw-r--r--doc/src/snippets/pointer/pointer.cpp2
-rw-r--r--doc/src/snippets/polygon/polygon.cpp2
-rw-r--r--doc/src/snippets/printing-qprinter/errors.cpp2
-rw-r--r--doc/src/snippets/printing-qprinter/object.cpp2
-rw-r--r--doc/src/snippets/process/process.cpp2
-rw-r--r--doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp2
-rw-r--r--doc/src/snippets/qdebug/qdebugsnippet.cpp2
-rw-r--r--doc/src/snippets/qdir-listfiles/main.cpp2
-rw-r--r--doc/src/snippets/qdir-namefilters/main.cpp2
-rw-r--r--doc/src/snippets/qelapsedtimer/main.cpp2
-rw-r--r--doc/src/snippets/qfontdatabase/main.cpp2
-rw-r--r--doc/src/snippets/qlistwidget-using/mainwindow.cpp2
-rw-r--r--doc/src/snippets/qmacnativewidget/main.mm2
-rw-r--r--doc/src/snippets/qmetaobject-invokable/main.cpp2
-rw-r--r--doc/src/snippets/qmetaobject-invokable/window.cpp2
-rw-r--r--doc/src/snippets/qmetaobject-invokable/window.h2
-rw-r--r--doc/src/snippets/qprocess-environment/main.cpp2
-rw-r--r--doc/src/snippets/qprocess/qprocess-simpleexecution.cpp2
-rw-r--r--doc/src/snippets/qsignalmapper/buttonwidget.cpp2
-rw-r--r--doc/src/snippets/qsignalmapper/buttonwidget.h2
-rw-r--r--doc/src/snippets/qsortfilterproxymodel-details/main.cpp2
-rw-r--r--doc/src/snippets/qsplashscreen/main.cpp2
-rw-r--r--doc/src/snippets/qstack/main.cpp2
-rw-r--r--doc/src/snippets/qstackedlayout/main.cpp2
-rw-r--r--doc/src/snippets/qstackedwidget/main.cpp2
-rw-r--r--doc/src/snippets/qstatustipevent/main.cpp2
-rw-r--r--doc/src/snippets/qstring/main.cpp2
-rw-r--r--doc/src/snippets/qstring/stringbuilder.cpp2
-rw-r--r--doc/src/snippets/qstringlist/main.cpp2
-rw-r--r--doc/src/snippets/qstringlistmodel/main.cpp2
-rw-r--r--doc/src/snippets/qstyleoption/main.cpp2
-rw-r--r--doc/src/snippets/qstyleplugin/main.cpp2
-rw-r--r--doc/src/snippets/qtablewidget-resizing/mainwindow.cpp2
-rw-r--r--doc/src/snippets/qtablewidget-using/mainwindow.cpp2
-rw-r--r--doc/src/snippets/qtcast/qtcast.cpp2
-rw-r--r--doc/src/snippets/qtreewidget-using/mainwindow.cpp2
-rw-r--r--doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp2
-rw-r--r--doc/src/snippets/quiloader/main.cpp2
-rw-r--r--doc/src/snippets/quiloader/mywidget.cpp2
-rw-r--r--doc/src/snippets/qx11embedcontainer/main.cpp2
-rw-r--r--doc/src/snippets/qx11embedwidget/main.cpp2
-rw-r--r--doc/src/snippets/qxmlstreamwriter/main.cpp2
-rw-r--r--doc/src/snippets/separations/finalwidget.cpp2
-rw-r--r--doc/src/snippets/settings/settings.cpp2
-rw-r--r--doc/src/snippets/shareddirmodel/main.cpp2
-rw-r--r--doc/src/snippets/sharedemployee/employee.h2
-rw-r--r--doc/src/snippets/sharedemployee/main.cpp2
-rw-r--r--doc/src/snippets/signalmapper/filereader.cpp2
-rw-r--r--doc/src/snippets/signalsandslots/lcdnumber.h2
-rw-r--r--doc/src/snippets/signalsandslots/signalsandslots.cpp2
-rw-r--r--doc/src/snippets/signalsandslots/signalsandslots.h2
-rw-r--r--doc/src/snippets/splitter/splitter.cpp2
-rw-r--r--doc/src/snippets/splitterhandle/splitter.cpp2
-rw-r--r--doc/src/snippets/splitterhandle/splitter.h2
-rw-r--r--doc/src/snippets/sqldatabase/sqldatabase.cpp2
-rw-r--r--doc/src/snippets/streaming/main.cpp2
-rw-r--r--doc/src/snippets/styles/styles.cpp2
-rw-r--r--doc/src/snippets/stylesheet/common-mistakes.cpp2
-rw-r--r--doc/src/snippets/textblock-fragments/xmlwriter.cpp2
-rw-r--r--doc/src/snippets/textdocument-css/main.cpp2
-rw-r--r--doc/src/snippets/textdocument-imagedrop/textedit.cpp2
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/main.cpp2
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp2
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/mainwindow.h2
-rw-r--r--doc/src/snippets/textdocument-lists/mainwindow.cpp2
-rw-r--r--doc/src/snippets/textdocument-resources/main.cpp2
-rw-r--r--doc/src/snippets/textdocument-tables/mainwindow.cpp2
-rw-r--r--doc/src/snippets/textdocument-texttable/main.cpp2
-rw-r--r--doc/src/snippets/textdocumentendsnippet.cpp2
-rw-r--r--doc/src/snippets/threads/threads.cpp2
-rw-r--r--doc/src/snippets/threads/threads.h2
-rw-r--r--doc/src/snippets/timeline/main.cpp2
-rw-r--r--doc/src/snippets/timers/timers.cpp2
-rw-r--r--doc/src/snippets/transform/main.cpp2
-rw-r--r--doc/src/snippets/whatsthis/whatsthis.cpp2
-rw-r--r--doc/src/snippets/widget-mask/main.cpp2
-rw-r--r--doc/src/snippets/widgetdelegate.cpp2
-rw-r--r--doc/src/snippets/widgetprinting.cpp2
-rw-r--r--doc/src/snippets/widgets-tutorial/template.cpp2
-rw-r--r--doc/src/snippets/xml/rsslisting/handler.cpp2
-rw-r--r--doc/src/snippets/xml/rsslisting/rsslisting.cpp2
-rw-r--r--doc/src/snippets/xml/simpleparse/main.cpp2
-rw-r--r--doc/src/sql/qtsql.qdoc2
-rw-r--r--doc/src/sql/sql-programming/qsqldatatype-table.qdoc2
-rw-r--r--doc/src/sql/sql-programming/sql-driver.qdoc2
-rw-r--r--doc/src/sql/sql-programming/sql-programming.qdoc2
-rw-r--r--doc/src/widgets/addressbook-fr.qdoc2
-rw-r--r--doc/src/widgets/addressbook.qdoc2
-rw-r--r--doc/src/widgets/modelview.qdoc2
-rw-r--r--doc/src/widgets/qtwidgets.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/focus.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/gallery.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/layout.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/styles.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/stylesheet.qdoc2
-rw-r--r--doc/src/widgets/widgets-and-layouts/widgets.qdoc2
-rw-r--r--doc/src/widgets/widgets-tutorial.qdoc2
-rw-r--r--doc/src/widgets/windows-and-dialogs/dialogs.qdoc2
-rw-r--r--doc/src/widgets/windows-and-dialogs/mainwindow.qdoc2
-rw-r--r--doc/src/xml/qtxml.qdoc2
-rw-r--r--examples/animation/animatedtiles/main.cpp2
-rw-r--r--examples/animation/appchooser/main.cpp2
-rw-r--r--examples/animation/easing/animation.h2
-rw-r--r--examples/animation/easing/main.cpp2
-rw-r--r--examples/animation/easing/window.cpp2
-rw-r--r--examples/animation/easing/window.h2
-rw-r--r--examples/animation/moveblocks/main.cpp2
-rw-r--r--examples/animation/states/main.cpp2
-rw-r--r--examples/animation/stickman/animation.cpp2
-rw-r--r--examples/animation/stickman/animation.h2
-rw-r--r--examples/animation/stickman/graphicsview.cpp2
-rw-r--r--examples/animation/stickman/graphicsview.h2
-rw-r--r--examples/animation/stickman/lifecycle.cpp2
-rw-r--r--examples/animation/stickman/lifecycle.h2
-rw-r--r--examples/animation/stickman/main.cpp2
-rw-r--r--examples/animation/stickman/node.cpp2
-rw-r--r--examples/animation/stickman/node.h2
-rw-r--r--examples/animation/stickman/rectbutton.cpp2
-rw-r--r--examples/animation/stickman/rectbutton.h2
-rw-r--r--examples/animation/stickman/stickman.cpp2
-rw-r--r--examples/animation/stickman/stickman.h2
-rw-r--r--examples/animation/sub-attaq/animationmanager.cpp2
-rw-r--r--examples/animation/sub-attaq/animationmanager.h2
-rw-r--r--examples/animation/sub-attaq/boat.cpp2
-rw-r--r--examples/animation/sub-attaq/boat.h2
-rw-r--r--examples/animation/sub-attaq/boat_p.h2
-rw-r--r--examples/animation/sub-attaq/bomb.cpp2
-rw-r--r--examples/animation/sub-attaq/bomb.h2
-rw-r--r--examples/animation/sub-attaq/graphicsscene.cpp2
-rw-r--r--examples/animation/sub-attaq/graphicsscene.h2
-rw-r--r--examples/animation/sub-attaq/main.cpp2
-rw-r--r--examples/animation/sub-attaq/mainwindow.cpp2
-rw-r--r--examples/animation/sub-attaq/mainwindow.h2
-rw-r--r--examples/animation/sub-attaq/pixmapitem.cpp2
-rw-r--r--examples/animation/sub-attaq/pixmapitem.h2
-rw-r--r--examples/animation/sub-attaq/progressitem.cpp2
-rw-r--r--examples/animation/sub-attaq/progressitem.h2
-rw-r--r--examples/animation/sub-attaq/qanimationstate.cpp2
-rw-r--r--examples/animation/sub-attaq/qanimationstate.h2
-rw-r--r--examples/animation/sub-attaq/states.cpp2
-rw-r--r--examples/animation/sub-attaq/states.h2
-rw-r--r--examples/animation/sub-attaq/submarine.cpp2
-rw-r--r--examples/animation/sub-attaq/submarine.h2
-rw-r--r--examples/animation/sub-attaq/submarine_p.h2
-rw-r--r--examples/animation/sub-attaq/textinformationitem.cpp2
-rw-r--r--examples/animation/sub-attaq/textinformationitem.h2
-rw-r--r--examples/animation/sub-attaq/torpedo.cpp2
-rw-r--r--examples/animation/sub-attaq/torpedo.h2
-rw-r--r--examples/dbus/complexpingpong/complexping.cpp2
-rw-r--r--examples/dbus/complexpingpong/complexping.h2
-rw-r--r--examples/dbus/complexpingpong/complexpong.cpp2
-rw-r--r--examples/dbus/complexpingpong/complexpong.h2
-rw-r--r--examples/dbus/complexpingpong/ping-common.h2
-rw-r--r--examples/dbus/dbus-chat/chat.cpp2
-rw-r--r--examples/dbus/dbus-chat/chat.h2
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.cpp4
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.h4
-rw-r--r--examples/dbus/dbus-chat/chat_interface.cpp4
-rw-r--r--examples/dbus/dbus-chat/chat_interface.h4
-rw-r--r--examples/dbus/listnames/listnames.cpp2
-rw-r--r--examples/dbus/pingpong/ping-common.h2
-rw-r--r--examples/dbus/pingpong/ping.cpp2
-rw-r--r--examples/dbus/pingpong/pong.cpp2
-rw-r--r--examples/dbus/pingpong/pong.h2
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.cpp2
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.h2
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor.cpp4
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor.h4
-rw-r--r--examples/dbus/remotecontrolledcar/car/main.cpp2
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface.cpp4
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface.h4
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.cpp2
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.h2
-rw-r--r--examples/dbus/remotecontrolledcar/controller/main.cpp2
-rw-r--r--examples/desktop/screenshot/main.cpp2
-rw-r--r--examples/desktop/screenshot/screenshot.cpp2
-rw-r--r--examples/desktop/screenshot/screenshot.h2
-rw-r--r--examples/dialogs/classwizard/classwizard.cpp2
-rw-r--r--examples/dialogs/classwizard/classwizard.h2
-rw-r--r--examples/dialogs/classwizard/main.cpp2
-rw-r--r--examples/dialogs/configdialog/configdialog.cpp2
-rw-r--r--examples/dialogs/configdialog/configdialog.h2
-rw-r--r--examples/dialogs/configdialog/main.cpp2
-rw-r--r--examples/dialogs/configdialog/pages.cpp2
-rw-r--r--examples/dialogs/configdialog/pages.h2
-rw-r--r--examples/dialogs/extension/finddialog.cpp2
-rw-r--r--examples/dialogs/extension/finddialog.h2
-rw-r--r--examples/dialogs/extension/main.cpp2
-rw-r--r--examples/dialogs/findfiles/main.cpp2
-rw-r--r--examples/dialogs/findfiles/window.cpp2
-rw-r--r--examples/dialogs/findfiles/window.h2
-rw-r--r--examples/dialogs/licensewizard/licensewizard.cpp2
-rw-r--r--examples/dialogs/licensewizard/licensewizard.h2
-rw-r--r--examples/dialogs/licensewizard/main.cpp2
-rw-r--r--examples/dialogs/sipdialog/dialog.cpp2
-rw-r--r--examples/dialogs/sipdialog/dialog.h2
-rw-r--r--examples/dialogs/sipdialog/main.cpp2
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp2
-rw-r--r--examples/dialogs/standarddialogs/dialog.h2
-rw-r--r--examples/dialogs/standarddialogs/main.cpp2
-rw-r--r--examples/dialogs/tabdialog/main.cpp2
-rw-r--r--examples/dialogs/tabdialog/tabdialog.cpp2
-rw-r--r--examples/dialogs/tabdialog/tabdialog.h2
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.cpp2
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.cpp2
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.h2
-rw-r--r--examples/draganddrop/draggableicons/main.cpp2
-rw-r--r--examples/draganddrop/draggabletext/draglabel.cpp2
-rw-r--r--examples/draganddrop/draggabletext/draglabel.h2
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp2
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.h2
-rw-r--r--examples/draganddrop/draggabletext/main.cpp2
-rw-r--r--examples/draganddrop/dropsite/droparea.cpp2
-rw-r--r--examples/draganddrop/dropsite/droparea.h2
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.cpp2
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.h2
-rw-r--r--examples/draganddrop/dropsite/main.cpp2
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.cpp2
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.h2
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.cpp2
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.h2
-rw-r--r--examples/draganddrop/fridgemagnets/main.cpp2
-rw-r--r--examples/draganddrop/puzzle/main.cpp2
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp2
-rw-r--r--examples/draganddrop/puzzle/mainwindow.h2
-rw-r--r--examples/draganddrop/puzzle/pieceslist.cpp2
-rw-r--r--examples/draganddrop/puzzle/pieceslist.h2
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.cpp2
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.h2
-rw-r--r--examples/effects/blurpicker/blureffect.cpp2
-rw-r--r--examples/effects/blurpicker/blureffect.h2
-rw-r--r--examples/effects/blurpicker/blurpicker.cpp2
-rw-r--r--examples/effects/blurpicker/blurpicker.h2
-rw-r--r--examples/effects/blurpicker/main.cpp2
-rw-r--r--examples/effects/fademessage/fademessage.cpp2
-rw-r--r--examples/effects/fademessage/fademessage.h2
-rw-r--r--examples/effects/fademessage/main.cpp2
-rw-r--r--examples/effects/lighting/lighting.cpp2
-rw-r--r--examples/effects/lighting/lighting.h2
-rw-r--r--examples/effects/lighting/main.cpp2
-rw-r--r--examples/embedded/digiflip/digiflip.cpp2
-rw-r--r--examples/embedded/flickable/flickable.cpp2
-rw-r--r--examples/embedded/flickable/flickable.h2
-rw-r--r--examples/embedded/flickable/main.cpp2
-rw-r--r--examples/embedded/flightinfo/flightinfo.cpp2
-rw-r--r--examples/embedded/lightmaps/lightmaps.cpp2
-rw-r--r--examples/embedded/lightmaps/lightmaps.h2
-rw-r--r--examples/embedded/lightmaps/main.cpp2
-rw-r--r--examples/embedded/lightmaps/mapzoom.cpp2
-rw-r--r--examples/embedded/lightmaps/mapzoom.h2
-rw-r--r--examples/embedded/lightmaps/slippymap.cpp2
-rw-r--r--examples/embedded/lightmaps/slippymap.h2
-rw-r--r--examples/embedded/raycasting/raycasting.cpp2
-rw-r--r--[-rwxr-xr-x]examples/embedded/styleexample/files/add.pngbin1474 -> 1474 bytes
-rw-r--r--[-rwxr-xr-x]examples/embedded/styleexample/files/remove.pngbin865 -> 865 bytes
-rw-r--r--examples/embedded/styleexample/main.cpp2
-rw-r--r--examples/embedded/styleexample/stylewidget.cpp2
-rw-r--r--examples/embedded/styleexample/stylewidget.h2
-rw-r--r--examples/gestures/imagegestures/imagewidget.cpp2
-rw-r--r--examples/gestures/imagegestures/imagewidget.h2
-rw-r--r--examples/gestures/imagegestures/main.cpp2
-rw-r--r--examples/gestures/imagegestures/mainwidget.cpp2
-rw-r--r--examples/gestures/imagegestures/mainwidget.h2
-rw-r--r--examples/graphicsview/anchorlayout/main.cpp2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.cpp2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.h2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/main.cpp2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.cpp2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.h2
-rw-r--r--examples/graphicsview/boxes/basic.fsh2
-rw-r--r--examples/graphicsview/boxes/basic.vsh2
-rw-r--r--examples/graphicsview/boxes/dotted.fsh2
-rw-r--r--examples/graphicsview/boxes/fresnel.fsh2
-rw-r--r--examples/graphicsview/boxes/glass.fsh2
-rw-r--r--examples/graphicsview/boxes/glbuffers.cpp2
-rw-r--r--examples/graphicsview/boxes/glbuffers.h2
-rw-r--r--examples/graphicsview/boxes/glextensions.cpp2
-rw-r--r--examples/graphicsview/boxes/glextensions.h2
-rw-r--r--examples/graphicsview/boxes/gltrianglemesh.h2
-rw-r--r--examples/graphicsview/boxes/granite.fsh2
-rw-r--r--examples/graphicsview/boxes/main.cpp2
-rw-r--r--examples/graphicsview/boxes/marble.fsh2
-rw-r--r--examples/graphicsview/boxes/qtbox.cpp2
-rw-r--r--examples/graphicsview/boxes/qtbox.h2
-rw-r--r--examples/graphicsview/boxes/reflection.fsh2
-rw-r--r--examples/graphicsview/boxes/refraction.fsh2
-rw-r--r--examples/graphicsview/boxes/roundedbox.cpp2
-rw-r--r--examples/graphicsview/boxes/roundedbox.h2
-rw-r--r--examples/graphicsview/boxes/scene.cpp2
-rw-r--r--examples/graphicsview/boxes/scene.h2
-rw-r--r--examples/graphicsview/boxes/trackball.cpp2
-rw-r--r--examples/graphicsview/boxes/trackball.h2
-rw-r--r--examples/graphicsview/boxes/wood.fsh2
-rw-r--r--examples/graphicsview/chip/chip.cpp2
-rw-r--r--examples/graphicsview/chip/chip.h2
-rw-r--r--examples/graphicsview/chip/main.cpp2
-rw-r--r--examples/graphicsview/chip/mainwindow.cpp2
-rw-r--r--examples/graphicsview/chip/mainwindow.h2
-rw-r--r--examples/graphicsview/chip/view.cpp2
-rw-r--r--examples/graphicsview/chip/view.h2
-rw-r--r--examples/graphicsview/collidingmice/main.cpp2
-rw-r--r--examples/graphicsview/collidingmice/mouse.cpp2
-rw-r--r--examples/graphicsview/collidingmice/mouse.h2
-rw-r--r--examples/graphicsview/diagramscene/arrow.cpp2
-rw-r--r--examples/graphicsview/diagramscene/arrow.h2
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.cpp2
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.h2
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.cpp2
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.h2
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.cpp2
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.h2
-rw-r--r--examples/graphicsview/diagramscene/main.cpp2
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp2
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.h2
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.cpp2
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.h2
-rw-r--r--examples/graphicsview/dragdroprobot/main.cpp2
-rw-r--r--examples/graphicsview/dragdroprobot/robot.cpp2
-rw-r--r--examples/graphicsview/dragdroprobot/robot.h2
-rw-r--r--examples/graphicsview/elasticnodes/edge.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/edge.h2
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.h2
-rw-r--r--examples/graphicsview/elasticnodes/main.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/node.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/node.h2
-rw-r--r--examples/graphicsview/embeddeddialogs/customproxy.cpp2
-rw-r--r--examples/graphicsview/embeddeddialogs/customproxy.h2
-rw-r--r--examples/graphicsview/embeddeddialogs/embeddeddialog.cpp2
-rw-r--r--examples/graphicsview/embeddeddialogs/embeddeddialog.h2
-rw-r--r--examples/graphicsview/embeddeddialogs/main.cpp2
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.cpp2
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.h2
-rw-r--r--examples/graphicsview/flowlayout/main.cpp2
-rw-r--r--examples/graphicsview/flowlayout/window.cpp2
-rw-r--r--examples/graphicsview/flowlayout/window.h2
-rw-r--r--examples/graphicsview/padnavigator/flippablepad.cpp2
-rw-r--r--examples/graphicsview/padnavigator/flippablepad.h2
-rw-r--r--examples/graphicsview/padnavigator/main.cpp2
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.cpp2
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.h2
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.cpp2
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.h2
-rw-r--r--examples/graphicsview/padnavigator/splashitem.cpp2
-rw-r--r--examples/graphicsview/padnavigator/splashitem.h2
-rw-r--r--examples/graphicsview/simpleanchorlayout/main.cpp2
-rw-r--r--examples/graphicsview/weatheranchorlayout/main.cpp2
-rw-r--r--examples/ipc/localfortuneclient/client.cpp2
-rw-r--r--examples/ipc/localfortuneclient/client.h2
-rw-r--r--examples/ipc/localfortuneclient/main.cpp2
-rw-r--r--examples/ipc/localfortuneserver/main.cpp2
-rw-r--r--examples/ipc/localfortuneserver/server.cpp2
-rw-r--r--examples/ipc/localfortuneserver/server.h2
-rw-r--r--examples/ipc/sharedmemory/dialog.cpp2
-rw-r--r--examples/ipc/sharedmemory/dialog.h2
-rw-r--r--examples/ipc/sharedmemory/main.cpp2
-rw-r--r--examples/itemviews/addressbook/adddialog.cpp2
-rw-r--r--examples/itemviews/addressbook/adddialog.h2
-rw-r--r--examples/itemviews/addressbook/addresswidget.cpp5
-rw-r--r--examples/itemviews/addressbook/addresswidget.h2
-rw-r--r--examples/itemviews/addressbook/main.cpp2
-rw-r--r--examples/itemviews/addressbook/mainwindow.cpp2
-rw-r--r--examples/itemviews/addressbook/mainwindow.h2
-rw-r--r--examples/itemviews/addressbook/newaddresstab.cpp2
-rw-r--r--examples/itemviews/addressbook/newaddresstab.h2
-rw-r--r--examples/itemviews/addressbook/tablemodel.cpp2
-rw-r--r--examples/itemviews/addressbook/tablemodel.h2
-rw-r--r--examples/itemviews/basicsortfiltermodel/main.cpp2
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.cpp3
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.h2
-rw-r--r--examples/itemviews/chart/main.cpp2
-rw-r--r--examples/itemviews/chart/mainwindow.cpp2
-rw-r--r--examples/itemviews/chart/mainwindow.h2
-rw-r--r--examples/itemviews/chart/pieview.cpp2
-rw-r--r--examples/itemviews/chart/pieview.h2
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.cpp2
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.h2
-rw-r--r--examples/itemviews/coloreditorfactory/main.cpp2
-rw-r--r--examples/itemviews/coloreditorfactory/window.cpp2
-rw-r--r--examples/itemviews/coloreditorfactory/window.h2
-rw-r--r--examples/itemviews/combowidgetmapper/main.cpp2
-rw-r--r--examples/itemviews/combowidgetmapper/window.cpp2
-rw-r--r--examples/itemviews/combowidgetmapper/window.h2
-rw-r--r--examples/itemviews/customsortfiltermodel/main.cpp2
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp2
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h2
-rw-r--r--examples/itemviews/customsortfiltermodel/window.cpp3
-rw-r--r--examples/itemviews/customsortfiltermodel/window.h2
-rw-r--r--examples/itemviews/dirview/main.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/main.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.h2
-rw-r--r--examples/itemviews/editabletreemodel/treeitem.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/treeitem.h2
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.h2
-rw-r--r--examples/itemviews/fetchmore/filelistmodel.cpp2
-rw-r--r--examples/itemviews/fetchmore/filelistmodel.h2
-rw-r--r--examples/itemviews/fetchmore/main.cpp2
-rw-r--r--examples/itemviews/fetchmore/window.cpp2
-rw-r--r--examples/itemviews/fetchmore/window.h2
-rw-r--r--examples/itemviews/frozencolumn/freezetablewidget.cpp2
-rw-r--r--examples/itemviews/frozencolumn/freezetablewidget.h2
-rw-r--r--examples/itemviews/frozencolumn/main.cpp2
-rw-r--r--examples/itemviews/interview/main.cpp2
-rw-r--r--examples/itemviews/interview/model.cpp2
-rw-r--r--examples/itemviews/interview/model.h2
-rw-r--r--examples/itemviews/pixelator/imagemodel.cpp2
-rw-r--r--examples/itemviews/pixelator/imagemodel.h2
-rw-r--r--examples/itemviews/pixelator/main.cpp2
-rw-r--r--examples/itemviews/pixelator/mainwindow.cpp2
-rw-r--r--examples/itemviews/pixelator/mainwindow.h2
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.cpp2
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.h2
-rw-r--r--examples/itemviews/puzzle/main.cpp2
-rw-r--r--examples/itemviews/puzzle/mainwindow.cpp2
-rw-r--r--examples/itemviews/puzzle/mainwindow.h2
-rw-r--r--examples/itemviews/puzzle/piecesmodel.cpp2
-rw-r--r--examples/itemviews/puzzle/piecesmodel.h2
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.cpp2
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.h2
-rw-r--r--examples/itemviews/simpledommodel/domitem.cpp2
-rw-r--r--examples/itemviews/simpledommodel/domitem.h2
-rw-r--r--examples/itemviews/simpledommodel/dommodel.cpp2
-rw-r--r--examples/itemviews/simpledommodel/dommodel.h2
-rw-r--r--examples/itemviews/simpledommodel/main.cpp2
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.cpp2
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.h2
-rw-r--r--examples/itemviews/simpletreemodel/main.cpp2
-rw-r--r--examples/itemviews/simpletreemodel/treeitem.cpp2
-rw-r--r--examples/itemviews/simpletreemodel/treeitem.h2
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.cpp2
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.h2
-rw-r--r--examples/itemviews/simplewidgetmapper/main.cpp2
-rw-r--r--examples/itemviews/simplewidgetmapper/window.cpp2
-rw-r--r--examples/itemviews/simplewidgetmapper/window.h2
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.cpp2
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.h2
-rw-r--r--examples/itemviews/spinboxdelegate/main.cpp2
-rw-r--r--examples/itemviews/spreadsheet/main.cpp2
-rw-r--r--examples/itemviews/spreadsheet/printview.cpp2
-rw-r--r--examples/itemviews/spreadsheet/printview.h2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheet.cpp2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheet.h2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheetdelegate.cpp2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheetdelegate.h2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheetitem.cpp2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheetitem.h2
-rw-r--r--examples/itemviews/stardelegate/main.cpp2
-rw-r--r--examples/itemviews/stardelegate/stardelegate.cpp2
-rw-r--r--examples/itemviews/stardelegate/stardelegate.h2
-rw-r--r--examples/itemviews/stardelegate/stareditor.cpp2
-rw-r--r--examples/itemviews/stardelegate/stareditor.h2
-rw-r--r--examples/itemviews/stardelegate/starrating.cpp2
-rw-r--r--examples/itemviews/stardelegate/starrating.h2
-rw-r--r--examples/ja_JP/linguist/hellotr/main.cpp2
-rw-r--r--examples/layouts/basiclayouts/dialog.cpp2
-rw-r--r--examples/layouts/basiclayouts/dialog.h2
-rw-r--r--examples/layouts/basiclayouts/main.cpp2
-rw-r--r--examples/layouts/borderlayout/borderlayout.cpp2
-rw-r--r--examples/layouts/borderlayout/borderlayout.h2
-rw-r--r--examples/layouts/borderlayout/main.cpp2
-rw-r--r--examples/layouts/borderlayout/window.cpp2
-rw-r--r--examples/layouts/borderlayout/window.h2
-rw-r--r--examples/layouts/dynamiclayouts/dialog.cpp2
-rw-r--r--examples/layouts/dynamiclayouts/dialog.h2
-rw-r--r--examples/layouts/dynamiclayouts/main.cpp2
-rw-r--r--examples/layouts/flowlayout/flowlayout.cpp2
-rw-r--r--examples/layouts/flowlayout/flowlayout.h2
-rw-r--r--examples/layouts/flowlayout/main.cpp2
-rw-r--r--examples/layouts/flowlayout/window.cpp2
-rw-r--r--examples/layouts/flowlayout/window.h2
-rw-r--r--examples/linguist/arrowpad/arrowpad.cpp2
-rw-r--r--examples/linguist/arrowpad/arrowpad.h2
-rw-r--r--examples/linguist/arrowpad/main.cpp2
-rw-r--r--examples/linguist/arrowpad/mainwindow.cpp2
-rw-r--r--examples/linguist/arrowpad/mainwindow.h2
-rw-r--r--examples/linguist/hellotr/main.cpp2
-rw-r--r--examples/linguist/trollprint/main.cpp2
-rw-r--r--examples/linguist/trollprint/mainwindow.cpp2
-rw-r--r--examples/linguist/trollprint/mainwindow.h2
-rw-r--r--examples/linguist/trollprint/printpanel.cpp2
-rw-r--r--examples/linguist/trollprint/printpanel.h2
-rw-r--r--examples/mainwindows/application/main.cpp2
-rw-r--r--examples/mainwindows/application/mainwindow.cpp2
-rw-r--r--examples/mainwindows/application/mainwindow.h2
-rw-r--r--examples/mainwindows/dockwidgets/main.cpp2
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp2
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.h2
-rw-r--r--examples/mainwindows/macmainwindow/macmainwindow.h2
-rw-r--r--examples/mainwindows/macmainwindow/macmainwindow.mm2
-rw-r--r--examples/mainwindows/macmainwindow/main.cpp2
-rw-r--r--examples/mainwindows/mainwindow/colorswatch.cpp2
-rw-r--r--examples/mainwindows/mainwindow/colorswatch.h2
-rw-r--r--examples/mainwindows/mainwindow/main.cpp2
-rw-r--r--examples/mainwindows/mainwindow/mainwindow.cpp2
-rw-r--r--examples/mainwindows/mainwindow/mainwindow.h2
-rw-r--r--examples/mainwindows/mainwindow/toolbar.cpp2
-rw-r--r--examples/mainwindows/mainwindow/toolbar.h2
-rw-r--r--examples/mainwindows/mdi/main.cpp2
-rw-r--r--examples/mainwindows/mdi/mainwindow.cpp2
-rw-r--r--examples/mainwindows/mdi/mainwindow.h2
-rw-r--r--examples/mainwindows/mdi/mdichild.cpp2
-rw-r--r--examples/mainwindows/mdi/mdichild.h2
-rw-r--r--examples/mainwindows/menus/main.cpp2
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp2
-rw-r--r--examples/mainwindows/menus/mainwindow.h2
-rw-r--r--examples/mainwindows/recentfiles/main.cpp2
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.cpp2
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.h2
-rw-r--r--examples/mainwindows/sdi/main.cpp2
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp2
-rw-r--r--examples/mainwindows/sdi/mainwindow.h2
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp2
-rw-r--r--examples/network/bearermonitor/bearermonitor.h2
-rw-r--r--examples/network/bearermonitor/main.cpp2
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp2
-rw-r--r--examples/network/bearermonitor/sessionwidget.h2
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.cpp2
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.h2
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.cpp2
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.h2
-rw-r--r--examples/network/blockingfortuneclient/main.cpp2
-rw-r--r--examples/network/broadcastreceiver/main.cpp2
-rw-r--r--examples/network/broadcastreceiver/receiver.cpp2
-rw-r--r--examples/network/broadcastreceiver/receiver.h2
-rw-r--r--examples/network/broadcastsender/main.cpp2
-rw-r--r--examples/network/broadcastsender/sender.cpp2
-rw-r--r--examples/network/broadcastsender/sender.h2
-rw-r--r--examples/network/download/main.cpp2
-rw-r--r--examples/network/downloadmanager/downloadmanager.cpp2
-rw-r--r--examples/network/downloadmanager/downloadmanager.h2
-rw-r--r--examples/network/downloadmanager/main.cpp2
-rw-r--r--examples/network/downloadmanager/textprogressbar.cpp2
-rw-r--r--examples/network/downloadmanager/textprogressbar.h2
-rw-r--r--examples/network/fortuneclient/client.cpp2
-rw-r--r--examples/network/fortuneclient/client.h2
-rw-r--r--examples/network/fortuneclient/main.cpp2
-rw-r--r--examples/network/fortuneserver/main.cpp2
-rw-r--r--examples/network/fortuneserver/server.cpp2
-rw-r--r--examples/network/fortuneserver/server.h2
-rw-r--r--examples/network/googlesuggest/googlesuggest.cpp2
-rw-r--r--examples/network/googlesuggest/googlesuggest.h2
-rw-r--r--examples/network/googlesuggest/main.cpp2
-rw-r--r--examples/network/googlesuggest/searchbox.cpp2
-rw-r--r--examples/network/googlesuggest/searchbox.h2
-rw-r--r--examples/network/http/httpwindow.cpp2
-rw-r--r--examples/network/http/httpwindow.h2
-rw-r--r--examples/network/http/main.cpp2
-rw-r--r--examples/network/loopback/dialog.cpp2
-rw-r--r--examples/network/loopback/dialog.h2
-rw-r--r--examples/network/loopback/main.cpp2
-rw-r--r--examples/network/multicastreceiver/main.cpp2
-rw-r--r--examples/network/multicastreceiver/receiver.cpp2
-rw-r--r--examples/network/multicastreceiver/receiver.h2
-rw-r--r--examples/network/multicastsender/main.cpp2
-rw-r--r--examples/network/multicastsender/sender.cpp2
-rw-r--r--examples/network/multicastsender/sender.h2
-rw-r--r--examples/network/network-chat/chatdialog.cpp2
-rw-r--r--examples/network/network-chat/chatdialog.h2
-rw-r--r--examples/network/network-chat/client.cpp2
-rw-r--r--examples/network/network-chat/client.h2
-rw-r--r--examples/network/network-chat/connection.cpp2
-rw-r--r--examples/network/network-chat/connection.h2
-rw-r--r--examples/network/network-chat/main.cpp2
-rw-r--r--examples/network/network-chat/peermanager.cpp2
-rw-r--r--examples/network/network-chat/peermanager.h2
-rw-r--r--examples/network/network-chat/server.cpp4
-rw-r--r--examples/network/network-chat/server.h4
-rw-r--r--examples/network/network.pro1
-rw-r--r--examples/network/qftp/ftp.qrc7
-rw-r--r--examples/network/qftp/ftpwindow.cpp406
-rw-r--r--examples/network/qftp/ftpwindow.h110
-rw-r--r--examples/network/qftp/images/cdtoparent.pngbin139 -> 0 bytes
-rw-r--r--examples/network/qftp/images/dir.pngbin154 -> 0 bytes
-rw-r--r--examples/network/qftp/images/file.pngbin129 -> 0 bytes
-rw-r--r--examples/network/qftp/main.cpp52
-rw-r--r--examples/network/qftp/qftp.desktop11
-rw-r--r--examples/network/qftp/qftp.pro13
-rw-r--r--examples/network/securesocketclient/certificateinfo.cpp2
-rw-r--r--examples/network/securesocketclient/certificateinfo.h2
-rw-r--r--examples/network/securesocketclient/main.cpp2
-rw-r--r--examples/network/securesocketclient/sslclient.cpp2
-rw-r--r--examples/network/securesocketclient/sslclient.h2
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp2
-rw-r--r--examples/network/threadedfortuneserver/dialog.h2
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.cpp4
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.h4
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.cpp2
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.h2
-rw-r--r--examples/network/threadedfortuneserver/main.cpp2
-rw-r--r--examples/network/torrent/addtorrentdialog.cpp2
-rw-r--r--examples/network/torrent/addtorrentdialog.h2
-rw-r--r--examples/network/torrent/bencodeparser.cpp2
-rw-r--r--examples/network/torrent/bencodeparser.h2
-rw-r--r--examples/network/torrent/connectionmanager.cpp2
-rw-r--r--examples/network/torrent/connectionmanager.h2
-rw-r--r--examples/network/torrent/filemanager.cpp2
-rw-r--r--examples/network/torrent/filemanager.h2
-rw-r--r--examples/network/torrent/main.cpp2
-rw-r--r--examples/network/torrent/mainwindow.cpp2
-rw-r--r--examples/network/torrent/mainwindow.h2
-rw-r--r--examples/network/torrent/metainfo.cpp2
-rw-r--r--examples/network/torrent/metainfo.h2
-rw-r--r--examples/network/torrent/peerwireclient.cpp2
-rw-r--r--examples/network/torrent/peerwireclient.h2
-rw-r--r--examples/network/torrent/ratecontroller.cpp2
-rw-r--r--examples/network/torrent/ratecontroller.h2
-rw-r--r--examples/network/torrent/torrentclient.cpp2
-rw-r--r--examples/network/torrent/torrentclient.h2
-rw-r--r--examples/network/torrent/torrentserver.cpp4
-rw-r--r--examples/network/torrent/torrentserver.h4
-rw-r--r--examples/network/torrent/trackerclient.cpp39
-rw-r--r--examples/network/torrent/trackerclient.h15
-rw-r--r--examples/opengl/2dpainting/glwidget.cpp2
-rw-r--r--examples/opengl/2dpainting/glwidget.h2
-rw-r--r--examples/opengl/2dpainting/helper.cpp2
-rw-r--r--examples/opengl/2dpainting/helper.h2
-rw-r--r--examples/opengl/2dpainting/main.cpp2
-rw-r--r--examples/opengl/2dpainting/widget.cpp2
-rw-r--r--examples/opengl/2dpainting/widget.h2
-rw-r--r--examples/opengl/2dpainting/window.cpp2
-rw-r--r--examples/opengl/2dpainting/window.h2
-rw-r--r--examples/opengl/cube/geometryengine.cpp2
-rw-r--r--examples/opengl/cube/geometryengine.h2
-rw-r--r--examples/opengl/cube/main.cpp2
-rw-r--r--examples/opengl/cube/mainwidget.cpp2
-rw-r--r--examples/opengl/cube/mainwidget.h2
-rw-r--r--examples/opengl/framebufferobject2/glwidget.cpp2
-rw-r--r--examples/opengl/framebufferobject2/glwidget.h2
-rw-r--r--examples/opengl/framebufferobject2/main.cpp2
-rw-r--r--examples/opengl/grabber/glwidget.cpp2
-rw-r--r--examples/opengl/grabber/glwidget.h2
-rw-r--r--examples/opengl/grabber/main.cpp2
-rw-r--r--examples/opengl/grabber/mainwindow.cpp2
-rw-r--r--examples/opengl/grabber/mainwindow.h2
-rw-r--r--examples/opengl/hellogl/glwidget.cpp2
-rw-r--r--examples/opengl/hellogl/glwidget.h2
-rw-r--r--examples/opengl/hellogl/main.cpp2
-rw-r--r--examples/opengl/hellogl/window.cpp2
-rw-r--r--examples/opengl/hellogl/window.h2
-rw-r--r--examples/opengl/hellogl_es/glwindow.cpp2
-rw-r--r--examples/opengl/hellogl_es/glwindow.h2
-rw-r--r--examples/opengl/hellogl_es/main.cpp2
-rw-r--r--examples/opengl/hellogl_es2/bubble.cpp2
-rw-r--r--examples/opengl/hellogl_es2/bubble.h2
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp2
-rw-r--r--examples/opengl/hellogl_es2/glwidget.h2
-rw-r--r--examples/opengl/hellogl_es2/main.cpp2
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.cpp2
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.h2
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp2
-rw-r--r--examples/opengl/hellowindow/hellowindow.h2
-rw-r--r--examples/opengl/hellowindow/main.cpp2
-rw-r--r--examples/opengl/overpainting/bubble.cpp2
-rw-r--r--examples/opengl/overpainting/bubble.h2
-rw-r--r--examples/opengl/overpainting/glwidget.cpp2
-rw-r--r--examples/opengl/overpainting/glwidget.h2
-rw-r--r--examples/opengl/overpainting/main.cpp2
-rw-r--r--examples/opengl/paintedwindow/main.cpp2
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.cpp2
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h2
-rw-r--r--examples/opengl/pbuffers/cube.cpp2
-rw-r--r--examples/opengl/pbuffers/cube.h2
-rw-r--r--examples/opengl/pbuffers/glwidget.cpp2
-rw-r--r--examples/opengl/pbuffers/glwidget.h2
-rw-r--r--examples/opengl/pbuffers/main.cpp2
-rw-r--r--examples/opengl/pbuffers2/glwidget.cpp2
-rw-r--r--examples/opengl/pbuffers2/glwidget.h2
-rw-r--r--examples/opengl/pbuffers2/main.cpp2
-rw-r--r--examples/opengl/samplebuffers/glwidget.cpp2
-rw-r--r--examples/opengl/samplebuffers/glwidget.h2
-rw-r--r--examples/opengl/samplebuffers/main.cpp2
-rw-r--r--examples/opengl/shared/qtlogo.cpp2
-rw-r--r--examples/opengl/shared/qtlogo.h2
-rw-r--r--examples/opengl/textures/glwidget.cpp2
-rw-r--r--examples/opengl/textures/glwidget.h2
-rw-r--r--examples/opengl/textures/main.cpp2
-rw-r--r--examples/opengl/textures/window.cpp2
-rw-r--r--examples/opengl/textures/window.h2
-rw-r--r--examples/painting/affine/main.cpp2
-rw-r--r--examples/painting/affine/xform.cpp2
-rw-r--r--examples/painting/affine/xform.h2
-rw-r--r--examples/painting/basicdrawing/main.cpp2
-rw-r--r--examples/painting/basicdrawing/renderarea.cpp2
-rw-r--r--examples/painting/basicdrawing/renderarea.h2
-rw-r--r--examples/painting/basicdrawing/window.cpp2
-rw-r--r--examples/painting/basicdrawing/window.h2
-rw-r--r--examples/painting/composition/composition.cpp2
-rw-r--r--examples/painting/composition/composition.h2
-rw-r--r--examples/painting/composition/main.cpp2
-rw-r--r--examples/painting/concentriccircles/circlewidget.cpp2
-rw-r--r--examples/painting/concentriccircles/circlewidget.h2
-rw-r--r--examples/painting/concentriccircles/main.cpp2
-rw-r--r--examples/painting/concentriccircles/window.cpp2
-rw-r--r--examples/painting/concentriccircles/window.h2
-rw-r--r--examples/painting/deform/main.cpp2
-rw-r--r--examples/painting/deform/pathdeform.cpp2
-rw-r--r--examples/painting/deform/pathdeform.h2
-rw-r--r--examples/painting/fontsampler/main.cpp2
-rw-r--r--examples/painting/fontsampler/mainwindow.cpp2
-rw-r--r--examples/painting/fontsampler/mainwindow.h2
-rw-r--r--examples/painting/gradients/gradients.cpp2
-rw-r--r--examples/painting/gradients/gradients.h2
-rw-r--r--examples/painting/gradients/main.cpp2
-rw-r--r--examples/painting/imagecomposition/imagecomposer.cpp2
-rw-r--r--examples/painting/imagecomposition/imagecomposer.h2
-rw-r--r--examples/painting/imagecomposition/main.cpp2
-rw-r--r--examples/painting/painterpaths/main.cpp2
-rw-r--r--examples/painting/painterpaths/renderarea.cpp2
-rw-r--r--examples/painting/painterpaths/renderarea.h2
-rw-r--r--examples/painting/painterpaths/window.cpp2
-rw-r--r--examples/painting/painterpaths/window.h2
-rw-r--r--examples/painting/pathstroke/main.cpp2
-rw-r--r--examples/painting/pathstroke/pathstroke.cpp2
-rw-r--r--examples/painting/pathstroke/pathstroke.h2
-rw-r--r--examples/painting/shared/arthurstyle.cpp2
-rw-r--r--examples/painting/shared/arthurstyle.h2
-rw-r--r--examples/painting/shared/arthurwidgets.cpp2
-rw-r--r--examples/painting/shared/arthurwidgets.h2
-rw-r--r--examples/painting/shared/hoverpoints.cpp2
-rw-r--r--examples/painting/shared/hoverpoints.h2
-rw-r--r--examples/painting/transformations/main.cpp2
-rw-r--r--examples/painting/transformations/renderarea.cpp2
-rw-r--r--examples/painting/transformations/renderarea.h2
-rw-r--r--examples/painting/transformations/window.cpp2
-rw-r--r--examples/painting/transformations/window.h2
-rw-r--r--examples/qmake/precompile/main.cpp2
-rw-r--r--examples/qmake/precompile/mydialog.cpp2
-rw-r--r--examples/qmake/precompile/mydialog.h2
-rw-r--r--examples/qmake/precompile/myobject.cpp2
-rw-r--r--examples/qmake/precompile/myobject.h2
-rw-r--r--examples/qmake/precompile/stable.h2
-rw-r--r--examples/qmake/precompile/util.cpp2
-rw-r--r--examples/qmake/tutorial/hello.cpp2
-rw-r--r--examples/qmake/tutorial/hello.h2
-rw-r--r--examples/qmake/tutorial/hellounix.cpp2
-rw-r--r--examples/qmake/tutorial/hellowin.cpp2
-rw-r--r--examples/qmake/tutorial/main.cpp2
-rw-r--r--examples/qpa/windows/main.cpp2
-rw-r--r--examples/qpa/windows/window.cpp2
-rw-r--r--examples/qpa/windows/window.h2
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.cpp2
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.h2
-rw-r--r--examples/qtconcurrent/imagescaling/main.cpp2
-rw-r--r--examples/qtconcurrent/map/main.cpp2
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp2
-rw-r--r--examples/qtconcurrent/runfunction/main.cpp2
-rw-r--r--examples/qtconcurrent/wordcount/main.cpp2
-rw-r--r--examples/qtestlib/tutorial1/testqstring.cpp2
-rw-r--r--examples/qtestlib/tutorial2/testqstring.cpp2
-rw-r--r--examples/qtestlib/tutorial3/testgui.cpp2
-rw-r--r--examples/qtestlib/tutorial4/testgui.cpp2
-rw-r--r--examples/qtestlib/tutorial5/benchmarking.cpp2
-rw-r--r--examples/qtestlib/tutorial5/containers.cpp2
-rw-r--r--examples/qws/dbscreen/dbscreen.cpp2
-rw-r--r--examples/qws/dbscreen/dbscreen.h2
-rw-r--r--examples/qws/dbscreen/dbscreendriverplugin.cpp2
-rw-r--r--examples/qws/framebuffer/main.c2
-rw-r--r--examples/qws/mousecalibration/calibration.cpp2
-rw-r--r--examples/qws/mousecalibration/calibration.h2
-rw-r--r--examples/qws/mousecalibration/main.cpp2
-rw-r--r--examples/qws/mousecalibration/scribblewidget.cpp2
-rw-r--r--examples/qws/mousecalibration/scribblewidget.h2
-rw-r--r--examples/qws/simpledecoration/analogclock.cpp2
-rw-r--r--examples/qws/simpledecoration/analogclock.h2
-rw-r--r--examples/qws/simpledecoration/main.cpp2
-rw-r--r--examples/qws/simpledecoration/mydecoration.cpp2
-rw-r--r--examples/qws/simpledecoration/mydecoration.h2
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.cpp2
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.h2
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.cpp2
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.h2
-rw-r--r--examples/qws/svgalib/svgalibplugin.cpp2
-rw-r--r--examples/qws/svgalib/svgalibscreen.cpp2
-rw-r--r--examples/qws/svgalib/svgalibscreen.h2
-rw-r--r--examples/qws/svgalib/svgalibsurface.cpp2
-rw-r--r--examples/qws/svgalib/svgalibsurface.h2
-rw-r--r--examples/richtext/calendar/main.cpp2
-rw-r--r--examples/richtext/calendar/mainwindow.cpp2
-rw-r--r--examples/richtext/calendar/mainwindow.h2
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp2
-rw-r--r--examples/richtext/orderform/detailsdialog.h2
-rw-r--r--examples/richtext/orderform/main.cpp2
-rw-r--r--examples/richtext/orderform/mainwindow.cpp2
-rw-r--r--examples/richtext/orderform/mainwindow.h2
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.cpp2
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.h2
-rw-r--r--examples/richtext/syntaxhighlighter/main.cpp2
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.cpp2
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.h2
-rw-r--r--examples/richtext/textedit/main.cpp2
-rw-r--r--examples/richtext/textedit/textedit.cpp2
-rw-r--r--examples/richtext/textedit/textedit.h2
-rw-r--r--examples/richtext/textedit/textedit.qdoc2
-rw-r--r--examples/scroller/graphicsview/main.cpp2
-rw-r--r--examples/sql/books/bookdelegate.cpp2
-rw-r--r--examples/sql/books/bookdelegate.h2
-rw-r--r--examples/sql/books/bookwindow.cpp2
-rw-r--r--examples/sql/books/bookwindow.h2
-rw-r--r--examples/sql/books/initdb.h2
-rw-r--r--examples/sql/books/main.cpp2
-rw-r--r--examples/sql/cachedtable/main.cpp2
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp2
-rw-r--r--examples/sql/cachedtable/tableeditor.h2
-rw-r--r--examples/sql/connection.h2
-rw-r--r--examples/sql/drilldown/imageitem.cpp2
-rw-r--r--examples/sql/drilldown/imageitem.h2
-rw-r--r--examples/sql/drilldown/informationwindow.cpp2
-rw-r--r--examples/sql/drilldown/informationwindow.h2
-rw-r--r--examples/sql/drilldown/main.cpp2
-rw-r--r--examples/sql/drilldown/view.cpp2
-rw-r--r--examples/sql/drilldown/view.h2
-rw-r--r--examples/sql/masterdetail/database.h2
-rw-r--r--examples/sql/masterdetail/dialog.cpp2
-rw-r--r--examples/sql/masterdetail/dialog.h2
-rw-r--r--examples/sql/masterdetail/main.cpp2
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp2
-rw-r--r--examples/sql/masterdetail/mainwindow.h2
-rw-r--r--examples/sql/querymodel/customsqlmodel.cpp2
-rw-r--r--examples/sql/querymodel/customsqlmodel.h2
-rw-r--r--examples/sql/querymodel/editablesqlmodel.cpp2
-rw-r--r--examples/sql/querymodel/editablesqlmodel.h2
-rw-r--r--examples/sql/querymodel/main.cpp2
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.cpp2
-rw-r--r--examples/sql/sqlbrowser/browser.cpp2
-rw-r--r--examples/sql/sqlbrowser/browser.h2
-rw-r--r--examples/sql/sqlbrowser/connectionwidget.cpp2
-rw-r--r--examples/sql/sqlbrowser/connectionwidget.h2
-rw-r--r--examples/sql/sqlbrowser/main.cpp2
-rw-r--r--examples/sql/sqlbrowser/qsqlconnectiondialog.cpp2
-rw-r--r--examples/sql/sqlbrowser/qsqlconnectiondialog.h2
-rw-r--r--examples/sql/sqlwidgetmapper/main.cpp2
-rw-r--r--examples/sql/sqlwidgetmapper/window.cpp2
-rw-r--r--examples/sql/sqlwidgetmapper/window.h2
-rw-r--r--examples/sql/tablemodel/tablemodel.cpp2
-rw-r--r--examples/statemachine/eventtransitions/main.cpp2
-rw-r--r--examples/statemachine/factorial/main.cpp2
-rw-r--r--examples/statemachine/pingpong/main.cpp2
-rw-r--r--examples/statemachine/rogue/main.cpp2
-rw-r--r--examples/statemachine/rogue/movementtransition.h2
-rw-r--r--examples/statemachine/rogue/window.cpp2
-rw-r--r--examples/statemachine/rogue/window.h2
-rw-r--r--examples/statemachine/trafficlight/main.cpp2
-rw-r--r--examples/statemachine/twowaybutton/main.cpp2
-rw-r--r--examples/threads/mandelbrot/main.cpp2
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp2
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h2
-rw-r--r--examples/threads/mandelbrot/renderthread.cpp2
-rw-r--r--examples/threads/mandelbrot/renderthread.h2
-rw-r--r--examples/threads/queuedcustomtype/block.cpp2
-rw-r--r--examples/threads/queuedcustomtype/block.h2
-rw-r--r--examples/threads/queuedcustomtype/main.cpp2
-rw-r--r--examples/threads/queuedcustomtype/renderthread.cpp2
-rw-r--r--examples/threads/queuedcustomtype/renderthread.h2
-rw-r--r--examples/threads/queuedcustomtype/window.cpp2
-rw-r--r--examples/threads/queuedcustomtype/window.h2
-rw-r--r--examples/threads/semaphores/semaphores.cpp2
-rw-r--r--examples/threads/waitconditions/waitconditions.cpp2
-rw-r--r--examples/tools/codecs/main.cpp2
-rw-r--r--examples/tools/codecs/mainwindow.cpp2
-rw-r--r--examples/tools/codecs/mainwindow.h2
-rw-r--r--examples/tools/codecs/previewform.cpp2
-rw-r--r--examples/tools/codecs/previewform.h2
-rw-r--r--examples/tools/completer/fsmodel.cpp2
-rw-r--r--examples/tools/completer/fsmodel.h2
-rw-r--r--examples/tools/completer/main.cpp2
-rw-r--r--examples/tools/completer/mainwindow.cpp2
-rw-r--r--examples/tools/completer/mainwindow.h2
-rw-r--r--examples/tools/contiguouscache/main.cpp2
-rw-r--r--examples/tools/contiguouscache/randomlistmodel.cpp2
-rw-r--r--examples/tools/contiguouscache/randomlistmodel.h2
-rw-r--r--examples/tools/customcompleter/main.cpp2
-rw-r--r--examples/tools/customcompleter/mainwindow.cpp2
-rw-r--r--examples/tools/customcompleter/mainwindow.h2
-rw-r--r--examples/tools/customcompleter/textedit.cpp2
-rw-r--r--examples/tools/customcompleter/textedit.h2
-rw-r--r--examples/tools/customtype/main.cpp2
-rw-r--r--examples/tools/customtype/message.cpp2
-rw-r--r--examples/tools/customtype/message.h2
-rw-r--r--examples/tools/customtypesending/main.cpp2
-rw-r--r--examples/tools/customtypesending/message.cpp2
-rw-r--r--examples/tools/customtypesending/message.h2
-rw-r--r--examples/tools/customtypesending/window.cpp2
-rw-r--r--examples/tools/customtypesending/window.h2
-rw-r--r--examples/tools/echoplugin/echowindow/echointerface.h2
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.cpp2
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.h2
-rw-r--r--examples/tools/echoplugin/echowindow/main.cpp2
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.cpp2
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.h2
-rw-r--r--examples/tools/i18n/languagechooser.cpp2
-rw-r--r--examples/tools/i18n/languagechooser.h2
-rw-r--r--examples/tools/i18n/main.cpp2
-rw-r--r--examples/tools/i18n/mainwindow.cpp2
-rw-r--r--examples/tools/i18n/mainwindow.h2
-rw-r--r--examples/tools/inputpanel/inputpanel.desktop11
-rw-r--r--examples/tools/inputpanel/inputpanel.pro19
-rw-r--r--examples/tools/inputpanel/main.cpp61
-rw-r--r--examples/tools/inputpanel/mainform.ui76
-rw-r--r--examples/tools/inputpanel/myinputpanel.cpp133
-rw-r--r--examples/tools/inputpanel/myinputpanel.h76
-rw-r--r--examples/tools/inputpanel/myinputpanelcontext.cpp131
-rw-r--r--examples/tools/inputpanel/myinputpanelcontext.h81
-rw-r--r--examples/tools/inputpanel/myinputpanelform.ui398
-rw-r--r--examples/tools/plugandpaint/interfaces.h2
-rw-r--r--examples/tools/plugandpaint/main.cpp2
-rw-r--r--examples/tools/plugandpaint/mainwindow.cpp2
-rw-r--r--examples/tools/plugandpaint/mainwindow.h2
-rw-r--r--examples/tools/plugandpaint/paintarea.cpp2
-rw-r--r--examples/tools/plugandpaint/paintarea.h2
-rw-r--r--examples/tools/plugandpaint/plugindialog.cpp2
-rw-r--r--examples/tools/plugandpaint/plugindialog.h2
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp2
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h2
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp2
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h2
-rw-r--r--examples/tools/regexp/main.cpp2
-rw-r--r--examples/tools/regexp/regexpdialog.cpp2
-rw-r--r--examples/tools/regexp/regexpdialog.h2
-rw-r--r--examples/tools/settingseditor/locationdialog.cpp2
-rw-r--r--examples/tools/settingseditor/locationdialog.h2
-rw-r--r--examples/tools/settingseditor/main.cpp2
-rw-r--r--examples/tools/settingseditor/mainwindow.cpp2
-rw-r--r--examples/tools/settingseditor/mainwindow.h2
-rw-r--r--examples/tools/settingseditor/settingstree.cpp2
-rw-r--r--examples/tools/settingseditor/settingstree.h2
-rw-r--r--examples/tools/settingseditor/variantdelegate.cpp2
-rw-r--r--examples/tools/settingseditor/variantdelegate.h2
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.cpp2
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.h2
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.cpp2
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.h2
-rw-r--r--examples/tools/styleplugin/stylewindow/main.cpp2
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.cpp2
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.h2
-rw-r--r--examples/tools/tools.pro1
-rw-r--r--examples/tools/treemodelcompleter/main.cpp2
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.cpp2
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.h2
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.cpp2
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.h2
-rw-r--r--examples/tools/undo/commands.cpp2
-rw-r--r--examples/tools/undo/commands.h2
-rw-r--r--examples/tools/undo/document.cpp2
-rw-r--r--examples/tools/undo/document.h2
-rw-r--r--examples/tools/undo/main.cpp2
-rw-r--r--examples/tools/undo/mainwindow.cpp2
-rw-r--r--examples/tools/undo/mainwindow.h2
-rw-r--r--examples/tools/undoframework/commands.cpp2
-rw-r--r--examples/tools/undoframework/commands.h2
-rw-r--r--examples/tools/undoframework/diagramitem.cpp2
-rw-r--r--examples/tools/undoframework/diagramitem.h2
-rw-r--r--examples/tools/undoframework/diagramscene.cpp2
-rw-r--r--examples/tools/undoframework/diagramscene.h2
-rw-r--r--examples/tools/undoframework/main.cpp2
-rw-r--r--examples/tools/undoframework/mainwindow.cpp2
-rw-r--r--examples/tools/undoframework/mainwindow.h2
-rw-r--r--examples/touch/dials/main.cpp2
-rw-r--r--examples/touch/fingerpaint/main.cpp2
-rw-r--r--examples/touch/fingerpaint/mainwindow.cpp2
-rw-r--r--examples/touch/fingerpaint/mainwindow.h2
-rw-r--r--examples/touch/fingerpaint/scribblearea.cpp2
-rw-r--r--examples/touch/fingerpaint/scribblearea.h2
-rw-r--r--examples/touch/knobs/knob.cpp2
-rw-r--r--examples/touch/knobs/knob.h2
-rw-r--r--examples/touch/knobs/main.cpp2
-rw-r--r--examples/touch/pinchzoom/graphicsview.cpp2
-rw-r--r--examples/touch/pinchzoom/graphicsview.h2
-rw-r--r--examples/touch/pinchzoom/main.cpp2
-rw-r--r--examples/touch/pinchzoom/mouse.cpp2
-rw-r--r--examples/touch/pinchzoom/mouse.h2
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part1/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part2/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part3/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part4/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.h2
-rw-r--r--examples/tutorials/addressbook-fr/part5/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.h2
-rw-r--r--examples/tutorials/addressbook-fr/part6/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.h2
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.h2
-rw-r--r--examples/tutorials/addressbook-fr/part7/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part1/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part2/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part3/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.h2
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.h2
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.h2
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.h2
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/gsqt.pro0
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part1/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part1/part1.pro0
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part2/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part2/part2.pro0
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part3/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part3/part3.pro0
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part4/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part4/part4.pro0
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part5/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/gettingStarted/gsQt/part5/part5.pro0
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/1_readonly/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/1_readonly/mymodel.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/1_readonly/mymodel.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/2_formatting/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/2_formatting/mymodel.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/2_formatting/mymodel.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/3_changingmodel/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/3_changingmodel/mymodel.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/3_changingmodel/mymodel.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/4_headers/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/4_headers/mymodel.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/4_headers/mymodel.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/5_edit/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/5_edit/mainwindow.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/5_edit/mainwindow.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/5_edit/mymodel.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/5_edit/mymodel.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/6_treeview/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/6_treeview/mainwindow.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/6_treeview/mainwindow.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/7_selections/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/7_selections/mainwindow.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/modelview/7_selections/mainwindow.h2
-rw-r--r--examples/tutorials/threads/clock/clockthread.cpp2
-rw-r--r--examples/tutorials/threads/clock/clockthread.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/clock/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/hellothread/hellothread.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/hellothread/hellothread.h2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/hellothread/main.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp2
-rw-r--r--[-rwxr-xr-x]examples/tutorials/threads/movedobject/main.cpp2
-rw-r--r--examples/tutorials/threads/movedobject/thread.cpp2
-rw-r--r--examples/tutorials/threads/movedobject/thread.h2
-rw-r--r--examples/tutorials/threads/movedobject/workerobject.cpp2
-rw-r--r--examples/tutorials/threads/movedobject/workerobject.h2
-rw-r--r--examples/tutorials/widgets/childwidget/main.cpp2
-rw-r--r--examples/tutorials/widgets/nestedlayouts/main.cpp2
-rw-r--r--examples/tutorials/widgets/toplevel/main.cpp2
-rw-r--r--examples/tutorials/widgets/windowlayout/main.cpp2
-rw-r--r--examples/webkit/webkit-guide/_image_assets.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_accord.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_demo-rotate.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_demo-scale.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_demo-skew.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_gallery.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_panel.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_pulse.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_skew.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_slide1.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_slide2.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_slide3.htm2
-rw-r--r--examples/webkit/webkit-guide/anim_tabbedSkew.htm2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_accord.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_demo-rotate.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_demo-scale.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_demo-skew.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_gallery.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_panel.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_pulse.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_skew.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_slide.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/anim_tabbedSkew.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_backgrounds.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_border-img.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_grad-radial.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_gradientBack.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_gradientBackStop.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_gradientButton.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_mask-grad.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_mask-img.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_multicol.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_reflect.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_scroll.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_sel-nth.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_shadow.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_shadowBlur.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_text-overflow.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_text-shadow.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/css3_text-stroke.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/form_tapper.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/form_toggler.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/layout_link-fmt.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/layout_tbl-keyhole.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mob_condjs.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mob_mediaquery.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mobile.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mq_desktop.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mq_mobile.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mq_touch.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mqlayout_desktop.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mqlayout_mobile.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/mqlayout_touch.css2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/css/storage.css2
-rw-r--r--examples/webkit/webkit-guide/css3_backgrounds.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_border-img.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_grad-radial.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_gradientBack.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_gradientBackStop.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_gradientButton.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_mask-grad.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_mask-img.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_multicol.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_reflect.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_scroll.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_sel-nth.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_shadow.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_text-overflow.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_text-shadow.htm2
-rw-r--r--examples/webkit/webkit-guide/css3_text-stroke.htm2
-rw-r--r--examples/webkit/webkit-guide/form_tapper.htm2
-rw-r--r--examples/webkit/webkit-guide/form_toggler.htm2
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/border-frame.pngbin5534 -> 5534 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/gradient.jpgbin710 -> 710 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/gray_icon_close.pngbin658 -> 658 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ag_016.pngbin598 -> 598 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ag_032.pngbin1275 -> 1275 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ag_036.pngbin1803 -> 1803 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ag_048.pngbin1885 -> 1885 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_al_016.pngbin625 -> 625 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_al_032.pngbin1259 -> 1259 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_al_036.pngbin1755 -> 1755 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_al_048.pngbin1795 -> 1795 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ar_016.pngbin608 -> 608 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ar_032.pngbin1233 -> 1233 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ar_036.pngbin1777 -> 1777 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ar_048.pngbin1828 -> 1828 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_b_016.pngbin580 -> 580 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_b_032.pngbin1166 -> 1166 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_b_036.pngbin1668 -> 1668 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_b_048.pngbin1623 -> 1623 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_be_016.pngbin614 -> 614 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_be_032.pngbin1322 -> 1322 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_be_036.pngbin1811 -> 1811 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_be_048.pngbin1824 -> 1824 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_c_016.pngbin545 -> 545 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_c_032.pngbin1102 -> 1102 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_c_036.pngbin1595 -> 1595 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_c_048.pngbin1622 -> 1622 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ca_016.pngbin606 -> 606 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ca_032.pngbin1229 -> 1229 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ca_036.pngbin1771 -> 1771 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ca_048.pngbin1820 -> 1820 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cl_016.pngbin602 -> 602 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cl_032.pngbin1197 -> 1197 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cl_036.pngbin1731 -> 1731 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cl_048.pngbin1816 -> 1816 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cu_016.pngbin580 -> 580 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cu_032.pngbin1183 -> 1183 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cu_036.pngbin1742 -> 1742 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_cu_048.pngbin1729 -> 1729 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_f_016.pngbin539 -> 539 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_f_032.pngbin1047 -> 1047 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_f_036.pngbin1487 -> 1487 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_f_048.pngbin1488 -> 1488 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_fe_016.pngbin591 -> 591 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_fe_032.pngbin1171 -> 1171 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_fe_036.pngbin1726 -> 1726 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_fe_048.pngbin1745 -> 1745 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_h_016.pngbin583 -> 583 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_h_032.pngbin1135 -> 1135 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_h_036.pngbin1600 -> 1600 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_h_048.pngbin1644 -> 1644 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_he_016.pngbin606 -> 606 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_he_032.pngbin1179 -> 1179 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_he_036.pngbin1746 -> 1746 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_he_048.pngbin1675 -> 1675 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_k_016.pngbin600 -> 600 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_k_032.pngbin1189 -> 1189 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_k_036.pngbin1657 -> 1657 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_k_048.pngbin1706 -> 1706 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_li_016.pngbin584 -> 584 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_li_032.pngbin1125 -> 1125 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_li_036.pngbin1596 -> 1596 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_li_048.pngbin1691 -> 1691 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_mg_016.pngbin628 -> 628 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_mg_032.pngbin1286 -> 1286 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_mg_036.pngbin1832 -> 1832 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_mg_048.pngbin1908 -> 1908 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_n_016.pngbin605 -> 605 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_n_032.pngbin1203 -> 1203 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_n_036.pngbin1728 -> 1728 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_n_048.pngbin1718 -> 1718 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_na_016.pngbin609 -> 609 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_na_032.pngbin1302 -> 1302 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_na_036.pngbin1811 -> 1811 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_na_048.pngbin1879 -> 1879 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ne_016.pngbin619 -> 619 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ne_032.pngbin1278 -> 1278 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ne_036.pngbin1798 -> 1798 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ne_048.pngbin1811 -> 1811 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ni_016.pngbin627 -> 627 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ni_032.pngbin1248 -> 1248 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ni_036.pngbin1805 -> 1805 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_ni_048.pngbin1837 -> 1837 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_o_016.pngbin580 -> 580 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_o_032.pngbin1182 -> 1182 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_o_036.pngbin1668 -> 1668 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_o_048.pngbin1752 -> 1752 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_pt_016.pngbin600 -> 600 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_pt_032.pngbin1212 -> 1212 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_pt_036.pngbin1728 -> 1728 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_pt_048.pngbin1675 -> 1675 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_si_016.pngbin588 -> 588 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_si_032.pngbin1198 -> 1198 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_si_036.pngbin1761 -> 1761 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_si_048.pngbin1820 -> 1820 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_zn_016.pngbin572 -> 572 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_zn_032.pngbin1164 -> 1164 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_zn_036.pngbin1689 -> 1689 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/ic_zn_048.pngbin1721 -> 1721 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_check.pngbin678 -> 678 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_check_x24green.pngbin776 -> 776 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_dismiss.pngbin613 -> 613 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_dismiss_x22.pngbin539 -> 539 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_drill-down.pngbin605 -> 605 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_drill-down_x32.pngbin3593 -> 3593 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_drill-up.pngbin592 -> 592 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_drill-up_x32.pngbin3685 -> 3685 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_expand-nav.pngbin675 -> 675 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_head-collapsed.pngbin285 -> 285 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_head-collapsed_x13.pngbin201 -> 201 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_head-expanded.pngbin295 -> 295 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_head-expanded_x13.pngbin3017 -> 3017 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_info.pngbin512 -> 512 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_info_x24.pngbin652 -> 652 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-doc.pngbin610 -> 610 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-email.pngbin542 -> 542 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-external.pngbin1106 -> 1106 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-pdf.pngbin637 -> 637 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-ppt.pngbin536 -> 536 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-rss.pngbin684 -> 684 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-sms.pngbin1086 -> 1086 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-tel.pngbin1205 -> 1205 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_link-xls.pngbin603 -> 603 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_list-all.pngbin545 -> 545 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_list-all_circ.pngbin665 -> 665 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_nav-start.pngbin594 -> 594 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_nav-top.pngbin634 -> 634 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_nav-up.pngbin551 -> 551 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_nav_end.pngbin643 -> 643 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_question.pngbin802 -> 802 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_scroll-left.pngbin660 -> 660 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_scroll-right.pngbin682 -> 682 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/icon_trash.pngbin717 -> 717 bytes
-rw-r--r--[-rwxr-xr-x]examples/webkit/webkit-guide/img/mask.pngbin5842 -> 5842 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/js/anim_accord.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/anim_gallery.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/anim_panel.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/anim_skew.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_backgrounds.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_border-img.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_grad-radial.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_mask-grad.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_mask-img.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_text-overflow.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/form_tapper.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/mob_condjs.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/mobile.js2
-rwxr-xr-xexamples/webkit/webkit-guide/js/storage.js2
-rw-r--r--examples/webkit/webkit-guide/layout_link-fmt.htm2
-rw-r--r--examples/webkit/webkit-guide/layout_tbl-keyhole.htm2
-rw-r--r--examples/webkit/webkit-guide/mob_condjs.htm2
-rw-r--r--examples/webkit/webkit-guide/mob_layout.htm2
-rw-r--r--examples/webkit/webkit-guide/mob_mediaquery.htm2
-rw-r--r--examples/webkit/webkit-guide/storage.htm2
-rw-r--r--examples/widgets/analogclock/analogclock.cpp2
-rw-r--r--examples/widgets/analogclock/analogclock.h2
-rw-r--r--examples/widgets/analogclock/main.cpp2
-rw-r--r--examples/widgets/applicationicon/main.cpp2
-rw-r--r--examples/widgets/calculator/button.cpp2
-rw-r--r--examples/widgets/calculator/button.h2
-rw-r--r--examples/widgets/calculator/calculator.cpp2
-rw-r--r--examples/widgets/calculator/calculator.h2
-rw-r--r--examples/widgets/calculator/main.cpp2
-rw-r--r--examples/widgets/calendarwidget/main.cpp2
-rw-r--r--examples/widgets/calendarwidget/window.cpp2
-rw-r--r--examples/widgets/calendarwidget/window.h2
-rw-r--r--examples/widgets/charactermap/characterwidget.cpp2
-rw-r--r--examples/widgets/charactermap/characterwidget.h2
-rw-r--r--examples/widgets/charactermap/main.cpp2
-rw-r--r--examples/widgets/charactermap/mainwindow.cpp2
-rw-r--r--examples/widgets/charactermap/mainwindow.h2
-rw-r--r--examples/widgets/codeeditor/codeeditor.cpp2
-rw-r--r--examples/widgets/codeeditor/codeeditor.h2
-rw-r--r--examples/widgets/codeeditor/main.cpp2
-rw-r--r--examples/widgets/digitalclock/digitalclock.cpp2
-rw-r--r--examples/widgets/digitalclock/digitalclock.h2
-rw-r--r--examples/widgets/digitalclock/main.cpp2
-rw-r--r--examples/widgets/elidedlabel/elidedlabel.cpp2
-rw-r--r--examples/widgets/elidedlabel/elidedlabel.h2
-rw-r--r--examples/widgets/elidedlabel/main.cpp2
-rw-r--r--examples/widgets/elidedlabel/testwidget.cpp2
-rw-r--r--examples/widgets/elidedlabel/testwidget.h2
-rw-r--r--examples/widgets/groupbox/main.cpp2
-rw-r--r--examples/widgets/groupbox/window.cpp2
-rw-r--r--examples/widgets/groupbox/window.h2
-rw-r--r--examples/widgets/icons/iconpreviewarea.cpp2
-rw-r--r--examples/widgets/icons/iconpreviewarea.h2
-rw-r--r--examples/widgets/icons/iconsizespinbox.cpp2
-rw-r--r--examples/widgets/icons/iconsizespinbox.h2
-rw-r--r--examples/widgets/icons/imagedelegate.cpp2
-rw-r--r--examples/widgets/icons/imagedelegate.h2
-rw-r--r--examples/widgets/icons/main.cpp2
-rw-r--r--examples/widgets/icons/mainwindow.cpp2
-rw-r--r--examples/widgets/icons/mainwindow.h2
-rw-r--r--examples/widgets/imageviewer/imageviewer.cpp2
-rw-r--r--examples/widgets/imageviewer/imageviewer.h2
-rw-r--r--examples/widgets/imageviewer/main.cpp2
-rw-r--r--examples/widgets/lineedits/main.cpp2
-rw-r--r--examples/widgets/lineedits/window.cpp2
-rw-r--r--examples/widgets/lineedits/window.h2
-rw-r--r--examples/widgets/movie/main.cpp2
-rw-r--r--examples/widgets/movie/movieplayer.cpp2
-rw-r--r--examples/widgets/movie/movieplayer.h2
-rw-r--r--examples/widgets/orientation/main.cpp2
-rw-r--r--examples/widgets/orientation/mainwindow.cpp2
-rw-r--r--examples/widgets/orientation/mainwindow.h2
-rw-r--r--examples/widgets/scribble/main.cpp2
-rw-r--r--examples/widgets/scribble/mainwindow.cpp2
-rw-r--r--examples/widgets/scribble/mainwindow.h2
-rw-r--r--examples/widgets/scribble/scribblearea.cpp2
-rw-r--r--examples/widgets/scribble/scribblearea.h2
-rw-r--r--examples/widgets/shapedclock/main.cpp2
-rw-r--r--examples/widgets/shapedclock/shapedclock.cpp2
-rw-r--r--examples/widgets/shapedclock/shapedclock.h2
-rw-r--r--examples/widgets/sliders/main.cpp2
-rw-r--r--examples/widgets/sliders/slidersgroup.cpp2
-rw-r--r--examples/widgets/sliders/slidersgroup.h2
-rw-r--r--examples/widgets/sliders/window.cpp2
-rw-r--r--examples/widgets/sliders/window.h2
-rw-r--r--examples/widgets/softkeys/main.cpp2
-rw-r--r--examples/widgets/softkeys/softkeys.cpp2
-rw-r--r--examples/widgets/softkeys/softkeys.h2
-rw-r--r--examples/widgets/spinboxes/main.cpp2
-rw-r--r--examples/widgets/spinboxes/window.cpp2
-rw-r--r--examples/widgets/spinboxes/window.h2
-rw-r--r--examples/widgets/styles/main.cpp2
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.cpp2
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.h2
-rw-r--r--examples/widgets/styles/widgetgallery.cpp2
-rw-r--r--examples/widgets/styles/widgetgallery.h2
-rw-r--r--examples/widgets/stylesheet/main.cpp2
-rw-r--r--examples/widgets/stylesheet/mainwindow.cpp2
-rw-r--r--examples/widgets/stylesheet/mainwindow.h2
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.cpp2
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.h2
-rw-r--r--examples/widgets/tablet/main.cpp2
-rw-r--r--examples/widgets/tablet/mainwindow.cpp2
-rw-r--r--examples/widgets/tablet/mainwindow.h2
-rw-r--r--examples/widgets/tablet/tabletapplication.cpp2
-rw-r--r--examples/widgets/tablet/tabletapplication.h2
-rw-r--r--examples/widgets/tablet/tabletcanvas.cpp2
-rw-r--r--examples/widgets/tablet/tabletcanvas.h2
-rw-r--r--examples/widgets/tetrix/main.cpp2
-rw-r--r--examples/widgets/tetrix/tetrixboard.cpp2
-rw-r--r--examples/widgets/tetrix/tetrixboard.h2
-rw-r--r--examples/widgets/tetrix/tetrixpiece.cpp2
-rw-r--r--examples/widgets/tetrix/tetrixpiece.h2
-rw-r--r--examples/widgets/tetrix/tetrixwindow.cpp2
-rw-r--r--examples/widgets/tetrix/tetrixwindow.h2
-rw-r--r--examples/widgets/tooltips/main.cpp2
-rw-r--r--examples/widgets/tooltips/shapeitem.cpp2
-rw-r--r--examples/widgets/tooltips/shapeitem.h2
-rw-r--r--examples/widgets/tooltips/sortingbox.cpp2
-rw-r--r--examples/widgets/tooltips/sortingbox.h2
-rw-r--r--examples/widgets/validators/ledwidget.cpp2
-rw-r--r--examples/widgets/validators/ledwidget.h2
-rw-r--r--examples/widgets/validators/localeselector.cpp2
-rw-r--r--examples/widgets/validators/localeselector.h2
-rw-r--r--examples/widgets/validators/main.cpp2
-rw-r--r--examples/widgets/wiggly/dialog.cpp2
-rw-r--r--examples/widgets/wiggly/dialog.h2
-rw-r--r--examples/widgets/wiggly/main.cpp2
-rw-r--r--examples/widgets/wiggly/wigglywidget.cpp2
-rw-r--r--examples/widgets/wiggly/wigglywidget.h2
-rw-r--r--examples/widgets/windowflags/controllerwindow.cpp2
-rw-r--r--examples/widgets/windowflags/controllerwindow.h2
-rw-r--r--examples/widgets/windowflags/main.cpp2
-rw-r--r--examples/widgets/windowflags/previewwindow.cpp2
-rw-r--r--examples/widgets/windowflags/previewwindow.h2
-rw-r--r--examples/xml/dombookmarks/main.cpp2
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp2
-rw-r--r--examples/xml/dombookmarks/mainwindow.h2
-rw-r--r--examples/xml/dombookmarks/xbeltree.cpp2
-rw-r--r--examples/xml/dombookmarks/xbeltree.h2
-rw-r--r--examples/xml/htmlinfo/main.cpp2
-rw-r--r--examples/xml/rsslisting/main.cpp2
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp2
-rw-r--r--examples/xml/rsslisting/rsslisting.h2
-rw-r--r--examples/xml/saxbookmarks/main.cpp2
-rw-r--r--examples/xml/saxbookmarks/mainwindow.cpp2
-rw-r--r--examples/xml/saxbookmarks/mainwindow.h2
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.cpp2
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.h2
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.cpp2
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.h2
-rw-r--r--examples/xml/streambookmarks/main.cpp2
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp2
-rw-r--r--examples/xml/streambookmarks/mainwindow.h2
-rw-r--r--examples/xml/streambookmarks/xbelreader.cpp2
-rw-r--r--examples/xml/streambookmarks/xbelreader.h2
-rw-r--r--examples/xml/streambookmarks/xbelwriter.cpp2
-rw-r--r--examples/xml/streambookmarks/xbelwriter.h2
-rw-r--r--examples/xml/xmlstreamlint/main.cpp2
-rw-r--r--header.BSD2
-rw-r--r--header.FDL2
-rw-r--r--header.LGPL2
-rw-r--r--header.LGPL-ONLY2
-rw-r--r--mkspecs/aix-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/aix-g++/qplatformdefs.h2
-rw-r--r--mkspecs/aix-xlc-64/qplatformdefs.h2
-rw-r--r--mkspecs/aix-xlc/qplatformdefs.h2
-rw-r--r--mkspecs/cmake/Qt5BasicConfig.cmake.in32
-rw-r--r--mkspecs/common/aix/qplatformdefs.h2
-rw-r--r--mkspecs/common/c89/qplatformdefs.h2
-rw-r--r--mkspecs/common/linux.conf1
-rw-r--r--mkspecs/common/mac/qplatformdefs.h2
-rw-r--r--mkspecs/common/posix/qplatformdefs.h2
-rw-r--r--mkspecs/common/wince/qplatformdefs.h2
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h2
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h2
-rw-r--r--mkspecs/features/create_cmake.prf34
-rw-r--r--mkspecs/features/declarative_debug.prf2
-rw-r--r--mkspecs/features/qt_module_config.prf1
-rw-r--r--mkspecs/features/qt_targets.prf2
-rw-r--r--mkspecs/features/qttest_p4.prf13
-rw-r--r--mkspecs/features/testcase.prf25
-rw-r--r--mkspecs/features/unix/default_pre.prf4
-rw-r--r--mkspecs/features/wayland-scanner.prf32
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h2
-rw-r--r--mkspecs/freebsd-g++34/qplatformdefs.h2
-rw-r--r--mkspecs/freebsd-g++40/qplatformdefs.h2
-rw-r--r--mkspecs/freebsd-icc/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-acc-64/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-acc-o64/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-acc/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-g++/qplatformdefs.h2
-rw-r--r--mkspecs/hpuxi-acc-32/qplatformdefs.h2
-rw-r--r--mkspecs/hpuxi-acc-64/qplatformdefs.h2
-rw-r--r--mkspecs/hpuxi-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h2
-rw-r--r--mkspecs/irix-cc-64/qplatformdefs.h2
-rw-r--r--mkspecs/irix-cc/qplatformdefs.h2
-rw-r--r--mkspecs/irix-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/irix-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h2
-rw-r--r--mkspecs/linux-ecc-64/qplatformdefs.h2
-rw-r--r--mkspecs/linux-g++-32/qplatformdefs.h2
-rw-r--r--mkspecs/linux-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/linux-g++-maemo/qplatformdefs.h2
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-icc-32/qplatformdefs.h2
-rw-r--r--mkspecs/linux-icc-64/qplatformdefs.h2
-rw-r--r--mkspecs/linux-icc/qplatformdefs.h2
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h2
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h2
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h2
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h2
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h2
-rw-r--r--mkspecs/macx-g++40/qplatformdefs.h2
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h2
-rw-r--r--mkspecs/macx-icc/qplatformdefs.h2
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h2
-rw-r--r--[-rwxr-xr-x]mkspecs/macx-pbuilder/qmake.conf0
-rw-r--r--mkspecs/macx-pbuilder/qplatformdefs.h2
-rw-r--r--[-rwxr-xr-x]mkspecs/macx-xcode/qmake.conf0
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h2
-rw-r--r--mkspecs/macx-xlc/qplatformdefs.h2
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h2
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h2
-rw-r--r--mkspecs/sco-cc/qplatformdefs.h2
-rw-r--r--mkspecs/sco-g++/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-cc-64-stlport/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-cc-stlport/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h2
-rw-r--r--mkspecs/tru64-cxx/qplatformdefs.h2
-rw-r--r--mkspecs/tru64-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unixware-cc/qplatformdefs.h2
-rw-r--r--mkspecs/unixware-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/integrity-ghs/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/linux-armcc/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/linux-clang/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/linux-host-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/macx-clang/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qnx-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/integrity-arm-cxarm/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/integrity-ppc-cxppc/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/qnx-641/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/win32-borland/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/win32-g++-cross/qmake.conf6
-rw-r--r--mkspecs/unsupported/win32-g++-cross/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/win32-msvc2003/qplatformdefs.h2
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h2
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h2
-rw-r--r--mkspecs/win32-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/win32-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/win32-msvc2010/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wince70embedded-armv4i-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf28
-rw-r--r--mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h (renamed from config.tests/unix/icd/icd.cpp)18
-rw-r--r--mkspecs/wince70embedded-x86-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wince70embedded-x86-msvc2008/qmake.conf27
-rw-r--r--mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h (renamed from tests/auto/v8/v8test.h)21
-rw-r--r--mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm50smart-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm50smart-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm60professional-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm60professional-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm60standard-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm60standard-msvc2008/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm65professional-msvc2005/qplatformdefs.h2
-rw-r--r--mkspecs/wincewm65professional-msvc2008/qplatformdefs.h2
-rw-r--r--qmake/Makefile.unix1
-rw-r--r--qmake/Makefile.win322
-rw-r--r--qmake/Makefile.win32-g++2
-rw-r--r--qmake/Makefile.win32-g++-sh2
-rw-r--r--qmake/cachekeys.h2
-rw-r--r--qmake/generators/integrity/gbuild.cpp2
-rw-r--r--qmake/generators/integrity/gbuild.h2
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp6
-rw-r--r--qmake/generators/mac/pbuilder_pbx.h4
-rw-r--r--qmake/generators/makefile.cpp57
-rw-r--r--qmake/generators/makefile.h2
-rw-r--r--qmake/generators/makefiledeps.cpp2
-rw-r--r--qmake/generators/makefiledeps.h2
-rw-r--r--qmake/generators/metamakefile.cpp8
-rw-r--r--qmake/generators/metamakefile.h2
-rw-r--r--qmake/generators/projectgenerator.cpp4
-rw-r--r--qmake/generators/projectgenerator.h2
-rw-r--r--qmake/generators/unix/unixmake.cpp2
-rw-r--r--qmake/generators/unix/unixmake.h2
-rw-r--r--qmake/generators/unix/unixmake2.cpp2
-rw-r--r--qmake/generators/win32/borland_bmake.cpp2
-rw-r--r--qmake/generators/win32/borland_bmake.h2
-rw-r--r--qmake/generators/win32/mingw_make.cpp2
-rw-r--r--qmake/generators/win32/mingw_make.h2
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp8
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.h2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp2
-rw-r--r--qmake/generators/win32/msvc_nmake.h2
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp11
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp12
-rw-r--r--qmake/generators/win32/msvc_vcproj.h8
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp2
-rw-r--r--qmake/generators/win32/msvc_vcxproj.h2
-rw-r--r--qmake/generators/win32/winmakefile.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.h2
-rw-r--r--qmake/generators/xmloutput.cpp2
-rw-r--r--qmake/generators/xmloutput.h2
-rw-r--r--qmake/main.cpp2
-rw-r--r--qmake/meta.cpp8
-rw-r--r--qmake/meta.h12
-rw-r--r--qmake/option.cpp2
-rw-r--r--qmake/option.h2
-rw-r--r--qmake/project.cpp109
-rw-r--r--qmake/project.h52
-rw-r--r--qmake/property.cpp3
-rw-r--r--qmake/property.h2
-rw-r--r--qmake/qmake_pch.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-greek.c2
-rw-r--r--src/3rdparty/libpng/pnglibconf.h4
-rw-r--r--src/3rdparty/s60/eiksoftkeyimage.h2
-rw-r--r--src/3rdparty/sqlite/sqlite3.c23
m---------src/3rdparty/v80
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in10
-rw-r--r--src/corelib/Qt5CoreMacros.cmake321
-rw-r--r--src/corelib/animation/qabstractanimation.cpp501
-rw-r--r--src/corelib/animation/qabstractanimation.h2
-rw-r--r--src/corelib/animation/qabstractanimation_p.h111
-rw-r--r--src/corelib/animation/qanimationgroup.cpp2
-rw-r--r--src/corelib/animation/qanimationgroup.h2
-rw-r--r--src/corelib/animation/qanimationgroup_p.h2
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp2
-rw-r--r--src/corelib/animation/qparallelanimationgroup.h2
-rw-r--r--src/corelib/animation/qparallelanimationgroup_p.h2
-rw-r--r--src/corelib/animation/qpauseanimation.cpp2
-rw-r--r--src/corelib/animation/qpauseanimation.h2
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp2
-rw-r--r--src/corelib/animation/qpropertyanimation.h2
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h2
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp2
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h2
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h2
-rw-r--r--src/corelib/animation/qvariantanimation.cpp2
-rw-r--r--src/corelib/animation/qvariantanimation.h2
-rw-r--r--src/corelib/animation/qvariantanimation_p.h2
-rw-r--r--src/corelib/arch/alpha/qatomic_alpha.s2
-rw-r--r--src/corelib/arch/arm/qatomic_arm.cpp2
-rw-r--r--src/corelib/arch/generic/qatomic_generic_unix.cpp2
-rw-r--r--src/corelib/arch/generic/qatomic_generic_windows.cpp2
-rw-r--r--src/corelib/arch/ia64/qatomic_ia64.s2
-rw-r--r--src/corelib/arch/macosx/qatomic32_ppc.s2
-rw-r--r--src/corelib/arch/mips/qatomic_mips32.s2
-rw-r--r--src/corelib/arch/mips/qatomic_mips64.s2
-rw-r--r--src/corelib/arch/parisc/q_ldcw.s2
-rw-r--r--src/corelib/arch/parisc/qatomic_parisc.cpp2
-rw-r--r--src/corelib/arch/powerpc/qatomic32.s2
-rw-r--r--src/corelib/arch/powerpc/qatomic64.s2
-rw-r--r--src/corelib/arch/qatomic_alpha.h2
-rw-r--r--src/corelib/arch/qatomic_arch.h2
-rw-r--r--src/corelib/arch/qatomic_arm.h2
-rw-r--r--src/corelib/arch/qatomic_armv5.h2
-rw-r--r--src/corelib/arch/qatomic_armv6.h2
-rw-r--r--src/corelib/arch/qatomic_armv7.h2
-rw-r--r--src/corelib/arch/qatomic_avr32.h2
-rw-r--r--src/corelib/arch/qatomic_bfin.h2
-rw-r--r--src/corelib/arch/qatomic_bootstrap.h2
-rw-r--r--src/corelib/arch/qatomic_generic.h2
-rw-r--r--src/corelib/arch/qatomic_i386.h2
-rw-r--r--src/corelib/arch/qatomic_ia64.h2
-rw-r--r--src/corelib/arch/qatomic_integrity.h2
-rw-r--r--src/corelib/arch/qatomic_macosx.h2
-rw-r--r--src/corelib/arch/qatomic_mips.h2
-rw-r--r--src/corelib/arch/qatomic_parisc.h2
-rw-r--r--src/corelib/arch/qatomic_powerpc.h2
-rw-r--r--src/corelib/arch/qatomic_s390.h2
-rw-r--r--src/corelib/arch/qatomic_sh.h2
-rw-r--r--src/corelib/arch/qatomic_sh4a.h2
-rw-r--r--src/corelib/arch/qatomic_sparc.h2
-rw-r--r--src/corelib/arch/qatomic_symbian.h2
-rw-r--r--src/corelib/arch/qatomic_vxworks.h2
-rw-r--r--src/corelib/arch/qatomic_windows.h2
-rw-r--r--src/corelib/arch/qatomic_windowsce.h2
-rw-r--r--src/corelib/arch/qatomic_x86_64.h2
-rw-r--r--src/corelib/arch/sh/qatomic_sh.cpp2
-rw-r--r--src/corelib/arch/sparc/qatomic32.s2
-rw-r--r--src/corelib/arch/sparc/qatomic64.s2
-rw-r--r--src/corelib/arch/sparc/qatomic_sparc.cpp2
-rw-r--r--src/corelib/codecs/codecs.pri3
-rw-r--r--src/corelib/codecs/codecs.qdoc2
-rw-r--r--src/corelib/codecs/qfontlaocodec.cpp2
-rw-r--r--src/corelib/codecs/qfontlaocodec_p.h2
-rw-r--r--src/corelib/codecs/qiconvcodec.cpp2
-rw-r--r--src/corelib/codecs/qiconvcodec_p.h2
-rw-r--r--src/corelib/codecs/qisciicodec.cpp2
-rw-r--r--src/corelib/codecs/qisciicodec_p.h2
-rw-r--r--src/corelib/codecs/qlatincodec.cpp2
-rw-r--r--src/corelib/codecs/qlatincodec_p.h2
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp10
-rw-r--r--src/corelib/codecs/qsimplecodec_p.h6
-rw-r--r--src/corelib/codecs/qtextcodec.cpp68
-rw-r--r--src/corelib/codecs/qtextcodec.h9
-rw-r--r--src/corelib/codecs/qtextcodec_p.h2
-rw-r--r--src/corelib/codecs/qtextcodec_symbian.cpp689
-rw-r--r--src/corelib/codecs/qtextcodecplugin.cpp2
-rw-r--r--src/corelib/codecs/qtextcodecplugin.h2
-rw-r--r--src/corelib/codecs/qtsciicodec.cpp2
-rw-r--r--src/corelib/codecs/qtsciicodec_p.h2
-rw-r--r--src/corelib/codecs/qutfcodec.cpp2
-rw-r--r--src/corelib/codecs/qutfcodec_p.h2
-rw-r--r--src/corelib/concurrent/qfuture.cpp2
-rw-r--r--src/corelib/concurrent/qfuture.h2
-rw-r--r--src/corelib/concurrent/qfutureinterface.cpp2
-rw-r--r--src/corelib/concurrent/qfutureinterface.h2
-rw-r--r--src/corelib/concurrent/qfutureinterface_p.h2
-rw-r--r--src/corelib/concurrent/qfuturesynchronizer.cpp2
-rw-r--r--src/corelib/concurrent/qfuturesynchronizer.h2
-rw-r--r--src/corelib/concurrent/qfuturewatcher.cpp2
-rw-r--r--src/corelib/concurrent/qfuturewatcher.h2
-rw-r--r--src/corelib/concurrent/qfuturewatcher_p.h2
-rw-r--r--src/corelib/concurrent/qrunnable.cpp2
-rw-r--r--src/corelib/concurrent/qrunnable.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentcompilertest.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentexception.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentexception.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentfilter.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentfilter.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentfilterkernel.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentfunctionwrappers.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentmapkernel.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentmedian.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentreducekernel.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentresultstore.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentresultstore.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentrun.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentrun.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentrunbase.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentstoredfunctioncall.h2
-rw-r--r--src/corelib/concurrent/qtconcurrentthreadengine.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentthreadengine.h2
-rw-r--r--src/corelib/concurrent/qthreadpool.cpp2
-rw-r--r--src/corelib/concurrent/qthreadpool.h2
-rw-r--r--src/corelib/concurrent/qthreadpool_p.h2
-rw-r--r--src/corelib/corelib.pro1
-rw-r--r--src/corelib/global/qconfig-dist.h2
-rw-r--r--src/corelib/global/qconfig-large.h2
-rw-r--r--src/corelib/global/qconfig-medium.h2
-rw-r--r--src/corelib/global/qconfig-minimal.h5
-rw-r--r--src/corelib/global/qconfig-nacl.h2
-rw-r--r--src/corelib/global/qconfig-small.h5
-rw-r--r--src/corelib/global/qendian.h2
-rw-r--r--src/corelib/global/qendian.qdoc2
-rw-r--r--src/corelib/global/qfeatures.h17
-rw-r--r--src/corelib/global/qfeatures.txt7
-rw-r--r--src/corelib/global/qglobal.cpp392
-rw-r--r--src/corelib/global/qglobal.h276
-rw-r--r--src/corelib/global/qlibraryinfo.cpp4
-rw-r--r--src/corelib/global/qlibraryinfo.h2
-rw-r--r--src/corelib/global/qmalloc.cpp8
-rw-r--r--src/corelib/global/qnamespace.h51
-rw-r--r--src/corelib/global/qnamespace.qdoc46
-rw-r--r--src/corelib/global/qnumeric.cpp2
-rw-r--r--src/corelib/global/qnumeric.h2
-rw-r--r--src/corelib/global/qnumeric_p.h2
-rw-r--r--src/corelib/global/qt_pch.h2
-rw-r--r--src/corelib/global/qt_windows.h2
-rw-r--r--src/corelib/io/io.pri57
-rw-r--r--src/corelib/io/qabstractfileengine.cpp2
-rw-r--r--src/corelib/io/qabstractfileengine.h2
-rw-r--r--src/corelib/io/qabstractfileengine_p.h2
-rw-r--r--src/corelib/io/qbuffer.cpp10
-rw-r--r--src/corelib/io/qbuffer.h2
-rw-r--r--src/corelib/io/qdatastream.cpp2
-rw-r--r--src/corelib/io/qdatastream.h2
-rw-r--r--src/corelib/io/qdatastream_p.h2
-rw-r--r--src/corelib/io/qdataurl.cpp68
-rw-r--r--src/corelib/io/qdataurl_p.h4
-rw-r--r--src/corelib/io/qdebug.cpp2
-rw-r--r--src/corelib/io/qdebug.h21
-rw-r--r--src/corelib/io/qdir.cpp4
-rw-r--r--src/corelib/io/qdir.h2
-rw-r--r--src/corelib/io/qdir_p.h2
-rw-r--r--src/corelib/io/qdiriterator.cpp2
-rw-r--r--src/corelib/io/qdiriterator.h2
-rw-r--r--src/corelib/io/qfile.cpp2
-rw-r--r--src/corelib/io/qfile.h2
-rw-r--r--src/corelib/io/qfile_p.h2
-rw-r--r--src/corelib/io/qfileinfo.cpp2
-rw-r--r--src/corelib/io/qfileinfo.h2
-rw-r--r--src/corelib/io/qfileinfo_p.h2
-rw-r--r--src/corelib/io/qfilesystemengine.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_mac.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_p.h2
-rw-r--r--src/corelib/io/qfilesystemengine_symbian.cpp406
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp63
-rw-r--r--src/corelib/io/qfilesystementry.cpp2
-rw-r--r--src/corelib/io/qfilesystementry_p.h2
-rw-r--r--src/corelib/io/qfilesystemiterator_p.h2
-rw-r--r--src/corelib/io/qfilesystemiterator_symbian.cpp127
-rw-r--r--src/corelib/io/qfilesystemiterator_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemiterator_win.cpp2
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h2
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp371
-rw-r--r--src/corelib/io/qfilesystemwatcher.h10
-rw-r--r--src/corelib/io/qfilesystemwatcher_dnotify.cpp461
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.cpp492
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents_p.h132
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp37
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify_p.h17
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp296
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h15
-rw-r--r--src/corelib/io/qfilesystemwatcher_p.h17
-rw-r--r--src/corelib/io/qfilesystemwatcher_polling.cpp151
-rw-r--r--src/corelib/io/qfilesystemwatcher_polling_p.h (renamed from src/corelib/io/qfilesystemwatcher_dnotify_p.h)113
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian.cpp273
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp35
-rw-r--r--src/corelib/io/qfilesystemwatcher_win_p.h10
-rw-r--r--src/corelib/io/qfsfileengine.cpp2
-rw-r--r--src/corelib/io/qfsfileengine.h2
-rw-r--r--src/corelib/io/qfsfileengine_iterator.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_iterator_p.h2
-rw-r--r--src/corelib/io/qfsfileengine_p.h2
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp5
-rw-r--r--src/corelib/io/qiodevice.cpp2
-rw-r--r--src/corelib/io/qiodevice.h2
-rw-r--r--src/corelib/io/qiodevice_p.h2
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp2
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice_p.h2
-rw-r--r--src/corelib/io/qprocess.cpp14
-rw-r--r--src/corelib/io/qprocess.h2
-rw-r--r--src/corelib/io/qprocess_p.h2
-rw-r--r--src/corelib/io/qprocess_symbian.cpp1072
-rw-r--r--src/corelib/io/qprocess_unix.cpp2
-rw-r--r--src/corelib/io/qprocess_win.cpp125
-rw-r--r--src/corelib/io/qprocess_wince.cpp330
-rw-r--r--src/corelib/io/qresource.cpp4
-rw-r--r--src/corelib/io/qresource.h2
-rw-r--r--src/corelib/io/qresource_iterator.cpp2
-rw-r--r--src/corelib/io/qresource_iterator_p.h2
-rw-r--r--src/corelib/io/qresource_p.h2
-rw-r--r--src/corelib/io/qsettings.cpp2
-rw-r--r--src/corelib/io/qsettings.h2
-rw-r--r--src/corelib/io/qsettings_mac.cpp2
-rw-r--r--src/corelib/io/qsettings_p.h2
-rw-r--r--src/corelib/io/qsettings_win.cpp2
-rw-r--r--src/corelib/io/qstandardpaths.cpp4
-rw-r--r--src/corelib/io/qstandardpaths.h5
-rw-r--r--src/corelib/io/qstandardpaths_mac.cpp6
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp13
-rw-r--r--src/corelib/io/qstandardpaths_win.cpp5
-rw-r--r--src/corelib/io/qtemporarydir.cpp2
-rw-r--r--src/corelib/io/qtemporarydir.h2
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
-rw-r--r--src/corelib/io/qtemporaryfile.h2
-rw-r--r--src/corelib/io/qtextstream.cpp2
-rw-r--r--src/corelib/io/qtextstream.h2
-rw-r--r--src/corelib/io/qtldurl.cpp2
-rw-r--r--src/corelib/io/qtldurl_p.h2
-rw-r--r--src/corelib/io/qurl.cpp2
-rw-r--r--src/corelib/io/qurl.h2
-rw-r--r--src/corelib/io/qwindowspipereader.cpp315
-rw-r--r--src/corelib/io/qwindowspipereader_p.h (renamed from src/corelib/io/qfilesystemwatcher_symbian_p.h)106
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp2
-rw-r--r--src/corelib/io/qwindowspipewriter_p.h2
-rw-r--r--src/corelib/itemmodels/itemmodels.pri20
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp (renamed from src/corelib/kernel/qabstractitemmodel.cpp)42
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h (renamed from src/corelib/kernel/qabstractitemmodel.h)23
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel_p.h (renamed from src/corelib/kernel/qabstractitemmodel_p.h)2
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp (renamed from src/widgets/itemviews/qabstractproxymodel.cpp)4
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h (renamed from src/widgets/itemviews/qabstractproxymodel.h)6
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel_p.h (renamed from src/widgets/itemviews/qabstractproxymodel_p.h)4
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.cpp (renamed from src/widgets/itemviews/qidentityproxymodel.cpp)2
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.h (renamed from src/widgets/itemviews/qidentityproxymodel.h)6
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp (renamed from src/widgets/itemviews/qitemselectionmodel.cpp)8
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h (renamed from src/widgets/itemviews/qitemselectionmodel.h)12
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel_p.h (renamed from src/widgets/itemviews/qitemselectionmodel_p.h)2
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp (renamed from src/widgets/itemviews/qsortfilterproxymodel.cpp)18
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.h (renamed from src/widgets/itemviews/qsortfilterproxymodel.h)8
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.cpp (renamed from src/widgets/itemviews/qstringlistmodel.cpp)6
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.h (renamed from src/widgets/itemviews/qstringlistmodel.h)8
-rw-r--r--src/corelib/kernel/kernel.pri76
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp42
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.h24
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher_p.h2
-rw-r--r--src/corelib/kernel/qbasictimer.cpp54
-rw-r--r--src/corelib/kernel/qbasictimer.h4
-rw-r--r--src/corelib/kernel/qcore_mac.cpp2
-rw-r--r--src/corelib/kernel/qcore_mac_p.h2
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp317
-rw-r--r--src/corelib/kernel/qcore_symbian_p.h282
-rw-r--r--src/corelib/kernel/qcore_unix.cpp2
-rw-r--r--src/corelib/kernel/qcore_unix_p.h2
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp54
-rw-r--r--src/corelib/kernel/qcoreapplication.h8
-rw-r--r--src/corelib/kernel/qcoreapplication_mac.cpp2
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h2
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp2
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h2
-rw-r--r--src/corelib/kernel/qcoreevent.cpp5
-rw-r--r--src/corelib/kernel/qcoreevent.h5
-rw-r--r--src/corelib/kernel/qcoreglobaldata.cpp2
-rw-r--r--src/corelib/kernel/qcoreglobaldata_p.h2
-rw-r--r--src/corelib/kernel/qcrashhandler.cpp2
-rw-r--r--src/corelib/kernel/qcrashhandler_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp6
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h4
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp1316
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h327
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp328
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h49
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp65
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h7
-rw-r--r--src/corelib/kernel/qeventloop.cpp2
-rw-r--r--src/corelib/kernel/qeventloop.h2
-rw-r--r--src/corelib/kernel/qfunctions_nacl.cpp2
-rw-r--r--src/corelib/kernel/qfunctions_nacl.h2
-rw-r--r--src/corelib/kernel/qfunctions_p.h2
-rw-r--r--src/corelib/kernel/qfunctions_vxworks.cpp2
-rw-r--r--src/corelib/kernel/qfunctions_vxworks.h2
-rw-r--r--src/corelib/kernel/qfunctions_wince.cpp2
-rw-r--r--src/corelib/kernel/qfunctions_wince.h2
-rw-r--r--src/corelib/kernel/qmath.cpp2
-rw-r--r--src/corelib/kernel/qmath.h2
-rw-r--r--src/corelib/kernel/qmath.qdoc2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp23
-rw-r--r--src/corelib/kernel/qmetaobject.h2
-rw-r--r--src/corelib/kernel/qmetaobject_moc_p.h2
-rw-r--r--src/corelib/kernel/qmetaobject_p.h2
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp35
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder_p.h6
-rw-r--r--src/corelib/kernel/qmetatype.cpp158
-rw-r--r--src/corelib/kernel/qmetatype.h30
-rw-r--r--src/corelib/kernel/qmetatype_p.h85
-rw-r--r--src/corelib/kernel/qmetatypeswitcher_p.h2
-rw-r--r--src/corelib/kernel/qmimedata.cpp2
-rw-r--r--src/corelib/kernel/qmimedata.h2
-rw-r--r--src/corelib/kernel/qobject.cpp290
-rw-r--r--src/corelib/kernel/qobject.h38
-rw-r--r--src/corelib/kernel/qobject_impl.h38
-rw-r--r--src/corelib/kernel/qobject_p.h11
-rw-r--r--src/corelib/kernel/qobjectcleanuphandler.cpp2
-rw-r--r--src/corelib/kernel/qobjectcleanuphandler.h2
-rw-r--r--src/corelib/kernel/qobjectdefs.h20
-rw-r--r--src/corelib/kernel/qpointer.cpp22
-rw-r--r--src/corelib/kernel/qpointer.h39
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp2
-rw-r--r--src/corelib/kernel/qsharedmemory.h2
-rw-r--r--src/corelib/kernel/qsharedmemory_p.h2
-rw-r--r--src/corelib/kernel/qsharedmemory_symbian.cpp173
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp2
-rw-r--r--src/corelib/kernel/qsharedmemory_win.cpp2
-rw-r--r--src/corelib/kernel/qsignalmapper.cpp2
-rw-r--r--src/corelib/kernel/qsignalmapper.h2
-rw-r--r--src/corelib/kernel/qsocketnotifier.cpp4
-rw-r--r--src/corelib/kernel/qsocketnotifier.h6
-rw-r--r--src/corelib/kernel/qsystemerror.cpp60
-rw-r--r--src/corelib/kernel/qsystemerror_p.h2
-rw-r--r--src/corelib/kernel/qsystemsemaphore.cpp2
-rw-r--r--src/corelib/kernel/qsystemsemaphore.h2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_p.h2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_symbian.cpp138
-rw-r--r--src/corelib/kernel/qsystemsemaphore_unix.cpp2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_win.cpp2
-rw-r--r--src/corelib/kernel/qtcore_eval.cpp6
-rw-r--r--src/corelib/kernel/qtimer.cpp48
-rw-r--r--src/corelib/kernel/qtimer.h9
-rw-r--r--src/corelib/kernel/qtimerinfo_unix.cpp625
-rw-r--r--src/corelib/kernel/qtimerinfo_unix_p.h117
-rw-r--r--src/corelib/kernel/qtranslator.cpp2
-rw-r--r--src/corelib/kernel/qtranslator.h2
-rw-r--r--src/corelib/kernel/qtranslator_p.h2
-rw-r--r--src/corelib/kernel/qvariant.cpp393
-rw-r--r--src/corelib/kernel/qvariant.h28
-rw-r--r--src/corelib/kernel/qvariant_p.h144
-rw-r--r--src/corelib/kernel/qwineventnotifier.cpp2
-rw-r--r--src/corelib/kernel/qwineventnotifier.h2
-rw-r--r--src/corelib/plugin/qelfparser_p.cpp2
-rw-r--r--src/corelib/plugin/qelfparser_p.h2
-rw-r--r--src/corelib/plugin/qfactoryinterface.h2
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp2
-rw-r--r--src/corelib/plugin/qfactoryloader_p.h2
-rw-r--r--src/corelib/plugin/qlibrary.cpp96
-rw-r--r--src/corelib/plugin/qlibrary.h2
-rw-r--r--src/corelib/plugin/qlibrary_p.h2
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp2
-rw-r--r--src/corelib/plugin/qplugin.h2
-rw-r--r--src/corelib/plugin/qplugin.qdoc2
-rw-r--r--src/corelib/plugin/qpluginloader.cpp62
-rw-r--r--src/corelib/plugin/qpluginloader.h2
-rw-r--r--src/corelib/plugin/qsystemlibrary.cpp2
-rw-r--r--src/corelib/plugin/qsystemlibrary_p.h2
-rw-r--r--src/corelib/plugin/quuid.cpp85
-rw-r--r--src/corelib/plugin/quuid.h36
-rw-r--r--src/corelib/statemachine/qabstractstate.cpp2
-rw-r--r--src/corelib/statemachine/qabstractstate.h2
-rw-r--r--src/corelib/statemachine/qabstractstate_p.h2
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp2
-rw-r--r--src/corelib/statemachine/qabstracttransition.h2
-rw-r--r--src/corelib/statemachine/qabstracttransition_p.h2
-rw-r--r--src/corelib/statemachine/qeventtransition.cpp2
-rw-r--r--src/corelib/statemachine/qeventtransition.h2
-rw-r--r--src/corelib/statemachine/qeventtransition_p.h2
-rw-r--r--src/corelib/statemachine/qfinalstate.cpp2
-rw-r--r--src/corelib/statemachine/qfinalstate.h2
-rw-r--r--src/corelib/statemachine/qhistorystate.cpp2
-rw-r--r--src/corelib/statemachine/qhistorystate.h2
-rw-r--r--src/corelib/statemachine/qhistorystate_p.h2
-rw-r--r--src/corelib/statemachine/qsignaleventgenerator_p.h2
-rw-r--r--src/corelib/statemachine/qsignaltransition.cpp2
-rw-r--r--src/corelib/statemachine/qsignaltransition.h2
-rw-r--r--src/corelib/statemachine/qsignaltransition_p.h2
-rw-r--r--src/corelib/statemachine/qstate.cpp2
-rw-r--r--src/corelib/statemachine/qstate.h2
-rw-r--r--src/corelib/statemachine/qstate_p.h2
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp2
-rw-r--r--src/corelib/statemachine/qstatemachine.h2
-rw-r--r--src/corelib/statemachine/qstatemachine_p.h2
-rw-r--r--src/corelib/thread/qatomic.cpp2
-rw-r--r--src/corelib/thread/qatomic.h4
-rw-r--r--src/corelib/thread/qmutex.cpp2
-rw-r--r--src/corelib/thread/qmutex.h2
-rw-r--r--src/corelib/thread/qmutex_linux.cpp2
-rw-r--r--src/corelib/thread/qmutex_mac.cpp2
-rw-r--r--src/corelib/thread/qmutex_p.h2
-rw-r--r--src/corelib/thread/qmutex_unix.cpp2
-rw-r--r--src/corelib/thread/qmutex_win.cpp2
-rw-r--r--src/corelib/thread/qmutexpool.cpp2
-rw-r--r--src/corelib/thread/qmutexpool_p.h2
-rw-r--r--src/corelib/thread/qoldbasicatomic.h (renamed from src/corelib/thread/qbasicatomic.h)2
-rw-r--r--src/corelib/thread/qorderedmutexlocker_p.h2
-rw-r--r--src/corelib/thread/qreadwritelock.cpp15
-rw-r--r--src/corelib/thread/qreadwritelock.h5
-rw-r--r--src/corelib/thread/qreadwritelock_p.h2
-rw-r--r--src/corelib/thread/qsemaphore.cpp2
-rw-r--r--src/corelib/thread/qsemaphore.h2
-rw-r--r--src/corelib/thread/qthread.cpp2
-rw-r--r--src/corelib/thread/qthread.h2
-rw-r--r--src/corelib/thread/qthread_p.h16
-rw-r--r--src/corelib/thread/qthread_unix.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/corelib/thread/qthreadstorage.cpp2
-rw-r--r--src/corelib/thread/qthreadstorage.h2
-rw-r--r--src/corelib/thread/qwaitcondition.h2
-rw-r--r--src/corelib/thread/qwaitcondition.qdoc2
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp2
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp2
-rw-r--r--src/corelib/thread/thread.pri4
-rw-r--r--src/corelib/tools/qalgorithms.h2
-rw-r--r--src/corelib/tools/qalgorithms.qdoc2
-rw-r--r--src/corelib/tools/qbitarray.cpp20
-rw-r--r--src/corelib/tools/qbitarray.h6
-rw-r--r--src/corelib/tools/qbytearray.cpp32
-rw-r--r--src/corelib/tools/qbytearray.h2
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp2
-rw-r--r--src/corelib/tools/qbytearraymatcher.h2
-rw-r--r--src/corelib/tools/qbytedata_p.h2
-rw-r--r--src/corelib/tools/qcache.h5
-rw-r--r--src/corelib/tools/qcache.qdoc2
-rw-r--r--src/corelib/tools/qchar.cpp2
-rw-r--r--src/corelib/tools/qchar.h2
-rw-r--r--src/corelib/tools/qcontainerfwd.h2
-rw-r--r--src/corelib/tools/qcontiguouscache.cpp2
-rw-r--r--src/corelib/tools/qcontiguouscache.h2
-rw-r--r--src/corelib/tools/qcryptographichash.cpp25
-rw-r--r--src/corelib/tools/qcryptographichash.h4
-rw-r--r--src/corelib/tools/qdatetime.cpp83
-rw-r--r--src/corelib/tools/qdatetime.h19
-rw-r--r--src/corelib/tools/qdatetime_p.h2
-rw-r--r--src/corelib/tools/qeasingcurve.cpp2
-rw-r--r--src/corelib/tools/qeasingcurve.h2
-rw-r--r--src/corelib/tools/qelapsedtimer.cpp2
-rw-r--r--src/corelib/tools/qelapsedtimer.h2
-rw-r--r--src/corelib/tools/qelapsedtimer_generic.cpp2
-rw-r--r--src/corelib/tools/qelapsedtimer_mac.cpp2
-rw-r--r--src/corelib/tools/qelapsedtimer_symbian.cpp2
-rw-r--r--src/corelib/tools/qelapsedtimer_unix.cpp2
-rw-r--r--src/corelib/tools/qelapsedtimer_win.cpp2
-rw-r--r--src/corelib/tools/qfreelist.cpp2
-rw-r--r--src/corelib/tools/qfreelist_p.h2
-rw-r--r--src/corelib/tools/qharfbuzz.cpp2
-rw-r--r--src/corelib/tools/qharfbuzz_p.h2
-rw-r--r--src/corelib/tools/qhash.cpp6
-rw-r--r--src/corelib/tools/qhash.h2
-rw-r--r--src/corelib/tools/qiterator.h2
-rw-r--r--src/corelib/tools/qiterator.qdoc2
-rw-r--r--src/corelib/tools/qline.cpp2
-rw-r--r--src/corelib/tools/qline.h2
-rw-r--r--src/corelib/tools/qlinkedlist.cpp2
-rw-r--r--src/corelib/tools/qlinkedlist.h2
-rw-r--r--src/corelib/tools/qlist.cpp10
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qlocale.cpp22
-rw-r--r--src/corelib/tools/qlocale.h14
-rw-r--r--src/corelib/tools/qlocale.qdoc6
-rw-r--r--src/corelib/tools/qlocale_data_p.h2
-rw-r--r--src/corelib/tools/qlocale_icu.cpp2
-rw-r--r--src/corelib/tools/qlocale_mac.mm2
-rw-r--r--src/corelib/tools/qlocale_p.h2
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp2
-rw-r--r--src/corelib/tools/qlocale_tools.cpp6
-rw-r--r--src/corelib/tools/qlocale_tools_p.h2
-rw-r--r--src/corelib/tools/qlocale_unix.cpp2
-rw-r--r--src/corelib/tools/qlocale_win.cpp2
-rw-r--r--src/corelib/tools/qmap.cpp8
-rw-r--r--src/corelib/tools/qmap.h2
-rw-r--r--src/corelib/tools/qmargins.cpp2
-rw-r--r--src/corelib/tools/qmargins.h2
-rw-r--r--src/corelib/tools/qpair.h2
-rw-r--r--src/corelib/tools/qpair.qdoc2
-rw-r--r--src/corelib/tools/qpodlist_p.h2
-rw-r--r--src/corelib/tools/qpoint.cpp2
-rw-r--r--src/corelib/tools/qpoint.h2
-rw-r--r--src/corelib/tools/qqueue.cpp2
-rw-r--r--src/corelib/tools/qqueue.h2
-rw-r--r--src/corelib/tools/qrect.cpp2
-rw-r--r--src/corelib/tools/qrect.h53
-rw-r--r--src/corelib/tools/qrefcount.cpp2
-rw-r--r--src/corelib/tools/qrefcount.h2
-rw-r--r--src/corelib/tools/qregexp.cpp12
-rw-r--r--src/corelib/tools/qregexp.h6
-rw-r--r--src/corelib/tools/qringbuffer_p.h2
-rw-r--r--src/corelib/tools/qscopedpointer.cpp2
-rw-r--r--src/corelib/tools/qscopedpointer.h2
-rw-r--r--src/corelib/tools/qscopedpointer_p.h2
-rw-r--r--src/corelib/tools/qscopedvaluerollback.cpp2
-rw-r--r--src/corelib/tools/qscopedvaluerollback.h2
-rw-r--r--src/corelib/tools/qset.h18
-rw-r--r--src/corelib/tools/qset.qdoc2
-rw-r--r--src/corelib/tools/qshareddata.cpp2
-rw-r--r--src/corelib/tools/qshareddata.h2
-rw-r--r--src/corelib/tools/qsharedpointer.cpp2
-rw-r--r--src/corelib/tools/qsharedpointer.h2
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h2
-rw-r--r--src/corelib/tools/qsimd.cpp2
-rw-r--r--src/corelib/tools/qsimd_p.h2
-rw-r--r--src/corelib/tools/qsize.cpp2
-rw-r--r--src/corelib/tools/qsize.h2
-rw-r--r--src/corelib/tools/qstack.cpp2
-rw-r--r--src/corelib/tools/qstack.h2
-rw-r--r--src/corelib/tools/qstring.cpp93
-rw-r--r--src/corelib/tools/qstring.h105
-rw-r--r--src/corelib/tools/qstringbuilder.cpp2
-rw-r--r--src/corelib/tools/qstringbuilder.h2
-rw-r--r--src/corelib/tools/qstringlist.cpp2
-rw-r--r--src/corelib/tools/qstringlist.h2
-rw-r--r--src/corelib/tools/qstringmatcher.cpp2
-rw-r--r--src/corelib/tools/qstringmatcher.h2
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp2
-rw-r--r--src/corelib/tools/qtextboundaryfinder.h2
-rw-r--r--src/corelib/tools/qtimeline.cpp2
-rw-r--r--src/corelib/tools/qtimeline.h2
-rw-r--r--src/corelib/tools/qtools_p.h2
-rw-r--r--src/corelib/tools/qunicodetables.cpp2
-rw-r--r--src/corelib/tools/qunicodetables_p.h2
-rw-r--r--src/corelib/tools/qvarlengtharray.h7
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc39
-rw-r--r--src/corelib/tools/qvector.cpp12
-rw-r--r--src/corelib/tools/qvector.h6
-rw-r--r--src/corelib/tools/qvsnprintf.cpp2
-rwxr-xr-xsrc/corelib/xml/make-parser.sh2
-rw-r--r--src/corelib/xml/qxmlstream.cpp10
-rw-r--r--src/corelib/xml/qxmlstream.g2
-rw-r--r--src/corelib/xml/qxmlstream.h2
-rw-r--r--src/corelib/xml/qxmlstream_p.h2
-rw-r--r--src/corelib/xml/qxmlutils.cpp2
-rw-r--r--src/corelib/xml/qxmlutils_p.h2
-rw-r--r--src/dbus/qdbus_symbols.cpp2
-rw-r--r--src/dbus/qdbus_symbols_p.h2
-rw-r--r--src/dbus/qdbusabstractadaptor.cpp2
-rw-r--r--src/dbus/qdbusabstractadaptor.h2
-rw-r--r--src/dbus/qdbusabstractadaptor_p.h2
-rw-r--r--src/dbus/qdbusabstractinterface.cpp2
-rw-r--r--src/dbus/qdbusabstractinterface.h2
-rw-r--r--src/dbus/qdbusabstractinterface_p.h2
-rw-r--r--src/dbus/qdbusargument.cpp2
-rw-r--r--src/dbus/qdbusargument.h2
-rw-r--r--src/dbus/qdbusargument_p.h8
-rw-r--r--src/dbus/qdbusconnection.cpp33
-rw-r--r--src/dbus/qdbusconnection.h2
-rw-r--r--src/dbus/qdbusconnection_p.h2
-rw-r--r--src/dbus/qdbusconnectioninterface.cpp2
-rw-r--r--src/dbus/qdbusconnectioninterface.h2
-rw-r--r--src/dbus/qdbusconnectionmanager_p.h2
-rw-r--r--src/dbus/qdbuscontext.cpp2
-rw-r--r--src/dbus/qdbuscontext.h2
-rw-r--r--src/dbus/qdbuscontext_p.h2
-rw-r--r--src/dbus/qdbusdemarshaller.cpp79
-rw-r--r--src/dbus/qdbuserror.cpp2
-rw-r--r--src/dbus/qdbuserror.h2
-rw-r--r--src/dbus/qdbusextratypes.cpp6
-rw-r--r--src/dbus/qdbusextratypes.h26
-rw-r--r--src/dbus/qdbusintegrator.cpp2
-rw-r--r--src/dbus/qdbusintegrator_p.h2
-rw-r--r--src/dbus/qdbusinterface.cpp2
-rw-r--r--src/dbus/qdbusinterface.h2
-rw-r--r--src/dbus/qdbusinterface_p.h2
-rw-r--r--src/dbus/qdbusinternalfilters.cpp2
-rw-r--r--src/dbus/qdbusintrospection.cpp2
-rw-r--r--src/dbus/qdbusintrospection_p.h2
-rw-r--r--src/dbus/qdbusmacros.h2
-rw-r--r--src/dbus/qdbusmarshaller.cpp2
-rw-r--r--src/dbus/qdbusmessage.cpp4
-rw-r--r--src/dbus/qdbusmessage.h2
-rw-r--r--src/dbus/qdbusmessage_p.h2
-rw-r--r--src/dbus/qdbusmetaobject.cpp2
-rw-r--r--src/dbus/qdbusmetaobject_p.h2
-rw-r--r--src/dbus/qdbusmetatype.cpp2
-rw-r--r--src/dbus/qdbusmetatype.h2
-rw-r--r--src/dbus/qdbusmetatype_p.h2
-rw-r--r--src/dbus/qdbusmisc.cpp2
-rw-r--r--src/dbus/qdbuspendingcall.cpp2
-rw-r--r--src/dbus/qdbuspendingcall.h2
-rw-r--r--src/dbus/qdbuspendingcall_p.h2
-rw-r--r--src/dbus/qdbuspendingreply.cpp2
-rw-r--r--src/dbus/qdbuspendingreply.h2
-rw-r--r--src/dbus/qdbusreply.cpp2
-rw-r--r--src/dbus/qdbusreply.h2
-rw-r--r--src/dbus/qdbusserver.cpp2
-rw-r--r--src/dbus/qdbusserver.h2
-rw-r--r--src/dbus/qdbusservicewatcher.cpp2
-rw-r--r--src/dbus/qdbusservicewatcher.h2
-rw-r--r--src/dbus/qdbusthreaddebug_p.h2
-rw-r--r--src/dbus/qdbusunixfiledescriptor.cpp2
-rw-r--r--src/dbus/qdbusunixfiledescriptor.h2
-rw-r--r--src/dbus/qdbusutil.cpp2
-rw-r--r--src/dbus/qdbusutil_p.h2
-rw-r--r--src/dbus/qdbusvirtualobject.cpp2
-rw-r--r--src/dbus/qdbusvirtualobject.h2
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp2
-rw-r--r--src/dbus/qdbusxmlparser.cpp2
-rw-r--r--src/dbus/qdbusxmlparser_p.h2
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in4
-rw-r--r--src/gui/accessible/accessible.pri12
-rw-r--r--src/gui/accessible/qaccessible.cpp336
-rw-r--r--src/gui/accessible/qaccessible.h165
-rw-r--r--src/gui/accessible/qaccessible2.cpp371
-rw-r--r--src/gui/accessible/qaccessible2.h45
-rw-r--r--src/gui/accessible/qaccessible_mac.mm2469
-rw-r--r--src/gui/accessible/qaccessible_mac_carbon.cpp119
-rw-r--r--src/gui/accessible/qaccessible_mac_cocoa.mm239
-rw-r--r--src/gui/accessible/qaccessible_mac_p.h479
-rw-r--r--src/gui/accessible/qaccessiblebridge.cpp2
-rw-r--r--src/gui/accessible/qaccessiblebridge.h2
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp39
-rw-r--r--src/gui/accessible/qaccessibleobject.h4
-rw-r--r--src/gui/accessible/qaccessibleplugin.cpp2
-rw-r--r--src/gui/accessible/qaccessibleplugin.h2
-rw-r--r--src/gui/accessible/qplatformaccessibility_qpa.cpp7
-rw-r--r--src/gui/accessible/qplatformaccessibility_qpa.h2
-rw-r--r--src/gui/egl/qegl.cpp2
-rw-r--r--src/gui/egl/qegl_p.h2
-rw-r--r--src/gui/egl/qegl_qpa.cpp2
-rw-r--r--src/gui/egl/qegl_stub.cpp2
-rw-r--r--src/gui/egl/qeglcontext_p.h2
-rw-r--r--src/gui/egl/qeglproperties.cpp2
-rw-r--r--src/gui/egl/qeglproperties_p.h2
-rw-r--r--src/gui/egl/qeglproperties_stub.cpp2
-rw-r--r--src/gui/image/qbitmap.cpp2
-rw-r--r--src/gui/image/qbitmap.h2
-rw-r--r--src/gui/image/qbmphandler.cpp2
-rw-r--r--src/gui/image/qbmphandler_p.h2
-rw-r--r--src/gui/image/qgifhandler.cpp2
-rw-r--r--src/gui/image/qgifhandler_p.h2
-rw-r--r--src/gui/image/qimage.cpp21
-rw-r--r--src/gui/image/qimage.h13
-rw-r--r--src/gui/image/qimage_neon.cpp2
-rw-r--r--src/gui/image/qimage_p.h2
-rw-r--r--src/gui/image/qimage_sse2.cpp2
-rw-r--r--src/gui/image/qimage_ssse3.cpp2
-rw-r--r--src/gui/image/qimageiohandler.cpp2
-rw-r--r--src/gui/image/qimageiohandler.h2
-rw-r--r--src/gui/image/qimagepixmapcleanuphooks.cpp2
-rw-r--r--src/gui/image/qimagepixmapcleanuphooks_p.h2
-rw-r--r--src/gui/image/qimagereader.cpp2
-rw-r--r--src/gui/image/qimagereader.h2
-rw-r--r--src/gui/image/qimagewriter.cpp2
-rw-r--r--src/gui/image/qimagewriter.h2
-rw-r--r--src/gui/image/qjpeghandler.cpp2
-rw-r--r--src/gui/image/qjpeghandler_p.h2
-rw-r--r--src/gui/image/qmnghandler.cpp2
-rw-r--r--src/gui/image/qmnghandler_p.h2
-rw-r--r--src/gui/image/qmovie.cpp11
-rw-r--r--src/gui/image/qmovie.h4
-rw-r--r--src/gui/image/qnativeimage.cpp2
-rw-r--r--src/gui/image/qnativeimage_p.h2
-rw-r--r--src/gui/image/qpaintengine_pic.cpp2
-rw-r--r--src/gui/image/qpaintengine_pic_p.h2
-rw-r--r--src/gui/image/qpicture.cpp13
-rw-r--r--src/gui/image/qpicture.h3
-rw-r--r--src/gui/image/qpicture_p.h2
-rw-r--r--src/gui/image/qpictureformatplugin.cpp2
-rw-r--r--src/gui/image/qpictureformatplugin.h2
-rw-r--r--src/gui/image/qpixmap.cpp10
-rw-r--r--src/gui/image/qpixmap.h6
-rw-r--r--src/gui/image/qpixmap_blitter.cpp2
-rw-r--r--src/gui/image/qpixmap_blitter_p.h34
-rw-r--r--src/gui/image/qpixmap_qpa.cpp2
-rw-r--r--src/gui/image/qpixmap_raster.cpp2
-rw-r--r--src/gui/image/qpixmap_raster_p.h2
-rw-r--r--src/gui/image/qpixmap_win.cpp2
-rw-r--r--src/gui/image/qpixmapcache.cpp2
-rw-r--r--src/gui/image/qpixmapcache.h2
-rw-r--r--src/gui/image/qpixmapcache_p.h2
-rw-r--r--src/gui/image/qplatformpixmap.cpp2
-rw-r--r--src/gui/image/qplatformpixmap_qpa.h2
-rw-r--r--src/gui/image/qpnghandler.cpp2
-rw-r--r--src/gui/image/qpnghandler_p.h2
-rw-r--r--src/gui/image/qppmhandler.cpp2
-rw-r--r--src/gui/image/qppmhandler_p.h2
-rw-r--r--src/gui/image/qtiffhandler.cpp20
-rw-r--r--src/gui/image/qtiffhandler_p.h2
-rw-r--r--src/gui/image/qvolatileimage.cpp2
-rw-r--r--src/gui/image/qvolatileimage_p.h2
-rw-r--r--src/gui/image/qvolatileimagedata.cpp2
-rw-r--r--src/gui/image/qvolatileimagedata_p.h2
-rw-r--r--src/gui/image/qvolatileimagedata_symbian.cpp2
-rw-r--r--src/gui/image/qxbmhandler.cpp2
-rw-r--r--src/gui/image/qxbmhandler_p.h2
-rw-r--r--src/gui/image/qxpmhandler.cpp2
-rw-r--r--src/gui/image/qxpmhandler_p.h2
-rw-r--r--src/gui/kernel/kernel.pri2
-rw-r--r--src/gui/kernel/qclipboard.cpp2
-rw-r--r--src/gui/kernel/qclipboard.h2
-rw-r--r--src/gui/kernel/qclipboard_qpa.cpp2
-rw-r--r--src/gui/kernel/qcursor.cpp12
-rw-r--r--src/gui/kernel/qcursor.h7
-rw-r--r--src/gui/kernel/qcursor_p.h2
-rw-r--r--src/gui/kernel/qcursor_qpa.cpp2
-rw-r--r--src/gui/kernel/qdnd.cpp2
-rw-r--r--src/gui/kernel/qdnd_p.h2
-rw-r--r--src/gui/kernel/qdrag.cpp2
-rw-r--r--src/gui/kernel/qdrag.h2
-rw-r--r--src/gui/kernel/qevent.cpp86
-rw-r--r--src/gui/kernel/qevent.h17
-rw-r--r--src/gui/kernel/qevent_p.h2
-rw-r--r--src/gui/kernel/qgenericplugin_qpa.cpp2
-rw-r--r--src/gui/kernel/qgenericplugin_qpa.h2
-rw-r--r--src/gui/kernel/qgenericpluginfactory_qpa.cpp2
-rw-r--r--src/gui/kernel/qgenericpluginfactory_qpa.h2
-rw-r--r--src/gui/kernel/qguiapplication.cpp155
-rw-r--r--src/gui/kernel/qguiapplication.h8
-rw-r--r--src/gui/kernel/qguiapplication_p.h23
-rw-r--r--src/gui/kernel/qguivariant.cpp164
-rw-r--r--src/gui/kernel/qinputpanel.cpp32
-rw-r--r--src/gui/kernel/qinputpanel.h11
-rw-r--r--src/gui/kernel/qinputpanel_p.h2
-rw-r--r--src/gui/kernel/qkeymapper.cpp2
-rw-r--r--src/gui/kernel/qkeymapper_p.h2
-rw-r--r--src/gui/kernel/qkeymapper_qpa.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp17
-rw-r--r--src/gui/kernel/qkeysequence.h2
-rw-r--r--src/gui/kernel/qkeysequence_p.h2
-rw-r--r--src/gui/kernel/qopenglcontext.cpp17
-rw-r--r--src/gui/kernel/qopenglcontext.h7
-rw-r--r--src/gui/kernel/qopenglcontext_p.h2
-rw-r--r--src/gui/kernel/qpalette.cpp11
-rw-r--r--src/gui/kernel/qpalette.h6
-rw-r--r--src/gui/kernel/qplatformclipboard_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformclipboard_qpa.h2
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.h2
-rw-r--r--src/gui/kernel/qplatformdrag_qpa.h2
-rw-r--r--src/gui/kernel/qplatforminputcontext_qpa.cpp24
-rw-r--r--src/gui/kernel/qplatforminputcontext_qpa.h7
-rw-r--r--src/gui/kernel/qplatformintegration_qpa.cpp16
-rw-r--r--src/gui/kernel/qplatformintegration_qpa.h6
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_qpa_p.h2
-rw-r--r--src/gui/kernel/qplatformintegrationplugin_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformintegrationplugin_qpa.h2
-rw-r--r--src/gui/kernel/qplatformnativeinterface_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformnativeinterface_qpa.h2
-rw-r--r--src/gui/kernel/qplatformopenglcontext_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformopenglcontext_qpa.h2
-rw-r--r--src/gui/kernel/qplatformscreen_qpa.cpp11
-rw-r--r--src/gui/kernel/qplatformscreen_qpa.h4
-rw-r--r--src/gui/kernel/qplatformscreen_qpa_p.h (renamed from src/plugins/bearer/icd/iapmonitor.h)44
-rw-r--r--src/gui/kernel/qplatformsurface_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformsurface_qpa.h2
-rw-r--r--src/gui/kernel/qplatformtheme_qpa.cpp43
-rw-r--r--src/gui/kernel/qplatformtheme_qpa.h11
-rw-r--r--src/gui/kernel/qplatformthemefactory_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformthemefactory_qpa_p.h2
-rw-r--r--src/gui/kernel/qplatformthemeplugin_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformthemeplugin_qpa.h2
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.h2
-rw-r--r--src/gui/kernel/qscreen.cpp40
-rw-r--r--src/gui/kernel/qscreen.h3
-rw-r--r--src/gui/kernel/qscreen_p.h (renamed from src/plugins/bearer/icd/main.cpp)64
-rw-r--r--src/gui/kernel/qsessionmanager.h2
-rw-r--r--src/gui/kernel/qsessionmanager_qpa.cpp2
-rw-r--r--src/gui/kernel/qshortcutmap.cpp2
-rw-r--r--src/gui/kernel/qshortcutmap_p.h2
-rw-r--r--src/gui/kernel/qstylehints.cpp12
-rw-r--r--src/gui/kernel/qstylehints.h4
-rw-r--r--src/gui/kernel/qsurface.cpp2
-rw-r--r--src/gui/kernel/qsurface.h2
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp2
-rw-r--r--src/gui/kernel/qsurfaceformat.h2
-rw-r--r--src/gui/kernel/qt_gui_pch.h2
-rw-r--r--src/gui/kernel/qtouchdevice.cpp2
-rw-r--r--src/gui/kernel/qtouchdevice.h2
-rw-r--r--src/gui/kernel/qtouchdevice_p.h2
-rw-r--r--src/gui/kernel/qwindow.cpp111
-rw-r--r--src/gui/kernel/qwindow.h8
-rw-r--r--src/gui/kernel/qwindow_p.h2
-rw-r--r--src/gui/kernel/qwindowdefs.h2
-rw-r--r--src/gui/kernel/qwindowdefs_win.h2
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp68
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.h17
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa_p.h28
-rw-r--r--src/gui/math3d/qgenericmatrix.cpp2
-rw-r--r--src/gui/math3d/qgenericmatrix.h2
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp2
-rw-r--r--src/gui/math3d/qmatrix4x4.h2
-rw-r--r--src/gui/math3d/qquaternion.cpp2
-rw-r--r--src/gui/math3d/qquaternion.h2
-rw-r--r--src/gui/math3d/qvector2d.cpp2
-rw-r--r--src/gui/math3d/qvector2d.h2
-rw-r--r--src/gui/math3d/qvector3d.cpp2
-rw-r--r--src/gui/math3d/qvector3d.h2
-rw-r--r--src/gui/math3d/qvector4d.cpp2
-rw-r--r--src/gui/math3d/qvector4d.h2
-rw-r--r--src/gui/opengl/qopengl.cpp2
-rw-r--r--src/gui/opengl/qopengl.h2
-rw-r--r--src/gui/opengl/qopengl2pexvertexarray.cpp2
-rw-r--r--src/gui/opengl/qopengl2pexvertexarray_p.h2
-rw-r--r--src/gui/opengl/qopengl_p.h2
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp2
-rw-r--r--src/gui/opengl/qopenglbuffer.h2
-rw-r--r--src/gui/opengl/qopenglcustomshaderstage.cpp2
-rw-r--r--src/gui/opengl/qopenglcustomshaderstage_p.h2
-rw-r--r--src/gui/opengl/qopenglengineshadermanager.cpp8
-rw-r--r--src/gui/opengl/qopenglengineshadermanager_p.h2
-rw-r--r--src/gui/opengl/qopenglengineshadersource_p.h2
-rw-r--r--src/gui/opengl/qopenglextensions_p.h2
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp2
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h2
-rw-r--r--src/gui/opengl/qopenglframebufferobject_p.h2
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp2
-rw-r--r--src/gui/opengl/qopenglfunctions.h2
-rw-r--r--src/gui/opengl/qopenglgradientcache.cpp2
-rw-r--r--src/gui/opengl/qopenglgradientcache_p.h2
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp2
-rw-r--r--src/gui/opengl/qopenglpaintdevice.h2
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp20
-rw-r--r--src/gui/opengl/qopenglpaintengine_p.h2
-rw-r--r--src/gui/opengl/qopenglshadercache_meego_p.h2
-rw-r--r--src/gui/opengl/qopenglshadercache_p.h2
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp3
-rw-r--r--src/gui/opengl/qopenglshaderprogram.h2
-rw-r--r--src/gui/opengl/qopengltexturecache.cpp6
-rw-r--r--src/gui/opengl/qopengltexturecache_p.h4
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp2
-rw-r--r--src/gui/opengl/qopengltextureglyphcache_p.h2
-rw-r--r--src/gui/opengl/qopengltriangulatingstroker.cpp2
-rw-r--r--src/gui/opengl/qopengltriangulatingstroker_p.h2
-rw-r--r--src/gui/opengl/qrbtree_p.h2
-rw-r--r--src/gui/opengl/qtriangulator.cpp75
-rw-r--r--src/gui/opengl/qtriangulator_p.h2
-rw-r--r--src/gui/painting/qbackingstore.cpp2
-rw-r--r--src/gui/painting/qbackingstore.h2
-rw-r--r--src/gui/painting/qbezier.cpp50
-rw-r--r--src/gui/painting/qbezier_p.h4
-rw-r--r--src/gui/painting/qblendfunctions.cpp2
-rw-r--r--src/gui/painting/qblendfunctions_p.h2
-rw-r--r--src/gui/painting/qblittable.cpp8
-rw-r--r--src/gui/painting/qblittable_p.h4
-rw-r--r--src/gui/painting/qbrush.cpp2
-rw-r--r--src/gui/painting/qbrush.h2
-rw-r--r--src/gui/painting/qcolor.cpp2
-rw-r--r--src/gui/painting/qcolor.h2
-rw-r--r--src/gui/painting/qcolor_p.cpp2
-rw-r--r--src/gui/painting/qcolor_p.h2
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp2
-rw-r--r--src/gui/painting/qcosmeticstroker_p.h2
-rw-r--r--src/gui/painting/qcssutil.cpp2
-rw-r--r--src/gui/painting/qcssutil_p.h2
-rw-r--r--src/gui/painting/qdatabuffer_p.h2
-rw-r--r--src/gui/painting/qdrawhelper.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_arm_simd.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_arm_simd_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_iwmmxt.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_mmx.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_mmx3dnow.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_mmx_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_neon_asm.S2
-rw-r--r--src/gui/painting/qdrawhelper_neon_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_sse.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_sse3dnow.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_sse_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_x86_p.h2
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h2
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp2
-rw-r--r--src/gui/painting/qemulationpaintengine_p.h2
-rw-r--r--src/gui/painting/qfixed_p.h2
-rw-r--r--src/gui/painting/qgrayraster.c62
-rw-r--r--src/gui/painting/qgrayraster_p.h2
-rw-r--r--src/gui/painting/qimagescale.cpp2
-rw-r--r--src/gui/painting/qimagescale_p.h2
-rw-r--r--src/gui/painting/qmath_p.h2
-rw-r--r--src/gui/painting/qmatrix.cpp2
-rw-r--r--src/gui/painting/qmatrix.h2
-rw-r--r--src/gui/painting/qmemrotate.cpp2
-rw-r--r--src/gui/painting/qmemrotate_p.h2
-rw-r--r--src/gui/painting/qoutlinemapper.cpp92
-rw-r--r--src/gui/painting/qoutlinemapper_p.h26
-rw-r--r--src/gui/painting/qpagedpaintdevice.cpp2
-rw-r--r--src/gui/painting/qpagedpaintdevice.h2
-rw-r--r--src/gui/painting/qpagedpaintdevice_p.h2
-rw-r--r--src/gui/painting/qpaintbuffer.cpp2
-rw-r--r--src/gui/painting/qpaintbuffer_p.h2
-rw-r--r--src/gui/painting/qpaintdevice.cpp2
-rw-r--r--src/gui/painting/qpaintdevice.h2
-rw-r--r--src/gui/painting/qpaintdevice.qdoc2
-rw-r--r--src/gui/painting/qpaintdevice_qpa.cpp2
-rw-r--r--src/gui/painting/qpaintengine.cpp2
-rw-r--r--src/gui/painting/qpaintengine.h2
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp645
-rw-r--r--src/gui/painting/qpaintengine_blitter_p.h61
-rw-r--r--src/gui/painting/qpaintengine_p.h2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp111
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h10
-rw-r--r--src/gui/painting/qpaintengineex.cpp4
-rw-r--r--src/gui/painting/qpaintengineex_p.h2
-rw-r--r--src/gui/painting/qpainter.cpp4
-rw-r--r--src/gui/painting/qpainter.h2
-rw-r--r--src/gui/painting/qpainter_p.h2
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/painting/qpainterpath.h2
-rw-r--r--src/gui/painting/qpainterpath_p.h2
-rw-r--r--src/gui/painting/qpathclipper.cpp2
-rw-r--r--src/gui/painting/qpathclipper_p.h2
-rw-r--r--src/gui/painting/qpdf.cpp2
-rw-r--r--src/gui/painting/qpdf_p.h2
-rw-r--r--src/gui/painting/qpdfwriter.cpp2
-rw-r--r--src/gui/painting/qpdfwriter.h2
-rw-r--r--src/gui/painting/qpen.cpp2
-rw-r--r--src/gui/painting/qpen.h2
-rw-r--r--src/gui/painting/qpen_p.h2
-rw-r--r--src/gui/painting/qplatformbackingstore_qpa.cpp2
-rw-r--r--src/gui/painting/qplatformbackingstore_qpa.h2
-rw-r--r--src/gui/painting/qpolygon.cpp2
-rw-r--r--src/gui/painting/qpolygon.h2
-rw-r--r--src/gui/painting/qpolygonclipper_p.h2
-rw-r--r--src/gui/painting/qrasterdefs_p.h2
-rw-r--r--src/gui/painting/qrasterizer.cpp2
-rw-r--r--src/gui/painting/qrasterizer_p.h2
-rw-r--r--src/gui/painting/qregion.cpp2
-rw-r--r--src/gui/painting/qregion.h2
-rw-r--r--src/gui/painting/qrgb.h2
-rw-r--r--src/gui/painting/qstroker.cpp2
-rw-r--r--src/gui/painting/qstroker_p.h2
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h2
-rw-r--r--src/gui/painting/qtransform.cpp2
-rw-r--r--src/gui/painting/qtransform.h2
-rw-r--r--src/gui/painting/qvectorpath_p.h2
-rw-r--r--src/gui/text/qabstractfontengine_p.h2
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.h2
-rw-r--r--src/gui/text/qabstracttextdocumentlayout_p.h2
-rw-r--r--src/gui/text/qcssparser.cpp2
-rw-r--r--src/gui/text/qcssparser_p.h2
-rw-r--r--src/gui/text/qcssscanner.cpp2
-rw-r--r--src/gui/text/qfont.cpp34
-rw-r--r--src/gui/text/qfont.h2
-rw-r--r--src/gui/text/qfont_p.h2
-rw-r--r--src/gui/text/qfont_qpa.cpp2
-rw-r--r--src/gui/text/qfontdatabase.cpp2
-rw-r--r--src/gui/text/qfontdatabase.h2
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp2
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
-rw-r--r--src/gui/text/qfontengine_ft_p.h2
-rw-r--r--src/gui/text/qfontengine_p.h2
-rw-r--r--src/gui/text/qfontengine_qpa.cpp2
-rw-r--r--src/gui/text/qfontengine_qpa_p.h2
-rw-r--r--src/gui/text/qfontengine_qpf.cpp2
-rw-r--r--src/gui/text/qfontengine_qpf_p.h2
-rw-r--r--src/gui/text/qfontenginedirectwrite.cpp2
-rw-r--r--src/gui/text/qfontenginedirectwrite_p.h2
-rw-r--r--src/gui/text/qfontengineglyphcache_p.h2
-rw-r--r--src/gui/text/qfontinfo.h2
-rw-r--r--src/gui/text/qfontmetrics.cpp2
-rw-r--r--src/gui/text/qfontmetrics.h2
-rw-r--r--src/gui/text/qfontsubset.cpp2
-rw-r--r--src/gui/text/qfontsubset_p.h2
-rw-r--r--src/gui/text/qfragmentmap.cpp2
-rw-r--r--src/gui/text/qfragmentmap_p.h2
-rw-r--r--src/gui/text/qglyphrun.cpp2
-rw-r--r--src/gui/text/qglyphrun.h2
-rw-r--r--src/gui/text/qglyphrun_p.h2
-rw-r--r--src/gui/text/qharfbuzz_copy_p.h2
-rw-r--r--src/gui/text/qlinecontrol.cpp2
-rw-r--r--src/gui/text/qlinecontrol_p.h4
-rw-r--r--src/gui/text/qpfutil.cpp2
-rw-r--r--src/gui/text/qplatformfontdatabase_qpa.cpp9
-rw-r--r--src/gui/text/qplatformfontdatabase_qpa.h3
-rw-r--r--src/gui/text/qrawfont.cpp2
-rw-r--r--src/gui/text/qrawfont.h2
-rw-r--r--src/gui/text/qrawfont_ft.cpp2
-rw-r--r--src/gui/text/qrawfont_p.h2
-rw-r--r--src/gui/text/qrawfont_qpa.cpp2
-rw-r--r--src/gui/text/qstatictext.cpp2
-rw-r--r--src/gui/text/qstatictext.h2
-rw-r--r--src/gui/text/qstatictext_p.h2
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp2
-rw-r--r--src/gui/text/qsyntaxhighlighter.h2
-rw-r--r--src/gui/text/qtextcontrol.cpp2
-rw-r--r--src/gui/text/qtextcontrol_p.h2
-rw-r--r--src/gui/text/qtextcontrol_p_p.h2
-rw-r--r--src/gui/text/qtextcursor.cpp35
-rw-r--r--src/gui/text/qtextcursor.h2
-rw-r--r--src/gui/text/qtextcursor_p.h2
-rw-r--r--src/gui/text/qtextdocument.cpp10
-rw-r--r--src/gui/text/qtextdocument.h2
-rw-r--r--src/gui/text/qtextdocument_p.cpp2
-rw-r--r--src/gui/text/qtextdocument_p.h2
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp12
-rw-r--r--src/gui/text/qtextdocumentfragment.h5
-rw-r--r--src/gui/text/qtextdocumentfragment_p.h2
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qtextdocumentlayout_p.h2
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp2
-rw-r--r--src/gui/text/qtextdocumentwriter.h2
-rw-r--r--src/gui/text/qtextengine.cpp7
-rw-r--r--src/gui/text/qtextengine_p.h2
-rw-r--r--src/gui/text/qtextformat.cpp80
-rw-r--r--src/gui/text/qtextformat.h25
-rw-r--r--src/gui/text/qtextformat_p.h2
-rw-r--r--src/gui/text/qtexthtmlparser.cpp2
-rw-r--r--src/gui/text/qtexthtmlparser_p.h2
-rw-r--r--src/gui/text/qtextimagehandler.cpp11
-rw-r--r--src/gui/text/qtextimagehandler_p.h5
-rw-r--r--src/gui/text/qtextlayout.cpp20
-rw-r--r--src/gui/text/qtextlayout.h2
-rw-r--r--src/gui/text/qtextlist.cpp2
-rw-r--r--src/gui/text/qtextlist.h2
-rw-r--r--src/gui/text/qtextobject.cpp2
-rw-r--r--src/gui/text/qtextobject.h2
-rw-r--r--src/gui/text/qtextobject_p.h2
-rw-r--r--src/gui/text/qtextodfwriter.cpp5
-rw-r--r--src/gui/text/qtextodfwriter_p.h2
-rw-r--r--src/gui/text/qtextoption.cpp2
-rw-r--r--src/gui/text/qtextoption.h2
-rw-r--r--src/gui/text/qtexttable.cpp2
-rw-r--r--src/gui/text/qtexttable.h2
-rw-r--r--src/gui/text/qtexttable_p.h2
-rw-r--r--src/gui/text/qzip.cpp2
-rw-r--r--src/gui/text/qzipreader_p.h2
-rw-r--r--src/gui/text/qzipwriter_p.h2
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/util/qdesktopservices.h2
-rw-r--r--src/gui/util/qdesktopservices_mac.cpp2
-rw-r--r--src/gui/util/qdesktopservices_qpa.cpp2
-rw-r--r--src/gui/util/qdesktopservices_win.cpp2
-rw-r--r--src/gui/util/qdesktopservices_x11.cpp2
-rw-r--r--src/gui/util/qhexstring_p.h2
-rw-r--r--src/gui/util/qvalidator.cpp2
-rw-r--r--src/gui/util/qvalidator.h4
-rw-r--r--src/modules/qt_v8.pri16
-rw-r--r--src/network/access/access.pri6
-rw-r--r--src/network/access/qabstractnetworkcache.cpp2
-rw-r--r--src/network/access/qabstractnetworkcache.h2
-rw-r--r--src/network/access/qabstractnetworkcache_p.h2
-rw-r--r--src/network/access/qftp.cpp55
-rw-r--r--src/network/access/qftp_p.h (renamed from src/network/access/qftp.h)15
-rw-r--r--src/network/access/qhttp.cpp3150
-rw-r--r--src/network/access/qhttp.h311
-rw-r--r--src/network/access/qhttpheader.cpp770
-rw-r--r--src/network/access/qhttpheader_p.h147
-rw-r--r--src/network/access/qhttpmultipart.cpp2
-rw-r--r--src/network/access/qhttpmultipart.h2
-rw-r--r--src/network/access/qhttpmultipart_p.h2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp84
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h7
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp26
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h4
-rw-r--r--src/network/access/qhttpnetworkheader.cpp2
-rw-r--r--src/network/access/qhttpnetworkheader_p.h2
-rw-r--r--src/network/access/qhttpnetworkreply.cpp2
-rw-r--r--src/network/access/qhttpnetworkreply_p.h2
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp2
-rw-r--r--src/network/access/qhttpnetworkrequest_p.h2
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp6
-rw-r--r--src/network/access/qhttpthreaddelegate_p.h2
-rw-r--r--src/network/access/qnetworkaccessauthenticationmanager.cpp14
-rw-r--r--src/network/access/qnetworkaccessauthenticationmanager_p.h4
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp2
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h2
-rw-r--r--src/network/access/qnetworkaccesscache.cpp2
-rw-r--r--src/network/access/qnetworkaccesscache_p.h2
-rw-r--r--src/network/access/qnetworkaccesscachebackend.cpp2
-rw-r--r--src/network/access/qnetworkaccesscachebackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp2
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessfilebackend.cpp2
-rw-r--r--src/network/access/qnetworkaccessfilebackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp2
-rw-r--r--src/network/access/qnetworkaccessftpbackend_p.h4
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp22
-rw-r--r--src/network/access/qnetworkaccessmanager.h2
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h2
-rw-r--r--src/network/access/qnetworkcookie.cpp2
-rw-r--r--src/network/access/qnetworkcookie.h5
-rw-r--r--src/network/access/qnetworkcookie_p.h2
-rw-r--r--src/network/access/qnetworkcookiejar.cpp2
-rw-r--r--src/network/access/qnetworkcookiejar.h7
-rw-r--r--src/network/access/qnetworkcookiejar_p.h2
-rw-r--r--src/network/access/qnetworkdiskcache.cpp2
-rw-r--r--src/network/access/qnetworkdiskcache.h2
-rw-r--r--src/network/access/qnetworkdiskcache_p.h2
-rw-r--r--src/network/access/qnetworkreply.cpp71
-rw-r--r--src/network/access/qnetworkreply.h6
-rw-r--r--src/network/access/qnetworkreply_p.h2
-rw-r--r--src/network/access/qnetworkreplydataimpl.cpp16
-rw-r--r--src/network/access/qnetworkreplydataimpl_p.h3
-rw-r--r--src/network/access/qnetworkreplyfileimpl.cpp2
-rw-r--r--src/network/access/qnetworkreplyfileimpl_p.h2
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp15
-rw-r--r--src/network/access/qnetworkreplyhttpimpl_p.h21
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp11
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h17
-rw-r--r--src/network/access/qnetworkrequest.cpp2
-rw-r--r--src/network/access/qnetworkrequest.h2
-rw-r--r--src/network/access/qnetworkrequest_p.h2
-rw-r--r--src/network/bearer/qbearerengine.cpp2
-rw-r--r--src/network/bearer/qbearerengine_p.h2
-rw-r--r--src/network/bearer/qbearerplugin.cpp2
-rw-r--r--src/network/bearer/qbearerplugin_p.h2
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp2
-rw-r--r--src/network/bearer/qnetworkconfigmanager.h2
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp2
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.h2
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp2
-rw-r--r--src/network/bearer/qnetworkconfiguration.h2
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h2
-rw-r--r--src/network/bearer/qnetworksession.cpp2
-rw-r--r--src/network/bearer/qnetworksession.h2
-rw-r--r--src/network/bearer/qnetworksession_p.h2
-rw-r--r--src/network/bearer/qsharednetworksession.cpp2
-rw-r--r--src/network/bearer/qsharednetworksession_p.h2
-rw-r--r--src/network/kernel/qauthenticator.cpp26
-rw-r--r--src/network/kernel/qauthenticator.h2
-rw-r--r--src/network/kernel/qauthenticator_p.h3
-rw-r--r--src/network/kernel/qhostaddress.cpp2
-rw-r--r--src/network/kernel/qhostaddress.h2
-rw-r--r--src/network/kernel/qhostaddress_p.h2
-rw-r--r--src/network/kernel/qhostinfo.cpp4
-rw-r--r--src/network/kernel/qhostinfo.h2
-rw-r--r--src/network/kernel/qhostinfo_p.h4
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp6
-rw-r--r--src/network/kernel/qhostinfo_win.cpp2
-rw-r--r--src/network/kernel/qnetworkinterface.cpp2
-rw-r--r--src/network/kernel/qnetworkinterface.h2
-rw-r--r--src/network/kernel/qnetworkinterface_p.h2
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp2
-rw-r--r--src/network/kernel/qnetworkinterface_win.cpp26
-rw-r--r--src/network/kernel/qnetworkinterface_win_p.h2
-rw-r--r--src/network/kernel/qnetworkproxy.cpp9
-rw-r--r--src/network/kernel/qnetworkproxy.h2
-rw-r--r--src/network/kernel/qnetworkproxy_generic.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp2
-rw-r--r--src/network/kernel/qurlinfo.cpp2
-rw-r--r--src/network/kernel/qurlinfo.h2
-rw-r--r--src/network/socket/qabstractsocket.cpp96
-rw-r--r--src/network/socket/qabstractsocket.h21
-rw-r--r--src/network/socket/qabstractsocket_p.h4
-rw-r--r--src/network/socket/qabstractsocketengine.cpp4
-rw-r--r--src/network/socket/qabstractsocketengine_p.h13
-rw-r--r--src/network/socket/qhttpsocketengine.cpp30
-rw-r--r--src/network/socket/qhttpsocketengine_p.h9
-rw-r--r--src/network/socket/qlocalserver.cpp2
-rw-r--r--src/network/socket/qlocalserver.h2
-rw-r--r--src/network/socket/qlocalserver_p.h2
-rw-r--r--src/network/socket/qlocalserver_tcp.cpp2
-rw-r--r--src/network/socket/qlocalserver_unix.cpp2
-rw-r--r--src/network/socket/qlocalserver_win.cpp2
-rw-r--r--src/network/socket/qlocalsocket.cpp8
-rw-r--r--src/network/socket/qlocalsocket.h12
-rw-r--r--src/network/socket/qlocalsocket_p.h21
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp9
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp16
-rw-r--r--src/network/socket/qlocalsocket_win.cpp341
-rw-r--r--src/network/socket/qnativesocketengine.cpp8
-rw-r--r--src/network/socket/qnativesocketengine_p.h8
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp14
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp12
-rw-r--r--src/network/socket/qnet_unix_p.h2
-rw-r--r--src/network/socket/qsocks5socketengine.cpp22
-rw-r--r--src/network/socket/qsocks5socketengine_p.h10
-rw-r--r--src/network/socket/qtcpserver.cpp8
-rw-r--r--src/network/socket/qtcpserver.h8
-rw-r--r--src/network/socket/qtcpsocket.cpp4
-rw-r--r--src/network/socket/qtcpsocket.h2
-rw-r--r--src/network/socket/qtcpsocket_p.h2
-rw-r--r--src/network/socket/qudpsocket.cpp2
-rw-r--r--src/network/socket/qudpsocket.h2
-rw-r--r--src/network/ssl/qssl.cpp2
-rw-r--r--src/network/ssl/qssl.h2
-rw-r--r--src/network/ssl/qsslcertificate.cpp4
-rw-r--r--src/network/ssl/qsslcertificate.h6
-rw-r--r--src/network/ssl/qsslcertificate_p.h2
-rw-r--r--src/network/ssl/qsslcertificateextension.h4
-rw-r--r--src/network/ssl/qsslcipher.cpp2
-rw-r--r--src/network/ssl/qsslcipher.h6
-rw-r--r--src/network/ssl/qsslcipher_p.h2
-rw-r--r--src/network/ssl/qsslconfiguration.cpp2
-rw-r--r--src/network/ssl/qsslconfiguration.h6
-rw-r--r--src/network/ssl/qsslconfiguration_p.h2
-rw-r--r--src/network/ssl/qsslerror.cpp2
-rw-r--r--src/network/ssl/qsslerror.h6
-rw-r--r--src/network/ssl/qsslkey.cpp2
-rw-r--r--src/network/ssl/qsslkey.h6
-rw-r--r--src/network/ssl/qsslkey_p.h2
-rw-r--r--src/network/ssl/qsslsocket.cpp14
-rw-r--r--src/network/ssl/qsslsocket.h18
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp42
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h4
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp6
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h10
-rw-r--r--src/network/ssl/qsslsocket_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglcustomshaderstage.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qglcustomshaderstage_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp8
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglshadercache_meego_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglshadercache_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp20
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker_p.h2
-rw-r--r--src/opengl/qgl.cpp4
-rw-r--r--src/opengl/qgl.h4
-rw-r--r--src/opengl/qgl_p.h2
-rw-r--r--src/opengl/qgl_qpa.cpp6
-rw-r--r--src/opengl/qglbuffer.cpp2
-rw-r--r--src/opengl/qglbuffer.h2
-rw-r--r--src/opengl/qglcolormap.cpp2
-rw-r--r--src/opengl/qglcolormap.h2
-rw-r--r--src/opengl/qglextensions.cpp8
-rw-r--r--src/opengl/qglextensions_p.h2
-rw-r--r--src/opengl/qglframebufferobject.cpp2
-rw-r--r--src/opengl/qglframebufferobject.h2
-rw-r--r--src/opengl/qglframebufferobject_p.h2
-rw-r--r--src/opengl/qglfunctions.cpp2
-rw-r--r--src/opengl/qglfunctions.h2
-rw-r--r--src/opengl/qglpaintdevice.cpp2
-rw-r--r--src/opengl/qglpaintdevice_p.h2
-rw-r--r--src/opengl/qglpixelbuffer.cpp2
-rw-r--r--src/opengl/qglpixelbuffer.h2
-rw-r--r--src/opengl/qglpixelbuffer_p.h2
-rw-r--r--src/opengl/qglpixelbuffer_stub.cpp2
-rw-r--r--src/opengl/qglshaderprogram.cpp2
-rw-r--r--src/opengl/qglshaderprogram.h2
-rw-r--r--src/opengl/qgraphicsshadereffect.cpp2
-rw-r--r--src/opengl/qgraphicsshadereffect_p.h2
-rw-r--r--src/platformsupport/cglconvenience/cglconvenience.mm2
-rw-r--r--src/platformsupport/cglconvenience/cglconvenience_p.h2
-rw-r--r--src/platformsupport/dnd/qsimpledrag.cpp2
-rw-r--r--src/platformsupport/dnd/qsimpledrag_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qxlibeglintegration.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qxlibeglintegration_p.h2
-rw-r--r--src/platformsupport/eventdispatchers/eventdispatchers.pri4
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp2
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h2
-rw-r--r--src/platformsupport/eventdispatchers/qgenericunixeventdispatcher.cpp6
-rw-r--r--src/platformsupport/eventdispatchers/qgenericunixeventdispatcher_p.h2
-rw-r--r--src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa.cpp (renamed from src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp)14
-rw-r--r--src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h (renamed from src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h)18
-rw-r--r--src/platformsupport/fb_base/fb_base.cpp2
-rw-r--r--src/platformsupport/fb_base/fb_base_p.h2
-rw-r--r--src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp2
-rw-r--r--src/platformsupport/fontdatabases/basic/qbasicfontdatabase_p.h2
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp4
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h2
-rw-r--r--src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h2
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm6
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h2
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm2
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h2
-rw-r--r--src/platformsupport/glxconvenience/glxconvenience.pri3
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience.cpp2
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience_p.h2
-rw-r--r--src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp2
-rw-r--r--src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa_p.h2
-rw-r--r--src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa.cpp2
-rw-r--r--src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h2
-rw-r--r--src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp2
-rw-r--r--src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h2
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp1574
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.h138
-rw-r--r--src/plugins/accessible/widgets/itemviews.cpp197
-rw-r--r--src/plugins/accessible/widgets/itemviews.h33
-rw-r--r--src/plugins/accessible/widgets/main.cpp2
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.cpp120
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.h15
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp448
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.h49
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.cpp14
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.h14
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp87
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.h37
-rw-r--r--src/plugins/bearer/bearer.pro10
-rw-r--r--src/plugins/bearer/connman/main.cpp2
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp2
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h2
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp2
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h2
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux.cpp2
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux_p.h2
-rw-r--r--src/plugins/bearer/corewlan/main.cpp2
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.h2
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm2
-rw-r--r--src/plugins/bearer/generic/main.cpp2
-rw-r--r--src/plugins/bearer/generic/qgenericengine.cpp2
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h2
-rw-r--r--src/plugins/bearer/icd/dbusdispatcher.cpp634
-rw-r--r--src/plugins/bearer/icd/dbusdispatcher.h111
-rw-r--r--src/plugins/bearer/icd/iapconf.cpp245
-rw-r--r--src/plugins/bearer/icd/iapconf.h74
-rw-r--r--src/plugins/bearer/icd/iapmonitor.cpp134
-rw-r--r--src/plugins/bearer/icd/icd.pro33
-rw-r--r--src/plugins/bearer/icd/maemo_icd.cpp855
-rw-r--r--src/plugins/bearer/icd/maemo_icd.h174
-rw-r--r--src/plugins/bearer/icd/proxyconf.cpp422
-rw-r--r--src/plugins/bearer/icd/proxyconf.h74
-rw-r--r--src/plugins/bearer/icd/qicdengine.cpp1126
-rw-r--r--src/plugins/bearer/icd/qicdengine.h177
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp1072
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.h229
-rw-r--r--src/plugins/bearer/icd/wlan-utils.h110
-rw-r--r--src/plugins/bearer/nativewifi/main.cpp2
-rw-r--r--src/plugins/bearer/nativewifi/platformdefs.h2
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.cpp2
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.h2
-rw-r--r--src/plugins/bearer/networkmanager/main.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.h2
-rw-r--r--src/plugins/bearer/networkmanager/qnmdbushelper.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnmdbushelper.h2
-rw-r--r--src/plugins/bearer/nla/main.cpp2
-rw-r--r--src/plugins/bearer/nla/qnlaengine.cpp2
-rw-r--r--src/plugins/bearer/nla/qnlaengine.h2
-rw-r--r--src/plugins/bearer/platformdefs_win.h2
-rw-r--r--src/plugins/bearer/qbearerengine_impl.h2
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp2
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h2
-rw-r--r--src/plugins/codecs/cn/cn.pro2
-rw-r--r--src/plugins/codecs/cn/main.cpp2
-rw-r--r--src/plugins/codecs/cn/qgb18030codec.cpp2
-rw-r--r--src/plugins/codecs/cn/qgb18030codec.h2
-rw-r--r--src/plugins/codecs/jp/jp.pro2
-rw-r--r--src/plugins/codecs/jp/main.cpp2
-rw-r--r--src/plugins/codecs/jp/qeucjpcodec.cpp2
-rw-r--r--src/plugins/codecs/jp/qeucjpcodec.h2
-rw-r--r--src/plugins/codecs/jp/qfontjpcodec.cpp2
-rw-r--r--src/plugins/codecs/jp/qfontjpcodec.h2
-rw-r--r--src/plugins/codecs/jp/qjiscodec.cpp2
-rw-r--r--src/plugins/codecs/jp/qjiscodec.h2
-rw-r--r--src/plugins/codecs/jp/qjpunicode.cpp2
-rw-r--r--src/plugins/codecs/jp/qjpunicode.h2
-rw-r--r--src/plugins/codecs/jp/qsjiscodec.cpp2
-rw-r--r--src/plugins/codecs/jp/qsjiscodec.h2
-rw-r--r--src/plugins/codecs/kr/cp949codetbl.h7
-rw-r--r--src/plugins/codecs/kr/kr.pro2
-rw-r--r--src/plugins/codecs/kr/main.cpp2
-rw-r--r--src/plugins/codecs/kr/qeuckrcodec.cpp2
-rw-r--r--src/plugins/codecs/kr/qeuckrcodec.h2
-rw-r--r--src/plugins/codecs/tw/main.cpp2
-rw-r--r--src/plugins/codecs/tw/qbig5codec.cpp2
-rw-r--r--src/plugins/codecs/tw/qbig5codec.h2
-rw-r--r--src/plugins/codecs/tw/tw.pro2
-rw-r--r--src/plugins/generic/linuxinput/main.cpp2
-rw-r--r--src/plugins/generic/linuxinput/qlinuxinput.cpp2
-rw-r--r--src/plugins/generic/linuxinput/qlinuxinput.h2
-rw-r--r--src/plugins/generic/touchscreen/README32
-rw-r--r--src/plugins/generic/touchscreen/main.cpp2
-rw-r--r--src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp55
-rw-r--r--src/plugins/generic/touchscreen/qtoucheventsenderqpa.h10
-rw-r--r--src/plugins/generic/touchscreen/qtouchscreen.cpp256
-rw-r--r--src/plugins/generic/touchscreen/qtouchscreen.h7
-rw-r--r--src/plugins/generic/tslib/main.cpp2
-rw-r--r--src/plugins/generic/tslib/qtslib.cpp2
-rw-r--r--src/plugins/generic/tslib/qtslib.h2
-rw-r--r--src/plugins/imageformats/gif/main.cpp2
-rw-r--r--src/plugins/imageformats/ico/main.cpp2
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp2
-rw-r--r--src/plugins/imageformats/ico/qicohandler.h2
-rw-r--r--src/plugins/imageformats/jpeg/main.cpp2
-rw-r--r--src/plugins/imageformats/mng/main.cpp2
-rw-r--r--src/plugins/imageformats/tiff/main.cpp2
-rw-r--r--src/plugins/platforminputcontexts/ibus/main.cpp2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.cpp2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp4
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusproxy.cpp2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusproxy.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibustypes.cpp2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibustypes.h2
-rw-r--r--src/plugins/platforminputcontexts/meego/contextadaptor.cpp2
-rw-r--r--src/plugins/platforminputcontexts/meego/contextadaptor.h2
-rw-r--r--src/plugins/platforminputcontexts/meego/main.cpp2
-rw-r--r--src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.cpp2
-rw-r--r--src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.h2
-rw-r--r--src/plugins/platforminputcontexts/meego/serverproxy.cpp2
-rw-r--r--src/plugins/platforminputcontexts/meego/serverproxy.h2
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro3
-rw-r--r--src/plugins/platforms/cocoa/main.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.h10
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm110
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm53
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaautoreleasepool.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaautoreleasepool.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoacursor.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoacursor.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.h73
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm240
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.h7
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm159
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm7
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h10
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm17
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuloader.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuloader.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm9
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h30
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm61
-rw-r--r--src/plugins/platforms/cocoa/qmenu_mac.h2
-rw-r--r--src/plugins/platforms/cocoa/qmenu_mac.mm2
-rw-r--r--src/plugins/platforms/cocoa/qmultitouch_mac.mm3
-rw-r--r--src/plugins/platforms/cocoa/qmultitouch_mac_p.h2
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h9
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm92
-rw-r--r--src/plugins/platforms/cocoa/qnsviewaccessibility.mm39
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.h2
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm2
-rw-r--r--src/plugins/platforms/directfb/main.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfb_egl.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfb_egl.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbbackingstore.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbbackingstore.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbblitter.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbblitter.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbglcontext.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbglcontext.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbinput.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbinput.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbscreen.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbscreen.h2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbwindow.cpp4
-rw-r--r--src/plugins/platforms/directfb/qdirectfbwindow.h2
-rw-r--r--src/plugins/platforms/eglfs/main.cpp2
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.cpp10
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.h2
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp12
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.h4
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.cpp2
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.h2
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp2
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.h2
-rw-r--r--src/plugins/platforms/kms/main.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmsbackingstore.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmsbackingstore.h2
-rw-r--r--src/plugins/platforms/kms/qkmsbuffermanager.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmsbuffermanager.h2
-rw-r--r--src/plugins/platforms/kms/qkmscontext.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmscontext.h2
-rw-r--r--src/plugins/platforms/kms/qkmscursor.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmscursor.h2
-rw-r--r--src/plugins/platforms/kms/qkmsdevice.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmsdevice.h2
-rw-r--r--src/plugins/platforms/kms/qkmsintegration.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmsintegration.h2
-rw-r--r--src/plugins/platforms/kms/qkmsscreen.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmsscreen.h2
-rw-r--r--src/plugins/platforms/kms/qkmswindow.cpp2
-rw-r--r--src/plugins/platforms/kms/qkmswindow.h2
-rw-r--r--src/plugins/platforms/linuxfb/main.cpp2
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp2
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbintegration.h2
-rw-r--r--src/plugins/platforms/minimal/main.cpp2
-rw-r--r--src/plugins/platforms/minimal/qminimalbackingstore.cpp2
-rw-r--r--src/plugins/platforms/minimal/qminimalbackingstore.h2
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.cpp2
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.h2
-rw-r--r--src/plugins/platforms/openkode/main.cpp2
-rw-r--r--src/plugins/platforms/openkode/openkodekeytranslator.h2
-rw-r--r--src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp2
-rw-r--r--src/plugins/platforms/openkode/qopenkodeeventloopintegration.h2
-rw-r--r--src/plugins/platforms/openkode/qopenkodeintegration.cpp2
-rw-r--r--src/plugins/platforms/openkode/qopenkodeintegration.h2
-rw-r--r--src/plugins/platforms/openkode/qopenkodewindow.cpp2
-rw-r--r--src/plugins/platforms/openkode/qopenkodewindow.h2
-rw-r--r--src/plugins/platforms/openkode/shaders/frag.glslf2
-rw-r--r--src/plugins/platforms/openkode/shaders/vert.glslv2
-rw-r--r--src/plugins/platforms/openvglite/main.cpp2
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp2
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.h2
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp2
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.h2
-rw-r--r--src/plugins/platforms/openwfd/main.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdbackingstore.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdbackingstore.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfddevice.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfddevice.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdevent.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdevent.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdglcontext.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdglcontext.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdintegration.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdintegration.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdnativeinterface.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdnativeinterface.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdoutputbuffer.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdoutputbuffer.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdport.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdport.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdportmode.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdportmode.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdscreen.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdscreen.h2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdwindow.cpp2
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdwindow.h2
-rw-r--r--src/plugins/platforms/qvfb/main.cpp2
-rw-r--r--src/plugins/platforms/qvfb/qvfbintegration.cpp2
-rw-r--r--src/plugins/platforms/qvfb/qvfbintegration.h2
-rw-r--r--src/plugins/platforms/qvfb/qvfbwindowsurface.cpp2
-rw-r--r--src/plugins/platforms/qvfb/qvfbwindowsurface.h2
-rw-r--r--src/plugins/platforms/uikit/examples/qmltest/main.mm2
-rw-r--r--src/plugins/platforms/uikit/examples/qmltest/qml/main.qml2
-rw-r--r--src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/moc_qmlapplicationviewer.cpp2
-rw-r--r--src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.cpp2
-rw-r--r--src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.h2
-rw-r--r--src/plugins/platforms/uikit/main.mm2
-rw-r--r--src/plugins/platforms/uikit/quikiteventloop.h2
-rw-r--r--src/plugins/platforms/uikit/quikiteventloop.mm2
-rw-r--r--src/plugins/platforms/uikit/quikitintegration.h2
-rw-r--r--src/plugins/platforms/uikit/quikitintegration.mm2
-rw-r--r--src/plugins/platforms/uikit/quikitscreen.h2
-rw-r--r--src/plugins/platforms/uikit/quikitscreen.mm2
-rw-r--r--src/plugins/platforms/uikit/quikitsoftwareinputhandler.h2
-rw-r--r--src/plugins/platforms/uikit/quikitwindow.h2
-rw-r--r--src/plugins/platforms/uikit/quikitwindow.mm2
-rw-r--r--src/plugins/platforms/uikit/quikitwindowsurface.h2
-rw-r--r--src/plugins/platforms/uikit/quikitwindowsurface.mm2
-rw-r--r--src/plugins/platforms/vnc/main.cpp2
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.cpp2
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.h2
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.cpp2
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.h2
-rw-r--r--src/plugins/platforms/vnc/qvncserver.cpp2
-rw-r--r--src/plugins/platforms/vnc/qvncserver.h2
-rw-r--r--src/plugins/platforms/windows/array.h2
-rw-r--r--src/plugins/platforms/windows/main.cpp2
-rw-r--r--src/plugins/platforms/windows/qtwindows_additional.h2
-rw-r--r--src/plugins/platforms/windows/qtwindowsglobal.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsaccessibility.cpp423
-rw-r--r--src/plugins/platforms/windows/qwindowsaccessibility.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsclipboard.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowsclipboard.h2
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp15
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h4
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp142
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.h9
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.cpp190
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.h9
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsguieventdispatcher.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp13
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsinternalmimedata.h2
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp10
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeimage.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeimage.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsole.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsole.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.h2
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp35
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.h3
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h2
-rw-r--r--src/plugins/platforms/xcb/main.cpp2
-rw-r--r--src/plugins/platforms/xcb/qdri2context.cpp2
-rw-r--r--src/plugins/platforms/xcb/qdri2context.h2
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp58
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp22
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp50
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h19
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_maemo.cpp5
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbeglsurface.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp85
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbobject.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwmsupport.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbwmsupport.h2
-rw-r--r--src/plugins/platforms/xlib/main.cpp2
-rw-r--r--src/plugins/platforms/xlib/qglxintegration.cpp2
-rw-r--r--src/plugins/platforms/xlib/qglxintegration.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibbackingstore.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibbackingstore.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibclipboard.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibclipboard.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibcursor.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibcursor.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibdisplay.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibdisplay.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibintegration.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibintegration.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibkeyboard.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibkeyboard.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibmime.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibmime.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibnativeinterface.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibnativeinterface.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibscreen.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibscreen.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibstatic.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibstatic.h2
-rw-r--r--src/plugins/platforms/xlib/qxlibwindow.cpp7
-rw-r--r--src/plugins/platforms/xlib/qxlibwindow.h4
-rw-r--r--src/plugins/plugins.pro4
-rw-r--r--src/plugins/printsupport/windows/main.cpp2
-rw-r--r--src/plugins/printsupport/windows/qwindowsprinterinfo.cpp2
-rw-r--r--src/plugins/printsupport/windows/qwindowsprintersupport.cpp2
-rw-r--r--src/plugins/printsupport/windows/qwindowsprintersupport.h2
-rw-r--r--src/plugins/sqldrivers/db2/main.cpp2
-rw-r--r--src/plugins/sqldrivers/ibase/main.cpp2
-rw-r--r--src/plugins/sqldrivers/mysql/main.cpp2
-rw-r--r--src/plugins/sqldrivers/oci/main.cpp2
-rw-r--r--src/plugins/sqldrivers/odbc/main.cpp2
-rw-r--r--src/plugins/sqldrivers/psql/main.cpp2
-rw-r--r--src/plugins/sqldrivers/sqlite/smain.cpp2
-rw-r--r--src/plugins/sqldrivers/sqlite2/smain.cpp2
-rw-r--r--src/plugins/sqldrivers/tds/main.cpp2
-rw-r--r--src/printsupport/dialogs/qabstractpagesetupdialog.cpp2
-rw-r--r--src/printsupport/dialogs/qabstractpagesetupdialog.h2
-rw-r--r--src/printsupport/dialogs/qabstractpagesetupdialog_p.h2
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.cpp2
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.h2
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog_p.h2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog.cpp2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog.h2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_mac.mm2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix_p.h2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_win.cpp2
-rw-r--r--src/printsupport/dialogs/qprintdialog.h2
-rw-r--r--src/printsupport/dialogs/qprintdialog.qdoc2
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm2
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp2
-rw-r--r--src/printsupport/dialogs/qprintdialog_win.cpp2
-rw-r--r--src/printsupport/dialogs/qprintpreviewdialog.cpp2
-rw-r--r--src/printsupport/dialogs/qprintpreviewdialog.h2
-rw-r--r--src/printsupport/kernel/qcups.cpp2
-rw-r--r--src/printsupport/kernel/qcups_p.h2
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha.cpp21
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha_p.h3
-rw-r--r--src/printsupport/kernel/qpaintengine_preview.cpp2
-rw-r--r--src/printsupport/kernel/qpaintengine_preview_p.h2
-rw-r--r--src/printsupport/kernel/qplatformprintersupport_qpa.cpp2
-rw-r--r--src/printsupport/kernel/qplatformprintersupport_qpa.h2
-rw-r--r--src/printsupport/kernel/qplatformprintplugin.cpp2
-rw-r--r--src/printsupport/kernel/qplatformprintplugin_qpa.h2
-rw-r--r--src/printsupport/kernel/qprintengine.h2
-rw-r--r--src/printsupport/kernel/qprintengine_pdf.cpp4
-rw-r--r--src/printsupport/kernel/qprintengine_pdf_p.h2
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp2
-rw-r--r--src/printsupport/kernel/qprintengine_win_p.h2
-rw-r--r--src/printsupport/kernel/qprinter.cpp2
-rw-r--r--src/printsupport/kernel/qprinter.h2
-rw-r--r--src/printsupport/kernel/qprinter_p.h2
-rw-r--r--src/printsupport/kernel/qprinterinfo.cpp2
-rw-r--r--src/printsupport/kernel/qprinterinfo.h2
-rw-r--r--src/printsupport/kernel/qprinterinfo_p.h2
-rw-r--r--src/printsupport/kernel/qprinterinfo_unix.cpp2
-rw-r--r--src/printsupport/kernel/qprinterinfo_unix_p.h2
-rw-r--r--src/printsupport/widgets/qprintpreviewwidget.cpp2
-rw-r--r--src/printsupport/widgets/qprintpreviewwidget.h2
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp2
-rw-r--r--src/sql/drivers/db2/qsql_db2.h2
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp2
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.h2
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp2
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.h2
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp2
-rw-r--r--src/sql/drivers/oci/qsql_oci.h2
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp6
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.h2
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
-rw-r--r--src/sql/drivers/psql/qsql_psql.h2
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp6
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.h2
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.cpp2
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.h2
-rw-r--r--src/sql/drivers/tds/qsql_tds.cpp2
-rw-r--r--src/sql/drivers/tds/qsql_tds.h2
-rw-r--r--src/sql/kernel/qsql.h2
-rw-r--r--src/sql/kernel/qsql.qdoc2
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp2
-rw-r--r--src/sql/kernel/qsqlcachedresult_p.h2
-rw-r--r--src/sql/kernel/qsqldatabase.cpp2
-rw-r--r--src/sql/kernel/qsqldatabase.h2
-rw-r--r--src/sql/kernel/qsqldriver.cpp2
-rw-r--r--src/sql/kernel/qsqldriver.h2
-rw-r--r--src/sql/kernel/qsqldriverplugin.cpp2
-rw-r--r--src/sql/kernel/qsqldriverplugin.h2
-rw-r--r--src/sql/kernel/qsqlerror.cpp2
-rw-r--r--src/sql/kernel/qsqlerror.h2
-rw-r--r--src/sql/kernel/qsqlfield.cpp2
-rw-r--r--src/sql/kernel/qsqlfield.h2
-rw-r--r--src/sql/kernel/qsqlindex.cpp2
-rw-r--r--src/sql/kernel/qsqlindex.h2
-rw-r--r--src/sql/kernel/qsqlnulldriver_p.h2
-rw-r--r--src/sql/kernel/qsqlquery.cpp2
-rw-r--r--src/sql/kernel/qsqlquery.h2
-rw-r--r--src/sql/kernel/qsqlrecord.cpp2
-rw-r--r--src/sql/kernel/qsqlrecord.h2
-rw-r--r--src/sql/kernel/qsqlresult.cpp9
-rw-r--r--src/sql/kernel/qsqlresult.h2
-rw-r--r--src/sql/models/qsqlquerymodel.cpp2
-rw-r--r--src/sql/models/qsqlquerymodel.h2
-rw-r--r--src/sql/models/qsqlquerymodel_p.h2
-rw-r--r--src/sql/models/qsqlrelationaldelegate.cpp2
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h2
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.cpp6
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.h2
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
-rw-r--r--src/sql/models/qsqltablemodel.h2
-rw-r--r--src/sql/models/qsqltablemodel_p.h2
-rw-r--r--src/src.pro4
-rw-r--r--src/testlib/qabstracttestlogger.cpp23
-rw-r--r--src/testlib/qabstracttestlogger_p.h3
-rw-r--r--src/testlib/qasciikey.cpp2
-rw-r--r--src/testlib/qbenchmark.cpp10
-rw-r--r--src/testlib/qbenchmark.h2
-rw-r--r--src/testlib/qbenchmark_p.h2
-rw-r--r--src/testlib/qbenchmarkevent.cpp2
-rw-r--r--src/testlib/qbenchmarkevent_p.h2
-rw-r--r--src/testlib/qbenchmarkmeasurement.cpp2
-rw-r--r--src/testlib/qbenchmarkmeasurement_p.h4
-rw-r--r--src/testlib/qbenchmarkmetric.cpp2
-rw-r--r--src/testlib/qbenchmarkmetric.h2
-rw-r--r--src/testlib/qbenchmarkmetric_p.h2
-rw-r--r--src/testlib/qbenchmarkvalgrind.cpp2
-rw-r--r--src/testlib/qbenchmarkvalgrind_p.h2
-rw-r--r--src/testlib/qplaintestlogger.cpp58
-rw-r--r--src/testlib/qplaintestlogger_p.h2
-rw-r--r--src/testlib/qsignaldumper.cpp2
-rw-r--r--src/testlib/qsignaldumper_p.h2
-rw-r--r--src/testlib/qsignalspy.h4
-rw-r--r--src/testlib/qsignalspy.qdoc2
-rw-r--r--src/testlib/qtest.h27
-rw-r--r--src/testlib/qtest_global.h6
-rw-r--r--src/testlib/qtest_gui.h84
-rw-r--r--src/testlib/qtestaccessible.h2
-rw-r--r--src/testlib/qtestassert.h2
-rw-r--r--src/testlib/qtestcase.cpp214
-rw-r--r--src/testlib/qtestcase.h21
-rw-r--r--src/testlib/qtestcoreelement_p.h2
-rw-r--r--src/testlib/qtestcorelist_p.h2
-rw-r--r--src/testlib/qtestdata.cpp2
-rw-r--r--src/testlib/qtestdata.h2
-rw-r--r--src/testlib/qtestelement.cpp2
-rw-r--r--src/testlib/qtestelement_p.h2
-rw-r--r--src/testlib/qtestelementattribute.cpp2
-rw-r--r--src/testlib/qtestelementattribute_p.h2
-rw-r--r--src/testlib/qtestevent.h2
-rw-r--r--src/testlib/qtestevent.qdoc2
-rw-r--r--src/testlib/qtesteventloop.h2
-rw-r--r--src/testlib/qtestkeyboard.h11
-rw-r--r--src/testlib/qtestlog.cpp6
-rw-r--r--src/testlib/qtestlog_p.h5
-rw-r--r--src/testlib/qtestmouse.h9
-rw-r--r--src/testlib/qtestresult.cpp19
-rw-r--r--src/testlib/qtestresult_p.h3
-rw-r--r--src/testlib/qtestspontaneevent.h2
-rw-r--r--src/testlib/qtestsystem.h2
-rw-r--r--src/testlib/qtesttable.cpp14
-rw-r--r--src/testlib/qtesttable_p.h2
-rw-r--r--src/testlib/qtesttouch.h62
-rw-r--r--src/testlib/qtestxunitstreamer.cpp2
-rw-r--r--src/testlib/qtestxunitstreamer_p.h2
-rw-r--r--src/testlib/qxmltestlogger.cpp4
-rw-r--r--src/testlib/qxmltestlogger_p.h2
-rw-r--r--src/testlib/qxunittestlogger.cpp16
-rw-r--r--src/testlib/qxunittestlogger_p.h2
-rw-r--r--src/tools/bootstrap/bootstrap.pri1
-rw-r--r--src/tools/bootstrap/bootstrap.pro1
-rw-r--r--src/tools/mkv8snapshot/mkv8snapshot.pro38
-rw-r--r--src/tools/moc/generator.cpp15
-rw-r--r--src/tools/moc/generator.h2
-rw-r--r--src/tools/moc/keywords.cpp87
-rw-r--r--src/tools/moc/main.cpp2
-rw-r--r--src/tools/moc/moc.cpp4
-rw-r--r--src/tools/moc/moc.h2
-rw-r--r--src/tools/moc/mwerks_mac.cpp2
-rw-r--r--src/tools/moc/mwerks_mac.h2
-rw-r--r--src/tools/moc/outputrevision.h2
-rw-r--r--src/tools/moc/parser.cpp2
-rw-r--r--src/tools/moc/parser.h2
-rw-r--r--src/tools/moc/ppkeywords.cpp2
-rw-r--r--src/tools/moc/preprocessor.cpp2
-rw-r--r--src/tools/moc/preprocessor.h2
-rw-r--r--src/tools/moc/symbols.h2
-rw-r--r--src/tools/moc/token.cpp3
-rw-r--r--src/tools/moc/token.h3
-rwxr-xr-xsrc/tools/moc/util/generate.sh2
-rw-r--r--src/tools/moc/util/generate_keywords.cpp3
-rw-r--r--src/tools/moc/util/licenseheader.txt2
-rw-r--r--src/tools/moc/utils.h2
-rw-r--r--src/tools/rcc/main.cpp2
-rw-r--r--src/tools/rcc/rcc.cpp2
-rw-r--r--src/tools/rcc/rcc.h2
-rw-r--r--src/tools/tools.pro3
-rw-r--r--src/tools/uic/cpp/cppextractimages.cpp2
-rw-r--r--src/tools/uic/cpp/cppextractimages.h2
-rw-r--r--src/tools/uic/cpp/cppwritedeclaration.cpp2
-rw-r--r--src/tools/uic/cpp/cppwritedeclaration.h2
-rw-r--r--src/tools/uic/cpp/cppwriteicondata.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteicondata.h2
-rw-r--r--src/tools/uic/cpp/cppwriteicondeclaration.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteicondeclaration.h2
-rw-r--r--src/tools/uic/cpp/cppwriteiconinitialization.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteiconinitialization.h2
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.h2
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.h2
-rw-r--r--src/tools/uic/customwidgetsinfo.cpp2
-rw-r--r--src/tools/uic/customwidgetsinfo.h2
-rw-r--r--src/tools/uic/databaseinfo.cpp2
-rw-r--r--src/tools/uic/databaseinfo.h2
-rw-r--r--src/tools/uic/driver.cpp2
-rw-r--r--src/tools/uic/driver.h2
-rw-r--r--src/tools/uic/globaldefs.h2
-rw-r--r--src/tools/uic/main.cpp2
-rw-r--r--src/tools/uic/option.h2
-rw-r--r--src/tools/uic/qclass_lib_map.h194
-rw-r--r--src/tools/uic/treewalker.cpp2
-rw-r--r--src/tools/uic/treewalker.h2
-rw-r--r--src/tools/uic/ui4.cpp2
-rw-r--r--src/tools/uic/ui4.h2
-rw-r--r--src/tools/uic/uic.cpp2
-rw-r--r--src/tools/uic/uic.h2
-rw-r--r--src/tools/uic/utils.h2
-rw-r--r--src/tools/uic/validator.cpp2
-rw-r--r--src/tools/uic/validator.h2
-rw-r--r--src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch336
-rw-r--r--src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch361
-rw-r--r--src/v8/0003-Generalize-external-object-resources.patch595
-rw-r--r--src/v8/0004-Introduce-a-QML-compilation-mode.patch2355
-rw-r--r--src/v8/0005-Allow-access-to-the-calling-script-data.patch48
-rw-r--r--src/v8/0006-Add-custom-object-compare-callback.patch548
-rw-r--r--src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch46
-rw-r--r--src/v8/0008-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch64
-rw-r--r--src/v8/0009-Fix-deprecated-Python-code.patch51
-rw-r--r--src/v8/0010-Remove-execute-flag-from-v8-debug.h.patch15
-rw-r--r--src/v8/0011-Fix-warnings.patch46
-rw-r--r--src/v8/0012-Add-flag-to-avoid-breakpoint-relocation.patch147
-rw-r--r--src/v8/README1
-rw-r--r--src/v8/v8.pri304
-rw-r--r--src/v8/v8.pro41
-rw-r--r--src/v8/v8base.pri19
-rw-r--r--src/widgets/Qt5WidgetsConfigExtras.cmake.in2
-rw-r--r--src/widgets/Qt5WidgetsMacros.cmake40
-rw-r--r--src/widgets/accessible/qaccessiblewidget.cpp205
-rw-r--r--src/widgets/accessible/qaccessiblewidget.h3
-rw-r--r--src/widgets/animation/qguivariantanimation.cpp2
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp108
-rw-r--r--src/widgets/dialogs/qcolordialog.h2
-rw-r--r--src/widgets/dialogs/qcolordialog_mac.mm2
-rw-r--r--src/widgets/dialogs/qcolordialog_p.h10
-rw-r--r--src/widgets/dialogs/qdialog.cpp27
-rw-r--r--src/widgets/dialogs/qdialog.h4
-rw-r--r--src/widgets/dialogs/qdialog_p.h5
-rw-r--r--src/widgets/dialogs/qerrormessage.cpp2
-rw-r--r--src/widgets/dialogs/qerrormessage.h2
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp258
-rw-r--r--src/widgets/dialogs/qfiledialog.h2
-rw-r--r--src/widgets/dialogs/qfiledialog.ui2
-rw-r--r--src/widgets/dialogs/qfiledialog_embedded.ui2
-rw-r--r--src/widgets/dialogs/qfiledialog_mac.mm2
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h42
-rw-r--r--src/widgets/dialogs/qfileinfogatherer.cpp7
-rw-r--r--src/widgets/dialogs/qfileinfogatherer_p.h2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.h2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel_p.h2
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp22
-rw-r--r--src/widgets/dialogs/qfontdialog.h2
-rw-r--r--src/widgets/dialogs/qfontdialog_mac.mm2
-rw-r--r--src/widgets/dialogs/qfontdialog_p.h8
-rw-r--r--src/widgets/dialogs/qfscompleter_p.h2
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp2
-rw-r--r--src/widgets/dialogs/qinputdialog.h2
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp8
-rw-r--r--src/widgets/dialogs/qmessagebox.h2
-rw-r--r--src/widgets/dialogs/qnspanelproxy_mac.mm2
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp2
-rw-r--r--src/widgets/dialogs/qprogressdialog.h2
-rw-r--r--src/widgets/dialogs/qsidebar.cpp4
-rw-r--r--src/widgets/dialogs/qsidebar_p.h4
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rw-r--r--src/widgets/dialogs/qwizard.h2
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp2
-rw-r--r--src/widgets/dialogs/qwizard_win_p.h2
-rw-r--r--src/widgets/effects/qgraphicseffect.cpp2
-rw-r--r--src/widgets/effects/qgraphicseffect.h2
-rw-r--r--src/widgets/effects/qgraphicseffect_p.h2
-rw-r--r--src/widgets/effects/qpixmapfilter.cpp2
-rw-r--r--src/widgets/effects/qpixmapfilter_p.h2
-rw-r--r--src/widgets/graphicsview/qgraph_p.h8
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsitemanimation.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsitemanimation.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayout.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslayout.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp14
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.h2
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscenelinearindex.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsscenelinearindex_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicstransform.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicstransform.h2
-rw-r--r--src/widgets/graphicsview/qgraphicstransform_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsview_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.h2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.h2
-rw-r--r--src/widgets/graphicsview/qgridlayoutengine.cpp2
-rw-r--r--src/widgets/graphicsview/qgridlayoutengine_p.h2
-rw-r--r--src/widgets/graphicsview/qsimplex_p.cpp2
-rw-r--r--src/widgets/graphicsview/qsimplex_p.h2
-rw-r--r--src/widgets/itemviews/itemviews.pri12
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp3
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.h11
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp35
-rw-r--r--src/widgets/itemviews/qabstractitemview.h6
-rw-r--r--src/widgets/itemviews/qabstractitemview_p.h4
-rw-r--r--src/widgets/itemviews/qbsptree.cpp2
-rw-r--r--src/widgets/itemviews/qbsptree_p.h2
-rw-r--r--src/widgets/itemviews/qcolumnview.cpp2
-rw-r--r--src/widgets/itemviews/qcolumnview.h2
-rw-r--r--src/widgets/itemviews/qcolumnview_p.h2
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip.cpp2
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip_p.h2
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.cpp14
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.h4
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp2
-rw-r--r--src/widgets/itemviews/qdirmodel.h2
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp2
-rw-r--r--src/widgets/itemviews/qfileiconprovider.h2
-rw-r--r--src/widgets/itemviews/qheaderview.cpp36
-rw-r--r--src/widgets/itemviews/qheaderview.h4
-rw-r--r--src/widgets/itemviews/qheaderview_p.h2
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp24
-rw-r--r--src/widgets/itemviews/qitemdelegate.h4
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp2
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.h2
-rw-r--r--src/widgets/itemviews/qitemeditorfactory_p.h2
-rw-r--r--src/widgets/itemviews/qlistview.cpp6
-rw-r--r--src/widgets/itemviews/qlistview.h4
-rw-r--r--src/widgets/itemviews/qlistview_p.h2
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp2
-rw-r--r--src/widgets/itemviews/qlistwidget.h4
-rw-r--r--src/widgets/itemviews/qlistwidget_p.h2
-rw-r--r--src/widgets/itemviews/qproxymodel.cpp2
-rw-r--r--src/widgets/itemviews/qproxymodel.h2
-rw-r--r--src/widgets/itemviews/qproxymodel_p.h2
-rw-r--r--src/widgets/itemviews/qstandarditemmodel.cpp2
-rw-r--r--src/widgets/itemviews/qstandarditemmodel.h2
-rw-r--r--src/widgets/itemviews/qstandarditemmodel_p.h2
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp2
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.h2
-rw-r--r--src/widgets/itemviews/qtableview.cpp2
-rw-r--r--src/widgets/itemviews/qtableview.h2
-rw-r--r--src/widgets/itemviews/qtableview_p.h2
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp2
-rw-r--r--src/widgets/itemviews/qtablewidget.h2
-rw-r--r--src/widgets/itemviews/qtablewidget_p.h2
-rw-r--r--src/widgets/itemviews/qtreeview.cpp127
-rw-r--r--src/widgets/itemviews/qtreeview.h4
-rw-r--r--src/widgets/itemviews/qtreeview_p.h7
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp2
-rw-r--r--src/widgets/itemviews/qtreewidget.h2
-rw-r--r--src/widgets/itemviews/qtreewidget_p.h2
-rw-r--r--src/widgets/itemviews/qtreewidgetitemiterator.cpp2
-rw-r--r--src/widgets/itemviews/qtreewidgetitemiterator.h2
-rw-r--r--src/widgets/itemviews/qtreewidgetitemiterator_p.h2
-rw-r--r--src/widgets/itemviews/qwidgetitemdata_p.h2
-rw-r--r--src/widgets/kernel/qaction.cpp102
-rw-r--r--src/widgets/kernel/qaction.h2
-rw-r--r--src/widgets/kernel/qaction_p.h2
-rw-r--r--src/widgets/kernel/qactiongroup.cpp2
-rw-r--r--src/widgets/kernel/qactiongroup.h2
-rw-r--r--src/widgets/kernel/qapplication.cpp208
-rw-r--r--src/widgets/kernel/qapplication.h5
-rw-r--r--src/widgets/kernel/qapplication_p.h173
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp6
-rw-r--r--src/widgets/kernel/qboxlayout.cpp2
-rw-r--r--src/widgets/kernel/qboxlayout.h2
-rw-r--r--src/widgets/kernel/qdesktopwidget.cpp2
-rw-r--r--src/widgets/kernel/qdesktopwidget.h2
-rw-r--r--src/widgets/kernel/qdesktopwidget.qdoc2
-rw-r--r--src/widgets/kernel/qdesktopwidget_qpa.cpp2
-rw-r--r--src/widgets/kernel/qdesktopwidget_qpa_p.h2
-rw-r--r--src/widgets/kernel/qformlayout.cpp4
-rw-r--r--src/widgets/kernel/qformlayout.h2
-rw-r--r--src/widgets/kernel/qgesture.cpp2
-rw-r--r--src/widgets/kernel/qgesture.h2
-rw-r--r--src/widgets/kernel/qgesture_p.h2
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp2
-rw-r--r--src/widgets/kernel/qgesturemanager_p.h2
-rw-r--r--src/widgets/kernel/qgesturerecognizer.cpp2
-rw-r--r--src/widgets/kernel/qgesturerecognizer.h2
-rw-r--r--src/widgets/kernel/qgridlayout.cpp2
-rw-r--r--src/widgets/kernel/qgridlayout.h2
-rw-r--r--src/widgets/kernel/qguiplatformplugin.cpp4
-rw-r--r--src/widgets/kernel/qguiplatformplugin_p.h2
-rw-r--r--src/widgets/kernel/qicon.cpp10
-rw-r--r--src/widgets/kernel/qicon.h6
-rw-r--r--src/widgets/kernel/qicon_p.h2
-rw-r--r--src/widgets/kernel/qiconengine.cpp2
-rw-r--r--src/widgets/kernel/qiconengine.h2
-rw-r--r--src/widgets/kernel/qiconengineplugin.cpp2
-rw-r--r--src/widgets/kernel/qiconengineplugin.h2
-rw-r--r--src/widgets/kernel/qiconloader.cpp2
-rw-r--r--src/widgets/kernel/qiconloader_p.h2
-rw-r--r--src/widgets/kernel/qinputcontext.cpp2
-rw-r--r--src/widgets/kernel/qinputcontext.h2
-rw-r--r--src/widgets/kernel/qlayout.cpp2
-rw-r--r--src/widgets/kernel/qlayout.h2
-rw-r--r--src/widgets/kernel/qlayout_p.h2
-rw-r--r--src/widgets/kernel/qlayoutengine.cpp2
-rw-r--r--src/widgets/kernel/qlayoutengine_p.h2
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp12
-rw-r--r--src/widgets/kernel/qlayoutitem.h2
-rw-r--r--src/widgets/kernel/qplatformdialoghelper_qpa.cpp468
-rw-r--r--src/widgets/kernel/qplatformdialoghelper_qpa.h189
-rw-r--r--src/widgets/kernel/qplatformmenu_qpa.cpp2
-rw-r--r--src/widgets/kernel/qplatformmenu_qpa.h2
-rw-r--r--src/widgets/kernel/qshortcut.cpp6
-rw-r--r--src/widgets/kernel/qshortcut.h4
-rw-r--r--src/widgets/kernel/qsizepolicy.h6
-rw-r--r--src/widgets/kernel/qsizepolicy.qdoc2
-rw-r--r--src/widgets/kernel/qsoftkeymanager.cpp2
-rw-r--r--src/widgets/kernel/qsoftkeymanager_common_p.h2
-rw-r--r--src/widgets/kernel/qsoftkeymanager_p.h2
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp2
-rw-r--r--src/widgets/kernel/qstackedlayout.h2
-rw-r--r--src/widgets/kernel/qstandardgestures.cpp2
-rw-r--r--src/widgets/kernel/qstandardgestures_p.h2
-rw-r--r--src/widgets/kernel/qt_widgets_pch.h2
-rw-r--r--src/widgets/kernel/qtooltip.cpp2
-rw-r--r--src/widgets/kernel/qtooltip.h2
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp21
-rw-r--r--src/widgets/kernel/qwhatsthis.h2
-rw-r--r--src/widgets/kernel/qwidget.cpp512
-rw-r--r--src/widgets/kernel/qwidget.h12
-rw-r--r--src/widgets/kernel/qwidget_p.h2
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
-rw-r--r--src/widgets/kernel/qwidgetaction.cpp2
-rw-r--r--src/widgets/kernel/qwidgetaction.h2
-rw-r--r--src/widgets/kernel/qwidgetaction_p.h2
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp2
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h2
-rw-r--r--src/widgets/kernel/qwidgetsvariant.cpp52
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa.cpp2
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa_p.h2
-rw-r--r--src/widgets/platforms/mac/qapplication_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qclipboard_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qcocoaintrospection_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qcocoaintrospection_p.h2
-rw-r--r--src/widgets/platforms/mac/qcocoapanel_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qcocoapanel_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qcocoasharedwindowmethods_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qcocoaview_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qcocoaview_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qcocoawindow_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qcocoawindow_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qcocoawindowdelegate_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qcocoawindowdelegate_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qcolormap_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qdesktopwidget_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qdesktopwidget_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qdnd_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qeventdispatcher_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qeventdispatcher_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qkeymapper_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qmacdefines_mac.h2
-rw-r--r--src/widgets/platforms/mac/qmacgesturerecognizer_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qmacgesturerecognizer_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qmacinputcontext_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qmacinputcontext_p.h2
-rw-r--r--src/widgets/platforms/mac/qmime_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qnsframeview_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qnsthemeframe_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qnstitledframe_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qpaintdevice_mac.cpp51
-rw-r--r--src/widgets/platforms/mac/qpaintengine_mac.cpp103
-rw-r--r--src/widgets/platforms/mac/qpaintengine_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qpixmap_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qpixmap_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qprintengine_mac.mm2
-rw-r--r--src/widgets/platforms/mac/qprintengine_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qprinterinfo_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qregion_mac.cpp73
-rw-r--r--src/widgets/platforms/mac/qt_cocoa_helpers_mac.mm8
-rw-r--r--src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h4
-rw-r--r--src/widgets/platforms/mac/qt_mac.cpp20
-rw-r--r--src/widgets/platforms/mac/qt_mac_p.h2
-rw-r--r--src/widgets/platforms/mac/qwidget_mac.mm2
-rw-r--r--src/widgets/statemachine/qbasickeyeventtransition.cpp2
-rw-r--r--src/widgets/statemachine/qbasickeyeventtransition_p.h2
-rw-r--r--src/widgets/statemachine/qbasicmouseeventtransition.cpp2
-rw-r--r--src/widgets/statemachine/qbasicmouseeventtransition_p.h2
-rw-r--r--src/widgets/statemachine/qguistatemachine.cpp9
-rw-r--r--src/widgets/statemachine/qkeyeventtransition.cpp2
-rw-r--r--src/widgets/statemachine/qkeyeventtransition.h2
-rw-r--r--src/widgets/statemachine/qmouseeventtransition.cpp2
-rw-r--r--src/widgets/statemachine/qmouseeventtransition.h2
-rw-r--r--src/widgets/styles/qcdestyle.cpp2
-rw-r--r--src/widgets/styles/qcdestyle.h2
-rw-r--r--src/widgets/styles/qcleanlooksstyle.cpp2
-rw-r--r--src/widgets/styles/qcleanlooksstyle.h2
-rw-r--r--src/widgets/styles/qcleanlooksstyle_p.h2
-rw-r--r--src/widgets/styles/qcommonstyle.cpp8
-rw-r--r--src/widgets/styles/qcommonstyle.h2
-rw-r--r--src/widgets/styles/qcommonstyle_p.h2
-rw-r--r--src/widgets/styles/qcommonstylepixmaps_p.h2
-rw-r--r--src/widgets/styles/qdrawutil.cpp2
-rw-r--r--src/widgets/styles/qdrawutil.h2
-rw-r--r--src/widgets/styles/qgtkpainter.cpp2
-rw-r--r--src/widgets/styles/qgtkpainter_p.h2
-rw-r--r--src/widgets/styles/qgtkstyle.cpp2
-rw-r--r--src/widgets/styles/qgtkstyle.h2
-rw-r--r--src/widgets/styles/qgtkstyle_p.cpp2
-rw-r--r--src/widgets/styles/qgtkstyle_p.h2
-rw-r--r--src/widgets/styles/qmacstyle.qdoc2
-rw-r--r--src/widgets/styles/qmacstyle_mac.h4
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm434
-rw-r--r--src/widgets/styles/qmacstyle_mac_p.h28
-rw-r--r--src/widgets/styles/qmacstylepixmaps_mac_p.h2
-rw-r--r--src/widgets/styles/qmotifstyle.cpp2
-rw-r--r--src/widgets/styles/qmotifstyle.h2
-rw-r--r--src/widgets/styles/qmotifstyle_p.h2
-rw-r--r--src/widgets/styles/qplastiquestyle.cpp2
-rw-r--r--src/widgets/styles/qplastiquestyle.h2
-rw-r--r--src/widgets/styles/qproxystyle.cpp2
-rw-r--r--src/widgets/styles/qproxystyle.h2
-rw-r--r--src/widgets/styles/qproxystyle_p.h2
-rw-r--r--src/widgets/styles/qstyle.cpp2
-rw-r--r--src/widgets/styles/qstyle.h2
-rw-r--r--src/widgets/styles/qstyle_p.h2
-rw-r--r--src/widgets/styles/qstylefactory.cpp4
-rw-r--r--src/widgets/styles/qstylefactory.h2
-rw-r--r--src/widgets/styles/qstylehelper.cpp25
-rw-r--r--src/widgets/styles/qstylehelper_p.h2
-rw-r--r--src/widgets/styles/qstyleoption.cpp2
-rw-r--r--src/widgets/styles/qstyleoption.h2
-rw-r--r--src/widgets/styles/qstylepainter.cpp2
-rw-r--r--src/widgets/styles/qstylepainter.h2
-rw-r--r--src/widgets/styles/qstyleplugin.cpp2
-rw-r--r--src/widgets/styles/qstyleplugin.h2
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp2
-rw-r--r--src/widgets/styles/qstylesheetstyle_default.cpp2
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h2
-rw-r--r--src/widgets/styles/qwindowscestyle.cpp2
-rw-r--r--src/widgets/styles/qwindowscestyle.h2
-rw-r--r--src/widgets/styles/qwindowscestyle_p.h2
-rw-r--r--src/widgets/styles/qwindowsmobilestyle.cpp2
-rw-r--r--src/widgets/styles/qwindowsmobilestyle.h2
-rw-r--r--src/widgets/styles/qwindowsmobilestyle_p.h2
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp22
-rw-r--r--src/widgets/styles/qwindowsstyle.h2
-rw-r--r--src/widgets/styles/qwindowsstyle_p.h2
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp2
-rw-r--r--src/widgets/styles/qwindowsvistastyle.h2
-rw-r--r--src/widgets/styles/qwindowsvistastyle_p.h2
-rw-r--r--src/widgets/styles/qwindowsxpstyle.cpp2
-rw-r--r--src/widgets/styles/qwindowsxpstyle.h2
-rw-r--r--src/widgets/styles/qwindowsxpstyle_p.h2
-rw-r--r--src/widgets/styles/styles.pri3
-rw-r--r--src/widgets/util/qcolormap.h2
-rw-r--r--src/widgets/util/qcolormap.qdoc2
-rw-r--r--src/widgets/util/qcolormap_qpa.cpp2
-rw-r--r--src/widgets/util/qcompleter.cpp4
-rw-r--r--src/widgets/util/qcompleter.h2
-rw-r--r--src/widgets/util/qcompleter_p.h4
-rw-r--r--src/widgets/util/qflickgesture.cpp2
-rw-r--r--src/widgets/util/qflickgesture_p.h2
-rw-r--r--src/widgets/util/qscroller.cpp8
-rw-r--r--src/widgets/util/qscroller.h2
-rw-r--r--src/widgets/util/qscroller_mac.mm2
-rw-r--r--src/widgets/util/qscroller_p.h2
-rw-r--r--src/widgets/util/qscrollerproperties.cpp2
-rw-r--r--src/widgets/util/qscrollerproperties.h2
-rw-r--r--src/widgets/util/qscrollerproperties_p.h2
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon.h2
-rw-r--r--src/widgets/util/qsystemtrayicon_mac.mm2
-rw-r--r--src/widgets/util/qsystemtrayicon_p.h2
-rw-r--r--src/widgets/util/qsystemtrayicon_qpa.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon_win.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon_wince.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon_x11.cpp2
-rw-r--r--src/widgets/util/qundogroup.cpp2
-rw-r--r--src/widgets/util/qundogroup.h2
-rw-r--r--src/widgets/util/qundostack.cpp2
-rw-r--r--src/widgets/util/qundostack.h2
-rw-r--r--src/widgets/util/qundostack_p.h2
-rw-r--r--src/widgets/util/qundoview.cpp2
-rw-r--r--src/widgets/util/qundoview.h2
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp2
-rw-r--r--src/widgets/widgets/qabstractbutton.h2
-rw-r--r--src/widgets/widgets/qabstractbutton_p.h2
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp4
-rw-r--r--src/widgets/widgets/qabstractscrollarea.h5
-rw-r--r--src/widgets/widgets/qabstractscrollarea_p.h2
-rw-r--r--src/widgets/widgets/qabstractslider.cpp58
-rw-r--r--src/widgets/widgets/qabstractslider.h2
-rw-r--r--src/widgets/widgets/qabstractslider_p.h2
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp14
-rw-r--r--src/widgets/widgets/qabstractspinbox.h2
-rw-r--r--src/widgets/widgets/qabstractspinbox_p.h2
-rw-r--r--src/widgets/widgets/qbuttongroup.cpp12
-rw-r--r--src/widgets/widgets/qbuttongroup.h2
-rw-r--r--src/widgets/widgets/qcalendartextnavigator_p.h2
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp2
-rw-r--r--src/widgets/widgets/qcalendarwidget.h2
-rw-r--r--src/widgets/widgets/qcheckbox.cpp2
-rw-r--r--src/widgets/widgets/qcheckbox.h2
-rw-r--r--src/widgets/widgets/qcocoatoolbardelegate_mac.mm2
-rw-r--r--src/widgets/widgets/qcocoatoolbardelegate_mac_p.h2
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.h2
-rw-r--r--src/widgets/widgets/qcombobox_p.h2
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.cpp2
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.h2
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp2
-rw-r--r--src/widgets/widgets/qdatetimeedit.h2
-rw-r--r--src/widgets/widgets/qdatetimeedit_p.h2
-rw-r--r--src/widgets/widgets/qdial.cpp20
-rw-r--r--src/widgets/widgets/qdial.h2
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp2
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.h2
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp2
-rw-r--r--src/widgets/widgets/qdockarealayout_p.h2
-rw-r--r--src/widgets/widgets/qdockwidget.cpp2
-rw-r--r--src/widgets/widgets/qdockwidget.h2
-rw-r--r--src/widgets/widgets/qdockwidget_p.h2
-rw-r--r--src/widgets/widgets/qeffects.cpp2
-rw-r--r--src/widgets/widgets/qeffects_p.h2
-rw-r--r--src/widgets/widgets/qfocusframe.cpp4
-rw-r--r--src/widgets/widgets/qfocusframe.h2
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp2
-rw-r--r--src/widgets/widgets/qfontcombobox.h2
-rw-r--r--src/widgets/widgets/qframe.cpp2
-rw-r--r--src/widgets/widgets/qframe.h2
-rw-r--r--src/widgets/widgets/qframe_p.h2
-rw-r--r--src/widgets/widgets/qgroupbox.cpp2
-rw-r--r--src/widgets/widgets/qgroupbox.h2
-rw-r--r--src/widgets/widgets/qlabel.cpp2
-rw-r--r--src/widgets/widgets/qlabel.h2
-rw-r--r--src/widgets/widgets/qlabel_p.h2
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp2
-rw-r--r--src/widgets/widgets/qlcdnumber.h2
-rw-r--r--src/widgets/widgets/qlineedit.cpp19
-rw-r--r--src/widgets/widgets/qlineedit.h2
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp15
-rw-r--r--src/widgets/widgets/qlineedit_p.h2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.h2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm2
-rw-r--r--src/widgets/widgets/qmacnativewidget_mac.h2
-rw-r--r--src/widgets/widgets/qmacnativewidget_mac.mm2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp2
-rw-r--r--src/widgets/widgets/qmainwindow.h2
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp2
-rw-r--r--src/widgets/widgets/qmainwindowlayout_mac.mm2
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h2
-rw-r--r--src/widgets/widgets/qmdiarea.cpp2
-rw-r--r--src/widgets/widgets/qmdiarea.h2
-rw-r--r--src/widgets/widgets/qmdiarea_p.h2
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp2
-rw-r--r--src/widgets/widgets/qmdisubwindow.h2
-rw-r--r--src/widgets/widgets/qmdisubwindow_p.h2
-rw-r--r--src/widgets/widgets/qmenu.cpp4
-rw-r--r--src/widgets/widgets/qmenu.h2
-rw-r--r--src/widgets/widgets/qmenu_p.h2
-rw-r--r--src/widgets/widgets/qmenu_wince.cpp2
-rw-r--r--src/widgets/widgets/qmenu_wince_resource_p.h2
-rw-r--r--src/widgets/widgets/qmenubar.cpp2
-rw-r--r--src/widgets/widgets/qmenubar.h2
-rw-r--r--src/widgets/widgets/qmenubar_p.h2
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp2
-rw-r--r--src/widgets/widgets/qplaintextedit.h2
-rw-r--r--src/widgets/widgets/qplaintextedit_p.h2
-rw-r--r--src/widgets/widgets/qprogressbar.cpp7
-rw-r--r--src/widgets/widgets/qprogressbar.h2
-rw-r--r--src/widgets/widgets/qpushbutton.cpp2
-rw-r--r--src/widgets/widgets/qpushbutton.h2
-rw-r--r--src/widgets/widgets/qpushbutton_p.h2
-rw-r--r--src/widgets/widgets/qradiobutton.cpp2
-rw-r--r--src/widgets/widgets/qradiobutton.h2
-rw-r--r--src/widgets/widgets/qrubberband.cpp2
-rw-r--r--src/widgets/widgets/qrubberband.h2
-rw-r--r--src/widgets/widgets/qscrollarea.cpp2
-rw-r--r--src/widgets/widgets/qscrollarea.h2
-rw-r--r--src/widgets/widgets/qscrollarea_p.h2
-rw-r--r--src/widgets/widgets/qscrollbar.cpp2
-rw-r--r--src/widgets/widgets/qscrollbar.h2
-rw-r--r--src/widgets/widgets/qsizegrip.cpp2
-rw-r--r--src/widgets/widgets/qsizegrip.h2
-rw-r--r--src/widgets/widgets/qslider.cpp2
-rw-r--r--src/widgets/widgets/qslider.h2
-rw-r--r--src/widgets/widgets/qspinbox.cpp32
-rw-r--r--src/widgets/widgets/qspinbox.h2
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp2
-rw-r--r--src/widgets/widgets/qsplashscreen.h2
-rw-r--r--src/widgets/widgets/qsplitter.cpp4
-rw-r--r--src/widgets/widgets/qsplitter.h4
-rw-r--r--src/widgets/widgets/qsplitter_p.h2
-rw-r--r--src/widgets/widgets/qstackedwidget.cpp2
-rw-r--r--src/widgets/widgets/qstackedwidget.h2
-rw-r--r--src/widgets/widgets/qstatusbar.cpp2
-rw-r--r--src/widgets/widgets/qstatusbar.h2
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
-rw-r--r--src/widgets/widgets/qtabbar.h2
-rw-r--r--src/widgets/widgets/qtabbar_p.h2
-rw-r--r--src/widgets/widgets/qtabwidget.cpp158
-rw-r--r--src/widgets/widgets/qtabwidget.h2
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp2
-rw-r--r--src/widgets/widgets/qtextbrowser.h2
-rw-r--r--src/widgets/widgets/qtextedit.cpp3
-rw-r--r--src/widgets/widgets/qtextedit.h2
-rw-r--r--src/widgets/widgets/qtextedit_p.h2
-rw-r--r--src/widgets/widgets/qtoolbar.cpp4
-rw-r--r--src/widgets/widgets/qtoolbar.h2
-rw-r--r--src/widgets/widgets/qtoolbar_p.h2
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp2
-rw-r--r--src/widgets/widgets/qtoolbararealayout_p.h2
-rw-r--r--src/widgets/widgets/qtoolbarextension.cpp2
-rw-r--r--src/widgets/widgets/qtoolbarextension_p.h2
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp2
-rw-r--r--src/widgets/widgets/qtoolbarlayout_p.h2
-rw-r--r--src/widgets/widgets/qtoolbarseparator.cpp2
-rw-r--r--src/widgets/widgets/qtoolbarseparator_p.h2
-rw-r--r--src/widgets/widgets/qtoolbox.cpp2
-rw-r--r--src/widgets/widgets/qtoolbox.h2
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp2
-rw-r--r--src/widgets/widgets/qtoolbutton.h2
-rw-r--r--src/widgets/widgets/qwidgetanimator.cpp2
-rw-r--r--src/widgets/widgets/qwidgetanimator_p.h2
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp58
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h28
-rw-r--r--src/widgets/widgets/qwidgetresizehandler.cpp2
-rw-r--r--src/widgets/widgets/qwidgetresizehandler_p.h2
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp88
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h2
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p_p.h2
-rw-r--r--src/widgets/widgets/qworkspace.cpp2
-rw-r--r--src/widgets/widgets/qworkspace.h2
-rw-r--r--src/winmain/qtmain_win.cpp2
-rw-r--r--src/xml/dom/qdom.cpp7
-rw-r--r--src/xml/dom/qdom.h2
-rw-r--r--src/xml/sax/qxml.cpp2
-rw-r--r--src/xml/sax/qxml.h2
-rw-r--r--sync.profile9
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/compilerwarnings/data/test_cpp.txt2
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp81
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp7
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp24
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp2
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp23
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp25
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp2
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/main.cpp5
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp21
-rw-r--r--tests/auto/corelib/codecs/utf8/tst_utf8.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp46
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp6
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentmap/functions.h2
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp6
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp29
-rw-r--r--tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp9
-rw-r--r--tests/auto/corelib/corelib.pro1
-rw-r--r--tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp2
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp2
-rw-r--r--tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp2
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp2
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp2
-rw-r--r--tests/auto/corelib/global/qrand/tst_qrand.cpp2
-rw-r--r--tests/auto/corelib/io/io.pro2
-rw-r--r--tests/auto/corelib/io/largefile/largefile.pro (renamed from tests/auto/corelib/io/qfile/largefile/largefile.pro)0
-rw-r--r--tests/auto/corelib/io/largefile/tst_largefile.cpp (renamed from tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp)2
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp2
-rw-r--r--tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp2
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp97
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp42
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp2
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp2
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp28
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp2
-rw-r--r--tests/auto/corelib/io/qfile/qfile.pro2
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/main.cpp5
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp39
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp55
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp2
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp150
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp4
-rw-r--r--tests/auto/corelib/io/qnodebug/qnodebug.pro4
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp (renamed from tests/auto/v8/tst_v8.cpp)72
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp5
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pri17
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pro29
-rw-r--r--tests/auto/corelib/io/qprocess/test/test.pro10
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/testDetached.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro5
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp6
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro5
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp164
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp2
-rw-r--r--tests/auto/corelib/io/qresourceengine/.gitignore1
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp4
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp20
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp2
-rw-r--r--tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp6
-rw-r--r--tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp7
-rw-r--r--tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp5
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp2
-rw-r--r--tests/auto/corelib/io/qurl/idna-test.c2
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp2
-rw-r--r--tests/auto/corelib/itemmodels/itemmodels.pro11
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/.gitignore (renamed from tests/auto/corelib/kernel/qabstractitemmodel/.gitignore)0
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro (renamed from tests/auto/corelib/kernel/qabstractitemmodel/qabstractitemmodel.pro)0
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp (renamed from tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp)411
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/.gitignore (renamed from tests/auto/widgets/itemviews/qabstractproxymodel/.gitignore)0
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro (renamed from tests/auto/widgets/itemviews/qabstractproxymodel/qabstractproxymodel.pro)0
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp (renamed from tests/auto/widgets/itemviews/qabstractproxymodel/tst_qabstractproxymodel.cpp)79
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro (renamed from tests/auto/widgets/itemviews/qidentityproxymodel/qidentityproxymodel.pro)0
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp (renamed from tests/auto/widgets/itemviews/qidentityproxymodel/tst_qidentityproxymodel.cpp)40
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/.gitignore (renamed from tests/auto/corelib/kernel/qitemmodel/.gitignore)0
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/README (renamed from tests/auto/corelib/kernel/qitemmodel/README)0
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp (renamed from tests/auto/corelib/kernel/qitemmodel/modelstotest.cpp)8
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro (renamed from tests/auto/corelib/kernel/qitemmodel/qitemmodel.pro)0
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp (renamed from tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp)21
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/.gitignore (renamed from tests/auto/widgets/itemviews/qitemselectionmodel/.gitignore)0
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro (renamed from tests/auto/widgets/itemviews/qitemselectionmodel/qitemselectionmodel.pro)2
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp (renamed from tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp)742
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/.gitignore (renamed from tests/auto/widgets/itemviews/qsortfilterproxymodel/.gitignore)0
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro (renamed from tests/auto/widgets/itemviews/qsortfilterproxymodel/qsortfilterproxymodel.pro)0
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp (renamed from tests/auto/widgets/itemviews/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp)361
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/.gitignore (renamed from tests/auto/widgets/itemviews/qstringlistmodel/.gitignore)0
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h (renamed from tests/auto/widgets/itemviews/qstringlistmodel/qmodellistener.h)7
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro (renamed from tests/auto/widgets/itemviews/qstringlistmodel/qstringlistmodel.pro)6
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp (renamed from tests/auto/widgets/itemviews/qstringlistmodel/tst_qstringlistmodel.cpp)76
-rw-r--r--tests/auto/corelib/kernel/kernel.pro4
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp4
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp12
-rw-r--r--tests/auto/corelib/kernel/qmath/tst_qmath.cpp2
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp3
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp12
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp2
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp48
-rw-r--r--tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp2
-rw-r--r--tests/auto/corelib/kernel/qobject/.gitignore4
-rw-r--r--tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp2
-rw-r--r--tests/auto/corelib/kernel/qobject/oldnormalizeobject.h2
-rw-r--r--tests/auto/corelib/kernel/qobject/qobject.pro2
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp (renamed from tests/auto/corelib/kernel/qobject/signalbug.cpp)2
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.h (renamed from tests/auto/corelib/kernel/qobject/signalbug.h)2
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro (renamed from tests/auto/corelib/kernel/qobject/signalbug.pro)6
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp202
-rw-r--r--tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp6
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp2
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp5
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp2
-rw-r--r--tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp2
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp120
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/.gitignore2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/mylib.c2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro4
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/mylib.c2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp12
-rw-r--r--tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp2
-rw-r--r--tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp2
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/mylib.c2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp4
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp2
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid.cpp61
-rw-r--r--tests/auto/corelib/statemachine/qstate/tst_qstate.cpp2
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp81
-rw-r--r--tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp2
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp2
-rw-r--r--tests/auto/corelib/thread/qmutex/tst_qmutex.cpp2
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp2
-rw-r--r--tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp2
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp2
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp2
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp17
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp2
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.h2
-rw-r--r--tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp2
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp5
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp8
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp18
-rw-r--r--tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp2
-rw-r--r--tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp4
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp2
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp2
-rw-r--r--tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp2
-rw-r--r--tests/auto/corelib/tools/qcache/tst_qcache.cpp2
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp2
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp2
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/data/2c1517dad3678f03917f15849b052fd5.md5bin0 -> 8375 bytes
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/data/d41d8cd98f00b204e9800998ecf8427e.md50
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro12
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp36
-rw-r--r--tests/auto/corelib/tools/qdate/tst_qdate.cpp2
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp2
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp2
-rw-r--r--tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp2
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp2
-rw-r--r--tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp2
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp2
-rw-r--r--tests/auto/corelib/tools/qline/tst_qline.cpp2
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp2
-rw-r--r--tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp2
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp2
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp2
-rw-r--r--tests/auto/corelib/tools/qmargins/tst_qmargins.cpp2
-rw-r--r--tests/auto/corelib/tools/qpoint/tst_qpoint.cpp2
-rw-r--r--tests/auto/corelib/tools/qqueue/tst_qqueue.cpp2
-rw-r--r--tests/auto/corelib/tools/qrect/tst_qrect.cpp2
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp6
-rw-r--r--tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp2
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp2
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp2
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp6
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.h2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp88
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/wrapper.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/wrapper.h2
-rw-r--r--tests/auto/corelib/tools/qsize/tst_qsize.cpp2
-rw-r--r--tests/auto/corelib/tools/qsizef/tst_qsizef.cpp2
-rw-r--r--tests/auto/corelib/tools/qstl/tst_qstl.cpp2
-rw-r--r--tests/auto/corelib/tools/qstring/double_data.h2
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp102
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp2
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp2
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp2
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp2
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp2
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp2
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp16
-rw-r--r--tests/auto/corelib/tools/qstringref/tst_qstringref.cpp2
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp2
-rw-r--r--tests/auto/corelib/tools/qtime/tst_qtime.cpp2
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp14
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp110
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/qc14n.h2
-rwxr-xr-xtests/auto/corelib/xml/qxmlstream/setupSuite.sh2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/myobject.h2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp2
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/interface.cpp2
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/interface.h2
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/pinger.cpp4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/pinger.h4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp2
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp2
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp2
-rw-r--r--tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp2
-rw-r--r--tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp2
-rw-r--r--tests/auto/dbus/qdbusinterface/myobject.h2
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp2
-rw-r--r--tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp2
-rw-r--r--tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp2
-rw-r--r--tests/auto/dbus/qdbusmarshall/common.h2
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp2
-rw-r--r--tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp222
-rw-r--r--tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp2
-rw-r--r--tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp2
-rw-r--r--tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp2
-rw-r--r--tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp2
-rw-r--r--tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp2
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp2
-rw-r--r--tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp2
-rw-r--r--tests/auto/dbus/qdbustype/tst_qdbustype.cpp2
-rw-r--r--tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp2
-rw-r--r--tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp2
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp2
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp2
-rw-r--r--tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp2
-rw-r--r--[-rwxr-xr-x]tests/auto/gui/image/qimagereader/images/txts.pngbin5413 -> 5413 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/qimagereader.pro12
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp64
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp2
-rw-r--r--tests/auto/gui/image/qmovie/qmovie.pro8
-rw-r--r--tests/auto/gui/image/qmovie/tst_qmovie.cpp4
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp2
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp12
-rw-r--r--tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp2
-rw-r--r--tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp2
-rw-r--r--tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp2
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/copier.pro1
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/main.cpp22
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/main.cpp21
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/paster.pro1
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp155
-rw-r--r--tests/auto/gui/kernel/qdrag/tst_qdrag.cpp2
-rw-r--r--tests/auto/gui/kernel/qevent/tst_qevent.cpp2
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp2
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp18
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp28
-rw-r--r--tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp2
-rw-r--r--tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp28
-rw-r--r--tests/auto/gui/kernel/qkeysequence/qt_de.qmbin186240 -> 186240 bytes
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp55
-rw-r--r--tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp10
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp2
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp2
-rw-r--r--tests/auto/gui/kernel/qscreen/tst_qscreen.cpp14
-rw-r--r--tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp16
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp235
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp236
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp2
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp2
-rw-r--r--tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp2
-rw-r--r--tests/auto/gui/painting/qbrush/tst_qbrush.cpp2
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp2
-rw-r--r--tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp2
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp28
-rw-r--r--tests/auto/gui/painting/qpainter/utils/createImages/main.cpp6
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp2
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp2
-rw-r--r--tests/auto/gui/painting/qpathclipper/pathcompare.h2
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.cpp2
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.h2
-rw-r--r--tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp2
-rw-r--r--tests/auto/gui/painting/qpen/tst_qpen.cpp14
-rw-r--r--tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp4
-rw-r--r--tests/auto/gui/painting/qprinter/tst_qprinter.cpp36
-rw-r--r--tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp2
-rw-r--r--tests/auto/gui/painting/qregion/tst_qregion.cpp2
-rw-r--r--tests/auto/gui/painting/qtransform/tst_qtransform.cpp2
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp24
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp2
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp2
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp2
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp2
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp2
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp2
-rw-r--r--tests/auto/gui/text/qrawfont/qrawfont.pro6
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp75
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp2
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp2
-rw-r--r--tests/auto/gui/text/qtextblock/tst_qtextblock.cpp2
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp136
-rw-r--r--tests/auto/gui/text/qtextdocument/common.h2
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp2
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp2
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp2
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp39
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp2
-rw-r--r--tests/auto/gui/text/qtextlist/tst_qtextlist.cpp2
-rw-r--r--tests/auto/gui/text/qtextobject/tst_qtextobject.cpp2
-rw-r--r--tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp2
-rw-r--r--tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp2
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/main.cpp2
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp2
-rw-r--r--tests/auto/gui/text/qtexttable/tst_qtexttable.cpp2
-rw-r--r--tests/auto/gui/text/qzip/tst_qzip.cpp2
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp2
-rw-r--r--tests/auto/network-settings.h2
-rw-r--r--tests/auto/network/access/access.pro4
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp14
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp40
-rw-r--r--tests/auto/network/access/qhttp/.gitattributes1
-rw-r--r--tests/auto/network/access/qhttp/.gitignore1
-rw-r--r--tests/auto/network/access/qhttp/dummyserver.h114
-rw-r--r--tests/auto/network/access/qhttp/qhttp.pro23
-rw-r--r--tests/auto/network/access/qhttp/rfc3252.txt899
-rw-r--r--tests/auto/network/access/qhttp/trolltech8
-rw-r--r--tests/auto/network/access/qhttp/tst_qhttp.cpp1565
-rwxr-xr-xtests/auto/network/access/qhttp/webserver/cgi-bin/retrieve_testfile.cgi6
-rwxr-xr-xtests/auto/network/access/qhttp/webserver/cgi-bin/rfc.cgi5
-rwxr-xr-xtests/auto/network/access/qhttp/webserver/cgi-bin/store_testfile.cgi6
-rw-r--r--tests/auto/network/access/qhttp/webserver/index.html899
-rw-r--r--tests/auto/network/access/qhttp/webserver/rfc3252899
-rw-r--r--tests/auto/network/access/qhttp/webserver/rfc3252.txt899
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp2
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp2
-rw-r--r--tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp10
-rw-r--r--tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp2
-rw-r--r--tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp2
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp3
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/main.cpp2
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp339
-rw-r--r--tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp2
-rw-r--r--tests/auto/network/bearer/qbearertestcommon.h35
-rw-r--r--tests/auto/network/bearer/qnetworkconfiguration/qnetworkconfiguration.pro6
-rw-r--r--tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp129
-rw-r--r--tests/auto/network/bearer/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro6
-rw-r--r--tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp144
-rw-r--r--tests/auto/network/bearer/qnetworksession/lackey/main.cpp6
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/test.pro6
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp176
-rw-r--r--tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp2
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp120
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp4
-rw-r--r--tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp2
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp6
-rw-r--r--tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp2
-rw-r--r--tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp2
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp2
-rw-r--r--tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp2
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp3
-rw-r--r--tests/auto/network/socket/qlocalsocket/example/client/main.cpp2
-rw-r--r--tests/auto/network/socket/qlocalsocket/example/server/main.cpp2
-rw-r--r--tests/auto/network/socket/qlocalsocket/lackey/main.cpp2
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp7
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro3
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp3
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/main.cpp2
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp6
-rw-r--r--tests/auto/network/socket/qtcpsocket/qtcpsocket.pro1
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp4
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/Test.h4
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/main.cpp2
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp21
-rw-r--r--tests/auto/network/socket/qudpsocket/clientserver/main.cpp2
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp6
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/main.cpp2
-rw-r--r--tests/auto/network/socket/socket.pro9
-rwxr-xr-xtests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh2
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp4
-rw-r--r--tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp2
-rw-r--r--tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp2
-rwxr-xr-xtests/auto/network/ssl/qsslkey/keys/genkeys.sh2
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp2
-rw-r--r--tests/auto/network/ssl/qsslsocket/qsslsocket.pro3
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp20
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp2
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp2
-rw-r--r--tests/auto/network/ssl/ssl.pro5
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp2
-rw-r--r--tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp2
-rw-r--r--tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp2
-rw-r--r--tests/auto/opengl/qglthreads/tst_qglthreads.cpp2
-rw-r--r--tests/auto/opengl/qglthreads/tst_qglthreads.h2
-rw-r--r--tests/auto/other/atwrapper/atWrapper.cpp2
-rw-r--r--tests/auto/other/atwrapper/atWrapper.h2
-rw-r--r--tests/auto/other/atwrapper/atWrapperAutotest.cpp2
-rw-r--r--tests/auto/other/baselineexample/tst_baselineexample.cpp2
-rw-r--r--tests/auto/other/collections/tst_collections.cpp2
-rw-r--r--tests/auto/other/compiler/baseclass.cpp2
-rw-r--r--tests/auto/other/compiler/baseclass.h2
-rw-r--r--tests/auto/other/compiler/derivedclass.cpp2
-rw-r--r--tests/auto/other/compiler/derivedclass.h2
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp2
-rw-r--r--tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp2
-rw-r--r--tests/auto/other/exceptionsafety_objects/oomsimulator.h8
-rw-r--r--tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp2
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp2
-rw-r--r--tests/auto/other/headersclean/tst_headersclean.cpp2
-rw-r--r--tests/auto/other/lancelot/lancelot.pro3
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp2
-rw-r--r--tests/auto/other/lancelot/paintcommands.h2
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp13
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp84
-rw-r--r--tests/auto/other/macgui/guitest.cpp2
-rw-r--r--tests/auto/other/macgui/guitest.h2
-rw-r--r--tests/auto/other/macgui/tst_macgui.cpp2
-rw-r--r--tests/auto/other/macnativeevents/expectedeventlist.cpp2
-rw-r--r--tests/auto/other/macnativeevents/expectedeventlist.h2
-rw-r--r--tests/auto/other/macnativeevents/nativeeventlist.cpp2
-rw-r--r--tests/auto/other/macnativeevents/nativeeventlist.h2
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents.cpp2
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents.h2
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents_mac.cpp2
-rw-r--r--tests/auto/other/macnativeevents/tst_macnativeevents.cpp2
-rw-r--r--tests/auto/other/macplist/app/main.cpp2
-rw-r--r--tests/auto/other/macplist/tst_macplist.cpp2
-rw-r--r--tests/auto/other/modeltest/modeltest.cpp2
-rw-r--r--tests/auto/other/modeltest/modeltest.h2
-rw-r--r--tests/auto/other/modeltest/tst_modeltest.cpp2
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp2
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp672
-rw-r--r--tests/auto/other/qcomplextext/bidireorderstring.h2
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp2
-rw-r--r--tests/auto/other/qdirectpainter/runDirectPainter/main.cpp2
-rw-r--r--tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp2
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp22
-rw-r--r--tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp2
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp2
-rw-r--r--tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp2
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp2
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp6
-rwxr-xr-xtests/auto/other/qtokenautomaton/generateTokenizers.sh2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp2
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h2
-rw-r--r--tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp2
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.cpp2
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.h2
-rw-r--r--tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp2
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/main.cpp2
-rw-r--r--tests/auto/platformquirks.h2
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp11
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp2
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp2
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp2
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp2
-rwxr-xr-xtests/auto/test.pl2
-rw-r--r--tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp2
-rw-r--r--tests/auto/testlib/selftests/.gitignore1
-rw-r--r--tests/auto/testlib/selftests/alive/qtestalive.cpp2
-rw-r--r--tests/auto/testlib/selftests/alive/tst_alive.cpp79
-rw-r--r--tests/auto/testlib/selftests/assert/tst_assert.cpp4
-rw-r--r--tests/auto/testlib/selftests/badxml/badxml.pro1
-rw-r--r--tests/auto/testlib/selftests/badxml/tst_badxml.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro1
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro1
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp7
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro1
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp7
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp4
-rw-r--r--tests/auto/testlib/selftests/cmptest/cmptest.pro3
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp239
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro1
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp4
-rw-r--r--tests/auto/testlib/selftests/crashes/crashes.pro1
-rw-r--r--tests/auto/testlib/selftests/crashes/tst_crashes.cpp4
-rw-r--r--tests/auto/testlib/selftests/datatable/datatable.pro1
-rw-r--r--tests/auto/testlib/selftests/datatable/tst_datatable.cpp4
-rw-r--r--tests/auto/testlib/selftests/datetime/datetime.pro1
-rw-r--r--tests/auto/testlib/selftests/datetime/tst_datetime.cpp7
-rw-r--r--tests/auto/testlib/selftests/differentexec/differentexec.pro1
-rw-r--r--tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp2
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro1
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp2
-rw-r--r--tests/auto/testlib/selftests/expected_alive.txt22
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml94
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt62
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml94
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xunitxml46
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.lightxml43
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.txt25
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xml43
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xunitxml21
-rw-r--r--tests/auto/testlib/selftests/expectfail/expectfail.pro1
-rw-r--r--tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp103
-rw-r--r--tests/auto/testlib/selftests/failinit/failinit.pro1
-rw-r--r--tests/auto/testlib/selftests/failinit/tst_failinit.cpp2
-rw-r--r--tests/auto/testlib/selftests/failinitdata/failinitdata.pro1
-rw-r--r--tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp2
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro1
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp4
-rw-r--r--tests/auto/testlib/selftests/findtestdata/findtestdata.cpp16
-rw-r--r--tests/auto/testlib/selftests/float/tst_float.cpp4
-rw-r--r--tests/auto/testlib/selftests/globaldata/globaldata.pro1
-rw-r--r--tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp4
-rw-r--r--tests/auto/testlib/selftests/longstring/longstring.pro2
-rw-r--r--tests/auto/testlib/selftests/longstring/tst_longstring.cpp4
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp4
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro1
-rw-r--r--tests/auto/testlib/selftests/multiexec/multiexec.pro1
-rw-r--r--tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp2
-rw-r--r--tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp2
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp2
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro7
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp96
-rw-r--r--tests/auto/testlib/selftests/selftests.pri7
-rw-r--r--tests/auto/testlib/selftests/selftests.pro10
-rw-r--r--tests/auto/testlib/selftests/selftests.qrc1
-rw-r--r--tests/auto/testlib/selftests/singleskip/singleskip.pro1
-rw-r--r--tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp4
-rw-r--r--tests/auto/testlib/selftests/skip/skip.pro1
-rw-r--r--tests/auto/testlib/selftests/skip/tst_skip.cpp4
-rw-r--r--tests/auto/testlib/selftests/skipinit/skipinit.pro1
-rw-r--r--tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp2
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro1
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp2
-rw-r--r--tests/auto/testlib/selftests/sleep/sleep.pro1
-rw-r--r--tests/auto/testlib/selftests/sleep/tst_sleep.cpp4
-rw-r--r--tests/auto/testlib/selftests/strcmp/strcmp.pro1
-rw-r--r--tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp4
-rw-r--r--tests/auto/testlib/selftests/subtest/subtest.pro1
-rw-r--r--tests/auto/testlib/selftests/subtest/tst_subtest.cpp6
-rw-r--r--tests/auto/testlib/selftests/test/test.pro5
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp82
-rw-r--r--tests/auto/testlib/selftests/warnings/tst_warnings.cpp4
-rw-r--r--tests/auto/testlib/selftests/warnings/warnings.pro1
-rw-r--r--tests/auto/testlib/selftests/xunit/tst_xunit.cpp2
-rw-r--r--tests/auto/testlib/selftests/xunit/xunit.pro4
-rw-r--r--tests/auto/tools/moc/Test.framework/Headers/testinterface.h2
-rw-r--r--tests/auto/tools/moc/assign-namespace.h2
-rw-r--r--tests/auto/tools/moc/backslash-newlines.h2
-rw-r--r--tests/auto/tools/moc/c-comments.h2
-rw-r--r--tests/auto/tools/moc/cstyle-enums.h2
-rw-r--r--tests/auto/tools/moc/dir-in-include-path.h2
-rw-r--r--tests/auto/tools/moc/error-on-wrong-notify.h2
-rw-r--r--tests/auto/tools/moc/escapes-in-string-literals.h2
-rw-r--r--tests/auto/tools/moc/extraqualification.h2
-rw-r--r--tests/auto/tools/moc/forgotten-qinterface.h2
-rw-r--r--tests/auto/tools/moc/gadgetwithnoenums.h2
-rw-r--r--tests/auto/tools/moc/interface-from-framework.h2
-rw-r--r--tests/auto/tools/moc/macro-on-cmdline.h2
-rw-r--r--tests/auto/tools/moc/namespaced-flags.h2
-rw-r--r--tests/auto/tools/moc/no-keywords.h2
-rw-r--r--tests/auto/tools/moc/oldstyle-casts.h2
-rw-r--r--tests/auto/tools/moc/os9-newlines.h2
-rw-r--r--tests/auto/tools/moc/parse-boost.h2
-rw-r--r--tests/auto/tools/moc/pure-virtual-signals.h2
-rw-r--r--tests/auto/tools/moc/qinvokable.h2
-rw-r--r--tests/auto/tools/moc/qprivateslots.h2
-rw-r--r--tests/auto/tools/moc/single_function_keyword.h2
-rw-r--r--tests/auto/tools/moc/slots-with-void-template.h2
-rw-r--r--tests/auto/tools/moc/task189996.h2
-rw-r--r--tests/auto/tools/moc/task192552.h2
-rw-r--r--tests/auto/tools/moc/task234909.h2
-rw-r--r--tests/auto/tools/moc/task240368.h2
-rw-r--r--tests/auto/tools/moc/task87883.h2
-rw-r--r--tests/auto/tools/moc/template-gtgt.h2
-rw-r--r--tests/auto/tools/moc/testproject/Plugin/Plugin.h2
-rw-r--r--tests/auto/tools/moc/trigraphs.h2
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp30
-rw-r--r--tests/auto/tools/moc/using-namespaces.h2
-rw-r--r--tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h2
-rw-r--r--tests/auto/tools/moc/warn-on-property-without-read.h2
-rw-r--r--tests/auto/tools/moc/win-newlines.h2
-rw-r--r--tests/auto/tools/qmake/qmake.pro2
-rw-r--r--tests/auto/tools/qmake/testcompiler.cpp2
-rw-r--r--tests/auto/tools/qmake/testcompiler.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object1.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object2.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object3.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object4.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object5.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object6.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object7.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object8.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object9.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object1.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object2.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object3.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object4.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object5.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object6.h2
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object7.h2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/1.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/2.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/one/1.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/one/2.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/two/1.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/two/2.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/wildcard21.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/functions/wildcard22.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/include_dir/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/include_dir/test_file.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/include_dir/test_file.h2
-rw-r--r--tests/auto/tools/qmake/testdata/include_function/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/install_depends/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/install_depends/test_file.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/install_depends/test_file.h2
-rw-r--r--tests/auto/tools/qmake/testdata/one_space/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/shadow_files/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/shadow_files/test_file.h2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/test_file.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/test_file.h2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple.h2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_lib/simple.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_lib/simple.h2
-rw-r--r--tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h2
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp2
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h2
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp29
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp2
-rw-r--r--tests/auto/tools/uic/baseline/batchtranslation.ui2
-rw-r--r--tests/auto/tools/uic/baseline/batchtranslation.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/config.ui2
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/finddialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/finddialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/formwindowsettings.ui2
-rw-r--r--tests/auto/tools/uic/baseline/formwindowsettings.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/listwidgeteditor.ui2
-rw-r--r--tests/auto/tools/uic/baseline/listwidgeteditor.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/newactiondialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/newactiondialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/newform.ui2
-rw-r--r--tests/auto/tools/uic/baseline/newform.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/orderdialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/orderdialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/paletteeditor.ui2
-rw-r--r--tests/auto/tools/uic/baseline/paletteeditor.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/phrasebookbox.ui2
-rw-r--r--tests/auto/tools/uic/baseline/phrasebookbox.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/plugindialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/plugindialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/previewwidget.ui2
-rw-r--r--tests/auto/tools/uic/baseline/previewwidget.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/qfiledialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/qfiledialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientdialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientdialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/qtgradienteditor.ui2
-rw-r--r--tests/auto/tools/uic/baseline/qtgradienteditor.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientviewdialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/saveformastemplate.ui2
-rw-r--r--tests/auto/tools/uic/baseline/saveformastemplate.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/statistics.ui2
-rw-r--r--tests/auto/tools/uic/baseline/statistics.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/stringlisteditor.ui2
-rw-r--r--tests/auto/tools/uic/baseline/stringlisteditor.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui2
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/tablewidgeteditor.ui2
-rw-r--r--tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/translatedialog.ui2
-rw-r--r--tests/auto/tools/uic/baseline/translatedialog.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/treewidgeteditor.ui2
-rw-r--r--tests/auto/tools/uic/baseline/treewidgeteditor.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/trpreviewtool.ui2
-rw-r--r--tests/auto/tools/uic/baseline/trpreviewtool.ui.h2
-rw-r--r--tests/auto/tools/uic/tst_uic.cpp2
-rw-r--r--tests/auto/v8/Makefile.nonqt16
-rw-r--r--tests/auto/v8/README.txt13
-rw-r--r--tests/auto/v8/v8.pro10
-rw-r--r--tests/auto/v8/v8test.cpp379
-rw-r--r--tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp20
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp8
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm2
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp10
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp10
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp84
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp45
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp55
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp44
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro3
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp2
-rw-r--r--tests/auto/widgets/itemviews/itemviews.pro5
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemview/viewstotest.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/qtreeview.pro4
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp54
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp2
-rw-r--r--tests/auto/widgets/kernel/kernel.pro1
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp2
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro6
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/base.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/base.h2
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/main.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/modal.pro6
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp224
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro6
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp2
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qinputcontext/qinputcontext.pro6
-rw-r--r--tests/auto/widgets/kernel/qinputcontext/tst_qinputcontext.cpp401
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp96
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm2
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp2
-rw-r--r--tests/auto/widgets/shared/platforminputcontext.h101
-rw-r--r--tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp2
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp6
-rw-r--r--tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp2
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp2
-rw-r--r--tests/auto/widgets/styles/styles.pro3
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp2
-rw-r--r--tests/auto/widgets/util/qscroller/tst_qscroller.cpp2
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp2
-rw-r--r--tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp2
-rw-r--r--tests/auto/widgets/util/qundostack/tst_qundostack.cpp2
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp44
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp2
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp2
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro3
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp36
-rw-r--r--tests/auto/widgets/widgets/qcombobox/qcombobox.pro3
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp44
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp12
-rw-r--r--tests/auto/widgets/widgets/qdial/tst_qdial.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro3
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp2
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp2
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp2
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp2
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmenubar/qmenubar.pro3
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp6
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp2
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp44
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp2
-rw-r--r--tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp2
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp2
-rw-r--r--tests/auto/widgets/widgets/qslider/tst_qslider.cpp2
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp2
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp12
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp2
-rw-r--r--tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp4
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp119
-rw-r--r--tests/auto/xml/sax/qxml/tst_qxml.cpp2
-rw-r--r--tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp65
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp54
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.h2
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp2
-rw-r--r--tests/baselineserver/shared/baselineprotocol.cpp2
-rw-r--r--tests/baselineserver/shared/baselineprotocol.h2
-rw-r--r--tests/baselineserver/shared/lookup3.cpp2
-rw-r--r--tests/baselineserver/shared/qbaselinetest.cpp2
-rw-r--r--tests/baselineserver/shared/qbaselinetest.h2
-rw-r--r--tests/baselineserver/src/baselineserver.cpp4
-rw-r--r--tests/baselineserver/src/baselineserver.h4
-rw-r--r--tests/baselineserver/src/main.cpp2
-rw-r--r--tests/baselineserver/src/report.cpp2
-rw-r--r--tests/baselineserver/src/report.h2
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/main.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp2
-rw-r--r--[-rwxr-xr-x]tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro0
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h2
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qiodevice/main.cpp2
-rw-r--r--[-rwxr-xr-x]tests/benchmarks/corelib/io/qiodevice/qiodevice.pro0
-rw-r--r--tests/benchmarks/corelib/io/qtemporaryfile/main.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qurl/main.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/events/main.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/kernel.pro3
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp82
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro9
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/main.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/main.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/object.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/object.h2
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp2
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp2
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp22
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp2
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp2
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qbytearray/main.cpp2
-rw-r--r--[-rwxr-xr-x]tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro0
-rw-r--r--tests/benchmarks/corelib/tools/qchar/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qhash/outofline.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qhash/qhash_string.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qhash/qhash_string.h2
-rw-r--r--tests/benchmarks/corelib/tools/qlist/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qrect/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/data.h2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist.pl2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist_char.pl2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp94
-rw-r--r--tests/benchmarks/corelib/tools/qstringbuilder/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qvector/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qvector/outofline.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h6
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/server/server.cpp2
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/serverobject.h2
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp2
-rw-r--r--tests/benchmarks/dbus/qdbustype/main.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp7
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.h4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.h2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/main.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp2
-rw-r--r--tests/benchmarks/gui/image/blendbench/main.cpp2
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp2
-rw-r--r--tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp2
-rw-r--r--tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp2
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp2
-rw-r--r--tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/qapplication/main.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp2
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp2
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qregion/main.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h2
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp2
-rw-r--r--tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp2
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/main.cpp2
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp2
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp2
-rw-r--r--tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp12
-rw-r--r--tests/benchmarks/network/kernel/qhostinfo/main.cpp2
-rw-r--r--[-rwxr-xr-x]tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro0
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp2
-rw-r--r--tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp2
-rw-r--r--tests/benchmarks/opengl/main.cpp2
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp2
-rw-r--r--tests/benchmarks/sql/kernel/qsqlquery/main.cpp2
-rw-r--r--tests/manual/bearerex/bearerex.cpp2
-rw-r--r--tests/manual/bearerex/bearerex.h2
-rw-r--r--tests/manual/bearerex/datatransferer.cpp2
-rw-r--r--tests/manual/bearerex/datatransferer.h2
-rw-r--r--tests/manual/bearerex/main.cpp2
-rw-r--r--tests/manual/bearerex/xqlistwidget.cpp2
-rw-r--r--tests/manual/bearerex/xqlistwidget.h2
-rw-r--r--tests/manual/cmake/CMakeLists.txt6
-rw-r--r--tests/manual/cmake/pass1/CMakeLists.txt16
-rw-r--r--tests/manual/cmake/pass3/CMakeLists.txt5
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/main.mm213
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro12
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/window.cpp203
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/window.h (renamed from tests/auto/v8/v8main.cpp)52
-rw-r--r--tests/manual/gestures/graphicsview/gestures.cpp2
-rw-r--r--tests/manual/gestures/graphicsview/gestures.h2
-rw-r--r--tests/manual/gestures/graphicsview/imageitem.cpp2
-rw-r--r--tests/manual/gestures/graphicsview/imageitem.h2
-rw-r--r--tests/manual/gestures/graphicsview/main.cpp2
-rw-r--r--tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp2
-rw-r--r--tests/manual/gestures/graphicsview/mousepangesturerecognizer.h2
-rw-r--r--tests/manual/gestures/scrollarea/main.cpp2
-rw-r--r--tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp2
-rw-r--r--tests/manual/gestures/scrollarea/mousepangesturerecognizer.h2
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.cpp2
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.h2
-rw-r--r--tests/manual/inputmethodhints/main.cpp2
-rw-r--r--tests/manual/keypadnavigation/main.cpp2
-rw-r--r--tests/manual/lance/interactivewidget.cpp2
-rw-r--r--tests/manual/lance/interactivewidget.h2
-rw-r--r--tests/manual/lance/main.cpp2
-rw-r--r--tests/manual/lance/widgets.h2
-rwxr-xr-xtests/manual/mkspecs/test.sh2
-rw-r--r--tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp2
-rw-r--r--tests/manual/network_stresstest/minihttpserver.cpp2
-rw-r--r--tests/manual/network_stresstest/minihttpserver.h2
-rw-r--r--tests/manual/network_stresstest/tst_network_stresstest.cpp2
-rw-r--r--tests/manual/qcursor/allcursors/main.cpp2
-rw-r--r--tests/manual/qcursor/allcursors/mainwindow.cpp2
-rw-r--r--tests/manual/qcursor/allcursors/mainwindow.h2
-rw-r--r--tests/manual/qcursor/grab_override/main.cpp2
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.cpp2
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.h2
-rw-r--r--tests/manual/qdesktopwidget/main.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.h2
-rw-r--r--tests/manual/qgraphicsitemgroup/main.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/widget.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/widget.h2
-rw-r--r--tests/manual/qgraphicslayout/flicker/main.cpp2
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.cpp2
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.h2
-rw-r--r--tests/manual/qhttpnetworkconnection/main.cpp2
-rw-r--r--tests/manual/qimagereader/main.cpp2
-rw-r--r--tests/manual/qlocale/calendar.cpp2
-rw-r--r--tests/manual/qlocale/calendar.h2
-rw-r--r--tests/manual/qlocale/currency.cpp2
-rw-r--r--tests/manual/qlocale/currency.h2
-rw-r--r--tests/manual/qlocale/dateformats.cpp2
-rw-r--r--tests/manual/qlocale/dateformats.h2
-rw-r--r--tests/manual/qlocale/info.cpp2
-rw-r--r--tests/manual/qlocale/info.h2
-rw-r--r--tests/manual/qlocale/languages.cpp2
-rw-r--r--tests/manual/qlocale/languages.h2
-rw-r--r--tests/manual/qlocale/main.cpp2
-rw-r--r--tests/manual/qlocale/miscellaneous.cpp2
-rw-r--r--tests/manual/qlocale/miscellaneous.h2
-rw-r--r--tests/manual/qlocale/numberformats.cpp2
-rw-r--r--tests/manual/qlocale/numberformats.h2
-rw-r--r--tests/manual/qlocale/window.cpp2
-rw-r--r--tests/manual/qlocale/window.h2
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.cpp300
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.h101
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.pro10
-rw-r--r--tests/manual/qnetworkreply/main.cpp2
-rw-r--r--tests/manual/qssloptions/main.cpp2
-rw-r--r--tests/manual/qtabletevent/device_information/main.cpp2
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.cpp2
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.h2
-rw-r--r--tests/manual/qtabletevent/event_compression/main.cpp2
-rw-r--r--tests/manual/qtabletevent/event_compression/mousestatwidget.cpp2
-rw-r--r--tests/manual/qtabletevent/event_compression/mousestatwidget.h2
-rw-r--r--tests/manual/qtabletevent/regular_widgets/main.cpp2
-rw-r--r--tests/manual/qtbug-8933/main.cpp2
-rw-r--r--tests/manual/qtbug-8933/widget.cpp2
-rw-r--r--tests/manual/qtbug-8933/widget.h2
-rw-r--r--tests/manual/qtouchevent/main.cpp2
-rw-r--r--tests/manual/qtouchevent/touchwidget.cpp2
-rw-r--r--tests/manual/qtouchevent/touchwidget.h2
-rw-r--r--tests/manual/qwidget_zorder/main.cpp2
-rw-r--r--tests/manual/repaint/mainwindow/main.cpp2
-rw-r--r--tests/manual/repaint/scrollarea/main.cpp2
-rw-r--r--tests/manual/repaint/shared/shared.h2
-rw-r--r--tests/manual/repaint/splitter/main.cpp2
-rw-r--r--tests/manual/repaint/tableview/main.cpp2
-rw-r--r--tests/manual/repaint/task141091/main.cpp2
-rw-r--r--tests/manual/repaint/toplevel/main.cpp2
-rw-r--r--tests/manual/repaint/widget/main.cpp2
-rw-r--r--tests/manual/socketengine/main.cpp2
-rw-r--r--tests/manual/textrendering/glyphshaping/main.cpp2
-rw-r--r--tests/manual/textrendering/textperformance/main.cpp2
-rw-r--r--tests/manual/windowflags/controllerwindow.cpp2
-rw-r--r--tests/manual/windowflags/controllerwindow.h2
-rw-r--r--tests/manual/windowflags/main.cpp2
-rw-r--r--tests/manual/windowflags/previewwindow.cpp2
-rw-r--r--tests/manual/windowflags/previewwindow.h2
-rw-r--r--tests/shared/filesystem.h2
-rw-r--r--tools/configure/configure_pch.h2
-rw-r--r--tools/configure/configureapp.cpp78
-rw-r--r--tools/configure/configureapp.h2
-rw-r--r--tools/configure/environment.cpp2
-rw-r--r--tools/configure/environment.h2
-rw-r--r--tools/configure/main.cpp2
-rw-r--r--tools/configure/tools.cpp2
-rw-r--r--tools/configure/tools.h2
-rw-r--r--tools/shared/windows/registry.cpp2
-rw-r--r--tools/shared/windows/registry_p.h2
-rw-r--r--util/accessibilityinspector/accessibilityinspector.cpp9
-rw-r--r--util/accessibilityinspector/accessibilityinspector.h4
-rw-r--r--util/accessibilityinspector/accessibilityscenemanager.cpp6
-rw-r--r--util/accessibilityinspector/accessibilityscenemanager.h2
-rw-r--r--util/accessibilityinspector/main.cpp2
-rw-r--r--util/accessibilityinspector/optionswidget.cpp2
-rw-r--r--util/accessibilityinspector/optionswidget.h2
-rw-r--r--util/accessibilityinspector/screenreader.cpp25
-rw-r--r--util/accessibilityinspector/screenreader.h2
-rw-r--r--util/accessibilityinspector/screenreader_mac.mm2
-rw-r--r--util/corelib/qurl-generateTLDs/main.cpp2
-rw-r--r--util/lexgen/configfile.cpp2
-rw-r--r--util/lexgen/configfile.h2
-rw-r--r--util/lexgen/generator.cpp2
-rw-r--r--util/lexgen/generator.h2
-rw-r--r--util/lexgen/global.h2
-rw-r--r--util/lexgen/main.cpp2
-rw-r--r--util/lexgen/nfa.cpp2
-rw-r--r--util/lexgen/nfa.h2
-rw-r--r--util/lexgen/re2nfa.cpp2
-rw-r--r--util/lexgen/re2nfa.h2
-rw-r--r--util/lexgen/tests/tst_lexgen.cpp2
-rw-r--r--util/lexgen/tokenizer.cpp2
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py2
-rwxr-xr-xutil/local_database/dateconverter.py2
-rw-r--r--util/local_database/enumdata.py2
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py2
-rw-r--r--util/local_database/testlocales/localemodel.cpp2
-rw-r--r--util/local_database/testlocales/localemodel.h2
-rw-r--r--util/local_database/testlocales/localewidget.cpp2
-rw-r--r--util/local_database/testlocales/localewidget.h2
-rw-r--r--util/local_database/testlocales/main.cpp2
-rw-r--r--util/local_database/xpathlite.py2
-rw-r--r--util/plugintest/main.cpp2
-rw-r--r--util/s60pixelmetrics/bld.inf2
-rw-r--r--util/s60pixelmetrics/pixel_metrics.cpp2
-rw-r--r--util/s60pixelmetrics/pixel_metrics.h2
-rw-r--r--util/s60pixelmetrics/pm_mapper.hrh2
-rw-r--r--util/s60pixelmetrics/pm_mapper.mmp2
-rw-r--r--util/s60pixelmetrics/pm_mapper.pkg2
-rw-r--r--util/s60pixelmetrics/pm_mapper.rss2
-rw-r--r--util/s60pixelmetrics/pm_mapper_reg.rss2
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.cpp2
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.h2
-rw-r--r--util/s60pixelmetrics/pm_mapperview.cpp2
-rw-r--r--util/s60pixelmetrics/pm_mapperview.h2
-rw-r--r--util/s60theme/main.cpp2
-rw-r--r--util/s60theme/s60themeconvert.cpp2
-rw-r--r--util/s60theme/s60themeconvert.h2
-rwxr-xr-xutil/scripts/make_qfeatures_dot_h4
-rw-r--r--util/unicode/codecs/big5/main.cpp2
-rw-r--r--util/unicode/main.cpp4
-rwxr-xr-xutil/unicode/writingSystems.sh2
-rw-r--r--util/xkbdatagen/main.cpp4
5990 files changed, 25176 insertions, 53089 deletions
diff --git a/.gitignore b/.gitignore
index 03883f652e..90010e3f1b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -124,17 +124,13 @@ src/dbus/qtdbusversion.h
src/gui/qtguiversion.h
src/network/qtnetworkversion.h
src/opengl/qtopenglversion.h
-src/openvg/qtopenvgversion.h
src/sql/qtsqlversion.h
src/testlib/qttestversion.h
src/xml/qtxmlversion.h
-src/v8/qtv8version.h
src/platformsupport/qtplatformsupportversion.h
src/printsupport/qtprintsupportversion.h
src/widgets/qtwidgetsversion.h
-src/v8/generated-debug/
-
# Test generated files
QObject.log
tst_*
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 183f5b46cc..0000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "src/3rdparty/v8"]
- path = src/3rdparty/v8
- url = git://github.com/aaronkennedy/v8.git
diff --git a/LICENSE.LGPL b/LICENSE.LGPL
index a0e8eb8545..a32ac8471b 100644
--- a/LICENSE.LGPL
+++ b/LICENSE.LGPL
@@ -1,6 +1,6 @@
GNU LESSER GENERAL PUBLIC LICENSE
- The Qt GUI Toolkit is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ The Qt GUI Toolkit is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
Contact: Nokia Corporation (qt-info@nokia.com)
You may use, distribute and copy the Qt GUI Toolkit under the terms of
diff --git a/bin/createpackage.bat b/bin/createpackage.bat
index f86cec8758..cd0480dd39 100755
--- a/bin/createpackage.bat
+++ b/bin/createpackage.bat
@@ -1,6 +1,6 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
-:: Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+:: Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
:: All rights reserved.
:: Contact: Nokia Corporation (qt-info@nokia.com)
::
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 3d676816b1..c723e6574b 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/bin/elf2e32_qtwrapper.pl b/bin/elf2e32_qtwrapper.pl
index 54d7bacdff..e3e1cb1802 100755
--- a/bin/elf2e32_qtwrapper.pl
+++ b/bin/elf2e32_qtwrapper.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/bin/findtr b/bin/findtr
index 1263da1914..b72efcbda8 100755
--- a/bin/findtr
+++ b/bin/findtr
@@ -2,7 +2,7 @@
# vi:wrap:
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/bin/fixqt4headers.pl b/bin/fixqt4headers.pl
index 966681fad5..597f785367 100755
--- a/bin/fixqt4headers.pl
+++ b/bin/fixqt4headers.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
@@ -140,6 +140,7 @@ sub findQtHeaders
die "This script requires the QTDIR environment variable pointing to Qt 5\n" unless $qtdir;
+findQtHeaders('QtCore', $qtdir);
findQtHeaders('QtWidgets', $qtdir);
findQtHeaders('QtPrintSupport', $qtdir);
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 0ba8bc5463..3afbba1050 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/bin/qtmodule-configtests b/bin/qtmodule-configtests
index 1c65e51279..9640869fb8 100755
--- a/bin/qtmodule-configtests
+++ b/bin/qtmodule-configtests
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/bin/setcepaths.bat b/bin/setcepaths.bat
index 7a469c4328..4c6a7e27a0 100755
--- a/bin/setcepaths.bat
+++ b/bin/setcepaths.bat
@@ -1,6 +1,6 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
-:: Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+:: Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
:: All rights reserved.
:: Contact: Nokia Corporation (qt-info@nokia.com)
::
diff --git a/bin/syncqt b/bin/syncqt
index 34d518d7a2..63dfba3b42 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/bin/syncqt.bat b/bin/syncqt.bat
index 86566ecb79..6a39f578da 100755
--- a/bin/syncqt.bat
+++ b/bin/syncqt.bat
@@ -1,6 +1,6 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
-:: Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+:: Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
:: All rights reserved.
:: Contact: Nokia Corporation (qt-info@nokia.com)
::
diff --git a/config.tests/mac/coreservices/coreservices.mm b/config.tests/mac/coreservices/coreservices.mm
index 9fc452980f..b7de1f23e6 100644
--- a/config.tests/mac/coreservices/coreservices.mm
+++ b/config.tests/mac/coreservices/coreservices.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/mac/corewlan/corewlantest.mm b/config.tests/mac/corewlan/corewlantest.mm
index 06b7db3a0c..76eeb3a4d0 100644
--- a/config.tests/mac/corewlan/corewlantest.mm
+++ b/config.tests/mac/corewlan/corewlantest.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/mac/crc/main.cpp b/config.tests/mac/crc/main.cpp
index 12d2811b49..5bdb22aebd 100644
--- a/config.tests/mac/crc/main.cpp
+++ b/config.tests/mac/crc/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/mac/xcodeversion.cpp b/config.tests/mac/xcodeversion.cpp
index df208e338c..9fd292d9ec 100644
--- a/config.tests/mac/xcodeversion.cpp
+++ b/config.tests/mac/xcodeversion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qpa/wayland/wayland.cpp b/config.tests/qpa/wayland/wayland.cpp
index d0ecdac472..2bd7d00283 100644
--- a/config.tests/qpa/wayland/wayland.cpp
+++ b/config.tests/qpa/wayland/wayland.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qpa/xcb-poll-for-queued-event/xcb-poll-for-queued-event.cpp b/config.tests/qpa/xcb-poll-for-queued-event/xcb-poll-for-queued-event.cpp
index 8f93d64af5..cc78fdece5 100644
--- a/config.tests/qpa/xcb-poll-for-queued-event/xcb-poll-for-queued-event.cpp
+++ b/config.tests/qpa/xcb-poll-for-queued-event/xcb-poll-for-queued-event.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qpa/xcb-render/xcb-render.cpp b/config.tests/qpa/xcb-render/xcb-render.cpp
index 9e6c9c847c..c60de7366c 100644
--- a/config.tests/qpa/xcb-render/xcb-render.cpp
+++ b/config.tests/qpa/xcb-render/xcb-render.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qpa/xcb-xlib/xcb-xlib.cpp b/config.tests/qpa/xcb-xlib/xcb-xlib.cpp
index ede80d6360..a6f5ef8e3e 100644
--- a/config.tests/qpa/xcb-xlib/xcb-xlib.cpp
+++ b/config.tests/qpa/xcb-xlib/xcb-xlib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qpa/xcb/xcb.cpp b/config.tests/qpa/xcb/xcb.cpp
index 50fb86fc62..d9d8aed832 100644
--- a/config.tests/qpa/xcb/xcb.cpp
+++ b/config.tests/qpa/xcb/xcb.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qws/ahi/ahi.cpp b/config.tests/qws/ahi/ahi.cpp
index f9e3b1af86..7033bef14e 100644
--- a/config.tests/qws/ahi/ahi.cpp
+++ b/config.tests/qws/ahi/ahi.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qws/directfb/directfb.cpp b/config.tests/qws/directfb/directfb.cpp
index c0acff1463..f1ea238487 100644
--- a/config.tests/qws/directfb/directfb.cpp
+++ b/config.tests/qws/directfb/directfb.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qws/sound/sound.cpp b/config.tests/qws/sound/sound.cpp
index 7b5b47de8c..70ef3faf4f 100644
--- a/config.tests/qws/sound/sound.cpp
+++ b/config.tests/qws/sound/sound.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/qws/svgalib/svgalib.cpp b/config.tests/qws/svgalib/svgalib.cpp
index dc6b1ba1d2..326129eecf 100644
--- a/config.tests/qws/svgalib/svgalib.cpp
+++ b/config.tests/qws/svgalib/svgalib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/3dnow/3dnow.cpp b/config.tests/unix/3dnow/3dnow.cpp
index 1c158e3505..d34633cc1f 100644
--- a/config.tests/unix/3dnow/3dnow.cpp
+++ b/config.tests/unix/3dnow/3dnow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/alsa/alsatest.cpp b/config.tests/unix/alsa/alsatest.cpp
index d5a99b705a..a1527539a8 100644
--- a/config.tests/unix/alsa/alsatest.cpp
+++ b/config.tests/unix/alsa/alsatest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/avx/avx.cpp b/config.tests/unix/avx/avx.cpp
index 808533263c..746b36d0e2 100644
--- a/config.tests/unix/avx/avx.cpp
+++ b/config.tests/unix/avx/avx.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/clock-gettime/clock-gettime.cpp b/config.tests/unix/clock-gettime/clock-gettime.cpp
index f5f561bb7d..0b1d544d5d 100644
--- a/config.tests/unix/clock-gettime/clock-gettime.cpp
+++ b/config.tests/unix/clock-gettime/clock-gettime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.cpp b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
index ecc18d4574..d51a195571 100644
--- a/config.tests/unix/clock-monotonic/clock-monotonic.cpp
+++ b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/cups/cups.cpp b/config.tests/unix/cups/cups.cpp
index 832b050599..0c56312196 100644
--- a/config.tests/unix/cups/cups.cpp
+++ b/config.tests/unix/cups/cups.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/db2/db2.cpp b/config.tests/unix/db2/db2.cpp
index bf1a881e48..5e7aa9f52d 100644
--- a/config.tests/unix/db2/db2.cpp
+++ b/config.tests/unix/db2/db2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/dbus/dbus.cpp b/config.tests/unix/dbus/dbus.cpp
index 2b9c2f701f..2606b016f4 100644
--- a/config.tests/unix/dbus/dbus.cpp
+++ b/config.tests/unix/dbus/dbus.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp
index 7c75331254..7ca28166aa 100644
--- a/config.tests/unix/doubleformat/doubleformattest.cpp
+++ b/config.tests/unix/doubleformat/doubleformattest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/egl/egl.cpp b/config.tests/unix/egl/egl.cpp
index 3387a39304..b2bb90d7c0 100644
--- a/config.tests/unix/egl/egl.cpp
+++ b/config.tests/unix/egl/egl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/egl4gles1/egl4gles1.cpp b/config.tests/unix/egl4gles1/egl4gles1.cpp
index 1d6398a4b7..1b24a97e3a 100644
--- a/config.tests/unix/egl4gles1/egl4gles1.cpp
+++ b/config.tests/unix/egl4gles1/egl4gles1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/endian/endiantest.cpp b/config.tests/unix/endian/endiantest.cpp
index 71781a1f2c..36e662b6f6 100644
--- a/config.tests/unix/endian/endiantest.cpp
+++ b/config.tests/unix/endian/endiantest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/floatmath/floatmath.cpp b/config.tests/unix/floatmath/floatmath.cpp
index 8e87e7987a..b8521bac4e 100644
--- a/config.tests/unix/floatmath/floatmath.cpp
+++ b/config.tests/unix/floatmath/floatmath.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/freetype/freetype.cpp b/config.tests/unix/freetype/freetype.cpp
index 7f76b1f190..4549dfee9f 100644
--- a/config.tests/unix/freetype/freetype.cpp
+++ b/config.tests/unix/freetype/freetype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test
index 27c6841082..6e56410075 100755
--- a/config.tests/unix/fvisibility.test
+++ b/config.tests/unix/fvisibility.test
@@ -25,9 +25,9 @@ __global void blah();
EOF
if [ "$VERBOSE" = "yes" ] ; then
- "$COMPILER" -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
+ $COMPILER -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
else
- "$COMPILER" -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
+ $COMPILER -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
fi
rm -f fvisibility.c fvisibility.o
}
diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
index 9f82e647af..b23983af6c 100644
--- a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
+++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/getifaddrs/getifaddrs.cpp b/config.tests/unix/getifaddrs/getifaddrs.cpp
index 8d944a52c4..b0ea6edb1a 100644
--- a/config.tests/unix/getifaddrs/getifaddrs.cpp
+++ b/config.tests/unix/getifaddrs/getifaddrs.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/glib/glib.cpp b/config.tests/unix/glib/glib.cpp
index b8ddcad955..a08bae90c6 100644
--- a/config.tests/unix/glib/glib.cpp
+++ b/config.tests/unix/glib/glib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
index 85a2b208b3..e12d87f1a7 100644
--- a/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
+++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/gstreamer/gstreamer.cpp b/config.tests/unix/gstreamer/gstreamer.cpp
index 4936775369..3414925349 100644
--- a/config.tests/unix/gstreamer/gstreamer.cpp
+++ b/config.tests/unix/gstreamer/gstreamer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/ibase/ibase.cpp b/config.tests/unix/ibase/ibase.cpp
index 7ca3d05d0b..c51bcd9516 100644
--- a/config.tests/unix/ibase/ibase.cpp
+++ b/config.tests/unix/ibase/ibase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/icd/icd.pro b/config.tests/unix/icd/icd.pro
deleted file mode 100644
index d736b4142f..0000000000
--- a/config.tests/unix/icd/icd.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-SOURCES = icd.cpp
-CONFIG -= qt
-mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/iconv/iconv.cpp b/config.tests/unix/iconv/iconv.cpp
index 6353a43cee..f78b3c3c16 100644
--- a/config.tests/unix/iconv/iconv.cpp
+++ b/config.tests/unix/iconv/iconv.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/icu/icu.cpp b/config.tests/unix/icu/icu.cpp
index 657d86065b..d36b99b106 100644
--- a/config.tests/unix/icu/icu.cpp
+++ b/config.tests/unix/icu/icu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/inotify/inotifytest.cpp b/config.tests/unix/inotify/inotifytest.cpp
index 1e7c6005b3..9e2b79c614 100644
--- a/config.tests/unix/inotify/inotifytest.cpp
+++ b/config.tests/unix/inotify/inotifytest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/iodbc/iodbc.cpp b/config.tests/unix/iodbc/iodbc.cpp
index fe27c9a09b..5c3b2a160c 100644
--- a/config.tests/unix/iodbc/iodbc.cpp
+++ b/config.tests/unix/iodbc/iodbc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.cpp b/config.tests/unix/ipv6ifname/ipv6ifname.cpp
index 4f7d66fd77..fd215d7ff9 100644
--- a/config.tests/unix/ipv6ifname/ipv6ifname.cpp
+++ b/config.tests/unix/ipv6ifname/ipv6ifname.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/iwmmxt/iwmmxt.cpp b/config.tests/unix/iwmmxt/iwmmxt.cpp
index 83be5be27e..016f7046f3 100644
--- a/config.tests/unix/iwmmxt/iwmmxt.cpp
+++ b/config.tests/unix/iwmmxt/iwmmxt.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/javascriptcore-jit/hwcap_test.cpp b/config.tests/unix/javascriptcore-jit/hwcap_test.cpp
index 9ae5e6cbc9..452a952325 100644
--- a/config.tests/unix/javascriptcore-jit/hwcap_test.cpp
+++ b/config.tests/unix/javascriptcore-jit/hwcap_test.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/libjpeg/libjpeg.cpp b/config.tests/unix/libjpeg/libjpeg.cpp
index aaee287f92..ed67263b25 100644
--- a/config.tests/unix/libjpeg/libjpeg.cpp
+++ b/config.tests/unix/libjpeg/libjpeg.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/libmng/libmng.cpp b/config.tests/unix/libmng/libmng.cpp
index ee41aa4013..325077709f 100644
--- a/config.tests/unix/libmng/libmng.cpp
+++ b/config.tests/unix/libmng/libmng.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/libpng/libpng.cpp b/config.tests/unix/libpng/libpng.cpp
index cd05713853..3a8aa8c675 100644
--- a/config.tests/unix/libpng/libpng.cpp
+++ b/config.tests/unix/libpng/libpng.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/libtiff/libtiff.cpp b/config.tests/unix/libtiff/libtiff.cpp
index 21a9cbc7c6..11c4f11eb8 100644
--- a/config.tests/unix/libtiff/libtiff.cpp
+++ b/config.tests/unix/libtiff/libtiff.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/mmx/mmx.cpp b/config.tests/unix/mmx/mmx.cpp
index 771322e934..8a93a5504f 100644
--- a/config.tests/unix/mmx/mmx.cpp
+++ b/config.tests/unix/mmx/mmx.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/mremap/mremap.cpp b/config.tests/unix/mremap/mremap.cpp
index 580cce9a43..a4181271c6 100644
--- a/config.tests/unix/mremap/mremap.cpp
+++ b/config.tests/unix/mremap/mremap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/mysql/mysql.cpp b/config.tests/unix/mysql/mysql.cpp
index a4a49f1db8..a96bb2ec86 100644
--- a/config.tests/unix/mysql/mysql.cpp
+++ b/config.tests/unix/mysql/mysql.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/neon/neon.cpp b/config.tests/unix/neon/neon.cpp
index 9c154e19c1..b841d9f5b5 100644
--- a/config.tests/unix/neon/neon.cpp
+++ b/config.tests/unix/neon/neon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/nis/nis.cpp b/config.tests/unix/nis/nis.cpp
index 1d260cf644..8957342e40 100644
--- a/config.tests/unix/nis/nis.cpp
+++ b/config.tests/unix/nis/nis.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/oci/oci.cpp b/config.tests/unix/oci/oci.cpp
index d2cfd06556..6986835a65 100644
--- a/config.tests/unix/oci/oci.cpp
+++ b/config.tests/unix/oci/oci.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp
index fd01e35b79..f2c906ce86 100644
--- a/config.tests/unix/odbc/odbc.cpp
+++ b/config.tests/unix/odbc/odbc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/opengldesktop/opengldesktop.cpp b/config.tests/unix/opengldesktop/opengldesktop.cpp
index eea16b8fbd..f3837b4d36 100644
--- a/config.tests/unix/opengldesktop/opengldesktop.cpp
+++ b/config.tests/unix/opengldesktop/opengldesktop.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/opengles1/opengles1.cpp b/config.tests/unix/opengles1/opengles1.cpp
index 837bed470c..583a4ac79d 100644
--- a/config.tests/unix/opengles1/opengles1.cpp
+++ b/config.tests/unix/opengles1/opengles1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp
index 89c1e2d64b..8add0f4f22 100644
--- a/config.tests/unix/opengles2/opengles2.cpp
+++ b/config.tests/unix/opengles2/opengles2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/openssl/openssl.cpp b/config.tests/unix/openssl/openssl.cpp
index 17e5b13de8..7beb9c49b7 100644
--- a/config.tests/unix/openssl/openssl.cpp
+++ b/config.tests/unix/openssl/openssl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/openvg/openvg.cpp b/config.tests/unix/openvg/openvg.cpp
index 73783c35c1..4f1dbe4339 100644
--- a/config.tests/unix/openvg/openvg.cpp
+++ b/config.tests/unix/openvg/openvg.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/psql/psql.cpp b/config.tests/unix/psql/psql.cpp
index 31314ab081..fce6e79ca6 100644
--- a/config.tests/unix/psql/psql.cpp
+++ b/config.tests/unix/psql/psql.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/ptrsize/ptrsizetest.cpp b/config.tests/unix/ptrsize/ptrsizetest.cpp
index f11598f1b6..3b380808af 100644
--- a/config.tests/unix/ptrsize/ptrsizetest.cpp
+++ b/config.tests/unix/ptrsize/ptrsizetest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/pulseaudio/pulseaudio.cpp b/config.tests/unix/pulseaudio/pulseaudio.cpp
index c89e200f83..cef4cd93ac 100644
--- a/config.tests/unix/pulseaudio/pulseaudio.cpp
+++ b/config.tests/unix/pulseaudio/pulseaudio.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/shivavg/shivavg.cpp b/config.tests/unix/shivavg/shivavg.cpp
index 2b59687228..041696af2b 100644
--- a/config.tests/unix/shivavg/shivavg.cpp
+++ b/config.tests/unix/shivavg/shivavg.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sqlite/sqlite.cpp b/config.tests/unix/sqlite/sqlite.cpp
index 5ed2d7e2dd..176cb76288 100644
--- a/config.tests/unix/sqlite/sqlite.cpp
+++ b/config.tests/unix/sqlite/sqlite.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sqlite2/sqlite2.cpp b/config.tests/unix/sqlite2/sqlite2.cpp
index 45ca5c0e2b..0ca6a0a0d0 100644
--- a/config.tests/unix/sqlite2/sqlite2.cpp
+++ b/config.tests/unix/sqlite2/sqlite2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sse/sse.cpp b/config.tests/unix/sse/sse.cpp
index 9b04f447a6..4a7ba8655c 100644
--- a/config.tests/unix/sse/sse.cpp
+++ b/config.tests/unix/sse/sse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sse2/sse2.cpp b/config.tests/unix/sse2/sse2.cpp
index a10ec8770f..3fbb41af67 100644
--- a/config.tests/unix/sse2/sse2.cpp
+++ b/config.tests/unix/sse2/sse2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sse3/sse3.cpp b/config.tests/unix/sse3/sse3.cpp
index 45ffdf8716..a70557b238 100644
--- a/config.tests/unix/sse3/sse3.cpp
+++ b/config.tests/unix/sse3/sse3.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sse4_1/sse4_1.cpp b/config.tests/unix/sse4_1/sse4_1.cpp
index f192fe72da..2bb27d078a 100644
--- a/config.tests/unix/sse4_1/sse4_1.cpp
+++ b/config.tests/unix/sse4_1/sse4_1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/sse4_2/sse4_2.cpp b/config.tests/unix/sse4_2/sse4_2.cpp
index e7ece6e209..2c49ae89f9 100644
--- a/config.tests/unix/sse4_2/sse4_2.cpp
+++ b/config.tests/unix/sse4_2/sse4_2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/ssse3/ssse3.cpp b/config.tests/unix/ssse3/ssse3.cpp
index 653a2d75bc..2d0fcb9a4c 100644
--- a/config.tests/unix/ssse3/ssse3.cpp
+++ b/config.tests/unix/ssse3/ssse3.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/stdint/main.cpp b/config.tests/unix/stdint/main.cpp
index 42cd28d275..f8195fdd06 100644
--- a/config.tests/unix/stdint/main.cpp
+++ b/config.tests/unix/stdint/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/stl/stltest.cpp b/config.tests/unix/stl/stltest.cpp
index b811363c0d..50a55599de 100644
--- a/config.tests/unix/stl/stltest.cpp
+++ b/config.tests/unix/stl/stltest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/tds/tds.cpp b/config.tests/unix/tds/tds.cpp
index aa1e42817e..051690ccc8 100644
--- a/config.tests/unix/tds/tds.cpp
+++ b/config.tests/unix/tds/tds.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/tslib/tslib.cpp b/config.tests/unix/tslib/tslib.cpp
index 6e3682f499..5726b903e8 100644
--- a/config.tests/unix/tslib/tslib.cpp
+++ b/config.tests/unix/tslib/tslib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/unix/zlib/zlib.cpp b/config.tests/unix/zlib/zlib.cpp
index 4da3ae637f..40c514eb72 100644
--- a/config.tests/unix/zlib/zlib.cpp
+++ b/config.tests/unix/zlib/zlib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/fontconfig/fontconfig.cpp b/config.tests/x11/fontconfig/fontconfig.cpp
index 7894fd54aa..d0bdb2c9bd 100644
--- a/config.tests/x11/fontconfig/fontconfig.cpp
+++ b/config.tests/x11/fontconfig/fontconfig.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.cpp b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
index 3a1ee6bacb..e4f5876a2a 100644
--- a/config.tests/x11/glxfbconfig/glxfbconfig.cpp
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/mitshm/mitshm.cpp b/config.tests/x11/mitshm/mitshm.cpp
index c3ccf89e4f..66a95ff59c 100644
--- a/config.tests/x11/mitshm/mitshm.cpp
+++ b/config.tests/x11/mitshm/mitshm.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/notype/notypetest.cpp b/config.tests/x11/notype/notypetest.cpp
index 26b0c14056..8415d933ff 100644
--- a/config.tests/x11/notype/notypetest.cpp
+++ b/config.tests/x11/notype/notypetest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp
index ffcaff3674..ae46714205 100644
--- a/config.tests/x11/opengl/opengl.cpp
+++ b/config.tests/x11/opengl/opengl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/sm/sm.cpp b/config.tests/x11/sm/sm.cpp
index e8614e294a..b7ba9f0303 100644
--- a/config.tests/x11/sm/sm.cpp
+++ b/config.tests/x11/sm/sm.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xcursor/xcursor.cpp b/config.tests/x11/xcursor/xcursor.cpp
index 10fb4b26f1..d09dc77833 100644
--- a/config.tests/x11/xcursor/xcursor.cpp
+++ b/config.tests/x11/xcursor/xcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xfixes/xfixes.cpp b/config.tests/x11/xfixes/xfixes.cpp
index b57e32a10c..546f82cad7 100644
--- a/config.tests/x11/xfixes/xfixes.cpp
+++ b/config.tests/x11/xfixes/xfixes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/x11/xinerama/xinerama.cpp
index e37a783c86..568bd98695 100644
--- a/config.tests/x11/xinerama/xinerama.cpp
+++ b/config.tests/x11/xinerama/xinerama.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/x11/xinput/xinput.cpp
index 4dbff23b16..5babd22f29 100644
--- a/config.tests/x11/xinput/xinput.cpp
+++ b/config.tests/x11/xinput/xinput.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xinput2/xinput2.cpp b/config.tests/x11/xinput2/xinput2.cpp
index 14a51f4d28..a8adc58501 100644
--- a/config.tests/x11/xinput2/xinput2.cpp
+++ b/config.tests/x11/xinput2/xinput2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xkb/xkb.cpp b/config.tests/x11/xkb/xkb.cpp
index 4a46affea8..c4315d7da1 100644
--- a/config.tests/x11/xkb/xkb.cpp
+++ b/config.tests/x11/xkb/xkb.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xlib/xlib.cpp b/config.tests/x11/xlib/xlib.cpp
index 9004146a72..12b384b84c 100644
--- a/config.tests/x11/xlib/xlib.cpp
+++ b/config.tests/x11/xlib/xlib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xrandr/xrandr.cpp b/config.tests/x11/xrandr/xrandr.cpp
index 94fc35e2fe..e982ed81ba 100644
--- a/config.tests/x11/xrandr/xrandr.cpp
+++ b/config.tests/x11/xrandr/xrandr.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xrender/xrender.cpp b/config.tests/x11/xrender/xrender.cpp
index 4fdc2df4d4..e5f7ada728 100644
--- a/config.tests/x11/xrender/xrender.cpp
+++ b/config.tests/x11/xrender/xrender.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xshape/xshape.cpp b/config.tests/x11/xshape/xshape.cpp
index 16e31604f8..8d8dd27983 100644
--- a/config.tests/x11/xshape/xshape.cpp
+++ b/config.tests/x11/xshape/xshape.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp
index 37da06830f..30c9408bf7 100644
--- a/config.tests/x11/xsync/xsync.cpp
+++ b/config.tests/x11/xsync/xsync.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp
index e751755d04..0a29b83598 100644
--- a/config.tests/x11/xvideo/xvideo.cpp
+++ b/config.tests/x11/xvideo/xvideo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/configure b/configure
index 869e398764..c057351e96 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
@@ -229,7 +229,6 @@ fi
#-------------------------------------------------------------------------------
COMMERCIAL_USER=ask
CFG_DEV=no
-CFG_NOKIA=no
CFG_EMBEDDED=no
CFG_RTOS_ENABLED=yes
EditionString=Commercial
@@ -346,11 +345,6 @@ earlyArgParse()
developer-build)
CFG_DEV="yes"
;;
- nokia-developer)
- CFG_DEV="yes"
- CFG_NOKIA="yes"
- COMMERCIAL_USER="no"
- ;;
commercial)
COMMERCIAL_USER="yes"
;;
@@ -385,13 +379,7 @@ if [ "$COMMERCIAL_USER" = "ask" ]; then
done
fi
-if [ "$CFG_NOKIA" = "yes" ]; then
- Licensee="Nokia"
- Edition="NokiaInternalBuild"
- EditionString="Nokia Internal Build"
- QT_EDITION="QT_EDITION_OPENSOURCE"
- [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
-elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
+if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
# Commercial preview release
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
Licensee="Preview"
@@ -780,7 +768,6 @@ CFG_REDUCE_RELOCATIONS=auto
CFG_NAS=no
CFG_QWS_DEPTHS=all
CFG_ACCESSIBILITY=auto
-CFG_QT3SUPPORT=no
CFG_ENDIAN=auto
CFG_HOST_ENDIAN=auto
CFG_DOUBLEFORMAT=auto
@@ -800,9 +787,6 @@ CFG_MAC_ARCHS=
MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
CFG_MAC_DWARF2=auto
CFG_MAC_XARCH=auto
-CFG_MAC_CARBON=no
-CFG_MAC_COCOA=yes
-COMMANDLINE_MAC_CARBON=no
CFG_MAC_HARFBUZZ=no
CFG_SXE=no
CFG_PREFIX_INSTALL=yes
@@ -825,12 +809,9 @@ OPT_FAST=auto
OPT_VERBOSE=no
OPT_HELP=
CFG_SILENT=no
-CFG_GRAPHICS_SYSTEM=default
-CFG_RUNTIME_SYSTEM=
CFG_ALSA=auto
CFG_PULSEAUDIO=auto
CFG_COREWLAN=auto
-CFG_ICD=auto
CFG_NOPROCESS=no
CFG_ICU=auto
CFG_FORCE_ASSERTS=no
@@ -873,10 +854,6 @@ QT_LIBS_GLIB=
QT_CFLAGS_GSTREAMER=
QT_LIBS_GSTREAMER=
-# flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
-QT_CFLAGS_CONNSETTINGS=
-QT_LIBS_CONNSETTINGS=
-
#-------------------------------------------------------------------------------
# check SQL drivers, mouse drivers and decorations available in this package
#-------------------------------------------------------------------------------
@@ -1039,7 +1016,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1142,16 +1119,6 @@ while [ "$#" -gt 0 ]; do
shift
VAL="$1"
;;
- -graphicssystem)
- VAR="graphicssystem"
- shift
- VAL=$1
- ;;
- -runtimegraphicssystem)
- VAR="runtimegraphicssystem"
- shift
- VAL=$1
- ;;
-qtlibinfix)
VAR="qtlibinfix"
shift
@@ -1248,13 +1215,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=no
case "$VAR" in
- qt3support)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_QT3SUPPORT="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
accessibility)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ACCESSIBILITY="$VAL"
@@ -1401,33 +1361,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- graphicssystem)
- if [ "$PLATFORM_QWS" = "yes" ]; then
- echo "Error: Graphics System plugins are not supported on QWS."
- echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
- echo " rather than existing as a separate plugin."
- echo ""
- UNKNOWN_OPT=yes
- else
- if [ "$VAL" = "opengl" ]; then
- CFG_GRAPHICS_SYSTEM="opengl"
- elif [ "$VAL" = "openvg" ]; then
- CFG_GRAPHICS_SYSTEM="openvg"
- elif [ "$VAL" = "raster" ]; then
- CFG_GRAPHICS_SYSTEM="raster"
- elif [ "$VAL" = "runtime" ]; then
- CFG_GRAPHICS_SYSTEM="runtime"
- else
- UNKNOWN_OPT=yes
- fi
- fi
- ;;
- runtimegraphicssystem)
- if [ "$VAL" != "runtime" ]; then
- CFG_RUNTIME_SYSTEM="$VAL"
- fi
- ;;
-
qvfb) # left for commandline compatibility, not documented
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
if [ "$VAL" = "yes" ]; then
@@ -1471,7 +1404,7 @@ while [ "$#" -gt 0 ]; do
arch)
# if this is a Mac then "windows" probably means
# we are cross-compiling for MinGW
- if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
+ if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
else
CFG_ARCH=$VAL
@@ -1480,26 +1413,8 @@ while [ "$#" -gt 0 ]; do
host-arch)
CFG_HOST_ARCH=$VAL
;;
- universal)
- if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
- CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- cocoa)
-# do nothing - Cocoa is the default.
- ;;
- carbon)
- if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
- CFG_MAC_CARBON="$VAL"
- COMMANDLINE_MAC_CARBON="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
harfbuzz)
- if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
CFG_MAC_HARFBUZZ="$VAL"
else
UNKNOWN_OPT=yes
@@ -1591,7 +1506,6 @@ while [ "$#" -gt 0 ]; do
esac
if [ ! -z "$NATIVE_64_ARCH" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
- CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
fi
;;
esac
@@ -1633,7 +1547,7 @@ while [ "$#" -gt 0 ]; do
debug)
CFG_DEBUG="$VAL"
;;
- developer-build|commercial|opensource|nokia-developer)
+ developer-build|commercial|opensource)
# These switches have been dealt with already
;;
static)
@@ -2423,20 +2337,6 @@ while [ "$#" -gt 0 ]; do
fi
done
-if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
- echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
- CFG_QT3SUPPORT="no"
-fi
-if [ "$CFG_GUI" = "no" ]; then
- echo "Warning: -no-gui will disable the qt3support library."
- CFG_QT3SUPPORT="no"
-fi
-
-#disable Qt3Support for Lighthouse
-if [ "$PLATFORM_QPA" = "yes" ]; then
- CFG_QT3SUPPORT="no"
-fi
-
# update QT_CONFIG to show our current predefined configuration
case "$CFG_QCONFIG" in
minimal|small|medium|large|full)
@@ -3288,31 +3188,6 @@ if [ ! -n "$PKG_CONFIG" ]; then
QT_CONFIG="$QT_CONFIG no-pkg-config"
fi
-# process CFG_MAC_ARCHS
-if [ "$PLATFORM_MAC" = "yes" ]; then
-# check -arch arguments for validity.
- ALLOWED="x86 ppc x86_64 ppc64 i386"
- # Save the list so we can re-write it using only valid values
- CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
- CFG_MAC_ARCHS=
- for i in $CFG_MAC_ARCHS_IN
- do
- if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
- echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
- exit 2;
- fi
- if [ "$i" = "i386" -o "$i" = "x86" ]; then
- # These are synonymous values
- # CFG_MAC_ARCHS requires x86 while GCC requires i386
- CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
- MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
- else
- CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
- MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
- fi
- done
-fi
-
# pass on $CFG_SDK to the configure tests.
if [ '!' -z "$CFG_SDK" ]; then
MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
@@ -3361,18 +3236,11 @@ export SYSROOT_FLAG # used by config.tests/unix/compile.test
# auto-detect precompiled header support
if [ "$CFG_PRECOMPILE" = "auto" ]; then
- if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
- CFG_PRECOMPILE=no
- elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
+ if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
CFG_PRECOMPILE=no
else
CFG_PRECOMPILE=yes
fi
-elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
- echo
- echo "WARNING: Using universal binaries disables precompiled headers."
- echo
- CFG_PRECOMPILE=no
fi
#auto-detect DWARF2 on the mac
@@ -3384,15 +3252,6 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
fi
fi
-# auto-detect support for -Xarch on the mac
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
- if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
- CFG_MAC_XARCH=no
- else
- CFG_MAC_XARCH=yes
- fi
-fi
-
# don't autodetect support for separate debug info on objcopy when
# cross-compiling as lots of toolchains seems to have problems with this
if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
@@ -3704,7 +3563,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
[-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
[-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
- [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
+ [-plugin-sql-<driver>] [-system-sqlite]
[-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
[-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
[-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
@@ -3846,9 +3705,6 @@ fi
-system-sqlite ..... Use sqlite from the operating system.
- -no-qt3support ..... Disables the Qt 3 support functionality.
- * -qt3support ........ Enables the Qt 3 support functionality.
-
-no-xmlpatterns .... Do not build the QtXmlPatterns module.
+ -xmlpatterns ....... Build the QtXmlPatterns module.
QtXmlPatterns is built if a decent C++ compiler
@@ -4252,7 +4108,7 @@ Qt/X11 only:
EOF
fi
-if [ "$PLATFORM_MAC" = "yes" ]; then
+if [ "$BUILD_ON_MAC" = "yes" ]; then
cat << EOF
Qt/Mac only:
@@ -4260,12 +4116,6 @@ Qt/Mac only:
-Fstring ........... Add an explicit framework path.
-fw string ......... Add an explicit framework.
- -cocoa ............. [Deprecated] Cocoa is now enabled by default.
-
- -carbon .............Build the Carbon version of Qt. 64-bit archs
- are not supported by carbon and will be built
- with cocoa
-
* -framework ......... Build Qt as a series of frameworks and
link tools against those frameworks.
-no-framework ...... Do not build Qt as a series of frameworks.
@@ -4273,17 +4123,13 @@ Qt/Mac only:
* -dwarf2 ............ Enable dwarf2 debugging symbols.
-no-dwarf2 ......... Disable dwarf2 debugging symbols.
- -universal ......... Equivalent to -arch "ppc x86"
-
- -arch <arch> ....... Build Qt for <arch>
- Example values for <arch>: x86 ppc x86_64 ppc64
- Multiple -arch arguments can be specified.
+ -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
+ Only one arch value can be specified.
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
-harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
- It is only available to Cocoa builds.
* -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
QT_ENABLE_HARFBUZZ environment variable.
@@ -4434,11 +4280,7 @@ echo
echo "This is the $Platform ${EditionString} Edition."
echo
-if [ "$Edition" = "NokiaInternalBuild" ]; then
- echo "Detected -nokia-developer option"
- echo "Nokia employees and agents are allowed to use this software under"
- echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
-elif [ "$Edition" = "OpenSource" ]; then
+if [ "$Edition" = "OpenSource" ]; then
while true; do
echo "You are licensed to use this software under the terms of"
echo "the Lesser GNU General Public License (LGPL) versions 2.1."
@@ -4886,7 +4728,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
done
fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
- echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
+ echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
@@ -4894,20 +4736,6 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
- if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
- X86_CFLAGS="-arch i386"
- X86_LFLAGS="-arch i386"
- EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
- EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
- EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
- fi
- if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
- PPC_CFLAGS="-arch ppc"
- PPC_LFLAGS="-arch ppc"
- EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
- EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
- EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
- fi
if [ '!' -z "$CFG_SDK" ]; then
echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
@@ -5509,13 +5337,6 @@ if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
exit 1
fi
-# Generate a CRC of the namespace for using in constants for the Carbon port.
-# This should mean that you really *can* load two Qt's and have our custom
-# Carbon events work.
-if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
- QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
-fi
-
# X11/QWS/Lighthouse
if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
@@ -5602,33 +5423,6 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye
fi
fi
- # auto-detect icd support
- if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
- if [ -n "$PKG_CONFIG" ]; then
- QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
- QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
- fi
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icd "ICD" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_CONNSETTINGS $QT_LIBS_CONNSETTINGS; then
- [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
- QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
- QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
- else
- if [ "$CFG_ICD" = "auto" ]; then
- CFG_ICD=no
- elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- # CFG_ICD is "yes"
-
- echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- fi
- fi
- elif [ "$CFG_GLIB" = "no" ]; then
- CFG_ICD=no
- fi
-
# auto-detect libicu support
if [ "$CFG_ICU" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
@@ -5771,12 +5565,6 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
;;
esac
fi
-
- # if opengl is disabled and the user specified graphicssystem gl, disable it...
- if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
- echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
- CFG_GRAPHICS_SYSTEM=default
- fi
fi # X11/MINGW OpenGL
# X11
@@ -6167,6 +5955,24 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xlib"
fi
+ # auto-detect Xrender support
+ if [ "$CFG_XRENDER" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_XRENDER=yes
+ QT_CONFIG="$QT_CONFIG xrender"
+ else
+ if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xrender support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XRENDER=no
+ fi
+ fi
+ fi
+
if [ "$CFG_XCB" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_XCB=yes
@@ -6688,17 +6494,6 @@ if [ "$CFG_OPENVG" != "no" ]; then
fi
fi
-# if openvg is disabled and the user specified graphicssystem vg, disable it...
-if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
- echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
- CFG_GRAPHICS_SYSTEM=default
-fi
-
-if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
- echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
- CFG_RUNTIME_SYSTEM=
-fi
-
if [ "$CFG_ALSA" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_ALSA=yes
@@ -6786,79 +6581,11 @@ if [ "$CFG_MAC_DWARF2" = "yes" ]; then
fi
# Set the default arch if there are no "-arch" arguments on the configure line
-# For "-carbon" builds: 32 bit x86/ppc.
-# For builds on snow leopard : compiler default (64-bit).
-# For builds on leopard : compiler default (32-bit).
if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
-
- if [ "$CFG_MAC_CARBON" = "yes" ]; then
- if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
- CFG_MAC_ARCHS=" x86"
- elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
- CFG_MAC_ARCHS=" ppc"
- else
- CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
- fi
- else
- CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
- fi
-
+ CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
[ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
fi
-
-# enable Cocoa and/or Carbon on Mac
-# -carbon on the command line disables Cocoa, except for 64-bit archs
-if [ "$CFG_MAC_CARBON" = "yes" ]; then
- CFG_MAC_CARBON="YES"
- CFG_MAC_COCOA="NO"
-
-# check which archs are in use, enable cocoa if we find a 64-bit one
- if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
- CFG_MAC_COCOA="yes";
- CFG_MAC_CARBON="no";
- if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
- CFG_MAC_CARBON="yes";
- fi
- if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
- CFG_MAC_CARBON="yes";
- fi
- fi
-fi
-
-# select Carbon on 10.4 Tiger.
-if [ "$PLATFORM_MAC" = "yes" ]; then
- VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
- if [ "$VERSION" == 8 ]; then
- CFG_MAC_COCOA="no";
- CFG_MAC_CARBON="yes";
- fi
-fi
-
-# select Carbon when using the 10.4u SDK
-if [ "$PLATFORM_MAC" = "yes" ]; then
- if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
- echo "Carbon on";
- CFG_MAC_COCOA="no";
- CFG_MAC_CARBON="yes";
- fi
-fi
-
-# but disable Cocoa if cross-building for mingw
-[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
-
-# disable Qt 3 support on VxWorks
-case "$XPLATFORM" in
- unsupported/vxworks*)
- CFG_QT3SUPPORT="no"
- ;;
-esac
-
-# enable Qt 3 support functionality
-if [ "$CFG_QT3SUPPORT" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG gui-qt3support"
-fi
-
# enable Phonon
if [ "$CFG_PHONON" = "yes" ]; then
# No longer needed after modularization
@@ -7252,10 +6979,6 @@ if [ "$CFG_COREWLAN" = "yes" ]; then
QT_CONFIG="$QT_CONFIG corewlan"
fi
-if [ "$CFG_ICD" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG icd"
-fi
-
if [ "$CFG_ICU" = "yes" ]; then
QT_CONFIG="$QT_CONFIG icu"
fi
@@ -7516,6 +7239,11 @@ else
*) canUseV8Snapshot="no"
;;
esac
+ else
+ if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" == "arm" ]; then
+ # QEMU crashes when building inside Scratchbox with an ARM target
+ canUseV8Snapshot="no"
+ fi
fi
if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
CFG_V8SNAPSHOT="$canUseV8Snapshot"
@@ -7591,33 +7319,12 @@ if [ "$CFG_EXCEPTIONS" = "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
fi
-# On Mac, set the minimum deployment target for the different architechtures
-# using the Xarch compiler option when supported (10.5 and up).
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
- if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
- fi
- if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
- fi
- if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
- fi
- if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
- QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
- fi
+# Set the minimum deployment target.
+if [ "$BUILD_ON_MAC" = "yes" ]; then
+ QMakeVar add QMAKE_CFLAGS "-mmacosx-version-min=10.6"
+ QMakeVar add QMAKE_CXXFLAGS "-mmacosx-version-min=10.6"
+ QMakeVar add QMAKE_LFLAGS "-mmacosx-version-min=10.6"
+ QMakeVar add QMAKE_OBJECTIVE_CFLAGS "-mmacosx-version-min=10.6"
fi
case "$COMPILER" in
@@ -7746,13 +7453,6 @@ if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
-# if both carbon and cocoa are specified, enable the autodetection code.
-if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
- echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
-elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
- echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
-fi
-
if [ "$CFG_FRAMEWORK" = "yes" ]; then
echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
@@ -7864,13 +7564,6 @@ QMakeVar set sql-plugins "$SQL_PLUGINS"
[ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
-if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
- [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
- [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
- [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
- [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
-fi
-
# ATM we need this define to compile Qt. Remove later!
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
@@ -7888,7 +7581,7 @@ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
[ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
[ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
-[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
+[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
@@ -7913,7 +7606,6 @@ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
-[ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
# sort QCONFIG_FLAGS for neatness if we can
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
@@ -7976,13 +7668,6 @@ cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
EOF
fi
-if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
-cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
-#define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
-
-EOF
-fi
-
# avoid unecessary rebuilds by copying only if qconfig.h has changed
if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
rm -f "$outpath/src/corelib/global/qconfig.h.new"
@@ -8023,7 +7708,7 @@ else
QT_CONFIG="$QT_CONFIG qt_framework"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
fi
-if [ "$PLATFORM_MAC" = "yes" ]; then
+if [ "$BUILD_ON_MAC" = "yes" ]; then
QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
fi
if [ "$CFG_DEV" = "yes" ]; then
@@ -8091,6 +7776,8 @@ fi
#-------------------------------------------------------------------------------
QTMODULE="$outpath/mkspecs/qmodule.pri"
+echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
+
# Ensure we can link to uninistalled libraries
if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
@@ -8173,7 +7860,7 @@ QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
include(\$\$PWD/mkspecs/qmodule.pri)
-CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
+CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
@@ -8279,18 +7966,6 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
echo "Host architecture: $CFG_HOST_ARCH"
fi
-if [ "$PLATFORM_MAC" = "yes" ]; then
- if [ "$CFG_MAC_COCOA" = "yes" ]; then
- if [ "$CFG_MAC_CARBON" = "yes" ]; then
- echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
- else
- echo "Using framework: Cocoa"
- fi
- else
- echo "Using framework: Carbon"
- fi
-fi
-
if [ -n "$PLATFORM_NOTES" ]; then
echo "Platform notes:"
echo "$PLATFORM_NOTES"
@@ -8317,7 +7992,6 @@ if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
else
echo "Debug .................. $CFG_DEBUG"
fi
-echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
[ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
@@ -8356,7 +8030,6 @@ if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
echo "iWMMXt support ......... ${CFG_IWMMXT}"
echo "NEON support ........... ${CFG_NEON}"
fi
-[ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
echo "getaddrinfo support .... $CFG_GETADDRINFO"
echo "getifaddrs support ..... $CFG_GETIFADDRS"
@@ -8446,7 +8119,6 @@ if [ "$PLATFORM_X11" = "yes" ]; then
echo "Xcursor support ........ $CFG_XCURSOR"
echo "Xfixes support ......... $CFG_XFIXES"
echo "Xrandr support ......... $CFG_XRANDR"
- echo "Xrender support ........ $CFG_XRENDER"
echo "Xi support ............. $CFG_XINPUT"
echo "MIT-SHM support ........ $CFG_MITSHM"
echo "FontConfig support ..... $CFG_FONTCONFIG"
@@ -8475,13 +8147,13 @@ echo "Alsa support ........... $CFG_ALSA"
if [ "$PLATFORM_MAC" = "yes" ]; then
echo "CoreWlan support ....... $CFG_COREWLAN"
fi
-echo "ICD support ............ $CFG_ICD"
echo "libICU support ......... $CFG_ICU"
if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
echo "Xcb support ............ limited (old version)"
else
echo "Xcb support ............ $CFG_XCB"
fi
+echo "Xrender support ........ $CFG_XRENDER"
if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
echo "XInput2 support ........ $CFG_XINPUT2"
fi
diff --git a/configure.exe b/configure.exe
index 6037038f53..e27966e3cd 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index cec264337f..e8709430d6 100644
--- a/dist/changes-5.0.0
+++ b/dist/changes-5.0.0
@@ -35,7 +35,7 @@ information about a particular change.
- QCoreApplication::translate() will no longer return the source text when
the translation is empty. Use lrelease -removeidentical for optimization.
-
+
- Qt::escape() is deprecated (but can be enabled via
QT_DISABLE_DEPRECATED_BEFORE), use QString::toHtmlEscaped() instead.
@@ -44,7 +44,9 @@ information about a particular change.
- QTestLib:
* The QTRY_VERIFY and QTRY_COMPARE macros have been moved into QTestLib.
These macros formerly lived in tests/shared/util.h but are now provided
- by including the <QtTest/QtTest> header.
+ by including the <QtTest/QtTest> header. In addition,
+ QTRY_VERIFY_WITH_TIMEOUT and QTRY_COMPARE_WITH_TIMEOUT are provided,
+ allowing for specifying custom timeout values.
* The QTEST_NOOP_MAIN macro has been removed from the API. If a test is
known at compile-time to be inapplicable for a particular build it should
be omitted via .pro file logic, or the test should call QSKIP in the
@@ -53,15 +55,19 @@ information about a particular change.
* The DEPENDS_ON macro has been removed from the API. This macro did nothing
and misled some users to believe that they could make test functions depend
on each other or impose an execution order on test functions.
+ * The QTest::qt_snprintf function has been removed from the API. This was an
+ internal testlib function that was exposed in the public API due to its use
+ in a public macro. Any calls to this function should be replaced by a call
+ to qsnprintf(), which comes from the <QtCore/QByteArray> header.
+ * The QTest::pixmapsAreEqual() function has been removed from the API.
+ Comparison of QPixmap objects should be done using QCOMPARE, which provides
+ more informative output in the event of a failure.
* The QSKIP macro no longer has the "mode" parameter, which caused problems
for calculating test metrics, as the SkipAll mode hid information about
what test data was skipped. Calling QSKIP in a test function now behaves
like SkipSingle -- skipping a non-data-driven test function or skipping
only the current data row of a data-driven test function. Every skipped
data row is now reported in the test log.
- * The QTest::qExec(QObject*, const QStringList&) overload has been removed
- from the API. This function was not used in any of Qt's autotests and did
- not provide significant benefits over QTest::qExec(QObject*, int, char**).
- The QSsl::TlsV1 enum value was renamed to QSsl::TlsV1_0 .
@@ -99,10 +105,8 @@ information about a particular change.
QTouchDevice pointer instead of just a DeviceType value.
* TouchPointState no longer includes TouchPointStateMask and
- TouchPointPrimary. The primary flag is now stored together with
- other touch point flags and is accessible through
- TouchPoint::isPrimary() or TouchPoint::flags(). As a result the
- internally used state mask is no longer necessary.
+ TouchPointPrimary. QTouchEvent::TouchPoint::isPrimary() has
+ been removed.
* QWidget *widget() has been removed and is replaced by QObject
*target() in order to avoid QWidget dependencies.
@@ -116,6 +120,44 @@ information about a particular change.
* The event type parameter is removed from handleTouchEvent().
+- The previously exported function qt_translateRawTouchEvent() has been removed.
+ Use QWindowSystemInterface::handleTouchEvent() instead.
+
+- QAbstractEventDispatcher
+
+ * The signature for the pure-virtual registerTimer() has changed. Subclasses
+ of QAbstractEventDispatcher will need to be updated to reimplement the new
+ pure-virtual 'virtual void registerTimer(int timerId, int interval,
+ Qt::TimerType timerType, QObject *object) = 0;'
+
+ * QAbstractEventDispatcher::TimerInfo is no longer a QPair<int, int>. It is
+ now a struct with 3 members: struct TimerInfo { int timerId; int interval;
+ Qt::TimerType timerType; }; Reimplementations of
+ QAbstractEventDispatcher::registeredTimers() will need to be updated to pass
+ 3 arguments to the TimerInfo constructor (instead of 2).
+
+- QUuid
+
+ * Removed implicit conversion operator QUuid::operator QString(), instead
+ QUuid::toString() function should be used.
+
+- The QHttp, QHttpHeader, QHttpResponseHeader and QHttpRequestHeader classes have
+ been removed, QNetworkAccessManager should be used instead.
+
+- The QFtp class is no longer exported, QNetworkAccessManager should be used
+ instead.
+
+- QProcess
+
+ * On Windows, QProcess::ForwardedChannels will not forward the output of GUI
+ applications anymore, if they do not create a console.
+
+- QAbstractSocket's connectToHost() and disconnectFromHost() are now virtual and
+ connectToHostImplementation() and disconnectFromHostImplementation() don't exist.
+
+- QTcpServer::incomingConnection() now takes a qintptr instead of an int.
+
+
****************************************************************************
* General *
****************************************************************************
@@ -147,6 +189,17 @@ QtCore
should now also connect to (and disconnect from) the rowsAboutToBeMoved and
rowsMoved signals.
+* The default value of the property QSortFilterProxyModel::dynamicSortFilter was
+ changed from false to true.
+
+* The signature of the virtual QAbstractItemView::dataChanged method has changed to
+ include the roles which have changed. The signature is consistent with the dataChanged
+ signal in the model.
+
+* QFileSystemWatcher is now able to return failure in case of errors whilst
+ altering the watchlist in both the singular and QStringList overloads of
+ addPath and removePath.
+
QtGui
-----
* Accessibility has been refactored. The hierachy of accessible objects is implemented via
@@ -159,8 +212,8 @@ QtGui
QtWidgets
---------
-* QWidget::setInputContext() is removed. Input contexts are now platform
- specific.
+* QWidget::setInputContext() and QApplication::setInputContext() are removed.
+ Input contexts are now platform specific.
QtNetwork
---------
@@ -170,6 +223,9 @@ QtNetwork
* QSslCertificate::serialNumber() now always returns the serial number in
hexadecimal format.
+* The openssl network backend now reads the ssl configuration file allowing
+ the use of openssl engines.
+
QtOpenGL
--------
@@ -225,6 +281,10 @@ Qt for Windows CE
- Build System
+ * Remove qttest_p4.prf file. From now on we should explicitly enable the
+ things from it which we want. Autotest .pro files should stop using
+ 'load(qttest_p4)' and start using 'CONFIG+=testcase' instead.
+
- Assistant
- Designer
@@ -267,3 +327,21 @@ Qt for Windows CE
* Important Behavior Changes *
****************************************************************************
+- QPointer
+
+ * QPointer itself is now deprecated, and the implementation of QPointer
+ has been changed to use QWeakPointer. The old guard mechanism has been
+ removed. This causes two slight changes in behavior when using
+ QPointer:
+
+ * When using QPointer on a QWidget (or a subclass of QWidget), previously
+ the QPointer would be cleared by the QWidget destructor. Now, the QPointer
+ is cleared by the QObject destructor (since this is when QWeakPointers are
+ cleared). Any QPointers tracking a widget will NOT be cleared before the
+ QWidget destructor destroys the children for the widget being tracked.
+
+ * When constructing a QSharedPointer to take ownership of an object after a
+ QPointer is already tracking the object. Previously, the shared pointer
+ construction would not be affected by the QPointer, but now that QPointer
+ is implemented using QWeakPoiner, constructing the QSharedPointer will
+ cause an abort().
diff --git a/doc/src/core/containers.qdoc b/doc/src/core/containers.qdoc
index 8cae97c972..ca9bcc6b47 100644
--- a/doc/src/core/containers.qdoc
+++ b/doc/src/core/containers.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/implicit-sharing.qdoc b/doc/src/core/implicit-sharing.qdoc
index 9e839edb24..e745d127d5 100644
--- a/doc/src/core/implicit-sharing.qdoc
+++ b/doc/src/core/implicit-sharing.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/objectmodel/metaobjects.qdoc b/doc/src/core/objectmodel/metaobjects.qdoc
index 597210e789..0a4756f899 100644
--- a/doc/src/core/objectmodel/metaobjects.qdoc
+++ b/doc/src/core/objectmodel/metaobjects.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/objectmodel/object.qdoc b/doc/src/core/objectmodel/object.qdoc
index d843f834a5..535c4cc8f2 100644
--- a/doc/src/core/objectmodel/object.qdoc
+++ b/doc/src/core/objectmodel/object.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/objectmodel/objecttrees.qdoc b/doc/src/core/objectmodel/objecttrees.qdoc
index 46921106b6..d8f9501748 100644
--- a/doc/src/core/objectmodel/objecttrees.qdoc
+++ b/doc/src/core/objectmodel/objecttrees.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/objectmodel/properties.qdoc b/doc/src/core/objectmodel/properties.qdoc
index befbde190b..0350f19be4 100644
--- a/doc/src/core/objectmodel/properties.qdoc
+++ b/doc/src/core/objectmodel/properties.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/objectmodel/signalsandslots.qdoc b/doc/src/core/objectmodel/signalsandslots.qdoc
index 821147fcfd..f976e74c7d 100644
--- a/doc/src/core/objectmodel/signalsandslots.qdoc
+++ b/doc/src/core/objectmodel/signalsandslots.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/qtcore.qdoc b/doc/src/core/qtcore.qdoc
index 3fdb64b02d..0d1654c9f0 100644
--- a/doc/src/core/qtcore.qdoc
+++ b/doc/src/core/qtcore.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/threads-basics.qdoc b/doc/src/core/threads-basics.qdoc
index 09707f5dfc..547c7fc50c 100644
--- a/doc/src/core/threads-basics.qdoc
+++ b/doc/src/core/threads-basics.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/core/threads.qdoc b/doc/src/core/threads.qdoc
index cab50c6fe2..c38a7f3141 100644
--- a/doc/src/core/threads.qdoc
+++ b/doc/src/core/threads.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -338,7 +338,7 @@
\section1 QObject Reentrancy
QObject is reentrant. Most of its non-GUI subclasses, such as
- QTimer, QTcpSocket, QUdpSocket, QFtp, and QProcess, are also
+ QTimer, QTcpSocket, QUdpSocket and QProcess, are also
reentrant, making it possible to use these classes from multiple
threads simultaneously. Note that these classes are designed to be
created and used from within a single thread; creating an object
diff --git a/doc/src/dbus/qtdbus.qdoc b/doc/src/dbus/qtdbus.qdoc
index 4de1550f18..37f4a40853 100644
--- a/doc/src/dbus/qtdbus.qdoc
+++ b/doc/src/dbus/qtdbus.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/2dpainting.qdoc b/doc/src/examples/2dpainting.qdoc
index c4a2695ad3..2a29de30b7 100644
--- a/doc/src/examples/2dpainting.qdoc
+++ b/doc/src/examples/2dpainting.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/addressbook.qdoc b/doc/src/examples/addressbook.qdoc
index 114c22b3d7..b188915566 100644
--- a/doc/src/examples/addressbook.qdoc
+++ b/doc/src/examples/addressbook.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/affine.qdoc b/doc/src/examples/affine.qdoc
index 2d70fa8951..b817e8a980 100644
--- a/doc/src/examples/affine.qdoc
+++ b/doc/src/examples/affine.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/analogclock.qdoc b/doc/src/examples/analogclock.qdoc
index 18dc47950f..39d60d5c68 100644
--- a/doc/src/examples/analogclock.qdoc
+++ b/doc/src/examples/analogclock.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/animatedtiles.qdoc b/doc/src/examples/animatedtiles.qdoc
index f56282967c..247a76c764 100644
--- a/doc/src/examples/animatedtiles.qdoc
+++ b/doc/src/examples/animatedtiles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/appchooser.qdoc b/doc/src/examples/appchooser.qdoc
index 63cbb0e9dc..f1c15057d4 100644
--- a/doc/src/examples/appchooser.qdoc
+++ b/doc/src/examples/appchooser.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/application.qdoc b/doc/src/examples/application.qdoc
index e4fceecdf5..d6c8b62a88 100644
--- a/doc/src/examples/application.qdoc
+++ b/doc/src/examples/application.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/applicationicon.qdoc b/doc/src/examples/applicationicon.qdoc
index 87942e5a86..3aa119c6d2 100644
--- a/doc/src/examples/applicationicon.qdoc
+++ b/doc/src/examples/applicationicon.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
index f3ba3325dd..e9c62d144e 100644
--- a/doc/src/examples/arrowpad.qdoc
+++ b/doc/src/examples/arrowpad.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/basicdrawing.qdoc b/doc/src/examples/basicdrawing.qdoc
index fbc34e6c54..e45cc36154 100644
--- a/doc/src/examples/basicdrawing.qdoc
+++ b/doc/src/examples/basicdrawing.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc
index 2742870431..730823806b 100644
--- a/doc/src/examples/basicgraphicslayouts.qdoc
+++ b/doc/src/examples/basicgraphicslayouts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/basiclayouts.qdoc b/doc/src/examples/basiclayouts.qdoc
index a8c64f0519..c96bf5c85c 100644
--- a/doc/src/examples/basiclayouts.qdoc
+++ b/doc/src/examples/basiclayouts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/basicsortfiltermodel.qdoc b/doc/src/examples/basicsortfiltermodel.qdoc
index dbe9f02a40..e3d7c51ef9 100644
--- a/doc/src/examples/basicsortfiltermodel.qdoc
+++ b/doc/src/examples/basicsortfiltermodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/bearermonitor.qdoc b/doc/src/examples/bearermonitor.qdoc
index a638d1272c..f44914919c 100644
--- a/doc/src/examples/bearermonitor.qdoc
+++ b/doc/src/examples/bearermonitor.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/blockingfortuneclient.qdoc b/doc/src/examples/blockingfortuneclient.qdoc
index d35ed4c339..f3f6f40bcd 100644
--- a/doc/src/examples/blockingfortuneclient.qdoc
+++ b/doc/src/examples/blockingfortuneclient.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/blurpicker.qdoc b/doc/src/examples/blurpicker.qdoc
index 3a6d4331a7..6e15a92eaa 100644
--- a/doc/src/examples/blurpicker.qdoc
+++ b/doc/src/examples/blurpicker.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/books.qdoc b/doc/src/examples/books.qdoc
index 9fa7fdfc8c..294ce7850c 100644
--- a/doc/src/examples/books.qdoc
+++ b/doc/src/examples/books.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/borderlayout.qdoc b/doc/src/examples/borderlayout.qdoc
index 94cd3d9ef3..a3580d6698 100644
--- a/doc/src/examples/borderlayout.qdoc
+++ b/doc/src/examples/borderlayout.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/boxes.qdoc b/doc/src/examples/boxes.qdoc
index 92db09d3d7..8ca40afcf9 100644
--- a/doc/src/examples/boxes.qdoc
+++ b/doc/src/examples/boxes.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/broadcastreceiver.qdoc b/doc/src/examples/broadcastreceiver.qdoc
index 409b491dd8..95b76cf181 100644
--- a/doc/src/examples/broadcastreceiver.qdoc
+++ b/doc/src/examples/broadcastreceiver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/broadcastsender.qdoc b/doc/src/examples/broadcastsender.qdoc
index 2cb0a1324d..18afa73de9 100644
--- a/doc/src/examples/broadcastsender.qdoc
+++ b/doc/src/examples/broadcastsender.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/cachedtable.qdoc b/doc/src/examples/cachedtable.qdoc
index 5a20329251..090fd74bfc 100644
--- a/doc/src/examples/cachedtable.qdoc
+++ b/doc/src/examples/cachedtable.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/calculator.qdoc b/doc/src/examples/calculator.qdoc
index c7dc0139b7..0db17caa41 100644
--- a/doc/src/examples/calculator.qdoc
+++ b/doc/src/examples/calculator.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/calendar.qdoc b/doc/src/examples/calendar.qdoc
index 32bc547ebe..a4de05b6a2 100644
--- a/doc/src/examples/calendar.qdoc
+++ b/doc/src/examples/calendar.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/calendarwidget.qdoc b/doc/src/examples/calendarwidget.qdoc
index f72082a1bf..e8c66a2bb2 100644
--- a/doc/src/examples/calendarwidget.qdoc
+++ b/doc/src/examples/calendarwidget.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/charactermap.qdoc b/doc/src/examples/charactermap.qdoc
index 285d6a40cb..05e0e4f516 100644
--- a/doc/src/examples/charactermap.qdoc
+++ b/doc/src/examples/charactermap.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/chart.qdoc b/doc/src/examples/chart.qdoc
index af82f1bebe..a42514e08f 100644
--- a/doc/src/examples/chart.qdoc
+++ b/doc/src/examples/chart.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/chip.qdoc b/doc/src/examples/chip.qdoc
index 07b12f9960..37a8c63c01 100644
--- a/doc/src/examples/chip.qdoc
+++ b/doc/src/examples/chip.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/classwizard.qdoc b/doc/src/examples/classwizard.qdoc
index 53d09361f9..b228fde411 100644
--- a/doc/src/examples/classwizard.qdoc
+++ b/doc/src/examples/classwizard.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/codecs.qdoc b/doc/src/examples/codecs.qdoc
index 91fb6a2c86..44e69b6e82 100644
--- a/doc/src/examples/codecs.qdoc
+++ b/doc/src/examples/codecs.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc
index 435f650e9a..372842fa36 100644
--- a/doc/src/examples/codeeditor.qdoc
+++ b/doc/src/examples/codeeditor.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/coloreditorfactory.qdoc b/doc/src/examples/coloreditorfactory.qdoc
index 34060bdb90..461508799c 100644
--- a/doc/src/examples/coloreditorfactory.qdoc
+++ b/doc/src/examples/coloreditorfactory.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/combowidgetmapper.qdoc b/doc/src/examples/combowidgetmapper.qdoc
index e852f5e8f3..9019ba0901 100644
--- a/doc/src/examples/combowidgetmapper.qdoc
+++ b/doc/src/examples/combowidgetmapper.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc
index d4a4e6d1d9..6a8d19febe 100644
--- a/doc/src/examples/completer.qdoc
+++ b/doc/src/examples/completer.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/complexpingpong.qdoc b/doc/src/examples/complexpingpong.qdoc
index 677353b8c5..96da41a598 100644
--- a/doc/src/examples/complexpingpong.qdoc
+++ b/doc/src/examples/complexpingpong.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/composition.qdoc b/doc/src/examples/composition.qdoc
index 53ca3dbf7a..d9cda294d6 100644
--- a/doc/src/examples/composition.qdoc
+++ b/doc/src/examples/composition.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/concentriccircles.qdoc b/doc/src/examples/concentriccircles.qdoc
index 37c8f834f9..9a33bd62ca 100644
--- a/doc/src/examples/concentriccircles.qdoc
+++ b/doc/src/examples/concentriccircles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/configdialog.qdoc b/doc/src/examples/configdialog.qdoc
index 166b25af41..3d419ff3aa 100644
--- a/doc/src/examples/configdialog.qdoc
+++ b/doc/src/examples/configdialog.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/contiguouscache.qdoc b/doc/src/examples/contiguouscache.qdoc
index d0b39e6d6b..b893bd325f 100644
--- a/doc/src/examples/contiguouscache.qdoc
+++ b/doc/src/examples/contiguouscache.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/cube.qdoc b/doc/src/examples/cube.qdoc
index e1fd1727fd..02f6386049 100644
--- a/doc/src/examples/cube.qdoc
+++ b/doc/src/examples/cube.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/customcompleter.qdoc b/doc/src/examples/customcompleter.qdoc
index f0d5698d02..8c7d23c665 100644
--- a/doc/src/examples/customcompleter.qdoc
+++ b/doc/src/examples/customcompleter.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/customsortfiltermodel.qdoc b/doc/src/examples/customsortfiltermodel.qdoc
index 8c402ac972..1e3b12b004 100644
--- a/doc/src/examples/customsortfiltermodel.qdoc
+++ b/doc/src/examples/customsortfiltermodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/customtype.qdoc b/doc/src/examples/customtype.qdoc
index b9693543c1..fa0e3b7568 100644
--- a/doc/src/examples/customtype.qdoc
+++ b/doc/src/examples/customtype.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/customtypesending.qdoc b/doc/src/examples/customtypesending.qdoc
index fc6b7935fd..7598965652 100644
--- a/doc/src/examples/customtypesending.qdoc
+++ b/doc/src/examples/customtypesending.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dbscreen.qdoc b/doc/src/examples/dbscreen.qdoc
index 793b5fc28c..43b8926b7f 100644
--- a/doc/src/examples/dbscreen.qdoc
+++ b/doc/src/examples/dbscreen.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dbus-chat.qdoc b/doc/src/examples/dbus-chat.qdoc
index a435cc9ebe..08d3f6af1f 100644
--- a/doc/src/examples/dbus-chat.qdoc
+++ b/doc/src/examples/dbus-chat.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/deform.qdoc b/doc/src/examples/deform.qdoc
index 1a81053248..f3d425392f 100644
--- a/doc/src/examples/deform.qdoc
+++ b/doc/src/examples/deform.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc
index 7d3c0e6bc3..9cfcedbd62 100644
--- a/doc/src/examples/diagramscene.qdoc
+++ b/doc/src/examples/diagramscene.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/digiflip.qdoc b/doc/src/examples/digiflip.qdoc
index ae3b18216b..10a09bef06 100644
--- a/doc/src/examples/digiflip.qdoc
+++ b/doc/src/examples/digiflip.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/digitalclock.qdoc b/doc/src/examples/digitalclock.qdoc
index acee4d65aa..0a3541fbee 100644
--- a/doc/src/examples/digitalclock.qdoc
+++ b/doc/src/examples/digitalclock.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dirview.qdoc b/doc/src/examples/dirview.qdoc
index 6d2ce7a372..5cc6e5bd36 100644
--- a/doc/src/examples/dirview.qdoc
+++ b/doc/src/examples/dirview.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dockwidgets.qdoc b/doc/src/examples/dockwidgets.qdoc
index b46a286c9e..4862b3a324 100644
--- a/doc/src/examples/dockwidgets.qdoc
+++ b/doc/src/examples/dockwidgets.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dombookmarks.qdoc b/doc/src/examples/dombookmarks.qdoc
index 03e3ec6aee..83e66f34c9 100644
--- a/doc/src/examples/dombookmarks.qdoc
+++ b/doc/src/examples/dombookmarks.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dragdroprobot.qdoc b/doc/src/examples/dragdroprobot.qdoc
index c68f6cc999..f60fdc1ff3 100644
--- a/doc/src/examples/dragdroprobot.qdoc
+++ b/doc/src/examples/dragdroprobot.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/draggableicons.qdoc b/doc/src/examples/draggableicons.qdoc
index 0337431c24..ca6fb20f4d 100644
--- a/doc/src/examples/draggableicons.qdoc
+++ b/doc/src/examples/draggableicons.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/draggabletext.qdoc b/doc/src/examples/draggabletext.qdoc
index 14d07b65ef..edac9cf48b 100644
--- a/doc/src/examples/draggabletext.qdoc
+++ b/doc/src/examples/draggabletext.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc
index 13c4117f25..2d1ab6bb9a 100644
--- a/doc/src/examples/drilldown.qdoc
+++ b/doc/src/examples/drilldown.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dropsite.qdoc b/doc/src/examples/dropsite.qdoc
index bf17427a13..d7396919e2 100644
--- a/doc/src/examples/dropsite.qdoc
+++ b/doc/src/examples/dropsite.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/dynamiclayouts.qdoc b/doc/src/examples/dynamiclayouts.qdoc
index b8314e330c..be29e94b70 100644
--- a/doc/src/examples/dynamiclayouts.qdoc
+++ b/doc/src/examples/dynamiclayouts.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/easing.qdoc b/doc/src/examples/easing.qdoc
index 1a7657d826..f1b9bebcaf 100644
--- a/doc/src/examples/easing.qdoc
+++ b/doc/src/examples/easing.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/echoplugin.qdoc b/doc/src/examples/echoplugin.qdoc
index cadd485573..3a7325b574 100644
--- a/doc/src/examples/echoplugin.qdoc
+++ b/doc/src/examples/echoplugin.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
index 8be3037750..a4602c1b6f 100644
--- a/doc/src/examples/editabletreemodel.qdoc
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc
index 7b4563172b..5b610df3e1 100644
--- a/doc/src/examples/elasticnodes.qdoc
+++ b/doc/src/examples/elasticnodes.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/elidedlabel.qdoc b/doc/src/examples/elidedlabel.qdoc
index 5bfe0f8551..68369e4cbf 100644
--- a/doc/src/examples/elidedlabel.qdoc
+++ b/doc/src/examples/elidedlabel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/embeddeddialogs.qdoc b/doc/src/examples/embeddeddialogs.qdoc
index 685bcf8e22..94ef6f4d35 100644
--- a/doc/src/examples/embeddeddialogs.qdoc
+++ b/doc/src/examples/embeddeddialogs.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/eventtransitions.qdoc b/doc/src/examples/eventtransitions.qdoc
index c66e9c1369..fdfedc5c3d 100644
--- a/doc/src/examples/eventtransitions.qdoc
+++ b/doc/src/examples/eventtransitions.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc
index a2c3590be8..e7533e24cf 100644
--- a/doc/src/examples/extension.qdoc
+++ b/doc/src/examples/extension.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/factorial.qdoc b/doc/src/examples/factorial.qdoc
index a317189443..ef7764b30c 100644
--- a/doc/src/examples/factorial.qdoc
+++ b/doc/src/examples/factorial.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc
index 7e0732475d..3661ea3d63 100644
--- a/doc/src/examples/fademessage.qdoc
+++ b/doc/src/examples/fademessage.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fetchmore.qdoc b/doc/src/examples/fetchmore.qdoc
index 9e64b0ae5c..cb952f5c45 100644
--- a/doc/src/examples/fetchmore.qdoc
+++ b/doc/src/examples/fetchmore.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/findfiles.qdoc b/doc/src/examples/findfiles.qdoc
index 4c03aac640..6e009a57a6 100644
--- a/doc/src/examples/findfiles.qdoc
+++ b/doc/src/examples/findfiles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fingerpaint.qdoc b/doc/src/examples/fingerpaint.qdoc
index 49078b66ad..3c9f9daf19 100644
--- a/doc/src/examples/fingerpaint.qdoc
+++ b/doc/src/examples/fingerpaint.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/flickable.qdoc b/doc/src/examples/flickable.qdoc
index 378bfcaf47..773047a3c9 100644
--- a/doc/src/examples/flickable.qdoc
+++ b/doc/src/examples/flickable.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/flightinfo.qdoc b/doc/src/examples/flightinfo.qdoc
index f3b5e32197..536373684b 100644
--- a/doc/src/examples/flightinfo.qdoc
+++ b/doc/src/examples/flightinfo.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/flowlayout.qdoc b/doc/src/examples/flowlayout.qdoc
index 194a733914..ac0c051b9c 100644
--- a/doc/src/examples/flowlayout.qdoc
+++ b/doc/src/examples/flowlayout.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fontsampler.qdoc b/doc/src/examples/fontsampler.qdoc
index b3caa9f206..05921089a8 100644
--- a/doc/src/examples/fontsampler.qdoc
+++ b/doc/src/examples/fontsampler.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fortuneclient.qdoc b/doc/src/examples/fortuneclient.qdoc
index 0c74143b4e..8582254069 100644
--- a/doc/src/examples/fortuneclient.qdoc
+++ b/doc/src/examples/fortuneclient.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fortuneserver.qdoc b/doc/src/examples/fortuneserver.qdoc
index 2fb7f25089..67b0ef2946 100644
--- a/doc/src/examples/fortuneserver.qdoc
+++ b/doc/src/examples/fortuneserver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/framebufferobject2.qdoc b/doc/src/examples/framebufferobject2.qdoc
index cbe8f3f5e3..6e501efee3 100644
--- a/doc/src/examples/framebufferobject2.qdoc
+++ b/doc/src/examples/framebufferobject2.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/fridgemagnets.qdoc b/doc/src/examples/fridgemagnets.qdoc
index 84908018ea..e521778278 100644
--- a/doc/src/examples/fridgemagnets.qdoc
+++ b/doc/src/examples/fridgemagnets.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/frozencolumn.qdoc b/doc/src/examples/frozencolumn.qdoc
index a21926bb55..88f5a69662 100644
--- a/doc/src/examples/frozencolumn.qdoc
+++ b/doc/src/examples/frozencolumn.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc
index 743a6240c4..9e8bd4ed55 100644
--- a/doc/src/examples/googlesuggest.qdoc
+++ b/doc/src/examples/googlesuggest.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/grabber.qdoc b/doc/src/examples/grabber.qdoc
index 4b65848343..aa73931bb6 100644
--- a/doc/src/examples/grabber.qdoc
+++ b/doc/src/examples/grabber.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/gradients.qdoc b/doc/src/examples/gradients.qdoc
index 430ce3ce87..9b33a5e6ec 100644
--- a/doc/src/examples/gradients.qdoc
+++ b/doc/src/examples/gradients.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/groupbox.qdoc b/doc/src/examples/groupbox.qdoc
index a04243785b..c0e3236c32 100644
--- a/doc/src/examples/groupbox.qdoc
+++ b/doc/src/examples/groupbox.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/hellogl.qdoc b/doc/src/examples/hellogl.qdoc
index dbd672e329..08973bbe22 100644
--- a/doc/src/examples/hellogl.qdoc
+++ b/doc/src/examples/hellogl.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/hellogl_es.qdoc b/doc/src/examples/hellogl_es.qdoc
index fdc7ab5d16..b21dd2ef60 100644
--- a/doc/src/examples/hellogl_es.qdoc
+++ b/doc/src/examples/hellogl_es.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc
index 4b7c4b7404..04d6f034d7 100644
--- a/doc/src/examples/hellotr.qdoc
+++ b/doc/src/examples/hellotr.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/htmlinfo.qdoc b/doc/src/examples/htmlinfo.qdoc
index 23365f1afb..6af27d27a6 100644
--- a/doc/src/examples/htmlinfo.qdoc
+++ b/doc/src/examples/htmlinfo.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/http.qdoc b/doc/src/examples/http.qdoc
index ab03683d2b..7c55d6f6c1 100644
--- a/doc/src/examples/http.qdoc
+++ b/doc/src/examples/http.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/i18n.qdoc b/doc/src/examples/i18n.qdoc
index 2ce47e10af..f379d19012 100644
--- a/doc/src/examples/i18n.qdoc
+++ b/doc/src/examples/i18n.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
index 82ff9948e1..67a62a16f2 100644
--- a/doc/src/examples/icons.qdoc
+++ b/doc/src/examples/icons.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/imagecomposition.qdoc b/doc/src/examples/imagecomposition.qdoc
index cd08de4edf..b0d95f3048 100644
--- a/doc/src/examples/imagecomposition.qdoc
+++ b/doc/src/examples/imagecomposition.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/imagegestures.qdoc b/doc/src/examples/imagegestures.qdoc
index 24a1276dce..6834482ba2 100644
--- a/doc/src/examples/imagegestures.qdoc
+++ b/doc/src/examples/imagegestures.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc
index be47c7dd87..ee6e9fe452 100644
--- a/doc/src/examples/imageviewer.qdoc
+++ b/doc/src/examples/imageviewer.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/inputpanel.qdoc b/doc/src/examples/inputpanel.qdoc
index 54920f0d0d..3e8520d9b0 100644
--- a/doc/src/examples/inputpanel.qdoc
+++ b/doc/src/examples/inputpanel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/interview.qdoc b/doc/src/examples/interview.qdoc
index 0be40fda85..ea50bda716 100644
--- a/doc/src/examples/interview.qdoc
+++ b/doc/src/examples/interview.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/licensewizard.qdoc b/doc/src/examples/licensewizard.qdoc
index 1e11732db3..12cc9d42a6 100644
--- a/doc/src/examples/licensewizard.qdoc
+++ b/doc/src/examples/licensewizard.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/lighting.qdoc b/doc/src/examples/lighting.qdoc
index 815a42a428..ff9bd1f662 100644
--- a/doc/src/examples/lighting.qdoc
+++ b/doc/src/examples/lighting.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/lightmaps.qdoc b/doc/src/examples/lightmaps.qdoc
index 0b5b807919..6f1b60d958 100644
--- a/doc/src/examples/lightmaps.qdoc
+++ b/doc/src/examples/lightmaps.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/lineedits.qdoc b/doc/src/examples/lineedits.qdoc
index 03b4f27199..e01aea5511 100644
--- a/doc/src/examples/lineedits.qdoc
+++ b/doc/src/examples/lineedits.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/localfortuneclient.qdoc b/doc/src/examples/localfortuneclient.qdoc
index 56ead19ea2..6bce3d49c3 100644
--- a/doc/src/examples/localfortuneclient.qdoc
+++ b/doc/src/examples/localfortuneclient.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/localfortuneserver.qdoc b/doc/src/examples/localfortuneserver.qdoc
index 7a26ff875b..cd4ef0a195 100644
--- a/doc/src/examples/localfortuneserver.qdoc
+++ b/doc/src/examples/localfortuneserver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/loopback.qdoc b/doc/src/examples/loopback.qdoc
index a5d810ac97..aaf507c83c 100644
--- a/doc/src/examples/loopback.qdoc
+++ b/doc/src/examples/loopback.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/macmainwindow.qdoc b/doc/src/examples/macmainwindow.qdoc
index d245398f4f..bc7ba88162 100644
--- a/doc/src/examples/macmainwindow.qdoc
+++ b/doc/src/examples/macmainwindow.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/maemovibration.qdoc b/doc/src/examples/maemovibration.qdoc
index de53ba4a8c..7c37b9d22d 100644
--- a/doc/src/examples/maemovibration.qdoc
+++ b/doc/src/examples/maemovibration.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/mainwindow.qdoc b/doc/src/examples/mainwindow.qdoc
index ef9d128628..b374d65c7f 100644
--- a/doc/src/examples/mainwindow.qdoc
+++ b/doc/src/examples/mainwindow.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/mandelbrot.qdoc b/doc/src/examples/mandelbrot.qdoc
index c4a6a49bf1..37533eee29 100644
--- a/doc/src/examples/mandelbrot.qdoc
+++ b/doc/src/examples/mandelbrot.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/masterdetail.qdoc b/doc/src/examples/masterdetail.qdoc
index 16ddb3e01c..7dda40a347 100644
--- a/doc/src/examples/masterdetail.qdoc
+++ b/doc/src/examples/masterdetail.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/mdi.qdoc b/doc/src/examples/mdi.qdoc
index 4f64fa128f..20887b20b9 100644
--- a/doc/src/examples/mdi.qdoc
+++ b/doc/src/examples/mdi.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/menus.qdoc b/doc/src/examples/menus.qdoc
index 0a31ca80cc..a72ea75f4f 100644
--- a/doc/src/examples/menus.qdoc
+++ b/doc/src/examples/menus.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/mousecalibration.qdoc b/doc/src/examples/mousecalibration.qdoc
index 590153b439..fb7531e91b 100644
--- a/doc/src/examples/mousecalibration.qdoc
+++ b/doc/src/examples/mousecalibration.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc
index e5ce3be8d1..71205338fd 100644
--- a/doc/src/examples/moveblocks.qdoc
+++ b/doc/src/examples/moveblocks.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc
index bd5726ca65..249dc60a72 100644
--- a/doc/src/examples/movie.qdoc
+++ b/doc/src/examples/movie.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/multicastreceiver.qdoc b/doc/src/examples/multicastreceiver.qdoc
index 1a0f3b5748..7ad6ee45b3 100644
--- a/doc/src/examples/multicastreceiver.qdoc
+++ b/doc/src/examples/multicastreceiver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/multicastsender.qdoc b/doc/src/examples/multicastsender.qdoc
index 55b3804d2d..2297cc0e9b 100644
--- a/doc/src/examples/multicastsender.qdoc
+++ b/doc/src/examples/multicastsender.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc
index fa125f0da9..973592e71d 100644
--- a/doc/src/examples/multipleinheritance.qdoc
+++ b/doc/src/examples/multipleinheritance.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/network-chat.qdoc b/doc/src/examples/network-chat.qdoc
index bd8288f9c9..bec37e12b7 100644
--- a/doc/src/examples/network-chat.qdoc
+++ b/doc/src/examples/network-chat.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/orderform.qdoc b/doc/src/examples/orderform.qdoc
index 7ab56da7fe..00caf896f6 100644
--- a/doc/src/examples/orderform.qdoc
+++ b/doc/src/examples/orderform.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/orientation.qdoc b/doc/src/examples/orientation.qdoc
index f55a6507bc..ef25b6f657 100644
--- a/doc/src/examples/orientation.qdoc
+++ b/doc/src/examples/orientation.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/overpainting.qdoc b/doc/src/examples/overpainting.qdoc
index 12f9756944..b9c178b339 100644
--- a/doc/src/examples/overpainting.qdoc
+++ b/doc/src/examples/overpainting.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/padnavigator.qdoc b/doc/src/examples/padnavigator.qdoc
index 6838e0a49f..15dbc7d701 100644
--- a/doc/src/examples/padnavigator.qdoc
+++ b/doc/src/examples/padnavigator.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/painterpaths.qdoc b/doc/src/examples/painterpaths.qdoc
index acf9772de9..e002dd5e27 100644
--- a/doc/src/examples/painterpaths.qdoc
+++ b/doc/src/examples/painterpaths.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/pathstroke.qdoc b/doc/src/examples/pathstroke.qdoc
index b433a42814..d22ed0270b 100644
--- a/doc/src/examples/pathstroke.qdoc
+++ b/doc/src/examples/pathstroke.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/pbuffers.qdoc b/doc/src/examples/pbuffers.qdoc
index 0c496b4bc7..7c78d21b54 100644
--- a/doc/src/examples/pbuffers.qdoc
+++ b/doc/src/examples/pbuffers.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/pbuffers2.qdoc b/doc/src/examples/pbuffers2.qdoc
index 280f329ddc..6f362a6650 100644
--- a/doc/src/examples/pbuffers2.qdoc
+++ b/doc/src/examples/pbuffers2.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc
index 04a8bb489f..d7c1a1d484 100644
--- a/doc/src/examples/pinchzoom.qdoc
+++ b/doc/src/examples/pinchzoom.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/pingpong.qdoc b/doc/src/examples/pingpong.qdoc
index c4a29a49a3..0aacb538e7 100644
--- a/doc/src/examples/pingpong.qdoc
+++ b/doc/src/examples/pingpong.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/pixelator.qdoc b/doc/src/examples/pixelator.qdoc
index b6d1fd6523..86507634c8 100644
--- a/doc/src/examples/pixelator.qdoc
+++ b/doc/src/examples/pixelator.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/plugandpaint.qdoc b/doc/src/examples/plugandpaint.qdoc
index 2a9d286a4d..a23560fe66 100644
--- a/doc/src/examples/plugandpaint.qdoc
+++ b/doc/src/examples/plugandpaint.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/querymodel.qdoc b/doc/src/examples/querymodel.qdoc
index 554ae2191c..dc5273b314 100644
--- a/doc/src/examples/querymodel.qdoc
+++ b/doc/src/examples/querymodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/queuedcustomtype.qdoc b/doc/src/examples/queuedcustomtype.qdoc
index 85f6b07abc..a377177945 100644
--- a/doc/src/examples/queuedcustomtype.qdoc
+++ b/doc/src/examples/queuedcustomtype.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/raycasting.qdoc b/doc/src/examples/raycasting.qdoc
index ae5be0f707..a5e34f58d4 100644
--- a/doc/src/examples/raycasting.qdoc
+++ b/doc/src/examples/raycasting.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/recentfiles.qdoc b/doc/src/examples/recentfiles.qdoc
index 048df0169c..5c2cc1922c 100644
--- a/doc/src/examples/recentfiles.qdoc
+++ b/doc/src/examples/recentfiles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/regexp.qdoc b/doc/src/examples/regexp.qdoc
index 7b97156378..bbac541da9 100644
--- a/doc/src/examples/regexp.qdoc
+++ b/doc/src/examples/regexp.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/relationaltablemodel.qdoc b/doc/src/examples/relationaltablemodel.qdoc
index f23c69c9e7..cb4899dad2 100644
--- a/doc/src/examples/relationaltablemodel.qdoc
+++ b/doc/src/examples/relationaltablemodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc
index e93886b694..c13fff32cd 100644
--- a/doc/src/examples/rogue.qdoc
+++ b/doc/src/examples/rogue.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/rsslisting.qdoc b/doc/src/examples/rsslisting.qdoc
index 9554842d05..5528c90da0 100644
--- a/doc/src/examples/rsslisting.qdoc
+++ b/doc/src/examples/rsslisting.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/samplebuffers.qdoc b/doc/src/examples/samplebuffers.qdoc
index c9d6438b85..bc2cb6cdd4 100644
--- a/doc/src/examples/samplebuffers.qdoc
+++ b/doc/src/examples/samplebuffers.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/saxbookmarks.qdoc b/doc/src/examples/saxbookmarks.qdoc
index e912372747..226041128f 100644
--- a/doc/src/examples/saxbookmarks.qdoc
+++ b/doc/src/examples/saxbookmarks.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/screenshot.qdoc b/doc/src/examples/screenshot.qdoc
index 190b175389..7ccee8fbc0 100644
--- a/doc/src/examples/screenshot.qdoc
+++ b/doc/src/examples/screenshot.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc
index b09f570c51..3d6a8b18dc 100644
--- a/doc/src/examples/scribble.qdoc
+++ b/doc/src/examples/scribble.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sdi.qdoc b/doc/src/examples/sdi.qdoc
index 5e3eb79ac6..45c306e477 100644
--- a/doc/src/examples/sdi.qdoc
+++ b/doc/src/examples/sdi.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/securesocketclient.qdoc b/doc/src/examples/securesocketclient.qdoc
index 30ba16a34c..5e8681a3b8 100644
--- a/doc/src/examples/securesocketclient.qdoc
+++ b/doc/src/examples/securesocketclient.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/semaphores.qdoc b/doc/src/examples/semaphores.qdoc
index aeced47d0a..5bb6822f6a 100644
--- a/doc/src/examples/semaphores.qdoc
+++ b/doc/src/examples/semaphores.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/settingseditor.qdoc b/doc/src/examples/settingseditor.qdoc
index a0fcc17543..72b7ca7ab0 100644
--- a/doc/src/examples/settingseditor.qdoc
+++ b/doc/src/examples/settingseditor.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/shapedclock.qdoc b/doc/src/examples/shapedclock.qdoc
index e66b3efc5a..23ff4027fa 100644
--- a/doc/src/examples/shapedclock.qdoc
+++ b/doc/src/examples/shapedclock.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sharedmemory.qdoc b/doc/src/examples/sharedmemory.qdoc
index 2f4088bd4a..4b80c68ca9 100644
--- a/doc/src/examples/sharedmemory.qdoc
+++ b/doc/src/examples/sharedmemory.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/simpledecoration.qdoc b/doc/src/examples/simpledecoration.qdoc
index 3c02009988..9f8be4a1b2 100644
--- a/doc/src/examples/simpledecoration.qdoc
+++ b/doc/src/examples/simpledecoration.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc
index b7fae915fe..2a671e6d9d 100644
--- a/doc/src/examples/simpledommodel.qdoc
+++ b/doc/src/examples/simpledommodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/simpletreemodel.qdoc b/doc/src/examples/simpletreemodel.qdoc
index 00464b290e..9f10177b55 100644
--- a/doc/src/examples/simpletreemodel.qdoc
+++ b/doc/src/examples/simpletreemodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/simplewidgetmapper.qdoc b/doc/src/examples/simplewidgetmapper.qdoc
index 60837fc9d9..aa41ec2161 100644
--- a/doc/src/examples/simplewidgetmapper.qdoc
+++ b/doc/src/examples/simplewidgetmapper.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sipdialog.qdoc b/doc/src/examples/sipdialog.qdoc
index 349ab1815a..65dfe6bde5 100644
--- a/doc/src/examples/sipdialog.qdoc
+++ b/doc/src/examples/sipdialog.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sliders.qdoc b/doc/src/examples/sliders.qdoc
index 721acaefbe..619d87a433 100644
--- a/doc/src/examples/sliders.qdoc
+++ b/doc/src/examples/sliders.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/spinboxdelegate.qdoc b/doc/src/examples/spinboxdelegate.qdoc
index 50d5b9c1ea..3f7de678a5 100644
--- a/doc/src/examples/spinboxdelegate.qdoc
+++ b/doc/src/examples/spinboxdelegate.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/spinboxes.qdoc b/doc/src/examples/spinboxes.qdoc
index e87faf152a..7c52f05f73 100644
--- a/doc/src/examples/spinboxes.qdoc
+++ b/doc/src/examples/spinboxes.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/spreadsheet.qdoc b/doc/src/examples/spreadsheet.qdoc
index 8bcecc99ed..c8648ec8ad 100644
--- a/doc/src/examples/spreadsheet.qdoc
+++ b/doc/src/examples/spreadsheet.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sqlbrowser.qdoc b/doc/src/examples/sqlbrowser.qdoc
index f7ec7951a8..57d8f94c8b 100644
--- a/doc/src/examples/sqlbrowser.qdoc
+++ b/doc/src/examples/sqlbrowser.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sqlwidgetmapper.qdoc b/doc/src/examples/sqlwidgetmapper.qdoc
index cf1a15831d..40bf540532 100644
--- a/doc/src/examples/sqlwidgetmapper.qdoc
+++ b/doc/src/examples/sqlwidgetmapper.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/standarddialogs.qdoc b/doc/src/examples/standarddialogs.qdoc
index 92005b40f1..83d9acbc26 100644
--- a/doc/src/examples/standarddialogs.qdoc
+++ b/doc/src/examples/standarddialogs.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/stardelegate.qdoc b/doc/src/examples/stardelegate.qdoc
index 3b009d5057..3bb80b440b 100644
--- a/doc/src/examples/stardelegate.qdoc
+++ b/doc/src/examples/stardelegate.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/states.qdoc b/doc/src/examples/states.qdoc
index 815c9690d3..6a0f5adc56 100644
--- a/doc/src/examples/states.qdoc
+++ b/doc/src/examples/states.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/stickman.qdoc b/doc/src/examples/stickman.qdoc
index 8c35fe17f8..cce3bf2e53 100644
--- a/doc/src/examples/stickman.qdoc
+++ b/doc/src/examples/stickman.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/styleexample.qdoc b/doc/src/examples/styleexample.qdoc
index f3ab3b17d6..9a48517d80 100644
--- a/doc/src/examples/styleexample.qdoc
+++ b/doc/src/examples/styleexample.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/styleplugin.qdoc b/doc/src/examples/styleplugin.qdoc
index 59729c7e23..d4bb5e2c41 100644
--- a/doc/src/examples/styleplugin.qdoc
+++ b/doc/src/examples/styleplugin.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/styles.qdoc b/doc/src/examples/styles.qdoc
index 5258c1972e..c880c180fd 100644
--- a/doc/src/examples/styles.qdoc
+++ b/doc/src/examples/styles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/stylesheet.qdoc b/doc/src/examples/stylesheet.qdoc
index a82d0d1e08..3af2ae45c1 100644
--- a/doc/src/examples/stylesheet.qdoc
+++ b/doc/src/examples/stylesheet.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/sub-attaq.qdoc b/doc/src/examples/sub-attaq.qdoc
index 0c8e587463..b2b64da78e 100644
--- a/doc/src/examples/sub-attaq.qdoc
+++ b/doc/src/examples/sub-attaq.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc
index dbdad0f26c..004ed920c2 100644
--- a/doc/src/examples/svgalib.qdoc
+++ b/doc/src/examples/svgalib.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/symbianvibration.qdoc b/doc/src/examples/symbianvibration.qdoc
index 76f79e5d47..0ff9a6731b 100644
--- a/doc/src/examples/symbianvibration.qdoc
+++ b/doc/src/examples/symbianvibration.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/syntaxhighlighter.qdoc b/doc/src/examples/syntaxhighlighter.qdoc
index 919d61c3db..c6c81ade77 100644
--- a/doc/src/examples/syntaxhighlighter.qdoc
+++ b/doc/src/examples/syntaxhighlighter.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/tabdialog.qdoc b/doc/src/examples/tabdialog.qdoc
index b192645a0a..ef4ee624ae 100644
--- a/doc/src/examples/tabdialog.qdoc
+++ b/doc/src/examples/tabdialog.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/tablemodel.qdoc b/doc/src/examples/tablemodel.qdoc
index bd81763d95..bd074dc079 100644
--- a/doc/src/examples/tablemodel.qdoc
+++ b/doc/src/examples/tablemodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc
index ce4ab2a1f0..b2be39c69b 100644
--- a/doc/src/examples/tablet.qdoc
+++ b/doc/src/examples/tablet.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/tetrix.qdoc b/doc/src/examples/tetrix.qdoc
index e37d2b67bb..b4fd5cf2eb 100644
--- a/doc/src/examples/tetrix.qdoc
+++ b/doc/src/examples/tetrix.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/textedit.qdoc b/doc/src/examples/textedit.qdoc
index 1a1171d542..1e202c4888 100644
--- a/doc/src/examples/textedit.qdoc
+++ b/doc/src/examples/textedit.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
index fc6d2ba840..ff31ed8fcd 100644
--- a/doc/src/examples/textfinder.qdoc
+++ b/doc/src/examples/textfinder.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/textures.qdoc b/doc/src/examples/textures.qdoc
index 52bde78187..6891f57fcc 100644
--- a/doc/src/examples/textures.qdoc
+++ b/doc/src/examples/textures.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/threadedfortuneserver.qdoc b/doc/src/examples/threadedfortuneserver.qdoc
index 87da0541e3..3ee5e0cdd4 100644
--- a/doc/src/examples/threadedfortuneserver.qdoc
+++ b/doc/src/examples/threadedfortuneserver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/tooltips.qdoc b/doc/src/examples/tooltips.qdoc
index 2b39bf9c5f..81343fbfe0 100644
--- a/doc/src/examples/tooltips.qdoc
+++ b/doc/src/examples/tooltips.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/torrent.qdoc b/doc/src/examples/torrent.qdoc
index 86c0b0c75c..9682c2f7e9 100644
--- a/doc/src/examples/torrent.qdoc
+++ b/doc/src/examples/torrent.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/trafficlight.qdoc b/doc/src/examples/trafficlight.qdoc
index 828195e7b8..7d62e07271 100644
--- a/doc/src/examples/trafficlight.qdoc
+++ b/doc/src/examples/trafficlight.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc
index 74c1a8450a..7117e207db 100644
--- a/doc/src/examples/transformations.qdoc
+++ b/doc/src/examples/transformations.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/treemodelcompleter.qdoc b/doc/src/examples/treemodelcompleter.qdoc
index 4caba0d03f..b4242a9985 100644
--- a/doc/src/examples/treemodelcompleter.qdoc
+++ b/doc/src/examples/treemodelcompleter.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/trivialwizard.qdoc b/doc/src/examples/trivialwizard.qdoc
index e654a78ae9..bf8e0c58b7 100644
--- a/doc/src/examples/trivialwizard.qdoc
+++ b/doc/src/examples/trivialwizard.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
index de6cc6088a..1532170699 100644
--- a/doc/src/examples/trollprint.qdoc
+++ b/doc/src/examples/trollprint.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/twowaybutton.qdoc b/doc/src/examples/twowaybutton.qdoc
index b42615e957..dd5c4a9da8 100644
--- a/doc/src/examples/twowaybutton.qdoc
+++ b/doc/src/examples/twowaybutton.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/undo.qdoc b/doc/src/examples/undo.qdoc
index 29c320ab05..75c3fb86f8 100644
--- a/doc/src/examples/undo.qdoc
+++ b/doc/src/examples/undo.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
index 15372ecb58..98c218bc5c 100644
--- a/doc/src/examples/undoframework.qdoc
+++ b/doc/src/examples/undoframework.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/waitconditions.qdoc b/doc/src/examples/waitconditions.qdoc
index 0d0cd1b9e0..35230689e7 100644
--- a/doc/src/examples/waitconditions.qdoc
+++ b/doc/src/examples/waitconditions.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/wiggly.qdoc b/doc/src/examples/wiggly.qdoc
index 3685741f65..dcdcbb1893 100644
--- a/doc/src/examples/wiggly.qdoc
+++ b/doc/src/examples/wiggly.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/windowflags.qdoc b/doc/src/examples/windowflags.qdoc
index e690c3701e..c625b583d8 100644
--- a/doc/src/examples/windowflags.qdoc
+++ b/doc/src/examples/windowflags.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/examples/xmlstreamlint.qdoc b/doc/src/examples/xmlstreamlint.qdoc
index 98bee624da..261667e6b2 100644
--- a/doc/src/examples/xmlstreamlint.qdoc
+++ b/doc/src/examples/xmlstreamlint.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/gui/coordsys.qdoc b/doc/src/gui/coordsys.qdoc
index 96eebd01e0..5c953d5979 100644
--- a/doc/src/gui/coordsys.qdoc
+++ b/doc/src/gui/coordsys.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/gui/paintsystem.qdoc b/doc/src/gui/paintsystem.qdoc
index a567509186..8fa771c965 100644
--- a/doc/src/gui/paintsystem.qdoc
+++ b/doc/src/gui/paintsystem.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/gui/qtgui.qdoc b/doc/src/gui/qtgui.qdoc
index 9db4ca534a..a745575eba 100644
--- a/doc/src/gui/qtgui.qdoc
+++ b/doc/src/gui/qtgui.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/images/clock.png b/doc/src/images/clock.png
index c7f6a1b296..c7f6a1b296 100755..100644
--- a/doc/src/images/clock.png
+++ b/doc/src/images/clock.png
Binary files differ
diff --git a/doc/src/images/dummy_tree.png b/doc/src/images/dummy_tree.png
index 7373ea60f6..7373ea60f6 100755..100644
--- a/doc/src/images/dummy_tree.png
+++ b/doc/src/images/dummy_tree.png
Binary files differ
diff --git a/doc/src/images/example_model.png b/doc/src/images/example_model.png
index 4261261c7e..4261261c7e 100755..100644
--- a/doc/src/images/example_model.png
+++ b/doc/src/images/example_model.png
Binary files differ
diff --git a/doc/src/images/list_table_tree.png b/doc/src/images/list_table_tree.png
index b2daf1f3a5..b2daf1f3a5 100755..100644
--- a/doc/src/images/list_table_tree.png
+++ b/doc/src/images/list_table_tree.png
Binary files differ
diff --git a/doc/src/images/modelview-header.png b/doc/src/images/modelview-header.png
index 2597635b9f..2597635b9f 100755..100644
--- a/doc/src/images/modelview-header.png
+++ b/doc/src/images/modelview-header.png
Binary files differ
diff --git a/doc/src/images/modelview.png b/doc/src/images/modelview.png
index 7b042af8a4..7b042af8a4 100755..100644
--- a/doc/src/images/modelview.png
+++ b/doc/src/images/modelview.png
Binary files differ
diff --git a/doc/src/images/qcompleter.png b/doc/src/images/qcompleter.png
index d25caacc72..d25caacc72 100755..100644
--- a/doc/src/images/qcompleter.png
+++ b/doc/src/images/qcompleter.png
Binary files differ
diff --git a/doc/src/images/readonlytable_role.png b/doc/src/images/readonlytable_role.png
index 7d2d416a53..7d2d416a53 100755..100644
--- a/doc/src/images/readonlytable_role.png
+++ b/doc/src/images/readonlytable_role.png
Binary files differ
diff --git a/doc/src/images/selection2.png b/doc/src/images/selection2.png
index 66c757f88e..66c757f88e 100755..100644
--- a/doc/src/images/selection2.png
+++ b/doc/src/images/selection2.png
Binary files differ
diff --git a/doc/src/images/standardwidget.png b/doc/src/images/standardwidget.png
index 3ccccf14a3..3ccccf14a3 100755..100644
--- a/doc/src/images/standardwidget.png
+++ b/doc/src/images/standardwidget.png
Binary files differ
diff --git a/doc/src/images/tree_2_with_algorithm.png b/doc/src/images/tree_2_with_algorithm.png
index ecf91012bf..ecf91012bf 100755..100644
--- a/doc/src/images/tree_2_with_algorithm.png
+++ b/doc/src/images/tree_2_with_algorithm.png
Binary files differ
diff --git a/doc/src/images/treeview.png b/doc/src/images/treeview.png
index af31fe9bf1..af31fe9bf1 100755..100644
--- a/doc/src/images/treeview.png
+++ b/doc/src/images/treeview.png
Binary files differ
diff --git a/doc/src/images/widgetmapper.png b/doc/src/images/widgetmapper.png
index 9627088077..9627088077 100755..100644
--- a/doc/src/images/widgetmapper.png
+++ b/doc/src/images/widgetmapper.png
Binary files differ
diff --git a/doc/src/network/files-and-resources/datastreamformat.qdoc b/doc/src/network/files-and-resources/datastreamformat.qdoc
index 69f49d892f..826fc523e0 100644
--- a/doc/src/network/files-and-resources/datastreamformat.qdoc
+++ b/doc/src/network/files-and-resources/datastreamformat.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/network/files-and-resources/resources.qdoc b/doc/src/network/files-and-resources/resources.qdoc
index d6e320bf04..8ca19f3703 100644
--- a/doc/src/network/files-and-resources/resources.qdoc
+++ b/doc/src/network/files-and-resources/resources.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/network/network-programming/bearermanagement.qdoc b/doc/src/network/network-programming/bearermanagement.qdoc
index 3d0262aa95..9578a716d2 100644
--- a/doc/src/network/network-programming/bearermanagement.qdoc
+++ b/doc/src/network/network-programming/bearermanagement.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/network/network-programming/qtnetwork.qdoc b/doc/src/network/network-programming/qtnetwork.qdoc
index 93ba24815d..122aa5784b 100644
--- a/doc/src/network/network-programming/qtnetwork.qdoc
+++ b/doc/src/network/network-programming/qtnetwork.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,8 +40,7 @@
\brief An Introduction to Network Programming with Qt
The QtNetwork module offers classes that allow you to write TCP/IP clients
- and servers. It offers classes such as QFtp that implement specific
- application-level protocols, lower-level classes such as QTcpSocket,
+ and servers. It offers lower-level classes such as QTcpSocket,
QTcpServer and QUdpSocket that represent low level network concepts,
and high level classes such as QNetworkRequest, QNetworkReply and
QNetworkAccessManager to perform network operations using common protocols.
@@ -92,64 +91,6 @@
Each application or library can create one or more instances of
QNetworkAccessManager to handle network communication.
- \section1 Writing FTP Clients with QFtp
-
- FTP (File Transfer Protocol) is a protocol used almost exclusively
- for browsing remote directories and for transferring files.
-
- \image httpstack.png FTP Client and Server
-
- FTP uses two network connections, one for sending
- commands and one for transferring data. The
- FTP protocol has a state and requires the client to send several
- commands before a file transfer takes place.
- FTP clients establish a connection
- and keeps it open throughout the session. In each session, multiple
- transfers can occur.
-
- The QFtp class provides client-side support for FTP.
- It has the following characteristics:
- \list
-
- \o \e{Non-blocking behavior.} QFtp is asynchronous.
- You can schedule a series of commands which are executed later,
- when control returns to Qt's event loop.
-
- \o \e{Command IDs.} Each command has a unique ID number that you
- can use to follow the execution of the command. For example, QFtp
- emits the \l{QFtp::commandStarted()}{commandStarted()} and
- \l{QFtp::commandFinished()}{commandFinished()} signal with the
- command ID for each command that is executed.
-
- \o \e{Data transfer progress indicators.} QFtp emits signals
- whenever data is transferred (QFtp::dataTransferProgress(),
- QNetworkReply::downloadProgress(), and
- QNetworkReply::uploadProgress()). You could connect these signals
- to QProgressBar::setProgress() or QProgressDialog::setProgress(),
- for example.
-
- \o \e{QIODevice support.} The class supports convenient
- uploading from and downloading to \l{QIODevice}s, in addition to a
- QByteArray-based API.
-
- \endlist
-
- There are two main ways of using QFtp. The most common
- approach is to keep track of the command IDs and follow the
- execution of every command by connecting to the appropriate
- signals. The other approach is to schedule all commands at once
- and only connect to the done() signal, which is emitted when all
- scheduled commands have been executed. The first approach
- requires more work, but it gives you more control over the
- execution of individual commands and allows you to initiate new
- commands based on the result of a previous command. It also
- enables you to provide detailed feedback to the user.
-
- The \l{network/qftp}{FTP} example
- illustrates how to write an FTP client.
- Writing your own FTP (or HTTP) server is possible using the
- lower-level classes QTcpSocket and QTcpServer.
-
\section1 Using TCP with QTcpSocket and QTcpServer
TCP (Transmission Control Protocol) is a low-level network
@@ -172,7 +113,7 @@
will then stop immediately.
QTcpSocket works asynchronously and emits signals to report status
- changes and errors, just like QNetworkAccessManager and QFtp. It
+ changes and errors, just like QNetworkAccessManager. It
relies on the event loop to detect incoming data and to
automatically flush outgoing data. You can write data to the
socket using QTcpSocket::write(), and read data using
diff --git a/doc/src/network/network-programming/ssl.qdoc b/doc/src/network/network-programming/ssl.qdoc
index 0bbcd8afb7..3b483b9924 100644
--- a/doc/src/network/network-programming/ssl.qdoc
+++ b/doc/src/network/network-programming/ssl.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/network/qtnetwork.qdoc b/doc/src/network/qtnetwork.qdoc
index afaa4653e7..2bfe8cb68e 100644
--- a/doc/src/network/qtnetwork.qdoc
+++ b/doc/src/network/qtnetwork.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/printsupport/printing.qdoc b/doc/src/printsupport/printing.qdoc
index c8d6efbc39..1dfa03db94 100644
--- a/doc/src/printsupport/printing.qdoc
+++ b/doc/src/printsupport/printing.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/printsupport/qtprintsupport.qdoc b/doc/src/printsupport/qtprintsupport.qdoc
index 2b313c2764..4119e3cb4b 100644
--- a/doc/src/printsupport/qtprintsupport.qdoc
+++ b/doc/src/printsupport/qtprintsupport.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/brush/brush.cpp b/doc/src/snippets/brush/brush.cpp
index 57a219242c..19466ae89f 100644
--- a/doc/src/snippets/brush/brush.cpp
+++ b/doc/src/snippets/brush/brush.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/brush/gradientcreationsnippet.cpp b/doc/src/snippets/brush/gradientcreationsnippet.cpp
index 783c4c249a..9ac8518b06 100644
--- a/doc/src/snippets/brush/gradientcreationsnippet.cpp
+++ b/doc/src/snippets/brush/gradientcreationsnippet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/buffer/buffer.cpp b/doc/src/snippets/buffer/buffer.cpp
index a5e91087cd..535db295d2 100644
--- a/doc/src/snippets/buffer/buffer.cpp
+++ b/doc/src/snippets/buffer/buffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_containers.cpp b/doc/src/snippets/code/doc_src_containers.cpp
index fa300f916b..2035a06b1d 100644
--- a/doc/src/snippets/code/doc_src_containers.cpp
+++ b/doc/src/snippets/code/doc_src_containers.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_coordsys.cpp b/doc/src/snippets/code/doc_src_coordsys.cpp
index 1ebb215941..a79af2f9ac 100644
--- a/doc/src/snippets/code/doc_src_coordsys.cpp
+++ b/doc/src/snippets/code/doc_src_coordsys.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_application.qdoc b/doc/src/snippets/code/doc_src_examples_application.qdoc
index 08e0747695..c124bb3c3a 100644
--- a/doc/src/snippets/code/doc_src_examples_application.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_application.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.cpp b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
index c834b9ff26..1301664697 100644
--- a/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
index ee3c36784f..972ad53ece 100644
--- a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_dropsite.qdoc b/doc/src/snippets/code/doc_src_examples_dropsite.qdoc
index d7bffc0227..478febaed4 100644
--- a/doc/src/snippets/code/doc_src_examples_dropsite.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_dropsite.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
index a69a7bf772..1f9d853a88 100644
--- a/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
+++ b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
index 9dbcb0af45..1373d4d8d3 100644
--- a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_icons.cpp b/doc/src/snippets/code/doc_src_examples_icons.cpp
index 411c49fb8d..91f028e4af 100644
--- a/doc/src/snippets/code/doc_src_examples_icons.cpp
+++ b/doc/src/snippets/code/doc_src_examples_icons.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_icons.qdoc b/doc/src/snippets/code/doc_src_examples_icons.qdoc
index 8ca57511f7..ba4a0045a5 100644
--- a/doc/src/snippets/code/doc_src_examples_icons.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_icons.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
index c86f8ace40..ac35aa436b 100644
--- a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
index 1870385de7..b89b26ad94 100644
--- a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp b/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
index 1abcdc21cc..b0d1beaff1 100644
--- a/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
+++ b/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc
index 1084d238e7..c207f3fec0 100644
--- a/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_svgalib.qdoc b/doc/src/snippets/code/doc_src_examples_svgalib.qdoc
index 3c34818662..49d66b0092 100644
--- a/doc/src/snippets/code/doc_src_examples_svgalib.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_svgalib.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_textfinder.pro b/doc/src/snippets/code/doc_src_examples_textfinder.pro
index cdc2366b57..28c5d542e2 100644
--- a/doc/src/snippets/code/doc_src_examples_textfinder.pro
+++ b/doc/src/snippets/code/doc_src_examples_textfinder.pro
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_examples_trollprint.cpp b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
index f7b8f48f3d..0ed2e686c5 100644
--- a/doc/src/snippets/code/doc_src_examples_trollprint.cpp
+++ b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_groups.cpp b/doc/src/snippets/code/doc_src_groups.cpp
index 2d5fd97280..168bd922ce 100644
--- a/doc/src/snippets/code/doc_src_groups.cpp
+++ b/doc/src/snippets/code/doc_src_groups.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_layout.cpp b/doc/src/snippets/code/doc_src_layout.cpp
index 47db36bb3a..8610fb5b0e 100644
--- a/doc/src/snippets/code/doc_src_layout.cpp
+++ b/doc/src/snippets/code/doc_src_layout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_objecttrees.cpp b/doc/src/snippets/code/doc_src_objecttrees.cpp
index cd92a49eea..67019f83e5 100644
--- a/doc/src/snippets/code/doc_src_objecttrees.cpp
+++ b/doc/src/snippets/code/doc_src_objecttrees.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_properties.cpp b/doc/src/snippets/code/doc_src_properties.cpp
index b5a103db0b..51af3d9038 100644
--- a/doc/src/snippets/code/doc_src_properties.cpp
+++ b/doc/src/snippets/code/doc_src_properties.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qalgorithms.cpp b/doc/src/snippets/code/doc_src_qalgorithms.cpp
index 0438105865..dab3b8930b 100644
--- a/doc/src/snippets/code/doc_src_qalgorithms.cpp
+++ b/doc/src/snippets/code/doc_src_qalgorithms.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qcache.cpp b/doc/src/snippets/code/doc_src_qcache.cpp
index 81fa3cf279..f44c194f29 100644
--- a/doc/src/snippets/code/doc_src_qcache.cpp
+++ b/doc/src/snippets/code/doc_src_qcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qiterator.cpp b/doc/src/snippets/code/doc_src_qiterator.cpp
index 82b1bd3429..6da868faa8 100644
--- a/doc/src/snippets/code/doc_src_qiterator.cpp
+++ b/doc/src/snippets/code/doc_src_qiterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qnamespace.cpp b/doc/src/snippets/code/doc_src_qnamespace.cpp
index c512862325..52318ceeda 100644
--- a/doc/src/snippets/code/doc_src_qnamespace.cpp
+++ b/doc/src/snippets/code/doc_src_qnamespace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qnamespace.qdoc b/doc/src/snippets/code/doc_src_qnamespace.qdoc
index 6b5ce6a41d..1bd7ad1d3f 100644
--- a/doc/src/snippets/code/doc_src_qnamespace.qdoc
+++ b/doc/src/snippets/code/doc_src_qnamespace.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qpair.cpp b/doc/src/snippets/code/doc_src_qpair.cpp
index a9a061e2c7..1482e06885 100644
--- a/doc/src/snippets/code/doc_src_qpair.cpp
+++ b/doc/src/snippets/code/doc_src_qpair.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qplugin.cpp b/doc/src/snippets/code/doc_src_qplugin.cpp
index fdacc08c3a..80fb178709 100644
--- a/doc/src/snippets/code/doc_src_qplugin.cpp
+++ b/doc/src/snippets/code/doc_src_qplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qplugin.pro b/doc/src/snippets/code/doc_src_qplugin.pro
index f3444e273a..1609b9c0d6 100644
--- a/doc/src/snippets/code/doc_src_qplugin.pro
+++ b/doc/src/snippets/code/doc_src_qplugin.pro
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qset.cpp b/doc/src/snippets/code/doc_src_qset.cpp
index 4a4953d452..1b88b02239 100644
--- a/doc/src/snippets/code/doc_src_qset.cpp
+++ b/doc/src/snippets/code/doc_src_qset.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qsignalspy.cpp b/doc/src/snippets/code/doc_src_qsignalspy.cpp
index 12462e2d74..bf6108eda9 100644
--- a/doc/src/snippets/code/doc_src_qsignalspy.cpp
+++ b/doc/src/snippets/code/doc_src_qsignalspy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp b/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
index d0c758e644..18c0c78271 100644
--- a/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
+++ b/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qt4-styles.cpp b/doc/src/snippets/code/doc_src_qt4-styles.cpp
index effe3cd561..98a0b241d8 100644
--- a/doc/src/snippets/code/doc_src_qt4-styles.cpp
+++ b/doc/src/snippets/code/doc_src_qt4-styles.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtcore.cpp b/doc/src/snippets/code/doc_src_qtcore.cpp
index 35916eacf1..e83f4dd454 100644
--- a/doc/src/snippets/code/doc_src_qtcore.cpp
+++ b/doc/src/snippets/code/doc_src_qtcore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtestevent.cpp b/doc/src/snippets/code/doc_src_qtestevent.cpp
index fd1c819ac0..c34742d3f1 100644
--- a/doc/src/snippets/code/doc_src_qtestevent.cpp
+++ b/doc/src/snippets/code/doc_src_qtestevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtgui.pro b/doc/src/snippets/code/doc_src_qtgui.pro
index dd3405c725..896c1d4044 100644
--- a/doc/src/snippets/code/doc_src_qtgui.pro
+++ b/doc/src/snippets/code/doc_src_qtgui.pro
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.cpp b/doc/src/snippets/code/doc_src_qtnetwork.cpp
index 7100f1a750..8f1a2c7545 100644
--- a/doc/src/snippets/code/doc_src_qtnetwork.cpp
+++ b/doc/src/snippets/code/doc_src_qtnetwork.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.pro b/doc/src/snippets/code/doc_src_qtnetwork.pro
index f6c3a5ae7d..35044761a5 100644
--- a/doc/src/snippets/code/doc_src_qtnetwork.pro
+++ b/doc/src/snippets/code/doc_src_qtnetwork.pro
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtsql.cpp b/doc/src/snippets/code/doc_src_qtsql.cpp
index 9c0c16e14b..5213857d03 100644
--- a/doc/src/snippets/code/doc_src_qtsql.cpp
+++ b/doc/src/snippets/code/doc_src_qtsql.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtsql.pro b/doc/src/snippets/code/doc_src_qtsql.pro
index 4e31846735..7bab18bdd9 100644
--- a/doc/src/snippets/code/doc_src_qtsql.pro
+++ b/doc/src/snippets/code/doc_src_qtsql.pro
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtxml.cpp b/doc/src/snippets/code/doc_src_qtxml.cpp
index 5413fd2ccf..f79a144655 100644
--- a/doc/src/snippets/code/doc_src_qtxml.cpp
+++ b/doc/src/snippets/code/doc_src_qtxml.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qtxml.pro b/doc/src/snippets/code/doc_src_qtxml.pro
index d69b2ceadd..a3b9d47f4b 100644
--- a/doc/src/snippets/code/doc_src_qtxml.pro
+++ b/doc/src/snippets/code/doc_src_qtxml.pro
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_qvarlengtharray.cpp b/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
index a9383301f5..af6794056f 100644
--- a/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
+++ b/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_resources.cpp b/doc/src/snippets/code/doc_src_resources.cpp
index b965cbeb29..6ac8295827 100644
--- a/doc/src/snippets/code/doc_src_resources.cpp
+++ b/doc/src/snippets/code/doc_src_resources.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_resources.qdoc b/doc/src/snippets/code/doc_src_resources.qdoc
index 0b727da461..3bdfaf06a4 100644
--- a/doc/src/snippets/code/doc_src_resources.qdoc
+++ b/doc/src/snippets/code/doc_src_resources.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_sql-driver.cpp b/doc/src/snippets/code/doc_src_sql-driver.cpp
index 56e4f9bcdb..3da646b486 100644
--- a/doc/src/snippets/code/doc_src_sql-driver.cpp
+++ b/doc/src/snippets/code/doc_src_sql-driver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_sql-driver.qdoc b/doc/src/snippets/code/doc_src_sql-driver.qdoc
index 46cd1b3f3e..8773372736 100644
--- a/doc/src/snippets/code/doc_src_sql-driver.qdoc
+++ b/doc/src/snippets/code/doc_src_sql-driver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_styles.cpp b/doc/src/snippets/code/doc_src_styles.cpp
index a2a6fa9694..dbfd5c7253 100644
--- a/doc/src/snippets/code/doc_src_styles.cpp
+++ b/doc/src/snippets/code/doc_src_styles.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_stylesheet.cpp b/doc/src/snippets/code/doc_src_stylesheet.cpp
index 3faaf2d037..2e651a1bc1 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.cpp
+++ b/doc/src/snippets/code/doc_src_stylesheet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc
index 99b31c9387..b0fd441d03 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.qdoc
+++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp b/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
index d7b982758b..a3f3cfd3d4 100644
--- a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
+++ b/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp b/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
index 623c526f7b..8c461f453a 100644
--- a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
+++ b/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp b/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
index 31e240ad35..87b40ff575 100644
--- a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
+++ b/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp b/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
index 698c0b652e..93e3dfd52e 100644
--- a/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
+++ b/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp b/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
index 684884f400..d0ad958e8b 100644
--- a/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
+++ b/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
index 7e106bfb9c..09cb3efe1e 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
index 291e2f4f4e..505c83a1b8 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
index 9f12e936fc..bbf7dbd471 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
index 85f3551b62..702abe15a5 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
index d18f1e5165..69a69a321f 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
index c48ce1e6ae..239c0292df 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
index 11f5163f50..5eddbca22a 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,7 +76,7 @@ QString result = future.result();
//! [4]
// call 'QList<QByteArray> QByteArray::split(char sep) const' in a separate thread
QByteArray bytearray = "hello world";
-QFuture<QList<QByteArray> > future = QtConcurrent::run(bytearray, &QByteArray::split), ',');
+QFuture<QList<QByteArray> > future = QtConcurrent::run(bytearray, &QByteArray::split, ',');
...
QList<QByteArray> result = future.result();
//! [4]
@@ -84,7 +84,7 @@ QList<QByteArray> result = future.result();
//! [5]
// call 'void QImage::invertPixels(InvertMode mode)' in a separate thread
QImage image = ...;
-QFuture<void> future = QtConcurrent::run(image, &QImage::invertPixels, QImage::InvertRgba);
+QFuture<void> future = QtConcurrent::run(&image, &QImage::invertPixels, QImage::InvertRgba);
...
future.waitForFinished();
// At this point, the pixels in 'image' have been inverted
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp b/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
index 6262cb1a11..a0bdd9334d 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
+++ b/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
index c79a714192..84ec44ba60 100644
--- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp
+++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp b/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
index 74ef79fa87..96b9aa2d89 100644
--- a/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qdatastream.cpp b/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
index cd9632c885..2f7b6f9b73 100644
--- a/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qdir.cpp b/doc/src/snippets/code/src_corelib_io_qdir.cpp
index 51262f711c..801f868195 100644
--- a/doc/src/snippets/code/src_corelib_io_qdir.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qdir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp b/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
index e7a93d4021..5b611bb6e5 100644
--- a/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qfile.cpp b/doc/src/snippets/code/src_corelib_io_qfile.cpp
index 158971e9ca..d873ca43ab 100644
--- a/doc/src/snippets/code/src_corelib_io_qfile.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
index 85e00052f7..1e32f83f05 100644
--- a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qiodevice.cpp b/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
index 1e2a976c77..5ba01a4d8f 100644
--- a/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qprocess.cpp b/doc/src/snippets/code/src_corelib_io_qprocess.cpp
index 64fb17a7c7..75d5a8fbe6 100644
--- a/doc/src/snippets/code/src_corelib_io_qprocess.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qprocess.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qsettings.cpp b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
index 064cf2cf34..17597f5131 100644
--- a/doc/src/snippets/code/src_corelib_io_qsettings.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qtemporarydir.cpp b/doc/src/snippets/code/src_corelib_io_qtemporarydir.cpp
index 4cdc54a6c4..11f9a07346 100644
--- a/doc/src/snippets/code/src_corelib_io_qtemporarydir.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qtemporarydir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp b/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
index 1fb1ccd77d..bdcfbf9c4d 100644
--- a/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qtextstream.cpp b/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
index b3483a9b10..8028132ad9 100644
--- a/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_io_qurl.cpp b/doc/src/snippets/code/src_corelib_io_qurl.cpp
index 18f36da9f4..98d8e37ebd 100644
--- a/doc/src/snippets/code/src_corelib_io_qurl.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qurl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -62,8 +62,8 @@ bool checkUrl(const QUrl &url) {
//! [3]
-QFtp ftp;
-ftp.connectToHost(url.host(), url.port(21));
+QTcpSocket sock;
+sock.connectToHost(url.host(), url.port(80));
//! [3]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
index 8f0a5c7ec8..c63b405203 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
index 5919c01085..d39271cccd 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
index 0e6c16f6de..0deb5db7f1 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
index 86bad5e825..9683f2ce57 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
index eb913f4231..89ac8add0b 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp b/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
index fcfc662f45..481dc1fe90 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
index b6d0e39ab0..fad0ef7dfe 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp b/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
index 1f5c5acda4..32a7bdd706 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp b/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
index ef06fd84b2..2e5b4f4cea 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
index 8b1bcbf41d..fd87d6c926 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp b/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
index 8943e92475..1e4f8b66cc 100644
--- a/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
+++ b/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_plugin_quuid.cpp b/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
index 88cdb54515..7deb859acf 100644
--- a/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
+++ b/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
index 9909b1b6e2..e56a8fa214 100644
--- a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
+++ b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qatomic.cpp b/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
index a70c187b7d..d43a6fed77 100644
--- a/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
index 7800a4da2d..b52709c5ce 100644
--- a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp b/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
index 5163fe54f8..c361946133 100644
--- a/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
index 9b325a785d..c0a5f60416 100644
--- a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp b/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
index 72a15dee2c..023e094216 100644
--- a/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qthread.cpp b/doc/src/snippets/code/src_corelib_thread_qthread.cpp
index 2b2422f7de..fd0dbdeb06 100644
--- a/doc/src/snippets/code/src_corelib_thread_qthread.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp b/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
index 49574cb36d..ad940b2edf 100644
--- a/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
+++ b/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp b/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
index 11621dcf92..5e780ad338 100644
--- a/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
index 4f3d8dda91..9b717249ba 100644
--- a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp b/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
index 3c53394a3b..56cc1dea5c 100644
--- a/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp b/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp
index 59ae1b551c..ebfeebb891 100644
--- a/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qeasingcurve.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qhash.cpp b/doc/src/snippets/code/src_corelib_tools_qhash.cpp
index a6bedb957e..7c3fc25a76 100644
--- a/doc/src/snippets/code/src_corelib_tools_qhash.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qhash.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp b/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
index 2bfafc81b4..cbb338461a 100644
--- a/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
index f580ba1940..7d939fdd79 100644
--- a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qlocale.cpp b/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
index 674b6f6313..4d41bf3822 100644
--- a/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qmap.cpp b/doc/src/snippets/code/src_corelib_tools_qmap.cpp
index 13715435f1..2242feb2af 100644
--- a/doc/src/snippets/code/src_corelib_tools_qmap.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qpoint.cpp b/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
index f5c6ec996c..5025fe6dbc 100644
--- a/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qqueue.cpp b/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
index 6b5509aa1a..dcf916f1f6 100644
--- a/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qrect.cpp b/doc/src/snippets/code/src_corelib_tools_qrect.cpp
index 3a3d0deec0..d8206da2d5 100644
--- a/doc/src/snippets/code/src_corelib_tools_qrect.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qrect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qregexp.cpp b/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
index ccb6382723..4756030f58 100644
--- a/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
index be28d56eb2..300da70f22 100644
--- a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qsize.cpp b/doc/src/snippets/code/src_corelib_tools_qsize.cpp
index 701627eb20..935cfdf232 100644
--- a/doc/src/snippets/code/src_corelib_tools_qsize.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qsize.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qstring.cpp b/doc/src/snippets/code/src_corelib_tools_qstring.cpp
index 4a43ac0f77..72361c9169 100644
--- a/doc/src/snippets/code/src_corelib_tools_qstring.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qstring.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp b/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
index 3374995bb2..9d0e0f2da7 100644
--- a/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_tools_qvector.cpp b/doc/src/snippets/code/src_corelib_tools_qvector.cpp
index fc46d913d3..b2c05eb478 100644
--- a/doc/src/snippets/code/src_corelib_tools_qvector.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qvector.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp b/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
index fe08cea4c9..5e781d770b 100644
--- a/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
+++ b/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
index 84eb1cd1ac..a3af95082a 100644
--- a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
+++ b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
index bc5d296e07..f4a042b27f 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
+++ b/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
index ef14632437..e8e379575f 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
+++ b/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
index ef906d7e7e..d6a3dfec61 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
+++ b/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp b/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp
index 7db6e264ae..196f995a1e 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp
+++ b/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp b/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
index 0a8c033a26..6832a87cc4 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
+++ b/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
index 1fa1717fd6..3668734694 100644
--- a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
+++ b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
index 38d17e8033..def46ebdcb 100644
--- a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
+++ b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
index 31db87037a..fe2cf77ef5 100644
--- a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
+++ b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp
index dc5a77300f..4ceada7606 100644
--- a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp
+++ b/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp
index cb902e5ed4..5becd28c8a 100644
--- a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp
+++ b/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp
index 0d5294be08..461c893623 100644
--- a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp
+++ b/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
index defa56a9e2..a7998759bc 100644
--- a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
+++ b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
index fb4178bda0..0224eade12 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
index c4cf674995..ac069815a4 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
index 492827a9d1..55765085e1 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
index 470b1505da..da56f20fc5 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
index 383a8efbb7..d139507e56 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
index 9ad042bc82..b114ec7303 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
index 0fffc4be40..498c475add 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
index aed1787984..f85aa2f53c 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qbitmap.cpp b/doc/src/snippets/code/src_gui_image_qbitmap.cpp
index 7b388433b5..8abb2c09c1 100644
--- a/doc/src/snippets/code/src_gui_image_qbitmap.cpp
+++ b/doc/src/snippets/code/src_gui_image_qbitmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qicon.cpp b/doc/src/snippets/code/src_gui_image_qicon.cpp
index cf6469eaae..10464ee1fa 100644
--- a/doc/src/snippets/code/src_gui_image_qicon.cpp
+++ b/doc/src/snippets/code/src_gui_image_qicon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qimage.cpp b/doc/src/snippets/code/src_gui_image_qimage.cpp
index cbfdf14cc1..8b69a7adee 100644
--- a/doc/src/snippets/code/src_gui_image_qimage.cpp
+++ b/doc/src/snippets/code/src_gui_image_qimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qimagereader.cpp b/doc/src/snippets/code/src_gui_image_qimagereader.cpp
index f4c64c165f..c3c44f26ad 100644
--- a/doc/src/snippets/code/src_gui_image_qimagereader.cpp
+++ b/doc/src/snippets/code/src_gui_image_qimagereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp b/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
index e44442ba7e..7379320e4d 100644
--- a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
+++ b/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qmovie.cpp b/doc/src/snippets/code/src_gui_image_qmovie.cpp
index 4efbac52b9..903f0d313b 100644
--- a/doc/src/snippets/code/src_gui_image_qmovie.cpp
+++ b/doc/src/snippets/code/src_gui_image_qmovie.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qpixmap.cpp b/doc/src/snippets/code/src_gui_image_qpixmap.cpp
index 11e021201d..cd5f126639 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmap.cpp
+++ b/doc/src/snippets/code/src_gui_image_qpixmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
index 08973b851d..39c0b17042 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
+++ b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp b/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
index 2d9c78f579..aa48e70125 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
+++ b/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp b/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
index 75ada3acd2..e011b841b1 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp b/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
index a3b90e2c1e..945111c6b3 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp b/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
index bef6711da0..233511bc28 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
index 1277506cd0..87bda3365f 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
index 6005179843..d9dd951a40 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp b/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
index 4035ca8e13..a7983b618c 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp b/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
index 4f5bc37d36..a72139f7fd 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
+++ b/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qaction.cpp b/doc/src/snippets/code/src_gui_kernel_qaction.cpp
index bfc613b36e..0591c01cc8 100644
--- a/doc/src/snippets/code/src_gui_kernel_qaction.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qaction.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
index bb0cdde200..649068719f 100644
--- a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
index a73f65de62..f36ce640c1 100644
--- a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp b/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
index dd052d790b..c8414abf8a 100644
--- a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qevent.cpp b/doc/src/snippets/code/src_gui_kernel_qevent.cpp
index d0627b2b44..1874e836b9 100644
--- a/doc/src/snippets/code/src_gui_kernel_qevent.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp b/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
index 94e6b1bd90..b27b007eff 100644
--- a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp b/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
index 1672dc7e85..8350170b0d 100644
--- a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp b/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
index 35da7cd89e..eb5bedc4d5 100644
--- a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp b/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
index 306b822bdf..cf706c1a9b 100644
--- a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp b/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
index 16bdda8799..35e9aa0a69 100644
--- a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp b/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
index db8edb46f3..99caa909b4 100644
--- a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qsound.cpp b/doc/src/snippets/code/src_gui_kernel_qsound.cpp
index ebaeead9cb..0a68fd37bb 100644
--- a/doc/src/snippets/code/src_gui_kernel_qsound.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qsound.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp b/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
index d142d56a1a..6cfb9bdf34 100644
--- a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qbrush.cpp b/doc/src/snippets/code/src_gui_painting_qbrush.cpp
index c2ce61ea35..383433bd6a 100644
--- a/doc/src/snippets/code/src_gui_painting_qbrush.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qbrush.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qcolor.cpp b/doc/src/snippets/code/src_gui_painting_qcolor.cpp
index 31434f2d96..0334235e02 100644
--- a/doc/src/snippets/code/src_gui_painting_qcolor.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qcolor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp b/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
index 6822d818ae..d498802301 100644
--- a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp b/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
index 63dfd6d493..afc1c79128 100644
--- a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qpainter.cpp b/doc/src/snippets/code/src_gui_painting_qpainter.cpp
index da566ed43a..048ea4404e 100644
--- a/doc/src/snippets/code/src_gui_painting_qpainter.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qpainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp b/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
index b2a9dcf5c7..3cf2d64b91 100644
--- a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qpen.cpp b/doc/src/snippets/code/src_gui_painting_qpen.cpp
index 8674516fbc..68b2be7592 100644
--- a/doc/src/snippets/code/src_gui_painting_qpen.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qpen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qregion.cpp b/doc/src/snippets/code/src_gui_painting_qregion.cpp
index 660138d461..ef52660a36 100644
--- a/doc/src/snippets/code/src_gui_painting_qregion.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qregion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
index 2eddeea506..c239d84a11 100644
--- a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_painting_qtransform.cpp b/doc/src/snippets/code/src_gui_painting_qtransform.cpp
index 24b1a359e1..bf379200dd 100644
--- a/doc/src/snippets/code/src_gui_painting_qtransform.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qtransform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp b/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp
index e3b537a9c2..191bb8e4ea 100644
--- a/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp
+++ b/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_qproxystyle.cpp b/doc/src/snippets/code/src_gui_qproxystyle.cpp
index b4cd0b65d0..bdb64572d5 100644
--- a/doc/src/snippets/code/src_gui_qproxystyle.cpp
+++ b/doc/src/snippets/code/src_gui_qproxystyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_styles_qstyle.cpp b/doc/src/snippets/code/src_gui_styles_qstyle.cpp
index 40fb230c02..f6471db89b 100644
--- a/doc/src/snippets/code/src_gui_styles_qstyle.cpp
+++ b/doc/src/snippets/code/src_gui_styles_qstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp b/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
index ba65d3f5ea..9cbecace8f 100644
--- a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
+++ b/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_text_qfont.cpp b/doc/src/snippets/code/src_gui_text_qfont.cpp
index 5694d6aab0..5c432cf11e 100644
--- a/doc/src/snippets/code/src_gui_text_qfont.cpp
+++ b/doc/src/snippets/code/src_gui_text_qfont.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp b/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
index 3be333d22a..929957cced 100644
--- a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
+++ b/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
index a273f333a5..64068a48a2 100644
--- a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
+++ b/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp b/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
index 9e99c4b676..9ce2566f53 100644
--- a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
+++ b/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp b/doc/src/snippets/code/src_gui_text_qtextdocument.cpp
index 8165086d09..299967adbf 100644
--- a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp
+++ b/doc/src/snippets/code/src_gui_text_qtextdocument.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
index feb5219c1a..9f51f071e4 100644
--- a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
+++ b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_util_qcompleter.cpp b/doc/src/snippets/code/src_gui_util_qcompleter.cpp
index bfc1b54cbd..7d903aa72a 100644
--- a/doc/src/snippets/code/src_gui_util_qcompleter.cpp
+++ b/doc/src/snippets/code/src_gui_util_qcompleter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
index c878b71b6c..885268a7ac 100644
--- a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
+++ b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_util_qundostack.cpp b/doc/src/snippets/code/src_gui_util_qundostack.cpp
index 2eccd71015..f022d963ad 100644
--- a/doc/src/snippets/code/src_gui_util_qundostack.cpp
+++ b/doc/src/snippets/code/src_gui_util_qundostack.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp b/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
index 3bfe1d2aaa..073f49bf31 100644
--- a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp b/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
index 3a73308e63..c35ca00916 100644
--- a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp b/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
index 336a4064b5..9b4bf904fa 100644
--- a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp b/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
index 785d0cfd93..f2e03f04aa 100644
--- a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
index 73253f79f1..2d0f69634a 100644
--- a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp b/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
index fd1d81769b..15f7de40f1 100644
--- a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qframe.cpp b/doc/src/snippets/code/src_gui_widgets_qframe.cpp
index 5fb45c1f77..b2c56b2e18 100644
--- a/doc/src/snippets/code/src_gui_widgets_qframe.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qframe.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp b/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
index 0f4a5b8afa..9242a849fa 100644
--- a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp b/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
index cda00fa349..80f24f779a 100644
--- a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp b/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
index 7b9e183703..40b11e408a 100644
--- a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp b/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
index d465c7013d..4d631217be 100644
--- a/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp b/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
index f2dd1ccf52..332725a6f3 100644
--- a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp b/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
index 98eafb4239..a1d24e5c35 100644
--- a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp b/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
index 4b0219d68c..93c077adf2 100644
--- a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp b/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
index 099d087dcb..36c490a291 100644
--- a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp b/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
index 3dc031c383..7b29d18cbd 100644
--- a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp b/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
index 3289344c43..c0bfc3331a 100644
--- a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp b/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
index 64f8d293df..25f20ad6ab 100644
--- a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp b/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
index d4022d790e..ff88a52b35 100644
--- a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp b/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
index c8ee298c78..17bd6f8536 100644
--- a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp b/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
index 05f907a7e6..3fdc5d4eb1 100644
--- a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp b/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
index 12e962c970..6fdc7980c9 100644
--- a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp b/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
index 8ad9deb4ea..4078b3bd6b 100644
--- a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp b/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
index 5ee24a04d3..8284247cc3 100644
--- a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp b/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp
index 4a104ddc33..bcdfb0b5aa 100644
--- a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp b/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
index fd1a43bf13..22ac81afab 100644
--- a/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
+++ b/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qftp.cpp b/doc/src/snippets/code/src_network_access_qftp.cpp
index 621d10de0b..b6047185aa 100644
--- a/doc/src/snippets/code/src_network_access_qftp.cpp
+++ b/doc/src/snippets/code/src_network_access_qftp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qhttp.cpp b/doc/src/snippets/code/src_network_access_qhttp.cpp
index 374f1f2121..1922563f62 100644
--- a/doc/src/snippets/code/src_network_access_qhttp.cpp
+++ b/doc/src/snippets/code/src_network_access_qhttp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qhttpmultipart.cpp b/doc/src/snippets/code/src_network_access_qhttpmultipart.cpp
index 7c2e0ac633..2b6032316b 100644
--- a/doc/src/snippets/code/src_network_access_qhttpmultipart.cpp
+++ b/doc/src/snippets/code/src_network_access_qhttpmultipart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qhttppart.cpp b/doc/src/snippets/code/src_network_access_qhttppart.cpp
index e70fead992..3a16253d81 100644
--- a/doc/src/snippets/code/src_network_access_qhttppart.cpp
+++ b/doc/src/snippets/code/src_network_access_qhttppart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
index 327d58f226..c8818e94c4 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
+++ b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp b/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
index 8d775bb20e..2a0b5a62f9 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
+++ b/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp
index 01f66bc63c..90d26f900b 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp
+++ b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp b/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
index 685eb0c3bc..75da0909db 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
+++ b/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp b/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
index af1a3e84df..19d103a60d 100644
--- a/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
+++ b/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp b/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
index bd203862c9..8f5524ef7c 100644
--- a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
+++ b/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
index 97d58ef32c..585e8a46c3 100644
--- a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
+++ b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp b/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
index 393674c6f1..2eb9b19edc 100644
--- a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
+++ b/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp b/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
index 8021b80733..2170f9b17f 100644
--- a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
+++ b/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
index 9a6e5c2830..ddc9174d5b 100644
--- a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
+++ b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp b/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
index 85cf4d7a62..2f72f12887 100644
--- a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
+++ b/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp b/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
index 6dca8b6054..6be3a5c110 100644
--- a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
+++ b/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp b/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
index 47f00b6b45..e087831c71 100644
--- a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
+++ b/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
index 679f41e1b4..c64fce45ee 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
+++ b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp b/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
index 96fe1afdd5..b15463c964 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
+++ b/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
index d415bae034..24365a3005 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
+++ b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -47,7 +47,7 @@ socket->connectToHostEncrypted("imap.example.com", 993);
//! [1]
-void SslServer::incomingConnection(int socketDescriptor)
+void SslServer::incomingConnection(qintptr socketDescriptor)
{
QSslSocket *serverSocket = new QSslSocket;
if (serverSocket->setSocketDescriptor(socketDescriptor)) {
diff --git a/doc/src/snippets/code/src_opengl_qgl.cpp b/doc/src/snippets/code/src_opengl_qgl.cpp
index 6ef049ac90..98c1fc08c2 100644
--- a/doc/src/snippets/code/src_opengl_qgl.cpp
+++ b/doc/src/snippets/code/src_opengl_qgl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/doc/src/snippets/code/src_opengl_qglcolormap.cpp
index 3bd780ba45..9371700c1f 100644
--- a/doc/src/snippets/code/src_opengl_qglcolormap.cpp
+++ b/doc/src/snippets/code/src_opengl_qglcolormap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp b/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
index 6825ebfab8..89593484c2 100644
--- a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
+++ b/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
index 812adf967f..634412a078 100644
--- a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp b/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp
index ba1b902a7a..be378bfd44 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp
+++ b/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp b/doc/src/snippets/code/src_qdbus_qdbusargument.cpp
index 125dc332a9..4ee70a69ec 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp
+++ b/doc/src/snippets/code/src_qdbus_qdbusargument.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp b/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp
index 312b8bb545..040afa59da 100644
--- a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp
+++ b/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp b/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp
index 425a736d28..1cd7afe304 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp
+++ b/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp b/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp
index 3774c10643..6013fcb16c 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp
+++ b/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp b/doc/src/snippets/code/src_qdbus_qdbusreply.cpp
index 2e6b33a6bd..ea8048070b 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp
+++ b/doc/src/snippets/code/src_qdbus_qdbusreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
index b5f1a51464..cf872b1245 100644
--- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
+++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp
index 50ea67c104..4316b04324 100644
--- a/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp
+++ b/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
index d49b6e0e19..9e695b8361 100644
--- a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
+++ b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
index cb45abf336..38a9f6a31f 100644
--- a/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
index bf04f2befb..f86fb3b68b 100644
--- a/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
index c739a9f499..c4861f4e9e 100644
--- a/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
index 96bb9fbbae..d267a7bb02 100644
--- a/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp b/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
index 0d85803dc0..3bf255f626 100644
--- a/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
+++ b/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_xml_dom_qdom.cpp b/doc/src/snippets/code/src_xml_dom_qdom.cpp
index e49bcf40ee..f25879879e 100644
--- a/doc/src/snippets/code/src_xml_dom_qdom.cpp
+++ b/doc/src/snippets/code/src_xml_dom_qdom.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/code/src_xml_sax_qxml.cpp b/doc/src/snippets/code/src_xml_sax_qxml.cpp
index 7cd7a33b76..45e489d48d 100644
--- a/doc/src/snippets/code/src_xml_sax_qxml.cpp
+++ b/doc/src/snippets/code/src_xml_sax_qxml.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/customstyle/customstyle.cpp b/doc/src/snippets/customstyle/customstyle.cpp
index b2e90722f2..d9f6e53024 100644
--- a/doc/src/snippets/customstyle/customstyle.cpp
+++ b/doc/src/snippets/customstyle/customstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/customstyle/customstyle.h b/doc/src/snippets/customstyle/customstyle.h
index 6a87d75421..9d695fdab7 100644
--- a/doc/src/snippets/customstyle/customstyle.h
+++ b/doc/src/snippets/customstyle/customstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/customviewstyle.cpp b/doc/src/snippets/customviewstyle.cpp
index b040f7563e..18f61f98fa 100644
--- a/doc/src/snippets/customviewstyle.cpp
+++ b/doc/src/snippets/customviewstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/dialogs/dialogs.cpp b/doc/src/snippets/dialogs/dialogs.cpp
index de9a2d1e04..b31557c554 100644
--- a/doc/src/snippets/dialogs/dialogs.cpp
+++ b/doc/src/snippets/dialogs/dialogs.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/dockwidgets/mainwindow.cpp b/doc/src/snippets/dockwidgets/mainwindow.cpp
index 10b7531ec4..d820ee330b 100644
--- a/doc/src/snippets/dockwidgets/mainwindow.cpp
+++ b/doc/src/snippets/dockwidgets/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/dragging/mainwindow.cpp b/doc/src/snippets/dragging/mainwindow.cpp
index 0b3f64213a..6fc87810bc 100644
--- a/doc/src/snippets/dragging/mainwindow.cpp
+++ b/doc/src/snippets/dragging/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/droparea.cpp b/doc/src/snippets/droparea.cpp
index 6556f05bf0..ed614e1389 100644
--- a/doc/src/snippets/droparea.cpp
+++ b/doc/src/snippets/droparea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/file/file.cpp b/doc/src/snippets/file/file.cpp
index ede4aa97d2..bf1a298595 100644
--- a/doc/src/snippets/file/file.cpp
+++ b/doc/src/snippets/file/file.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/filedialogurls.cpp b/doc/src/snippets/filedialogurls.cpp
index 2b6cdaaba8..b6e33a8d5b 100644
--- a/doc/src/snippets/filedialogurls.cpp
+++ b/doc/src/snippets/filedialogurls.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/fileinfo/main.cpp b/doc/src/snippets/fileinfo/main.cpp
index d0fc9f54dd..7162da7ba7 100644
--- a/doc/src/snippets/fileinfo/main.cpp
+++ b/doc/src/snippets/fileinfo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/graphicssceneadditemsnippet.cpp b/doc/src/snippets/graphicssceneadditemsnippet.cpp
index 2c2c0d01a8..f0c2bb6bd2 100644
--- a/doc/src/snippets/graphicssceneadditemsnippet.cpp
+++ b/doc/src/snippets/graphicssceneadditemsnippet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/image/image.cpp b/doc/src/snippets/image/image.cpp
index 62d83089d3..d89aa818b6 100644
--- a/doc/src/snippets/image/image.cpp
+++ b/doc/src/snippets/image/image.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/image/supportedformat.cpp b/doc/src/snippets/image/supportedformat.cpp
index 55800d33f3..b9aede2def 100644
--- a/doc/src/snippets/image/supportedformat.cpp
+++ b/doc/src/snippets/image/supportedformat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/javastyle.cpp b/doc/src/snippets/javastyle.cpp
index 1cf7e5560d..e64b89b366 100644
--- a/doc/src/snippets/javastyle.cpp
+++ b/doc/src/snippets/javastyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/layouts/layouts.cpp b/doc/src/snippets/layouts/layouts.cpp
index 2fdde84990..2fce924e87 100644
--- a/doc/src/snippets/layouts/layouts.cpp
+++ b/doc/src/snippets/layouts/layouts.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/mainwindowsnippet.cpp b/doc/src/snippets/mainwindowsnippet.cpp
index 70e638e7af..c090636b76 100644
--- a/doc/src/snippets/mainwindowsnippet.cpp
+++ b/doc/src/snippets/mainwindowsnippet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/matrix/matrix.cpp b/doc/src/snippets/matrix/matrix.cpp
index c7eb0b5943..43d50cd0d1 100644
--- a/doc/src/snippets/matrix/matrix.cpp
+++ b/doc/src/snippets/matrix/matrix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/mdiareasnippets.cpp b/doc/src/snippets/mdiareasnippets.cpp
index 9d626a3f8d..1928ddd254 100644
--- a/doc/src/snippets/mdiareasnippets.cpp
+++ b/doc/src/snippets/mdiareasnippets.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/myscrollarea.cpp b/doc/src/snippets/myscrollarea.cpp
index 9a41ed84d5..ed27fc6119 100644
--- a/doc/src/snippets/myscrollarea.cpp
+++ b/doc/src/snippets/myscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/network/tcpwait.cpp b/doc/src/snippets/network/tcpwait.cpp
index 02cecb4f87..4d1c3525b2 100644
--- a/doc/src/snippets/network/tcpwait.cpp
+++ b/doc/src/snippets/network/tcpwait.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/ntfsp.cpp b/doc/src/snippets/ntfsp.cpp
index 5d457124b2..b7cf337aae 100644
--- a/doc/src/snippets/ntfsp.cpp
+++ b/doc/src/snippets/ntfsp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/picture/picture.cpp b/doc/src/snippets/picture/picture.cpp
index 3cead763e1..a0a68ff633 100644
--- a/doc/src/snippets/picture/picture.cpp
+++ b/doc/src/snippets/picture/picture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/pointer/pointer.cpp b/doc/src/snippets/pointer/pointer.cpp
index b4ff3839cb..270ae0c18f 100644
--- a/doc/src/snippets/pointer/pointer.cpp
+++ b/doc/src/snippets/pointer/pointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/polygon/polygon.cpp b/doc/src/snippets/polygon/polygon.cpp
index 8b81db668d..30e2ec6ce4 100644
--- a/doc/src/snippets/polygon/polygon.cpp
+++ b/doc/src/snippets/polygon/polygon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/printing-qprinter/errors.cpp b/doc/src/snippets/printing-qprinter/errors.cpp
index ff3ea9053e..b850dd3e9b 100644
--- a/doc/src/snippets/printing-qprinter/errors.cpp
+++ b/doc/src/snippets/printing-qprinter/errors.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/printing-qprinter/object.cpp b/doc/src/snippets/printing-qprinter/object.cpp
index 0ee8dbdc56..99434bb6ce 100644
--- a/doc/src/snippets/printing-qprinter/object.cpp
+++ b/doc/src/snippets/printing-qprinter/object.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/process/process.cpp b/doc/src/snippets/process/process.cpp
index a545b734bf..3e14ab0fb1 100644
--- a/doc/src/snippets/process/process.cpp
+++ b/doc/src/snippets/process/process.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp b/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp
index 1ab3488780..7380923ef4 100644
--- a/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp
+++ b/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qdebug/qdebugsnippet.cpp b/doc/src/snippets/qdebug/qdebugsnippet.cpp
index 8e668d1736..542bb0d322 100644
--- a/doc/src/snippets/qdebug/qdebugsnippet.cpp
+++ b/doc/src/snippets/qdebug/qdebugsnippet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qdir-listfiles/main.cpp b/doc/src/snippets/qdir-listfiles/main.cpp
index cdce0d545a..3cbb20240f 100644
--- a/doc/src/snippets/qdir-listfiles/main.cpp
+++ b/doc/src/snippets/qdir-listfiles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qdir-namefilters/main.cpp b/doc/src/snippets/qdir-namefilters/main.cpp
index a72bab1d0a..952b3cf967 100644
--- a/doc/src/snippets/qdir-namefilters/main.cpp
+++ b/doc/src/snippets/qdir-namefilters/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qelapsedtimer/main.cpp b/doc/src/snippets/qelapsedtimer/main.cpp
index 3e5b520f57..4b503cac0f 100644
--- a/doc/src/snippets/qelapsedtimer/main.cpp
+++ b/doc/src/snippets/qelapsedtimer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qfontdatabase/main.cpp b/doc/src/snippets/qfontdatabase/main.cpp
index 24ed688001..c54eb1cf09 100644
--- a/doc/src/snippets/qfontdatabase/main.cpp
+++ b/doc/src/snippets/qfontdatabase/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qlistwidget-using/mainwindow.cpp b/doc/src/snippets/qlistwidget-using/mainwindow.cpp
index 0ec9c70ed3..ec770953c8 100644
--- a/doc/src/snippets/qlistwidget-using/mainwindow.cpp
+++ b/doc/src/snippets/qlistwidget-using/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qmacnativewidget/main.mm b/doc/src/snippets/qmacnativewidget/main.mm
index f83adeff23..53ff104dd9 100644
--- a/doc/src/snippets/qmacnativewidget/main.mm
+++ b/doc/src/snippets/qmacnativewidget/main.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qmetaobject-invokable/main.cpp b/doc/src/snippets/qmetaobject-invokable/main.cpp
index 0ad98737a9..220e49a12e 100644
--- a/doc/src/snippets/qmetaobject-invokable/main.cpp
+++ b/doc/src/snippets/qmetaobject-invokable/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qmetaobject-invokable/window.cpp b/doc/src/snippets/qmetaobject-invokable/window.cpp
index 4d9103ccc6..4fd64c5339 100644
--- a/doc/src/snippets/qmetaobject-invokable/window.cpp
+++ b/doc/src/snippets/qmetaobject-invokable/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qmetaobject-invokable/window.h b/doc/src/snippets/qmetaobject-invokable/window.h
index db030a855b..a89887d418 100644
--- a/doc/src/snippets/qmetaobject-invokable/window.h
+++ b/doc/src/snippets/qmetaobject-invokable/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qprocess-environment/main.cpp b/doc/src/snippets/qprocess-environment/main.cpp
index 974095fe02..5fbf4a450d 100644
--- a/doc/src/snippets/qprocess-environment/main.cpp
+++ b/doc/src/snippets/qprocess-environment/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp b/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp
index a5d097f3fe..14203b1154 100644
--- a/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp
+++ b/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qsignalmapper/buttonwidget.cpp b/doc/src/snippets/qsignalmapper/buttonwidget.cpp
index 35f305570f..716a37df85 100644
--- a/doc/src/snippets/qsignalmapper/buttonwidget.cpp
+++ b/doc/src/snippets/qsignalmapper/buttonwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qsignalmapper/buttonwidget.h b/doc/src/snippets/qsignalmapper/buttonwidget.h
index 095fc2c70a..15c2b6317b 100644
--- a/doc/src/snippets/qsignalmapper/buttonwidget.h
+++ b/doc/src/snippets/qsignalmapper/buttonwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qsortfilterproxymodel-details/main.cpp b/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
index 9de0cea1df..2b8308e2ad 100644
--- a/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
+++ b/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qsplashscreen/main.cpp b/doc/src/snippets/qsplashscreen/main.cpp
index 0a4ebb5f19..047064d660 100644
--- a/doc/src/snippets/qsplashscreen/main.cpp
+++ b/doc/src/snippets/qsplashscreen/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstack/main.cpp b/doc/src/snippets/qstack/main.cpp
index 8b6982e9e4..b05e0c3455 100644
--- a/doc/src/snippets/qstack/main.cpp
+++ b/doc/src/snippets/qstack/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstackedlayout/main.cpp b/doc/src/snippets/qstackedlayout/main.cpp
index ca415e8be0..cc38b6a34a 100644
--- a/doc/src/snippets/qstackedlayout/main.cpp
+++ b/doc/src/snippets/qstackedlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstackedwidget/main.cpp b/doc/src/snippets/qstackedwidget/main.cpp
index 7e72bfacba..b269d81c57 100644
--- a/doc/src/snippets/qstackedwidget/main.cpp
+++ b/doc/src/snippets/qstackedwidget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstatustipevent/main.cpp b/doc/src/snippets/qstatustipevent/main.cpp
index b609db856c..997b1c4bd9 100644
--- a/doc/src/snippets/qstatustipevent/main.cpp
+++ b/doc/src/snippets/qstatustipevent/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstring/main.cpp b/doc/src/snippets/qstring/main.cpp
index bbc9e98901..00c33c286b 100644
--- a/doc/src/snippets/qstring/main.cpp
+++ b/doc/src/snippets/qstring/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstring/stringbuilder.cpp b/doc/src/snippets/qstring/stringbuilder.cpp
index b8acbc1e2a..170c409be7 100644
--- a/doc/src/snippets/qstring/stringbuilder.cpp
+++ b/doc/src/snippets/qstring/stringbuilder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstringlist/main.cpp b/doc/src/snippets/qstringlist/main.cpp
index 3d56987b94..d8e746030b 100644
--- a/doc/src/snippets/qstringlist/main.cpp
+++ b/doc/src/snippets/qstringlist/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstringlistmodel/main.cpp b/doc/src/snippets/qstringlistmodel/main.cpp
index a64ba2b687..e6897e9803 100644
--- a/doc/src/snippets/qstringlistmodel/main.cpp
+++ b/doc/src/snippets/qstringlistmodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstyleoption/main.cpp b/doc/src/snippets/qstyleoption/main.cpp
index c3ef7298dd..69ba6588d7 100644
--- a/doc/src/snippets/qstyleoption/main.cpp
+++ b/doc/src/snippets/qstyleoption/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qstyleplugin/main.cpp b/doc/src/snippets/qstyleplugin/main.cpp
index 2c444d504b..74b45a14ad 100644
--- a/doc/src/snippets/qstyleplugin/main.cpp
+++ b/doc/src/snippets/qstyleplugin/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp b/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp
index e26031f678..9c505dcd69 100644
--- a/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp
+++ b/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qtablewidget-using/mainwindow.cpp b/doc/src/snippets/qtablewidget-using/mainwindow.cpp
index 79a01f56d6..b21d854369 100644
--- a/doc/src/snippets/qtablewidget-using/mainwindow.cpp
+++ b/doc/src/snippets/qtablewidget-using/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qtcast/qtcast.cpp b/doc/src/snippets/qtcast/qtcast.cpp
index 68cff32ad5..49f2a42043 100644
--- a/doc/src/snippets/qtcast/qtcast.cpp
+++ b/doc/src/snippets/qtcast/qtcast.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qtreewidget-using/mainwindow.cpp b/doc/src/snippets/qtreewidget-using/mainwindow.cpp
index a7e8277321..6db7b462b4 100644
--- a/doc/src/snippets/qtreewidget-using/mainwindow.cpp
+++ b/doc/src/snippets/qtreewidget-using/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp b/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
index 497540e054..5f83bb3d61 100644
--- a/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
+++ b/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/quiloader/main.cpp b/doc/src/snippets/quiloader/main.cpp
index 2b9acd2d3f..8facf78ac7 100644
--- a/doc/src/snippets/quiloader/main.cpp
+++ b/doc/src/snippets/quiloader/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/quiloader/mywidget.cpp b/doc/src/snippets/quiloader/mywidget.cpp
index 989a5ef075..31753dc5df 100644
--- a/doc/src/snippets/quiloader/mywidget.cpp
+++ b/doc/src/snippets/quiloader/mywidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qx11embedcontainer/main.cpp b/doc/src/snippets/qx11embedcontainer/main.cpp
index 38d6d28292..c8024afa10 100644
--- a/doc/src/snippets/qx11embedcontainer/main.cpp
+++ b/doc/src/snippets/qx11embedcontainer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qx11embedwidget/main.cpp b/doc/src/snippets/qx11embedwidget/main.cpp
index 4f82399699..b8a270d198 100644
--- a/doc/src/snippets/qx11embedwidget/main.cpp
+++ b/doc/src/snippets/qx11embedwidget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/qxmlstreamwriter/main.cpp b/doc/src/snippets/qxmlstreamwriter/main.cpp
index 2e7deff168..80dbe5d13a 100644
--- a/doc/src/snippets/qxmlstreamwriter/main.cpp
+++ b/doc/src/snippets/qxmlstreamwriter/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/separations/finalwidget.cpp b/doc/src/snippets/separations/finalwidget.cpp
index 8d2b7feacc..fb81e4ce79 100644
--- a/doc/src/snippets/separations/finalwidget.cpp
+++ b/doc/src/snippets/separations/finalwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/settings/settings.cpp b/doc/src/snippets/settings/settings.cpp
index 2cbe1804be..ef34d5ef55 100644
--- a/doc/src/snippets/settings/settings.cpp
+++ b/doc/src/snippets/settings/settings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/shareddirmodel/main.cpp b/doc/src/snippets/shareddirmodel/main.cpp
index 1cd2bde1bd..765a48add8 100644
--- a/doc/src/snippets/shareddirmodel/main.cpp
+++ b/doc/src/snippets/shareddirmodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/sharedemployee/employee.h b/doc/src/snippets/sharedemployee/employee.h
index 981e007b8d..aba6cc6be8 100644
--- a/doc/src/snippets/sharedemployee/employee.h
+++ b/doc/src/snippets/sharedemployee/employee.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/sharedemployee/main.cpp b/doc/src/snippets/sharedemployee/main.cpp
index a8f53a738c..2807421a7c 100644
--- a/doc/src/snippets/sharedemployee/main.cpp
+++ b/doc/src/snippets/sharedemployee/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/signalmapper/filereader.cpp b/doc/src/snippets/signalmapper/filereader.cpp
index 49b69055c5..20dfd5d5a6 100644
--- a/doc/src/snippets/signalmapper/filereader.cpp
+++ b/doc/src/snippets/signalmapper/filereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/signalsandslots/lcdnumber.h b/doc/src/snippets/signalsandslots/lcdnumber.h
index 3706387d24..e2699b1570 100644
--- a/doc/src/snippets/signalsandslots/lcdnumber.h
+++ b/doc/src/snippets/signalsandslots/lcdnumber.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/signalsandslots/signalsandslots.cpp b/doc/src/snippets/signalsandslots/signalsandslots.cpp
index 19a8b4d5cd..a7cdc4eab0 100644
--- a/doc/src/snippets/signalsandslots/signalsandslots.cpp
+++ b/doc/src/snippets/signalsandslots/signalsandslots.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/signalsandslots/signalsandslots.h b/doc/src/snippets/signalsandslots/signalsandslots.h
index 0671181f5f..d5eb2cb9a2 100644
--- a/doc/src/snippets/signalsandslots/signalsandslots.h
+++ b/doc/src/snippets/signalsandslots/signalsandslots.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/splitter/splitter.cpp b/doc/src/snippets/splitter/splitter.cpp
index b72eb02e4c..b0d72698b1 100644
--- a/doc/src/snippets/splitter/splitter.cpp
+++ b/doc/src/snippets/splitter/splitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/splitterhandle/splitter.cpp b/doc/src/snippets/splitterhandle/splitter.cpp
index 6f76c57b41..32d92f47d7 100644
--- a/doc/src/snippets/splitterhandle/splitter.cpp
+++ b/doc/src/snippets/splitterhandle/splitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/splitterhandle/splitter.h b/doc/src/snippets/splitterhandle/splitter.h
index 505c431f6d..692659f72a 100644
--- a/doc/src/snippets/splitterhandle/splitter.h
+++ b/doc/src/snippets/splitterhandle/splitter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/sqldatabase/sqldatabase.cpp b/doc/src/snippets/sqldatabase/sqldatabase.cpp
index 4f428c7f5b..c40b6896ec 100644
--- a/doc/src/snippets/sqldatabase/sqldatabase.cpp
+++ b/doc/src/snippets/sqldatabase/sqldatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/streaming/main.cpp b/doc/src/snippets/streaming/main.cpp
index cf03a46bc2..f905d12dc4 100644
--- a/doc/src/snippets/streaming/main.cpp
+++ b/doc/src/snippets/streaming/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/styles/styles.cpp b/doc/src/snippets/styles/styles.cpp
index 23ab71b485..18ed908f54 100644
--- a/doc/src/snippets/styles/styles.cpp
+++ b/doc/src/snippets/styles/styles.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/stylesheet/common-mistakes.cpp b/doc/src/snippets/stylesheet/common-mistakes.cpp
index 8de7f7941f..7dbdc7ecf6 100644
--- a/doc/src/snippets/stylesheet/common-mistakes.cpp
+++ b/doc/src/snippets/stylesheet/common-mistakes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textblock-fragments/xmlwriter.cpp b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
index 252720bc14..421f0b8ec3 100644
--- a/doc/src/snippets/textblock-fragments/xmlwriter.cpp
+++ b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-css/main.cpp b/doc/src/snippets/textdocument-css/main.cpp
index 8c267455e5..eb0f582022 100644
--- a/doc/src/snippets/textdocument-css/main.cpp
+++ b/doc/src/snippets/textdocument-css/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-imagedrop/textedit.cpp b/doc/src/snippets/textdocument-imagedrop/textedit.cpp
index 735dbe55ce..9db45bf432 100644
--- a/doc/src/snippets/textdocument-imagedrop/textedit.cpp
+++ b/doc/src/snippets/textdocument-imagedrop/textedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-listitemstyles/main.cpp b/doc/src/snippets/textdocument-listitemstyles/main.cpp
index 6e40492c29..786218557c 100644
--- a/doc/src/snippets/textdocument-listitemstyles/main.cpp
+++ b/doc/src/snippets/textdocument-listitemstyles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp b/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp
index 94e98b3400..9f05db4fc1 100644
--- a/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp
+++ b/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-listitemstyles/mainwindow.h b/doc/src/snippets/textdocument-listitemstyles/mainwindow.h
index 649a47bb16..f307a49b6a 100644
--- a/doc/src/snippets/textdocument-listitemstyles/mainwindow.h
+++ b/doc/src/snippets/textdocument-listitemstyles/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-lists/mainwindow.cpp b/doc/src/snippets/textdocument-lists/mainwindow.cpp
index bcbfce72b8..40e0c87916 100644
--- a/doc/src/snippets/textdocument-lists/mainwindow.cpp
+++ b/doc/src/snippets/textdocument-lists/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-resources/main.cpp b/doc/src/snippets/textdocument-resources/main.cpp
index 19a7469c8f..14cb03cfe5 100644
--- a/doc/src/snippets/textdocument-resources/main.cpp
+++ b/doc/src/snippets/textdocument-resources/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-tables/mainwindow.cpp b/doc/src/snippets/textdocument-tables/mainwindow.cpp
index c432f4c8cd..df6a360c94 100644
--- a/doc/src/snippets/textdocument-tables/mainwindow.cpp
+++ b/doc/src/snippets/textdocument-tables/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocument-texttable/main.cpp b/doc/src/snippets/textdocument-texttable/main.cpp
index 1e3b7c2a89..7b5a9ac3d5 100644
--- a/doc/src/snippets/textdocument-texttable/main.cpp
+++ b/doc/src/snippets/textdocument-texttable/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/textdocumentendsnippet.cpp b/doc/src/snippets/textdocumentendsnippet.cpp
index 3b28700ac3..01f55b667a 100644
--- a/doc/src/snippets/textdocumentendsnippet.cpp
+++ b/doc/src/snippets/textdocumentendsnippet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/threads/threads.cpp b/doc/src/snippets/threads/threads.cpp
index 5661757c9c..f922e4f1b4 100644
--- a/doc/src/snippets/threads/threads.cpp
+++ b/doc/src/snippets/threads/threads.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/threads/threads.h b/doc/src/snippets/threads/threads.h
index 9826208b38..a85c6b8a5c 100644
--- a/doc/src/snippets/threads/threads.h
+++ b/doc/src/snippets/threads/threads.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/timeline/main.cpp b/doc/src/snippets/timeline/main.cpp
index b652069d68..67c67c795d 100644
--- a/doc/src/snippets/timeline/main.cpp
+++ b/doc/src/snippets/timeline/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/timers/timers.cpp b/doc/src/snippets/timers/timers.cpp
index 015ab27387..0481e255e1 100644
--- a/doc/src/snippets/timers/timers.cpp
+++ b/doc/src/snippets/timers/timers.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/transform/main.cpp b/doc/src/snippets/transform/main.cpp
index b1e3d74094..87ff6ec792 100644
--- a/doc/src/snippets/transform/main.cpp
+++ b/doc/src/snippets/transform/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/whatsthis/whatsthis.cpp b/doc/src/snippets/whatsthis/whatsthis.cpp
index 608fa3e62f..9e0f6694f4 100644
--- a/doc/src/snippets/whatsthis/whatsthis.cpp
+++ b/doc/src/snippets/whatsthis/whatsthis.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/widget-mask/main.cpp b/doc/src/snippets/widget-mask/main.cpp
index 2d7defc02c..1038f9031a 100644
--- a/doc/src/snippets/widget-mask/main.cpp
+++ b/doc/src/snippets/widget-mask/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/widgetdelegate.cpp b/doc/src/snippets/widgetdelegate.cpp
index c6d3963807..b12baeef46 100644
--- a/doc/src/snippets/widgetdelegate.cpp
+++ b/doc/src/snippets/widgetdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/widgetprinting.cpp b/doc/src/snippets/widgetprinting.cpp
index a6ea3cb5d3..41171678bf 100644
--- a/doc/src/snippets/widgetprinting.cpp
+++ b/doc/src/snippets/widgetprinting.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/widgets-tutorial/template.cpp b/doc/src/snippets/widgets-tutorial/template.cpp
index e2a2f61ab1..95d32d7cf5 100644
--- a/doc/src/snippets/widgets-tutorial/template.cpp
+++ b/doc/src/snippets/widgets-tutorial/template.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/xml/rsslisting/handler.cpp b/doc/src/snippets/xml/rsslisting/handler.cpp
index fe9ef5cbe9..21aebcdb40 100644
--- a/doc/src/snippets/xml/rsslisting/handler.cpp
+++ b/doc/src/snippets/xml/rsslisting/handler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/xml/rsslisting/rsslisting.cpp b/doc/src/snippets/xml/rsslisting/rsslisting.cpp
index 5047d0840d..2e98f8f14e 100644
--- a/doc/src/snippets/xml/rsslisting/rsslisting.cpp
+++ b/doc/src/snippets/xml/rsslisting/rsslisting.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/xml/simpleparse/main.cpp b/doc/src/snippets/xml/simpleparse/main.cpp
index 5d9994d63e..5eeed234c5 100644
--- a/doc/src/snippets/xml/simpleparse/main.cpp
+++ b/doc/src/snippets/xml/simpleparse/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/sql/qtsql.qdoc b/doc/src/sql/qtsql.qdoc
index be2cc5097f..278905717c 100644
--- a/doc/src/sql/qtsql.qdoc
+++ b/doc/src/sql/qtsql.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/sql/sql-programming/qsqldatatype-table.qdoc b/doc/src/sql/sql-programming/qsqldatatype-table.qdoc
index e5a9bf5c5a..1aaf476549 100644
--- a/doc/src/sql/sql-programming/qsqldatatype-table.qdoc
+++ b/doc/src/sql/sql-programming/qsqldatatype-table.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/sql/sql-programming/sql-driver.qdoc b/doc/src/sql/sql-programming/sql-driver.qdoc
index 0e0e5cadd7..f0cc3212fe 100644
--- a/doc/src/sql/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql/sql-programming/sql-driver.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/sql/sql-programming/sql-programming.qdoc b/doc/src/sql/sql-programming/sql-programming.qdoc
index 0be443c89e..6b702668c1 100644
--- a/doc/src/sql/sql-programming/sql-programming.qdoc
+++ b/doc/src/sql/sql-programming/sql-programming.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/addressbook-fr.qdoc b/doc/src/widgets/addressbook-fr.qdoc
index 53b3e6fc15..0de065631f 100644
--- a/doc/src/widgets/addressbook-fr.qdoc
+++ b/doc/src/widgets/addressbook-fr.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/addressbook.qdoc b/doc/src/widgets/addressbook.qdoc
index d75e2cac2a..09c067aef9 100644
--- a/doc/src/widgets/addressbook.qdoc
+++ b/doc/src/widgets/addressbook.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/modelview.qdoc b/doc/src/widgets/modelview.qdoc
index 5ac15b9f39..0278f585b6 100644
--- a/doc/src/widgets/modelview.qdoc
+++ b/doc/src/widgets/modelview.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/qtwidgets.qdoc b/doc/src/widgets/qtwidgets.qdoc
index b0bfe1358b..cd37688b1a 100644
--- a/doc/src/widgets/qtwidgets.qdoc
+++ b/doc/src/widgets/qtwidgets.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/focus.qdoc b/doc/src/widgets/widgets-and-layouts/focus.qdoc
index 316893edc4..e9069c1812 100644
--- a/doc/src/widgets/widgets-and-layouts/focus.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/focus.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc
index 6d6fea7d1e..6db1863d9a 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc
index 603650bc4b..0f385db343 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc
index ce6a773776..7cf82b2b52 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc
index 58622151b7..54decc12a6 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc
index 91485a088f..7a9d2e887e 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc
index 473d7e8da5..eedd5a4577 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc
index 1f600b9814..b971625b92 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc
index 534da3e2bd..2b61d55025 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc b/doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc
index 4d1c79cc9a..81b7becd44 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/gallery.qdoc b/doc/src/widgets/widgets-and-layouts/gallery.qdoc
index 865321d4ad..1ffec414b1 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/gallery.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/layout.qdoc b/doc/src/widgets/widgets-and-layouts/layout.qdoc
index 394d537293..ae5a4fed56 100644
--- a/doc/src/widgets/widgets-and-layouts/layout.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/layout.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/styles.qdoc b/doc/src/widgets/widgets-and-layouts/styles.qdoc
index 3b705de973..a47f8e9be6 100644
--- a/doc/src/widgets/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/styles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets/widgets-and-layouts/stylesheet.qdoc
index 8375587ce8..aa48a24225 100644
--- a/doc/src/widgets/widgets-and-layouts/stylesheet.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/stylesheet.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-and-layouts/widgets.qdoc b/doc/src/widgets/widgets-and-layouts/widgets.qdoc
index f3f65b67eb..c3082c3cb5 100644
--- a/doc/src/widgets/widgets-and-layouts/widgets.qdoc
+++ b/doc/src/widgets/widgets-and-layouts/widgets.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/widgets-tutorial.qdoc b/doc/src/widgets/widgets-tutorial.qdoc
index a90c01447a..b09e07a5bc 100644
--- a/doc/src/widgets/widgets-tutorial.qdoc
+++ b/doc/src/widgets/widgets-tutorial.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/windows-and-dialogs/dialogs.qdoc b/doc/src/widgets/windows-and-dialogs/dialogs.qdoc
index 54f8c05e39..d332a45c9f 100644
--- a/doc/src/widgets/windows-and-dialogs/dialogs.qdoc
+++ b/doc/src/widgets/windows-and-dialogs/dialogs.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/widgets/windows-and-dialogs/mainwindow.qdoc b/doc/src/widgets/windows-and-dialogs/mainwindow.qdoc
index f2b29c9d5b..9938d097fe 100644
--- a/doc/src/widgets/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/widgets/windows-and-dialogs/mainwindow.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/xml/qtxml.qdoc b/doc/src/xml/qtxml.qdoc
index 973abef07e..2abc88cdef 100644
--- a/doc/src/xml/qtxml.qdoc
+++ b/doc/src/xml/qtxml.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/animatedtiles/main.cpp b/examples/animation/animatedtiles/main.cpp
index 55dbd39ec1..df8134c169 100644
--- a/examples/animation/animatedtiles/main.cpp
+++ b/examples/animation/animatedtiles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/appchooser/main.cpp b/examples/animation/appchooser/main.cpp
index 55068c6a67..ed037edd1d 100644
--- a/examples/animation/appchooser/main.cpp
+++ b/examples/animation/appchooser/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/easing/animation.h b/examples/animation/easing/animation.h
index 5f6c425827..298a0e3d13 100644
--- a/examples/animation/easing/animation.h
+++ b/examples/animation/easing/animation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/easing/main.cpp b/examples/animation/easing/main.cpp
index 7936810812..f6ec6e42e8 100644
--- a/examples/animation/easing/main.cpp
+++ b/examples/animation/easing/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/easing/window.cpp b/examples/animation/easing/window.cpp
index 208acd04fc..d5d46aed99 100644
--- a/examples/animation/easing/window.cpp
+++ b/examples/animation/easing/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/easing/window.h b/examples/animation/easing/window.h
index 51fa00d859..e45368b9bb 100644
--- a/examples/animation/easing/window.h
+++ b/examples/animation/easing/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/moveblocks/main.cpp b/examples/animation/moveblocks/main.cpp
index a5aba4549a..5076872823 100644
--- a/examples/animation/moveblocks/main.cpp
+++ b/examples/animation/moveblocks/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/states/main.cpp b/examples/animation/states/main.cpp
index 891254e069..0efaa8ae24 100644
--- a/examples/animation/states/main.cpp
+++ b/examples/animation/states/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/animation.cpp b/examples/animation/stickman/animation.cpp
index af7144be2c..6563f9d660 100644
--- a/examples/animation/stickman/animation.cpp
+++ b/examples/animation/stickman/animation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/animation.h b/examples/animation/stickman/animation.h
index 51edda6e63..20350b3669 100644
--- a/examples/animation/stickman/animation.h
+++ b/examples/animation/stickman/animation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp
index 0d422ab1d2..2584aee814 100644
--- a/examples/animation/stickman/graphicsview.cpp
+++ b/examples/animation/stickman/graphicsview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/graphicsview.h b/examples/animation/stickman/graphicsview.h
index abd621df43..4df7911dfa 100644
--- a/examples/animation/stickman/graphicsview.h
+++ b/examples/animation/stickman/graphicsview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index 791b33eb2e..17d1816557 100644
--- a/examples/animation/stickman/lifecycle.cpp
+++ b/examples/animation/stickman/lifecycle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/lifecycle.h b/examples/animation/stickman/lifecycle.h
index ca1a052c39..18a4fa3b46 100644
--- a/examples/animation/stickman/lifecycle.h
+++ b/examples/animation/stickman/lifecycle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/main.cpp b/examples/animation/stickman/main.cpp
index 208d346c5c..c134a7ec7f 100644
--- a/examples/animation/stickman/main.cpp
+++ b/examples/animation/stickman/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/node.cpp b/examples/animation/stickman/node.cpp
index 3077dffb12..f7d9a02610 100644
--- a/examples/animation/stickman/node.cpp
+++ b/examples/animation/stickman/node.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/node.h b/examples/animation/stickman/node.h
index cefb3a81ac..6e99d43517 100644
--- a/examples/animation/stickman/node.h
+++ b/examples/animation/stickman/node.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/rectbutton.cpp b/examples/animation/stickman/rectbutton.cpp
index d1bd9e42d1..57de48795e 100644
--- a/examples/animation/stickman/rectbutton.cpp
+++ b/examples/animation/stickman/rectbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/rectbutton.h b/examples/animation/stickman/rectbutton.h
index e3d1f88926..a3a73a1d9a 100644
--- a/examples/animation/stickman/rectbutton.h
+++ b/examples/animation/stickman/rectbutton.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/stickman.cpp b/examples/animation/stickman/stickman.cpp
index 8b474579c2..28c13dff8d 100644
--- a/examples/animation/stickman/stickman.cpp
+++ b/examples/animation/stickman/stickman.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/stickman/stickman.h b/examples/animation/stickman/stickman.h
index eeebbef283..06f606af9e 100644
--- a/examples/animation/stickman/stickman.h
+++ b/examples/animation/stickman/stickman.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/animationmanager.cpp b/examples/animation/sub-attaq/animationmanager.cpp
index c7e230e3d2..732c480cb8 100644
--- a/examples/animation/sub-attaq/animationmanager.cpp
+++ b/examples/animation/sub-attaq/animationmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/animationmanager.h b/examples/animation/sub-attaq/animationmanager.h
index 429d656485..3cfc74e0cd 100644
--- a/examples/animation/sub-attaq/animationmanager.h
+++ b/examples/animation/sub-attaq/animationmanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/boat.cpp b/examples/animation/sub-attaq/boat.cpp
index 4ddf59e6a0..b614b78b7f 100644
--- a/examples/animation/sub-attaq/boat.cpp
+++ b/examples/animation/sub-attaq/boat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/boat.h b/examples/animation/sub-attaq/boat.h
index 71e3512fc3..75d53b3755 100644
--- a/examples/animation/sub-attaq/boat.h
+++ b/examples/animation/sub-attaq/boat.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/boat_p.h b/examples/animation/sub-attaq/boat_p.h
index 4141671eb0..d3fa73bcee 100644
--- a/examples/animation/sub-attaq/boat_p.h
+++ b/examples/animation/sub-attaq/boat_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/bomb.cpp b/examples/animation/sub-attaq/bomb.cpp
index 6811a27e88..26b041a65c 100644
--- a/examples/animation/sub-attaq/bomb.cpp
+++ b/examples/animation/sub-attaq/bomb.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/bomb.h b/examples/animation/sub-attaq/bomb.h
index 222c3d029f..eeb1bb690a 100644
--- a/examples/animation/sub-attaq/bomb.h
+++ b/examples/animation/sub-attaq/bomb.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/graphicsscene.cpp b/examples/animation/sub-attaq/graphicsscene.cpp
index d274ca3bde..50a3a5e29f 100644
--- a/examples/animation/sub-attaq/graphicsscene.cpp
+++ b/examples/animation/sub-attaq/graphicsscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h
index 198b27101f..1ed5a18a9d 100644
--- a/examples/animation/sub-attaq/graphicsscene.h
+++ b/examples/animation/sub-attaq/graphicsscene.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/main.cpp b/examples/animation/sub-attaq/main.cpp
index 6fdc47ca20..cac0237393 100644
--- a/examples/animation/sub-attaq/main.cpp
+++ b/examples/animation/sub-attaq/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp
index 81632a50a0..677d09a214 100644
--- a/examples/animation/sub-attaq/mainwindow.cpp
+++ b/examples/animation/sub-attaq/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/mainwindow.h b/examples/animation/sub-attaq/mainwindow.h
index 0514776b75..19160e3843 100644
--- a/examples/animation/sub-attaq/mainwindow.h
+++ b/examples/animation/sub-attaq/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/pixmapitem.cpp b/examples/animation/sub-attaq/pixmapitem.cpp
index be75bd1995..d584d69ff8 100644
--- a/examples/animation/sub-attaq/pixmapitem.cpp
+++ b/examples/animation/sub-attaq/pixmapitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/pixmapitem.h b/examples/animation/sub-attaq/pixmapitem.h
index f6fced9e97..b8ed147d9e 100644
--- a/examples/animation/sub-attaq/pixmapitem.h
+++ b/examples/animation/sub-attaq/pixmapitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/progressitem.cpp b/examples/animation/sub-attaq/progressitem.cpp
index 426dedfbd4..a623ea8722 100644
--- a/examples/animation/sub-attaq/progressitem.cpp
+++ b/examples/animation/sub-attaq/progressitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/progressitem.h b/examples/animation/sub-attaq/progressitem.h
index 9a8a575111..c6b8a30343 100644
--- a/examples/animation/sub-attaq/progressitem.h
+++ b/examples/animation/sub-attaq/progressitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/qanimationstate.cpp b/examples/animation/sub-attaq/qanimationstate.cpp
index 593c8dfe8d..69d699cb16 100644
--- a/examples/animation/sub-attaq/qanimationstate.cpp
+++ b/examples/animation/sub-attaq/qanimationstate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/qanimationstate.h b/examples/animation/sub-attaq/qanimationstate.h
index aace3b502b..890037a269 100644
--- a/examples/animation/sub-attaq/qanimationstate.h
+++ b/examples/animation/sub-attaq/qanimationstate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/states.cpp b/examples/animation/sub-attaq/states.cpp
index db50938016..312733befd 100644
--- a/examples/animation/sub-attaq/states.cpp
+++ b/examples/animation/sub-attaq/states.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/states.h b/examples/animation/sub-attaq/states.h
index 4f322cbd57..3ef2b4b5b4 100644
--- a/examples/animation/sub-attaq/states.h
+++ b/examples/animation/sub-attaq/states.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/submarine.cpp b/examples/animation/sub-attaq/submarine.cpp
index 2c8a5a2884..0454751293 100644
--- a/examples/animation/sub-attaq/submarine.cpp
+++ b/examples/animation/sub-attaq/submarine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/submarine.h b/examples/animation/sub-attaq/submarine.h
index 852b63de36..cb334a2778 100644
--- a/examples/animation/sub-attaq/submarine.h
+++ b/examples/animation/sub-attaq/submarine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/submarine_p.h b/examples/animation/sub-attaq/submarine_p.h
index eb81c6604b..f42e84f47c 100644
--- a/examples/animation/sub-attaq/submarine_p.h
+++ b/examples/animation/sub-attaq/submarine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/textinformationitem.cpp b/examples/animation/sub-attaq/textinformationitem.cpp
index e2653361a1..050fd7713f 100644
--- a/examples/animation/sub-attaq/textinformationitem.cpp
+++ b/examples/animation/sub-attaq/textinformationitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/textinformationitem.h b/examples/animation/sub-attaq/textinformationitem.h
index 1c62c8597e..a249752c4a 100644
--- a/examples/animation/sub-attaq/textinformationitem.h
+++ b/examples/animation/sub-attaq/textinformationitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/torpedo.cpp b/examples/animation/sub-attaq/torpedo.cpp
index 8c9bacfa38..9318797b6c 100644
--- a/examples/animation/sub-attaq/torpedo.cpp
+++ b/examples/animation/sub-attaq/torpedo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/animation/sub-attaq/torpedo.h b/examples/animation/sub-attaq/torpedo.h
index a5ec24dabf..2d3cd40973 100644
--- a/examples/animation/sub-attaq/torpedo.h
+++ b/examples/animation/sub-attaq/torpedo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/complexpingpong/complexping.cpp b/examples/dbus/complexpingpong/complexping.cpp
index 4e17486439..5cda1a04a6 100644
--- a/examples/dbus/complexpingpong/complexping.cpp
+++ b/examples/dbus/complexpingpong/complexping.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/complexpingpong/complexping.h b/examples/dbus/complexpingpong/complexping.h
index bf54e630a8..6db508099b 100644
--- a/examples/dbus/complexpingpong/complexping.h
+++ b/examples/dbus/complexpingpong/complexping.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/complexpingpong/complexpong.cpp b/examples/dbus/complexpingpong/complexpong.cpp
index f16afd3121..696b2d3ce0 100644
--- a/examples/dbus/complexpingpong/complexpong.cpp
+++ b/examples/dbus/complexpingpong/complexpong.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/complexpingpong/complexpong.h b/examples/dbus/complexpingpong/complexpong.h
index cc05972f02..31ddd076ab 100644
--- a/examples/dbus/complexpingpong/complexpong.h
+++ b/examples/dbus/complexpingpong/complexpong.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/complexpingpong/ping-common.h b/examples/dbus/complexpingpong/ping-common.h
index 532517394b..1632e50adc 100644
--- a/examples/dbus/complexpingpong/ping-common.h
+++ b/examples/dbus/complexpingpong/ping-common.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/dbus-chat/chat.cpp b/examples/dbus/dbus-chat/chat.cpp
index 33ba0f7a3a..c52d0007d8 100644
--- a/examples/dbus/dbus-chat/chat.cpp
+++ b/examples/dbus/dbus-chat/chat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/dbus-chat/chat.h b/examples/dbus/dbus-chat/chat.h
index c7d7b6d2a8..999aa92d8d 100644
--- a/examples/dbus/dbus-chat/chat.h
+++ b/examples/dbus/dbus-chat/chat.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/dbus-chat/chat_adaptor.cpp b/examples/dbus/dbus-chat/chat_adaptor.cpp
index 553e6e10cc..a362b58774 100644
--- a/examples/dbus/dbus-chat/chat_adaptor.cpp
+++ b/examples/dbus/dbus-chat/chat_adaptor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
diff --git a/examples/dbus/dbus-chat/chat_adaptor.h b/examples/dbus/dbus-chat/chat_adaptor.h
index 2558ceb29f..228204b755 100644
--- a/examples/dbus/dbus-chat/chat_adaptor.h
+++ b/examples/dbus/dbus-chat/chat_adaptor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/examples/dbus/dbus-chat/chat_interface.cpp b/examples/dbus/dbus-chat/chat_interface.cpp
index ea472506de..c81204a776 100644
--- a/examples/dbus/dbus-chat/chat_interface.cpp
+++ b/examples/dbus/dbus-chat/chat_interface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -i chat_interface.h -p :chat_interface.cpp com.trolltech.chat.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/examples/dbus/dbus-chat/chat_interface.h b/examples/dbus/dbus-chat/chat_interface.h
index 8db1b4f420..2cfbecae79 100644
--- a/examples/dbus/dbus-chat/chat_interface.h
+++ b/examples/dbus/dbus-chat/chat_interface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
diff --git a/examples/dbus/listnames/listnames.cpp b/examples/dbus/listnames/listnames.cpp
index 40bb032369..9890af53b6 100644
--- a/examples/dbus/listnames/listnames.cpp
+++ b/examples/dbus/listnames/listnames.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/pingpong/ping-common.h b/examples/dbus/pingpong/ping-common.h
index 532517394b..1632e50adc 100644
--- a/examples/dbus/pingpong/ping-common.h
+++ b/examples/dbus/pingpong/ping-common.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/pingpong/ping.cpp b/examples/dbus/pingpong/ping.cpp
index 67aaf571bc..0d27e50604 100644
--- a/examples/dbus/pingpong/ping.cpp
+++ b/examples/dbus/pingpong/ping.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/pingpong/pong.cpp b/examples/dbus/pingpong/pong.cpp
index a7c0ad392c..96e537692a 100644
--- a/examples/dbus/pingpong/pong.cpp
+++ b/examples/dbus/pingpong/pong.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/pingpong/pong.h b/examples/dbus/pingpong/pong.h
index 1b53f11bbc..a1614e0c32 100644
--- a/examples/dbus/pingpong/pong.h
+++ b/examples/dbus/pingpong/pong.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/remotecontrolledcar/car/car.cpp b/examples/dbus/remotecontrolledcar/car/car.cpp
index d42db25d10..497302b03b 100644
--- a/examples/dbus/remotecontrolledcar/car/car.cpp
+++ b/examples/dbus/remotecontrolledcar/car/car.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/remotecontrolledcar/car/car.h b/examples/dbus/remotecontrolledcar/car/car.h
index 3db41d7770..0b465ba2ec 100644
--- a/examples/dbus/remotecontrolledcar/car/car.h
+++ b/examples/dbus/remotecontrolledcar/car/car.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
index 4ced1f5a9c..9ef035ff87 100644
--- a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -i car_adaptor.h -a :car_adaptor.cpp car.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.h b/examples/dbus/remotecontrolledcar/car/car_adaptor.h
index c31779fed0..7092e69f5d 100644
--- a/examples/dbus/remotecontrolledcar/car/car_adaptor.h
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -a car_adaptor.h: car.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp
index df68f6125b..fec64c1207 100644
--- a/examples/dbus/remotecontrolledcar/car/main.cpp
+++ b/examples/dbus/remotecontrolledcar/car/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
index e1e6ae4bec..094f04ca8c 100644
--- a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -i car_interface.h -p :car_interface.cpp car.xml
**
-** qqdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qqdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.h b/examples/dbus/remotecontrolledcar/controller/car_interface.h
index e7e3774c17..3d51fc4988 100644
--- a/examples/dbus/remotecontrolledcar/controller/car_interface.h
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
** This file was generated by qdbusxml2cpp version 0.7
** Command line was: qdbusxml2cpp -p car_interface.h: car.xml
**
-** qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp
index 1303d9e218..ba7baf41ff 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.h b/examples/dbus/remotecontrolledcar/controller/controller.h
index 3fe172e2b7..2f20ac7b4b 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.h
+++ b/examples/dbus/remotecontrolledcar/controller/controller.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dbus/remotecontrolledcar/controller/main.cpp b/examples/dbus/remotecontrolledcar/controller/main.cpp
index c91edd3056..ae0372bc8b 100644
--- a/examples/dbus/remotecontrolledcar/controller/main.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/desktop/screenshot/main.cpp b/examples/desktop/screenshot/main.cpp
index c2930f7513..58fdcfdf02 100644
--- a/examples/desktop/screenshot/main.cpp
+++ b/examples/desktop/screenshot/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/desktop/screenshot/screenshot.cpp b/examples/desktop/screenshot/screenshot.cpp
index 683682ae52..6486c4076a 100644
--- a/examples/desktop/screenshot/screenshot.cpp
+++ b/examples/desktop/screenshot/screenshot.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/desktop/screenshot/screenshot.h b/examples/desktop/screenshot/screenshot.h
index 03e0508575..0caddb3f60 100644
--- a/examples/desktop/screenshot/screenshot.h
+++ b/examples/desktop/screenshot/screenshot.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/classwizard/classwizard.cpp b/examples/dialogs/classwizard/classwizard.cpp
index 64039ae44f..d4d69ad52f 100644
--- a/examples/dialogs/classwizard/classwizard.cpp
+++ b/examples/dialogs/classwizard/classwizard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/classwizard/classwizard.h b/examples/dialogs/classwizard/classwizard.h
index c2833ae07f..377754b00e 100644
--- a/examples/dialogs/classwizard/classwizard.h
+++ b/examples/dialogs/classwizard/classwizard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/classwizard/main.cpp b/examples/dialogs/classwizard/main.cpp
index 8609c0fa08..14055e7025 100644
--- a/examples/dialogs/classwizard/main.cpp
+++ b/examples/dialogs/classwizard/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/configdialog/configdialog.cpp b/examples/dialogs/configdialog/configdialog.cpp
index d0f071440d..04af2dad59 100644
--- a/examples/dialogs/configdialog/configdialog.cpp
+++ b/examples/dialogs/configdialog/configdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/configdialog/configdialog.h b/examples/dialogs/configdialog/configdialog.h
index 3835daff86..48873dc447 100644
--- a/examples/dialogs/configdialog/configdialog.h
+++ b/examples/dialogs/configdialog/configdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/configdialog/main.cpp b/examples/dialogs/configdialog/main.cpp
index 3b7b8c1c45..46fca2f01d 100644
--- a/examples/dialogs/configdialog/main.cpp
+++ b/examples/dialogs/configdialog/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/configdialog/pages.cpp b/examples/dialogs/configdialog/pages.cpp
index 84949dd075..9af2231034 100644
--- a/examples/dialogs/configdialog/pages.cpp
+++ b/examples/dialogs/configdialog/pages.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/configdialog/pages.h b/examples/dialogs/configdialog/pages.h
index ef35b3d0f3..4c1713407a 100644
--- a/examples/dialogs/configdialog/pages.h
+++ b/examples/dialogs/configdialog/pages.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/extension/finddialog.cpp b/examples/dialogs/extension/finddialog.cpp
index 6edaa06594..115d8eb72d 100644
--- a/examples/dialogs/extension/finddialog.cpp
+++ b/examples/dialogs/extension/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/extension/finddialog.h b/examples/dialogs/extension/finddialog.h
index 0727bc2894..b32fc96ae4 100644
--- a/examples/dialogs/extension/finddialog.h
+++ b/examples/dialogs/extension/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/extension/main.cpp b/examples/dialogs/extension/main.cpp
index b54c1293d1..d93e7b6f67 100644
--- a/examples/dialogs/extension/main.cpp
+++ b/examples/dialogs/extension/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/findfiles/main.cpp b/examples/dialogs/findfiles/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/dialogs/findfiles/main.cpp
+++ b/examples/dialogs/findfiles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/findfiles/window.cpp b/examples/dialogs/findfiles/window.cpp
index d0515399d4..44f0a32f30 100644
--- a/examples/dialogs/findfiles/window.cpp
+++ b/examples/dialogs/findfiles/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/findfiles/window.h b/examples/dialogs/findfiles/window.h
index 4dbb446e18..66aeead2d0 100644
--- a/examples/dialogs/findfiles/window.h
+++ b/examples/dialogs/findfiles/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/licensewizard/licensewizard.cpp b/examples/dialogs/licensewizard/licensewizard.cpp
index a1599145de..e0ac2a9fd4 100644
--- a/examples/dialogs/licensewizard/licensewizard.cpp
+++ b/examples/dialogs/licensewizard/licensewizard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/licensewizard/licensewizard.h b/examples/dialogs/licensewizard/licensewizard.h
index 432c046444..ad10764bd7 100644
--- a/examples/dialogs/licensewizard/licensewizard.h
+++ b/examples/dialogs/licensewizard/licensewizard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/licensewizard/main.cpp b/examples/dialogs/licensewizard/main.cpp
index 59e59ac720..0e2434083c 100644
--- a/examples/dialogs/licensewizard/main.cpp
+++ b/examples/dialogs/licensewizard/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/sipdialog/dialog.cpp b/examples/dialogs/sipdialog/dialog.cpp
index 3dd37e368b..5f772efb4a 100644
--- a/examples/dialogs/sipdialog/dialog.cpp
+++ b/examples/dialogs/sipdialog/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/sipdialog/dialog.h b/examples/dialogs/sipdialog/dialog.h
index a97c20880b..16daf857fc 100644
--- a/examples/dialogs/sipdialog/dialog.h
+++ b/examples/dialogs/sipdialog/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/sipdialog/main.cpp b/examples/dialogs/sipdialog/main.cpp
index aa1151c0a9..0579492133 100644
--- a/examples/dialogs/sipdialog/main.cpp
+++ b/examples/dialogs/sipdialog/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp
index cb3e55fb63..5fc8f65880 100644
--- a/examples/dialogs/standarddialogs/dialog.cpp
+++ b/examples/dialogs/standarddialogs/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/standarddialogs/dialog.h b/examples/dialogs/standarddialogs/dialog.h
index b4f898d89b..e6c802fa7f 100644
--- a/examples/dialogs/standarddialogs/dialog.h
+++ b/examples/dialogs/standarddialogs/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/standarddialogs/main.cpp b/examples/dialogs/standarddialogs/main.cpp
index 11b6f50a0e..d67a6a42f9 100644
--- a/examples/dialogs/standarddialogs/main.cpp
+++ b/examples/dialogs/standarddialogs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/tabdialog/main.cpp b/examples/dialogs/tabdialog/main.cpp
index 879b16d21e..44b96a7c97 100644
--- a/examples/dialogs/tabdialog/main.cpp
+++ b/examples/dialogs/tabdialog/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/tabdialog/tabdialog.cpp b/examples/dialogs/tabdialog/tabdialog.cpp
index e38946a8ff..f99be2f400 100644
--- a/examples/dialogs/tabdialog/tabdialog.cpp
+++ b/examples/dialogs/tabdialog/tabdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/tabdialog/tabdialog.h b/examples/dialogs/tabdialog/tabdialog.h
index 6ae1e15df5..1cc71beae9 100644
--- a/examples/dialogs/tabdialog/tabdialog.h
+++ b/examples/dialogs/tabdialog/tabdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/dialogs/trivialwizard/trivialwizard.cpp b/examples/dialogs/trivialwizard/trivialwizard.cpp
index 5e3ef97694..5ad9a20414 100644
--- a/examples/dialogs/trivialwizard/trivialwizard.cpp
+++ b/examples/dialogs/trivialwizard/trivialwizard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggableicons/dragwidget.cpp b/examples/draganddrop/draggableicons/dragwidget.cpp
index 7a788dfa47..9d7ee8adb1 100644
--- a/examples/draganddrop/draggableicons/dragwidget.cpp
+++ b/examples/draganddrop/draggableicons/dragwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggableicons/dragwidget.h b/examples/draganddrop/draggableicons/dragwidget.h
index f41dbcdf93..252cce0304 100644
--- a/examples/draganddrop/draggableicons/dragwidget.h
+++ b/examples/draganddrop/draggableicons/dragwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggableicons/main.cpp b/examples/draganddrop/draggableicons/main.cpp
index 7a80b92a8a..b4f92005cd 100644
--- a/examples/draganddrop/draggableicons/main.cpp
+++ b/examples/draganddrop/draggableicons/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggabletext/draglabel.cpp b/examples/draganddrop/draggabletext/draglabel.cpp
index 9eb5dfac0b..a4f71d29a1 100644
--- a/examples/draganddrop/draggabletext/draglabel.cpp
+++ b/examples/draganddrop/draggabletext/draglabel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggabletext/draglabel.h b/examples/draganddrop/draggabletext/draglabel.h
index 55bf7c3d7c..5662eb957a 100644
--- a/examples/draganddrop/draggabletext/draglabel.h
+++ b/examples/draganddrop/draggabletext/draglabel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp
index 5287c998a3..dbf926c386 100644
--- a/examples/draganddrop/draggabletext/dragwidget.cpp
+++ b/examples/draganddrop/draggabletext/dragwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggabletext/dragwidget.h b/examples/draganddrop/draggabletext/dragwidget.h
index 89391a1313..8f9492b25a 100644
--- a/examples/draganddrop/draggabletext/dragwidget.h
+++ b/examples/draganddrop/draggabletext/dragwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/draggabletext/main.cpp b/examples/draganddrop/draggabletext/main.cpp
index 4d0a121337..ce90a00ddf 100644
--- a/examples/draganddrop/draggabletext/main.cpp
+++ b/examples/draganddrop/draggabletext/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/dropsite/droparea.cpp b/examples/draganddrop/dropsite/droparea.cpp
index c3cac7bf45..ebacac4752 100644
--- a/examples/draganddrop/dropsite/droparea.cpp
+++ b/examples/draganddrop/dropsite/droparea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/dropsite/droparea.h b/examples/draganddrop/dropsite/droparea.h
index 9c2259d4d0..ca30e80f88 100644
--- a/examples/draganddrop/dropsite/droparea.h
+++ b/examples/draganddrop/dropsite/droparea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/dropsite/dropsitewindow.cpp b/examples/draganddrop/dropsite/dropsitewindow.cpp
index 191470207e..0e6034afb8 100644
--- a/examples/draganddrop/dropsite/dropsitewindow.cpp
+++ b/examples/draganddrop/dropsite/dropsitewindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/dropsite/dropsitewindow.h b/examples/draganddrop/dropsite/dropsitewindow.h
index f4cb2a8f61..4e5313b56c 100644
--- a/examples/draganddrop/dropsite/dropsitewindow.h
+++ b/examples/draganddrop/dropsite/dropsitewindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/dropsite/main.cpp b/examples/draganddrop/dropsite/main.cpp
index 8f57cb88a6..b053135791 100644
--- a/examples/draganddrop/dropsite/main.cpp
+++ b/examples/draganddrop/dropsite/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/fridgemagnets/draglabel.cpp b/examples/draganddrop/fridgemagnets/draglabel.cpp
index dd5ddb57d9..ae973b7cc8 100644
--- a/examples/draganddrop/fridgemagnets/draglabel.cpp
+++ b/examples/draganddrop/fridgemagnets/draglabel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/fridgemagnets/draglabel.h b/examples/draganddrop/fridgemagnets/draglabel.h
index 37ebb3a7cd..a4de61ec0d 100644
--- a/examples/draganddrop/fridgemagnets/draglabel.h
+++ b/examples/draganddrop/fridgemagnets/draglabel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp
index 44b377ab89..726fd677e4 100644
--- a/examples/draganddrop/fridgemagnets/dragwidget.cpp
+++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.h b/examples/draganddrop/fridgemagnets/dragwidget.h
index 787121e9e7..a1c0e52bf0 100644
--- a/examples/draganddrop/fridgemagnets/dragwidget.h
+++ b/examples/draganddrop/fridgemagnets/dragwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp
index ae2ecb4bde..a3b1451214 100644
--- a/examples/draganddrop/fridgemagnets/main.cpp
+++ b/examples/draganddrop/fridgemagnets/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/main.cpp b/examples/draganddrop/puzzle/main.cpp
index 60341948ab..52c332b5a9 100644
--- a/examples/draganddrop/puzzle/main.cpp
+++ b/examples/draganddrop/puzzle/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp
index 800213e442..cbdb669ce6 100644
--- a/examples/draganddrop/puzzle/mainwindow.cpp
+++ b/examples/draganddrop/puzzle/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/mainwindow.h b/examples/draganddrop/puzzle/mainwindow.h
index 283ce97660..e0f7aec668 100644
--- a/examples/draganddrop/puzzle/mainwindow.h
+++ b/examples/draganddrop/puzzle/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/pieceslist.cpp b/examples/draganddrop/puzzle/pieceslist.cpp
index 181cd56427..ccbed762b0 100644
--- a/examples/draganddrop/puzzle/pieceslist.cpp
+++ b/examples/draganddrop/puzzle/pieceslist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/pieceslist.h b/examples/draganddrop/puzzle/pieceslist.h
index 967ade0c73..468304a3d3 100644
--- a/examples/draganddrop/puzzle/pieceslist.h
+++ b/examples/draganddrop/puzzle/pieceslist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/puzzlewidget.cpp b/examples/draganddrop/puzzle/puzzlewidget.cpp
index cee2596a61..897af3ca56 100644
--- a/examples/draganddrop/puzzle/puzzlewidget.cpp
+++ b/examples/draganddrop/puzzle/puzzlewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/draganddrop/puzzle/puzzlewidget.h b/examples/draganddrop/puzzle/puzzlewidget.h
index 2cc789c292..496edbb1e0 100644
--- a/examples/draganddrop/puzzle/puzzlewidget.h
+++ b/examples/draganddrop/puzzle/puzzlewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/blurpicker/blureffect.cpp b/examples/effects/blurpicker/blureffect.cpp
index 10410f4669..d12d8afe78 100644
--- a/examples/effects/blurpicker/blureffect.cpp
+++ b/examples/effects/blurpicker/blureffect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/blurpicker/blureffect.h b/examples/effects/blurpicker/blureffect.h
index f981b0f4db..dbd7f9826d 100644
--- a/examples/effects/blurpicker/blureffect.h
+++ b/examples/effects/blurpicker/blureffect.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/blurpicker/blurpicker.cpp b/examples/effects/blurpicker/blurpicker.cpp
index 00771a5818..58e24134a5 100644
--- a/examples/effects/blurpicker/blurpicker.cpp
+++ b/examples/effects/blurpicker/blurpicker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/blurpicker/blurpicker.h b/examples/effects/blurpicker/blurpicker.h
index af367b96c2..cbf9206b79 100644
--- a/examples/effects/blurpicker/blurpicker.h
+++ b/examples/effects/blurpicker/blurpicker.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/blurpicker/main.cpp b/examples/effects/blurpicker/main.cpp
index 2fbe1f139f..19e13f532b 100644
--- a/examples/effects/blurpicker/main.cpp
+++ b/examples/effects/blurpicker/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/fademessage/fademessage.cpp b/examples/effects/fademessage/fademessage.cpp
index 27d84b52bc..72dbf62ddf 100644
--- a/examples/effects/fademessage/fademessage.cpp
+++ b/examples/effects/fademessage/fademessage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/fademessage/fademessage.h b/examples/effects/fademessage/fademessage.h
index 61e67b1a63..2289b43a60 100644
--- a/examples/effects/fademessage/fademessage.h
+++ b/examples/effects/fademessage/fademessage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/fademessage/main.cpp b/examples/effects/fademessage/main.cpp
index 83d6d8eab8..f66694f5ca 100644
--- a/examples/effects/fademessage/main.cpp
+++ b/examples/effects/fademessage/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/lighting/lighting.cpp b/examples/effects/lighting/lighting.cpp
index 3c9fed7ec7..5a99999c01 100644
--- a/examples/effects/lighting/lighting.cpp
+++ b/examples/effects/lighting/lighting.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/lighting/lighting.h b/examples/effects/lighting/lighting.h
index 5099653b71..933a2b557b 100644
--- a/examples/effects/lighting/lighting.h
+++ b/examples/effects/lighting/lighting.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/effects/lighting/main.cpp b/examples/effects/lighting/main.cpp
index 69063a5672..3769f0aeeb 100644
--- a/examples/effects/lighting/main.cpp
+++ b/examples/effects/lighting/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/digiflip/digiflip.cpp b/examples/embedded/digiflip/digiflip.cpp
index dfe8432631..a2c126be1c 100644
--- a/examples/embedded/digiflip/digiflip.cpp
+++ b/examples/embedded/digiflip/digiflip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/flickable/flickable.cpp b/examples/embedded/flickable/flickable.cpp
index 0c707a172b..60433f6d5b 100644
--- a/examples/embedded/flickable/flickable.cpp
+++ b/examples/embedded/flickable/flickable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/flickable/flickable.h b/examples/embedded/flickable/flickable.h
index 3195d3297c..6b32e06d95 100644
--- a/examples/embedded/flickable/flickable.h
+++ b/examples/embedded/flickable/flickable.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/flickable/main.cpp b/examples/embedded/flickable/main.cpp
index 9f86281317..28c8ead9a7 100644
--- a/examples/embedded/flickable/main.cpp
+++ b/examples/embedded/flickable/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/flightinfo/flightinfo.cpp b/examples/embedded/flightinfo/flightinfo.cpp
index c0beb9ea8c..853679ff20 100644
--- a/examples/embedded/flightinfo/flightinfo.cpp
+++ b/examples/embedded/flightinfo/flightinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/lightmaps.cpp b/examples/embedded/lightmaps/lightmaps.cpp
index 2b97abacd8..e46a672920 100644
--- a/examples/embedded/lightmaps/lightmaps.cpp
+++ b/examples/embedded/lightmaps/lightmaps.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/lightmaps.h b/examples/embedded/lightmaps/lightmaps.h
index 45b5c188a2..eb6e4f88c4 100644
--- a/examples/embedded/lightmaps/lightmaps.h
+++ b/examples/embedded/lightmaps/lightmaps.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/main.cpp b/examples/embedded/lightmaps/main.cpp
index 999c355f25..c39428b456 100644
--- a/examples/embedded/lightmaps/main.cpp
+++ b/examples/embedded/lightmaps/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/mapzoom.cpp b/examples/embedded/lightmaps/mapzoom.cpp
index c1b43f07c7..b39ca5ac9a 100644
--- a/examples/embedded/lightmaps/mapzoom.cpp
+++ b/examples/embedded/lightmaps/mapzoom.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/mapzoom.h b/examples/embedded/lightmaps/mapzoom.h
index ac70a23316..d8855efefe 100644
--- a/examples/embedded/lightmaps/mapzoom.h
+++ b/examples/embedded/lightmaps/mapzoom.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/slippymap.cpp b/examples/embedded/lightmaps/slippymap.cpp
index e2a2eaa0bc..0bacb16874 100644
--- a/examples/embedded/lightmaps/slippymap.cpp
+++ b/examples/embedded/lightmaps/slippymap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/lightmaps/slippymap.h b/examples/embedded/lightmaps/slippymap.h
index 64ba5c3e59..63729c9958 100644
--- a/examples/embedded/lightmaps/slippymap.h
+++ b/examples/embedded/lightmaps/slippymap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp
index f2de58a1c1..d1ea143957 100644
--- a/examples/embedded/raycasting/raycasting.cpp
+++ b/examples/embedded/raycasting/raycasting.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/styleexample/files/add.png b/examples/embedded/styleexample/files/add.png
index fc5c16d4c8..fc5c16d4c8 100755..100644
--- a/examples/embedded/styleexample/files/add.png
+++ b/examples/embedded/styleexample/files/add.png
Binary files differ
diff --git a/examples/embedded/styleexample/files/remove.png b/examples/embedded/styleexample/files/remove.png
index a0ab1fa21a..a0ab1fa21a 100755..100644
--- a/examples/embedded/styleexample/files/remove.png
+++ b/examples/embedded/styleexample/files/remove.png
Binary files differ
diff --git a/examples/embedded/styleexample/main.cpp b/examples/embedded/styleexample/main.cpp
index d3c228a59e..4a2c2f001e 100644
--- a/examples/embedded/styleexample/main.cpp
+++ b/examples/embedded/styleexample/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/styleexample/stylewidget.cpp b/examples/embedded/styleexample/stylewidget.cpp
index 7bac8a84d7..9d499c2f2c 100644
--- a/examples/embedded/styleexample/stylewidget.cpp
+++ b/examples/embedded/styleexample/stylewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/embedded/styleexample/stylewidget.h b/examples/embedded/styleexample/stylewidget.h
index 11fa5348de..7ecf4ac13b 100644
--- a/examples/embedded/styleexample/stylewidget.h
+++ b/examples/embedded/styleexample/stylewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/gestures/imagegestures/imagewidget.cpp b/examples/gestures/imagegestures/imagewidget.cpp
index e12cb41363..d7f299285b 100644
--- a/examples/gestures/imagegestures/imagewidget.cpp
+++ b/examples/gestures/imagegestures/imagewidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/gestures/imagegestures/imagewidget.h b/examples/gestures/imagegestures/imagewidget.h
index 1ee7d02224..dd09a7b874 100644
--- a/examples/gestures/imagegestures/imagewidget.h
+++ b/examples/gestures/imagegestures/imagewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/gestures/imagegestures/main.cpp b/examples/gestures/imagegestures/main.cpp
index 4097a2fb31..78806777f8 100644
--- a/examples/gestures/imagegestures/main.cpp
+++ b/examples/gestures/imagegestures/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/gestures/imagegestures/mainwidget.cpp b/examples/gestures/imagegestures/mainwidget.cpp
index 329cfe3bfd..e973dbcc78 100644
--- a/examples/gestures/imagegestures/mainwidget.cpp
+++ b/examples/gestures/imagegestures/mainwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/gestures/imagegestures/mainwidget.h b/examples/gestures/imagegestures/mainwidget.h
index 066b1ee680..ea6a82cc9d 100644
--- a/examples/gestures/imagegestures/mainwidget.h
+++ b/examples/gestures/imagegestures/mainwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp
index d19dd38f74..575209583f 100644
--- a/examples/graphicsview/anchorlayout/main.cpp
+++ b/examples/graphicsview/anchorlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp b/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
index 0b1a10dd50..1d4ce5cb3e 100644
--- a/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.h b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
index 3d83d4cd88..f51ee280de 100644
--- a/examples/graphicsview/basicgraphicslayouts/layoutitem.h
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/basicgraphicslayouts/main.cpp b/examples/graphicsview/basicgraphicslayouts/main.cpp
index 5edd130403..296120fd40 100644
--- a/examples/graphicsview/basicgraphicslayouts/main.cpp
+++ b/examples/graphicsview/basicgraphicslayouts/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/basicgraphicslayouts/window.cpp b/examples/graphicsview/basicgraphicslayouts/window.cpp
index 17a456e240..33016be62f 100644
--- a/examples/graphicsview/basicgraphicslayouts/window.cpp
+++ b/examples/graphicsview/basicgraphicslayouts/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/basicgraphicslayouts/window.h b/examples/graphicsview/basicgraphicslayouts/window.h
index 4efa1ecd3a..dbfcb33adc 100644
--- a/examples/graphicsview/basicgraphicslayouts/window.h
+++ b/examples/graphicsview/basicgraphicslayouts/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/basic.fsh b/examples/graphicsview/boxes/basic.fsh
index faf3601606..b0491b7d41 100644
--- a/examples/graphicsview/boxes/basic.fsh
+++ b/examples/graphicsview/boxes/basic.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/basic.vsh b/examples/graphicsview/boxes/basic.vsh
index 31acc4224a..0016c261c7 100644
--- a/examples/graphicsview/boxes/basic.vsh
+++ b/examples/graphicsview/boxes/basic.vsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/dotted.fsh b/examples/graphicsview/boxes/dotted.fsh
index a9f1bcbefb..22ade01ecf 100644
--- a/examples/graphicsview/boxes/dotted.fsh
+++ b/examples/graphicsview/boxes/dotted.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/fresnel.fsh b/examples/graphicsview/boxes/fresnel.fsh
index 462f9674f4..d00c63d566 100644
--- a/examples/graphicsview/boxes/fresnel.fsh
+++ b/examples/graphicsview/boxes/fresnel.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/glass.fsh b/examples/graphicsview/boxes/glass.fsh
index aeac2c2fed..adadab8c58 100644
--- a/examples/graphicsview/boxes/glass.fsh
+++ b/examples/graphicsview/boxes/glass.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/glbuffers.cpp b/examples/graphicsview/boxes/glbuffers.cpp
index e12132b4cd..5b501f573c 100644
--- a/examples/graphicsview/boxes/glbuffers.cpp
+++ b/examples/graphicsview/boxes/glbuffers.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/glbuffers.h b/examples/graphicsview/boxes/glbuffers.h
index fa3a964c22..e81a026817 100644
--- a/examples/graphicsview/boxes/glbuffers.h
+++ b/examples/graphicsview/boxes/glbuffers.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/glextensions.cpp b/examples/graphicsview/boxes/glextensions.cpp
index b712efe38b..88e946b359 100644
--- a/examples/graphicsview/boxes/glextensions.cpp
+++ b/examples/graphicsview/boxes/glextensions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/glextensions.h b/examples/graphicsview/boxes/glextensions.h
index f9c5dbcaa9..751dbd8aa9 100644
--- a/examples/graphicsview/boxes/glextensions.h
+++ b/examples/graphicsview/boxes/glextensions.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/gltrianglemesh.h b/examples/graphicsview/boxes/gltrianglemesh.h
index f023938b7b..d10437d05f 100644
--- a/examples/graphicsview/boxes/gltrianglemesh.h
+++ b/examples/graphicsview/boxes/gltrianglemesh.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/granite.fsh b/examples/graphicsview/boxes/granite.fsh
index abaeeb97bc..5e78ff287c 100644
--- a/examples/graphicsview/boxes/granite.fsh
+++ b/examples/graphicsview/boxes/granite.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/main.cpp b/examples/graphicsview/boxes/main.cpp
index e7dced71d2..42b8d331cb 100644
--- a/examples/graphicsview/boxes/main.cpp
+++ b/examples/graphicsview/boxes/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/marble.fsh b/examples/graphicsview/boxes/marble.fsh
index 170ec3abef..84d62af8b2 100644
--- a/examples/graphicsview/boxes/marble.fsh
+++ b/examples/graphicsview/boxes/marble.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/qtbox.cpp b/examples/graphicsview/boxes/qtbox.cpp
index d24116578c..226363de0b 100644
--- a/examples/graphicsview/boxes/qtbox.cpp
+++ b/examples/graphicsview/boxes/qtbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/qtbox.h b/examples/graphicsview/boxes/qtbox.h
index 81ef8ae7d5..8cac5562a5 100644
--- a/examples/graphicsview/boxes/qtbox.h
+++ b/examples/graphicsview/boxes/qtbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/reflection.fsh b/examples/graphicsview/boxes/reflection.fsh
index 576c522bbb..ad63ccb3a3 100644
--- a/examples/graphicsview/boxes/reflection.fsh
+++ b/examples/graphicsview/boxes/reflection.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/refraction.fsh b/examples/graphicsview/boxes/refraction.fsh
index 10ab38a54c..b591891c19 100644
--- a/examples/graphicsview/boxes/refraction.fsh
+++ b/examples/graphicsview/boxes/refraction.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/roundedbox.cpp b/examples/graphicsview/boxes/roundedbox.cpp
index 5058043707..b3d452d161 100644
--- a/examples/graphicsview/boxes/roundedbox.cpp
+++ b/examples/graphicsview/boxes/roundedbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/roundedbox.h b/examples/graphicsview/boxes/roundedbox.h
index e4e7c589d3..12f6abe042 100644
--- a/examples/graphicsview/boxes/roundedbox.h
+++ b/examples/graphicsview/boxes/roundedbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/scene.cpp b/examples/graphicsview/boxes/scene.cpp
index 39cd0fcafd..bbe4f896e1 100644
--- a/examples/graphicsview/boxes/scene.cpp
+++ b/examples/graphicsview/boxes/scene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/scene.h b/examples/graphicsview/boxes/scene.h
index 357f955bb6..e79093df0e 100644
--- a/examples/graphicsview/boxes/scene.h
+++ b/examples/graphicsview/boxes/scene.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/trackball.cpp b/examples/graphicsview/boxes/trackball.cpp
index 1bb864ce90..95d4a63cab 100644
--- a/examples/graphicsview/boxes/trackball.cpp
+++ b/examples/graphicsview/boxes/trackball.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/trackball.h b/examples/graphicsview/boxes/trackball.h
index cc3d5ade34..ac0f41c969 100644
--- a/examples/graphicsview/boxes/trackball.h
+++ b/examples/graphicsview/boxes/trackball.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/boxes/wood.fsh b/examples/graphicsview/boxes/wood.fsh
index 19950b252c..4ce1411f5f 100644
--- a/examples/graphicsview/boxes/wood.fsh
+++ b/examples/graphicsview/boxes/wood.fsh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/chip.cpp b/examples/graphicsview/chip/chip.cpp
index b47069b20c..e7978cdfea 100644
--- a/examples/graphicsview/chip/chip.cpp
+++ b/examples/graphicsview/chip/chip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/chip.h b/examples/graphicsview/chip/chip.h
index 460969451b..fc57633004 100644
--- a/examples/graphicsview/chip/chip.h
+++ b/examples/graphicsview/chip/chip.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/main.cpp b/examples/graphicsview/chip/main.cpp
index e983e4cca6..d82a34cb2b 100644
--- a/examples/graphicsview/chip/main.cpp
+++ b/examples/graphicsview/chip/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/mainwindow.cpp b/examples/graphicsview/chip/mainwindow.cpp
index a8f4675c13..c504a108c8 100644
--- a/examples/graphicsview/chip/mainwindow.cpp
+++ b/examples/graphicsview/chip/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/mainwindow.h b/examples/graphicsview/chip/mainwindow.h
index a5ea9402d7..01bd3a1587 100644
--- a/examples/graphicsview/chip/mainwindow.h
+++ b/examples/graphicsview/chip/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/view.cpp b/examples/graphicsview/chip/view.cpp
index 072dafaed4..1169b30421 100644
--- a/examples/graphicsview/chip/view.cpp
+++ b/examples/graphicsview/chip/view.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/chip/view.h b/examples/graphicsview/chip/view.h
index 7c587d4147..2c3d643976 100644
--- a/examples/graphicsview/chip/view.h
+++ b/examples/graphicsview/chip/view.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/collidingmice/main.cpp b/examples/graphicsview/collidingmice/main.cpp
index 5bba2756ce..c3db838746 100644
--- a/examples/graphicsview/collidingmice/main.cpp
+++ b/examples/graphicsview/collidingmice/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/collidingmice/mouse.cpp b/examples/graphicsview/collidingmice/mouse.cpp
index 4e89454f8d..f5ad94bfef 100644
--- a/examples/graphicsview/collidingmice/mouse.cpp
+++ b/examples/graphicsview/collidingmice/mouse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/collidingmice/mouse.h b/examples/graphicsview/collidingmice/mouse.h
index 430e741d5b..c85e351f44 100644
--- a/examples/graphicsview/collidingmice/mouse.h
+++ b/examples/graphicsview/collidingmice/mouse.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/arrow.cpp b/examples/graphicsview/diagramscene/arrow.cpp
index 34142ff71b..6ba8e8282e 100644
--- a/examples/graphicsview/diagramscene/arrow.cpp
+++ b/examples/graphicsview/diagramscene/arrow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/arrow.h b/examples/graphicsview/diagramscene/arrow.h
index cc6ff9732d..b6e2c503b4 100644
--- a/examples/graphicsview/diagramscene/arrow.h
+++ b/examples/graphicsview/diagramscene/arrow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/diagramitem.cpp b/examples/graphicsview/diagramscene/diagramitem.cpp
index 31c9627f9a..3b67346cca 100644
--- a/examples/graphicsview/diagramscene/diagramitem.cpp
+++ b/examples/graphicsview/diagramscene/diagramitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/diagramitem.h b/examples/graphicsview/diagramscene/diagramitem.h
index 44a8b6dad5..96de11e865 100644
--- a/examples/graphicsview/diagramscene/diagramitem.h
+++ b/examples/graphicsview/diagramscene/diagramitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/diagramscene.cpp b/examples/graphicsview/diagramscene/diagramscene.cpp
index 4ce5c68841..c7ff12552f 100644
--- a/examples/graphicsview/diagramscene/diagramscene.cpp
+++ b/examples/graphicsview/diagramscene/diagramscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/diagramscene.h b/examples/graphicsview/diagramscene/diagramscene.h
index 4ebe1d2a71..dfa9bd197f 100644
--- a/examples/graphicsview/diagramscene/diagramscene.h
+++ b/examples/graphicsview/diagramscene/diagramscene.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/diagramtextitem.cpp b/examples/graphicsview/diagramscene/diagramtextitem.cpp
index f8858f1f51..ddbd754489 100644
--- a/examples/graphicsview/diagramscene/diagramtextitem.cpp
+++ b/examples/graphicsview/diagramscene/diagramtextitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/diagramtextitem.h b/examples/graphicsview/diagramscene/diagramtextitem.h
index 5e3505f6f0..3a4d6d9911 100644
--- a/examples/graphicsview/diagramscene/diagramtextitem.h
+++ b/examples/graphicsview/diagramscene/diagramtextitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/main.cpp b/examples/graphicsview/diagramscene/main.cpp
index bab04ef1aa..d1d8445aa2 100644
--- a/examples/graphicsview/diagramscene/main.cpp
+++ b/examples/graphicsview/diagramscene/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp
index edf7d3c3f3..382f47ba99 100644
--- a/examples/graphicsview/diagramscene/mainwindow.cpp
+++ b/examples/graphicsview/diagramscene/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/diagramscene/mainwindow.h b/examples/graphicsview/diagramscene/mainwindow.h
index ad76395a69..3986e41725 100644
--- a/examples/graphicsview/diagramscene/mainwindow.h
+++ b/examples/graphicsview/diagramscene/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/dragdroprobot/coloritem.cpp b/examples/graphicsview/dragdroprobot/coloritem.cpp
index 24b8491a6b..137faf7497 100644
--- a/examples/graphicsview/dragdroprobot/coloritem.cpp
+++ b/examples/graphicsview/dragdroprobot/coloritem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/dragdroprobot/coloritem.h b/examples/graphicsview/dragdroprobot/coloritem.h
index e5874f910d..72182420aa 100644
--- a/examples/graphicsview/dragdroprobot/coloritem.h
+++ b/examples/graphicsview/dragdroprobot/coloritem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp
index c90aef0599..ca68a17157 100644
--- a/examples/graphicsview/dragdroprobot/main.cpp
+++ b/examples/graphicsview/dragdroprobot/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/dragdroprobot/robot.cpp b/examples/graphicsview/dragdroprobot/robot.cpp
index df585a948f..e073a85791 100644
--- a/examples/graphicsview/dragdroprobot/robot.cpp
+++ b/examples/graphicsview/dragdroprobot/robot.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/dragdroprobot/robot.h b/examples/graphicsview/dragdroprobot/robot.h
index e65f39426b..60808a4df7 100644
--- a/examples/graphicsview/dragdroprobot/robot.h
+++ b/examples/graphicsview/dragdroprobot/robot.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/edge.cpp b/examples/graphicsview/elasticnodes/edge.cpp
index 652ab737fc..0431ff600c 100644
--- a/examples/graphicsview/elasticnodes/edge.cpp
+++ b/examples/graphicsview/elasticnodes/edge.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/edge.h b/examples/graphicsview/elasticnodes/edge.h
index 8f73edd787..dfd6dd7c40 100644
--- a/examples/graphicsview/elasticnodes/edge.h
+++ b/examples/graphicsview/elasticnodes/edge.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/graphwidget.cpp b/examples/graphicsview/elasticnodes/graphwidget.cpp
index 6c54ca2381..50dcf3348c 100644
--- a/examples/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/graphicsview/elasticnodes/graphwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/graphwidget.h b/examples/graphicsview/elasticnodes/graphwidget.h
index 354967bdd2..b65a213685 100644
--- a/examples/graphicsview/elasticnodes/graphwidget.h
+++ b/examples/graphicsview/elasticnodes/graphwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/main.cpp b/examples/graphicsview/elasticnodes/main.cpp
index 1c04057d1e..0aa551d4e5 100644
--- a/examples/graphicsview/elasticnodes/main.cpp
+++ b/examples/graphicsview/elasticnodes/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/node.cpp b/examples/graphicsview/elasticnodes/node.cpp
index 076d8232a1..de8d31058a 100644
--- a/examples/graphicsview/elasticnodes/node.cpp
+++ b/examples/graphicsview/elasticnodes/node.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/elasticnodes/node.h b/examples/graphicsview/elasticnodes/node.h
index 53af7182d0..d2f3e7471b 100644
--- a/examples/graphicsview/elasticnodes/node.h
+++ b/examples/graphicsview/elasticnodes/node.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/embeddeddialogs/customproxy.cpp b/examples/graphicsview/embeddeddialogs/customproxy.cpp
index 13f5f654c2..cc1ec06090 100644
--- a/examples/graphicsview/embeddeddialogs/customproxy.cpp
+++ b/examples/graphicsview/embeddeddialogs/customproxy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/embeddeddialogs/customproxy.h b/examples/graphicsview/embeddeddialogs/customproxy.h
index 0ac7c7afe4..d276298709 100644
--- a/examples/graphicsview/embeddeddialogs/customproxy.h
+++ b/examples/graphicsview/embeddeddialogs/customproxy.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp b/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp
index f608fc5558..40ed950fd1 100644
--- a/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp
+++ b/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/embeddeddialogs/embeddeddialog.h b/examples/graphicsview/embeddeddialogs/embeddeddialog.h
index 1c7051fac9..4098597577 100644
--- a/examples/graphicsview/embeddeddialogs/embeddeddialog.h
+++ b/examples/graphicsview/embeddeddialogs/embeddeddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/embeddeddialogs/main.cpp b/examples/graphicsview/embeddeddialogs/main.cpp
index 0dc61a4930..e70819efcc 100644
--- a/examples/graphicsview/embeddeddialogs/main.cpp
+++ b/examples/graphicsview/embeddeddialogs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/flowlayout/flowlayout.cpp b/examples/graphicsview/flowlayout/flowlayout.cpp
index cb0ca1b2de..2b26111223 100644
--- a/examples/graphicsview/flowlayout/flowlayout.cpp
+++ b/examples/graphicsview/flowlayout/flowlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/flowlayout/flowlayout.h b/examples/graphicsview/flowlayout/flowlayout.h
index 67c3315736..a1adc2e2a6 100644
--- a/examples/graphicsview/flowlayout/flowlayout.h
+++ b/examples/graphicsview/flowlayout/flowlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/flowlayout/main.cpp b/examples/graphicsview/flowlayout/main.cpp
index 88bbb79d4c..915eb479ca 100644
--- a/examples/graphicsview/flowlayout/main.cpp
+++ b/examples/graphicsview/flowlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/flowlayout/window.cpp b/examples/graphicsview/flowlayout/window.cpp
index 35bd931d39..2ab4f5f515 100644
--- a/examples/graphicsview/flowlayout/window.cpp
+++ b/examples/graphicsview/flowlayout/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/flowlayout/window.h b/examples/graphicsview/flowlayout/window.h
index 7697d70842..9a0d4d20f4 100644
--- a/examples/graphicsview/flowlayout/window.h
+++ b/examples/graphicsview/flowlayout/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/flippablepad.cpp b/examples/graphicsview/padnavigator/flippablepad.cpp
index 78f8281afd..e59a0c776d 100644
--- a/examples/graphicsview/padnavigator/flippablepad.cpp
+++ b/examples/graphicsview/padnavigator/flippablepad.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/flippablepad.h b/examples/graphicsview/padnavigator/flippablepad.h
index 0114b43a75..ef3a1cbfda 100644
--- a/examples/graphicsview/padnavigator/flippablepad.h
+++ b/examples/graphicsview/padnavigator/flippablepad.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/main.cpp b/examples/graphicsview/padnavigator/main.cpp
index 4cdf71c8e6..5f3eedb0f1 100644
--- a/examples/graphicsview/padnavigator/main.cpp
+++ b/examples/graphicsview/padnavigator/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/padnavigator.cpp b/examples/graphicsview/padnavigator/padnavigator.cpp
index b714ebfb71..7b7d7b632f 100644
--- a/examples/graphicsview/padnavigator/padnavigator.cpp
+++ b/examples/graphicsview/padnavigator/padnavigator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/padnavigator.h b/examples/graphicsview/padnavigator/padnavigator.h
index 0fcfde931f..73dae93529 100644
--- a/examples/graphicsview/padnavigator/padnavigator.h
+++ b/examples/graphicsview/padnavigator/padnavigator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/roundrectitem.cpp b/examples/graphicsview/padnavigator/roundrectitem.cpp
index 0103de47fe..f32c884884 100644
--- a/examples/graphicsview/padnavigator/roundrectitem.cpp
+++ b/examples/graphicsview/padnavigator/roundrectitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/roundrectitem.h b/examples/graphicsview/padnavigator/roundrectitem.h
index a7d014f12a..7bdf186533 100644
--- a/examples/graphicsview/padnavigator/roundrectitem.h
+++ b/examples/graphicsview/padnavigator/roundrectitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/splashitem.cpp b/examples/graphicsview/padnavigator/splashitem.cpp
index ee3b38c1a9..52a4ca9aa9 100644
--- a/examples/graphicsview/padnavigator/splashitem.cpp
+++ b/examples/graphicsview/padnavigator/splashitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/padnavigator/splashitem.h b/examples/graphicsview/padnavigator/splashitem.h
index 4d0b58a824..404880c172 100644
--- a/examples/graphicsview/padnavigator/splashitem.h
+++ b/examples/graphicsview/padnavigator/splashitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/simpleanchorlayout/main.cpp b/examples/graphicsview/simpleanchorlayout/main.cpp
index a909552f6a..5536e2ea03 100644
--- a/examples/graphicsview/simpleanchorlayout/main.cpp
+++ b/examples/graphicsview/simpleanchorlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/graphicsview/weatheranchorlayout/main.cpp b/examples/graphicsview/weatheranchorlayout/main.cpp
index e87756b664..30ac6487b9 100644
--- a/examples/graphicsview/weatheranchorlayout/main.cpp
+++ b/examples/graphicsview/weatheranchorlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp
index e637cce3c9..1236662bca 100644
--- a/examples/ipc/localfortuneclient/client.cpp
+++ b/examples/ipc/localfortuneclient/client.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/localfortuneclient/client.h b/examples/ipc/localfortuneclient/client.h
index 30dc482a4a..c0532d8ad2 100644
--- a/examples/ipc/localfortuneclient/client.h
+++ b/examples/ipc/localfortuneclient/client.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/localfortuneclient/main.cpp b/examples/ipc/localfortuneclient/main.cpp
index 557ca3add0..f56167009a 100644
--- a/examples/ipc/localfortuneclient/main.cpp
+++ b/examples/ipc/localfortuneclient/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/localfortuneserver/main.cpp b/examples/ipc/localfortuneserver/main.cpp
index ebae3fdd23..afca00ca04 100644
--- a/examples/ipc/localfortuneserver/main.cpp
+++ b/examples/ipc/localfortuneserver/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/localfortuneserver/server.cpp b/examples/ipc/localfortuneserver/server.cpp
index 684c81fc92..2d09bf53bb 100644
--- a/examples/ipc/localfortuneserver/server.cpp
+++ b/examples/ipc/localfortuneserver/server.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/localfortuneserver/server.h b/examples/ipc/localfortuneserver/server.h
index 5f00ba4d2d..cd9203d469 100644
--- a/examples/ipc/localfortuneserver/server.h
+++ b/examples/ipc/localfortuneserver/server.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/sharedmemory/dialog.cpp b/examples/ipc/sharedmemory/dialog.cpp
index fd7535ed13..5a4fa75235 100644
--- a/examples/ipc/sharedmemory/dialog.cpp
+++ b/examples/ipc/sharedmemory/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/sharedmemory/dialog.h b/examples/ipc/sharedmemory/dialog.h
index ff9eacbaec..26677a9446 100644
--- a/examples/ipc/sharedmemory/dialog.h
+++ b/examples/ipc/sharedmemory/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ipc/sharedmemory/main.cpp b/examples/ipc/sharedmemory/main.cpp
index 279c1c0047..6cda2b22f6 100644
--- a/examples/ipc/sharedmemory/main.cpp
+++ b/examples/ipc/sharedmemory/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/adddialog.cpp b/examples/itemviews/addressbook/adddialog.cpp
index c5baddd1ea..0352abe39c 100644
--- a/examples/itemviews/addressbook/adddialog.cpp
+++ b/examples/itemviews/addressbook/adddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/adddialog.h b/examples/itemviews/addressbook/adddialog.h
index d274cfba09..7d4e5b886d 100644
--- a/examples/itemviews/addressbook/adddialog.h
+++ b/examples/itemviews/addressbook/adddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp
index d9d3f46fed..7d4d752a52 100644
--- a/examples/itemviews/addressbook/addresswidget.cpp
+++ b/examples/itemviews/addressbook/addresswidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -167,8 +167,7 @@ void AddressWidget::setupTabs()
proxyModel = new QSortFilterProxyModel(this);
proxyModel->setSourceModel(table);
- proxyModel->setDynamicSortFilter(true);
-
+
QTableView *tableView = new QTableView;
tableView->setModel(proxyModel);
tableView->setSortingEnabled(true);
diff --git a/examples/itemviews/addressbook/addresswidget.h b/examples/itemviews/addressbook/addresswidget.h
index 9442a3da7d..28dac9dee3 100644
--- a/examples/itemviews/addressbook/addresswidget.h
+++ b/examples/itemviews/addressbook/addresswidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/main.cpp b/examples/itemviews/addressbook/main.cpp
index 0a0ccb7ac8..f5dc990137 100644
--- a/examples/itemviews/addressbook/main.cpp
+++ b/examples/itemviews/addressbook/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/mainwindow.cpp b/examples/itemviews/addressbook/mainwindow.cpp
index 0a08b726bb..dec4d266f6 100644
--- a/examples/itemviews/addressbook/mainwindow.cpp
+++ b/examples/itemviews/addressbook/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/mainwindow.h b/examples/itemviews/addressbook/mainwindow.h
index 4f925dd1e4..436565b12d 100644
--- a/examples/itemviews/addressbook/mainwindow.h
+++ b/examples/itemviews/addressbook/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/newaddresstab.cpp b/examples/itemviews/addressbook/newaddresstab.cpp
index 3a720f6cb4..01edd24575 100644
--- a/examples/itemviews/addressbook/newaddresstab.cpp
+++ b/examples/itemviews/addressbook/newaddresstab.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/newaddresstab.h b/examples/itemviews/addressbook/newaddresstab.h
index b849c9d62d..ad9afc25c2 100644
--- a/examples/itemviews/addressbook/newaddresstab.h
+++ b/examples/itemviews/addressbook/newaddresstab.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/tablemodel.cpp b/examples/itemviews/addressbook/tablemodel.cpp
index 19612eb809..536d2a4b4e 100644
--- a/examples/itemviews/addressbook/tablemodel.cpp
+++ b/examples/itemviews/addressbook/tablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/addressbook/tablemodel.h b/examples/itemviews/addressbook/tablemodel.h
index 2c30056766..e398e5a3e0 100644
--- a/examples/itemviews/addressbook/tablemodel.h
+++ b/examples/itemviews/addressbook/tablemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/basicsortfiltermodel/main.cpp b/examples/itemviews/basicsortfiltermodel/main.cpp
index 8f8a2a7205..7fa67ac71d 100644
--- a/examples/itemviews/basicsortfiltermodel/main.cpp
+++ b/examples/itemviews/basicsortfiltermodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp
index 08bdc04009..c1d62b643c 100644
--- a/examples/itemviews/basicsortfiltermodel/window.cpp
+++ b/examples/itemviews/basicsortfiltermodel/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,6 @@
Window::Window()
{
proxyModel = new QSortFilterProxyModel;
- proxyModel->setDynamicSortFilter(true);
sourceView = new QTreeView;
sourceView->setRootIsDecorated(false);
diff --git a/examples/itemviews/basicsortfiltermodel/window.h b/examples/itemviews/basicsortfiltermodel/window.h
index 92b5008384..9810d03edd 100644
--- a/examples/itemviews/basicsortfiltermodel/window.h
+++ b/examples/itemviews/basicsortfiltermodel/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/chart/main.cpp b/examples/itemviews/chart/main.cpp
index 936654097f..8d5f4ec909 100644
--- a/examples/itemviews/chart/main.cpp
+++ b/examples/itemviews/chart/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/chart/mainwindow.cpp b/examples/itemviews/chart/mainwindow.cpp
index b98057e2e3..84814dae12 100644
--- a/examples/itemviews/chart/mainwindow.cpp
+++ b/examples/itemviews/chart/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/chart/mainwindow.h b/examples/itemviews/chart/mainwindow.h
index 4d45f1e4be..c432bdbdd7 100644
--- a/examples/itemviews/chart/mainwindow.h
+++ b/examples/itemviews/chart/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/chart/pieview.cpp b/examples/itemviews/chart/pieview.cpp
index ff6306e9ea..04512f6d73 100644
--- a/examples/itemviews/chart/pieview.cpp
+++ b/examples/itemviews/chart/pieview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/chart/pieview.h b/examples/itemviews/chart/pieview.h
index 7afb3e51e6..b0bc0d7993 100644
--- a/examples/itemviews/chart/pieview.h
+++ b/examples/itemviews/chart/pieview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/coloreditorfactory/colorlisteditor.cpp b/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
index ee540c603c..0b1631c858 100644
--- a/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
+++ b/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/coloreditorfactory/colorlisteditor.h b/examples/itemviews/coloreditorfactory/colorlisteditor.h
index 2fdc23bb5e..bf97dca412 100644
--- a/examples/itemviews/coloreditorfactory/colorlisteditor.h
+++ b/examples/itemviews/coloreditorfactory/colorlisteditor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/coloreditorfactory/main.cpp b/examples/itemviews/coloreditorfactory/main.cpp
index bbb1d25933..e70150e37c 100644
--- a/examples/itemviews/coloreditorfactory/main.cpp
+++ b/examples/itemviews/coloreditorfactory/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/coloreditorfactory/window.cpp b/examples/itemviews/coloreditorfactory/window.cpp
index aa7e9377b5..194168ee0d 100644
--- a/examples/itemviews/coloreditorfactory/window.cpp
+++ b/examples/itemviews/coloreditorfactory/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/coloreditorfactory/window.h b/examples/itemviews/coloreditorfactory/window.h
index 5aad0c21b9..53b06ba6e5 100644
--- a/examples/itemviews/coloreditorfactory/window.h
+++ b/examples/itemviews/coloreditorfactory/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/combowidgetmapper/main.cpp b/examples/itemviews/combowidgetmapper/main.cpp
index 41e756d8ad..3cbf4b5880 100644
--- a/examples/itemviews/combowidgetmapper/main.cpp
+++ b/examples/itemviews/combowidgetmapper/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/combowidgetmapper/window.cpp b/examples/itemviews/combowidgetmapper/window.cpp
index 8721a6a8e6..490b993e31 100644
--- a/examples/itemviews/combowidgetmapper/window.cpp
+++ b/examples/itemviews/combowidgetmapper/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/combowidgetmapper/window.h b/examples/itemviews/combowidgetmapper/window.h
index e890ce0eda..5262566501 100644
--- a/examples/itemviews/combowidgetmapper/window.h
+++ b/examples/itemviews/combowidgetmapper/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/customsortfiltermodel/main.cpp b/examples/itemviews/customsortfiltermodel/main.cpp
index 34be2f682b..458198740c 100644
--- a/examples/itemviews/customsortfiltermodel/main.cpp
+++ b/examples/itemviews/customsortfiltermodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
index 358546350c..99677e1ccd 100644
--- a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
+++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
index 7ab7d590c2..8d081c0f6b 100644
--- a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
+++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp
index 95b5f581d7..8e640c0bc8 100644
--- a/examples/itemviews/customsortfiltermodel/window.cpp
+++ b/examples/itemviews/customsortfiltermodel/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -47,7 +47,6 @@
Window::Window()
{
proxyModel = new MySortFilterProxyModel(this);
- proxyModel->setDynamicSortFilter(true);
//! [0]
//! [1]
diff --git a/examples/itemviews/customsortfiltermodel/window.h b/examples/itemviews/customsortfiltermodel/window.h
index 15baffc2c6..6225d84d70 100644
--- a/examples/itemviews/customsortfiltermodel/window.h
+++ b/examples/itemviews/customsortfiltermodel/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/dirview/main.cpp b/examples/itemviews/dirview/main.cpp
index dbb5b7ae8c..b76eca5566 100644
--- a/examples/itemviews/dirview/main.cpp
+++ b/examples/itemviews/dirview/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/main.cpp b/examples/itemviews/editabletreemodel/main.cpp
index 5a2cc77465..ced44b979c 100644
--- a/examples/itemviews/editabletreemodel/main.cpp
+++ b/examples/itemviews/editabletreemodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/mainwindow.cpp b/examples/itemviews/editabletreemodel/mainwindow.cpp
index 3080684e4f..1754a29120 100644
--- a/examples/itemviews/editabletreemodel/mainwindow.cpp
+++ b/examples/itemviews/editabletreemodel/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/mainwindow.h b/examples/itemviews/editabletreemodel/mainwindow.h
index 3dc8291d26..6608f48251 100644
--- a/examples/itemviews/editabletreemodel/mainwindow.h
+++ b/examples/itemviews/editabletreemodel/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/treeitem.cpp b/examples/itemviews/editabletreemodel/treeitem.cpp
index 00446aa89b..34f3e881b8 100644
--- a/examples/itemviews/editabletreemodel/treeitem.cpp
+++ b/examples/itemviews/editabletreemodel/treeitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/treeitem.h b/examples/itemviews/editabletreemodel/treeitem.h
index 7a54ce4f26..065c748332 100644
--- a/examples/itemviews/editabletreemodel/treeitem.h
+++ b/examples/itemviews/editabletreemodel/treeitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/treemodel.cpp b/examples/itemviews/editabletreemodel/treemodel.cpp
index 34168137fa..52e0b56c3f 100644
--- a/examples/itemviews/editabletreemodel/treemodel.cpp
+++ b/examples/itemviews/editabletreemodel/treemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/editabletreemodel/treemodel.h b/examples/itemviews/editabletreemodel/treemodel.h
index 549a437012..9c7af52d06 100644
--- a/examples/itemviews/editabletreemodel/treemodel.h
+++ b/examples/itemviews/editabletreemodel/treemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/fetchmore/filelistmodel.cpp b/examples/itemviews/fetchmore/filelistmodel.cpp
index 727c658a3d..272742c27a 100644
--- a/examples/itemviews/fetchmore/filelistmodel.cpp
+++ b/examples/itemviews/fetchmore/filelistmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/fetchmore/filelistmodel.h b/examples/itemviews/fetchmore/filelistmodel.h
index 9f0898eb8e..6cd2094f57 100644
--- a/examples/itemviews/fetchmore/filelistmodel.h
+++ b/examples/itemviews/fetchmore/filelistmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/fetchmore/main.cpp b/examples/itemviews/fetchmore/main.cpp
index aedfd9f8d3..027c8bd3d1 100644
--- a/examples/itemviews/fetchmore/main.cpp
+++ b/examples/itemviews/fetchmore/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/fetchmore/window.cpp b/examples/itemviews/fetchmore/window.cpp
index 676a4ae1a8..30c000edc9 100644
--- a/examples/itemviews/fetchmore/window.cpp
+++ b/examples/itemviews/fetchmore/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/fetchmore/window.h b/examples/itemviews/fetchmore/window.h
index f726caedcf..5cbd6c3ea3 100644
--- a/examples/itemviews/fetchmore/window.h
+++ b/examples/itemviews/fetchmore/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/frozencolumn/freezetablewidget.cpp b/examples/itemviews/frozencolumn/freezetablewidget.cpp
index f76575a86d..2d2e16cd3b 100644
--- a/examples/itemviews/frozencolumn/freezetablewidget.cpp
+++ b/examples/itemviews/frozencolumn/freezetablewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/frozencolumn/freezetablewidget.h b/examples/itemviews/frozencolumn/freezetablewidget.h
index 8ba8d17aa7..f9129898de 100644
--- a/examples/itemviews/frozencolumn/freezetablewidget.h
+++ b/examples/itemviews/frozencolumn/freezetablewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/frozencolumn/main.cpp b/examples/itemviews/frozencolumn/main.cpp
index f6aa489d05..947387e20d 100644
--- a/examples/itemviews/frozencolumn/main.cpp
+++ b/examples/itemviews/frozencolumn/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/interview/main.cpp b/examples/itemviews/interview/main.cpp
index b9656c6185..83ea0ff1c8 100644
--- a/examples/itemviews/interview/main.cpp
+++ b/examples/itemviews/interview/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/interview/model.cpp b/examples/itemviews/interview/model.cpp
index 6031615711..03cd7de036 100644
--- a/examples/itemviews/interview/model.cpp
+++ b/examples/itemviews/interview/model.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/interview/model.h b/examples/itemviews/interview/model.h
index f0ae556ce3..2389346a67 100644
--- a/examples/itemviews/interview/model.h
+++ b/examples/itemviews/interview/model.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/imagemodel.cpp b/examples/itemviews/pixelator/imagemodel.cpp
index d0e315978b..fdbe81cd02 100644
--- a/examples/itemviews/pixelator/imagemodel.cpp
+++ b/examples/itemviews/pixelator/imagemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/imagemodel.h b/examples/itemviews/pixelator/imagemodel.h
index 158f31dc0b..d71c0dafcb 100644
--- a/examples/itemviews/pixelator/imagemodel.h
+++ b/examples/itemviews/pixelator/imagemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/main.cpp b/examples/itemviews/pixelator/main.cpp
index e7f45e3f42..89a7f9e665 100644
--- a/examples/itemviews/pixelator/main.cpp
+++ b/examples/itemviews/pixelator/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/mainwindow.cpp b/examples/itemviews/pixelator/mainwindow.cpp
index 15bd60e1b4..2e77fb94bb 100644
--- a/examples/itemviews/pixelator/mainwindow.cpp
+++ b/examples/itemviews/pixelator/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/mainwindow.h b/examples/itemviews/pixelator/mainwindow.h
index 5dc2a908db..78a294dcc9 100644
--- a/examples/itemviews/pixelator/mainwindow.h
+++ b/examples/itemviews/pixelator/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/pixeldelegate.cpp b/examples/itemviews/pixelator/pixeldelegate.cpp
index 2260553cbb..e92be74927 100644
--- a/examples/itemviews/pixelator/pixeldelegate.cpp
+++ b/examples/itemviews/pixelator/pixeldelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/pixelator/pixeldelegate.h b/examples/itemviews/pixelator/pixeldelegate.h
index 3ff73b53e5..9ba8c85c76 100644
--- a/examples/itemviews/pixelator/pixeldelegate.h
+++ b/examples/itemviews/pixelator/pixeldelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/main.cpp b/examples/itemviews/puzzle/main.cpp
index 60341948ab..52c332b5a9 100644
--- a/examples/itemviews/puzzle/main.cpp
+++ b/examples/itemviews/puzzle/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/mainwindow.cpp b/examples/itemviews/puzzle/mainwindow.cpp
index 5142de1cb2..57b46fe266 100644
--- a/examples/itemviews/puzzle/mainwindow.cpp
+++ b/examples/itemviews/puzzle/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/mainwindow.h b/examples/itemviews/puzzle/mainwindow.h
index e242adb173..a4b888d270 100644
--- a/examples/itemviews/puzzle/mainwindow.h
+++ b/examples/itemviews/puzzle/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/piecesmodel.cpp b/examples/itemviews/puzzle/piecesmodel.cpp
index 4c53648210..ddb6c062cd 100644
--- a/examples/itemviews/puzzle/piecesmodel.cpp
+++ b/examples/itemviews/puzzle/piecesmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/piecesmodel.h b/examples/itemviews/puzzle/piecesmodel.h
index 40079fe1c1..5549a795d1 100644
--- a/examples/itemviews/puzzle/piecesmodel.h
+++ b/examples/itemviews/puzzle/piecesmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/puzzlewidget.cpp b/examples/itemviews/puzzle/puzzlewidget.cpp
index 604c73d8f0..ee1ac78e29 100644
--- a/examples/itemviews/puzzle/puzzlewidget.cpp
+++ b/examples/itemviews/puzzle/puzzlewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/puzzle/puzzlewidget.h b/examples/itemviews/puzzle/puzzlewidget.h
index 2cc789c292..496edbb1e0 100644
--- a/examples/itemviews/puzzle/puzzlewidget.h
+++ b/examples/itemviews/puzzle/puzzlewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/domitem.cpp b/examples/itemviews/simpledommodel/domitem.cpp
index ed266c71a1..56bae8e7c2 100644
--- a/examples/itemviews/simpledommodel/domitem.cpp
+++ b/examples/itemviews/simpledommodel/domitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/domitem.h b/examples/itemviews/simpledommodel/domitem.h
index 0348218d32..b0acb21667 100644
--- a/examples/itemviews/simpledommodel/domitem.h
+++ b/examples/itemviews/simpledommodel/domitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/dommodel.cpp b/examples/itemviews/simpledommodel/dommodel.cpp
index 2a04f7a840..1593e1ec97 100644
--- a/examples/itemviews/simpledommodel/dommodel.cpp
+++ b/examples/itemviews/simpledommodel/dommodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/dommodel.h b/examples/itemviews/simpledommodel/dommodel.h
index 0b91a115a6..f643c54aa5 100644
--- a/examples/itemviews/simpledommodel/dommodel.h
+++ b/examples/itemviews/simpledommodel/dommodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/main.cpp b/examples/itemviews/simpledommodel/main.cpp
index 74a14b0f8c..03cc08d21b 100644
--- a/examples/itemviews/simpledommodel/main.cpp
+++ b/examples/itemviews/simpledommodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/mainwindow.cpp b/examples/itemviews/simpledommodel/mainwindow.cpp
index 11517c124b..237f7b27cc 100644
--- a/examples/itemviews/simpledommodel/mainwindow.cpp
+++ b/examples/itemviews/simpledommodel/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpledommodel/mainwindow.h b/examples/itemviews/simpledommodel/mainwindow.h
index 6a0e6e5239..eca751cfc4 100644
--- a/examples/itemviews/simpledommodel/mainwindow.h
+++ b/examples/itemviews/simpledommodel/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpletreemodel/main.cpp b/examples/itemviews/simpletreemodel/main.cpp
index 1cca36328f..338d5b4e19 100644
--- a/examples/itemviews/simpletreemodel/main.cpp
+++ b/examples/itemviews/simpletreemodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpletreemodel/treeitem.cpp b/examples/itemviews/simpletreemodel/treeitem.cpp
index ac310e8226..5ade6aa7fb 100644
--- a/examples/itemviews/simpletreemodel/treeitem.cpp
+++ b/examples/itemviews/simpletreemodel/treeitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpletreemodel/treeitem.h b/examples/itemviews/simpletreemodel/treeitem.h
index a220a7d8bc..43fd66391b 100644
--- a/examples/itemviews/simpletreemodel/treeitem.h
+++ b/examples/itemviews/simpletreemodel/treeitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpletreemodel/treemodel.cpp b/examples/itemviews/simpletreemodel/treemodel.cpp
index de5b6f8d6e..3551958e10 100644
--- a/examples/itemviews/simpletreemodel/treemodel.cpp
+++ b/examples/itemviews/simpletreemodel/treemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simpletreemodel/treemodel.h b/examples/itemviews/simpletreemodel/treemodel.h
index 6d1adb6b17..12d349a87b 100644
--- a/examples/itemviews/simpletreemodel/treemodel.h
+++ b/examples/itemviews/simpletreemodel/treemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simplewidgetmapper/main.cpp b/examples/itemviews/simplewidgetmapper/main.cpp
index 41e756d8ad..3cbf4b5880 100644
--- a/examples/itemviews/simplewidgetmapper/main.cpp
+++ b/examples/itemviews/simplewidgetmapper/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simplewidgetmapper/window.cpp b/examples/itemviews/simplewidgetmapper/window.cpp
index c3331b689d..726c6f4a11 100644
--- a/examples/itemviews/simplewidgetmapper/window.cpp
+++ b/examples/itemviews/simplewidgetmapper/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/simplewidgetmapper/window.h b/examples/itemviews/simplewidgetmapper/window.h
index 57d191e144..f993ee9008 100644
--- a/examples/itemviews/simplewidgetmapper/window.h
+++ b/examples/itemviews/simplewidgetmapper/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spinboxdelegate/delegate.cpp b/examples/itemviews/spinboxdelegate/delegate.cpp
index ecc4f3eb3b..8a689211e7 100644
--- a/examples/itemviews/spinboxdelegate/delegate.cpp
+++ b/examples/itemviews/spinboxdelegate/delegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spinboxdelegate/delegate.h b/examples/itemviews/spinboxdelegate/delegate.h
index c7b2e7f156..772b69f1c3 100644
--- a/examples/itemviews/spinboxdelegate/delegate.h
+++ b/examples/itemviews/spinboxdelegate/delegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spinboxdelegate/main.cpp b/examples/itemviews/spinboxdelegate/main.cpp
index e078d7f2df..1ef5bcb1d6 100644
--- a/examples/itemviews/spinboxdelegate/main.cpp
+++ b/examples/itemviews/spinboxdelegate/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/main.cpp b/examples/itemviews/spreadsheet/main.cpp
index 19bb379124..ea94d89f45 100644
--- a/examples/itemviews/spreadsheet/main.cpp
+++ b/examples/itemviews/spreadsheet/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/printview.cpp b/examples/itemviews/spreadsheet/printview.cpp
index 0962e28844..501ef85509 100644
--- a/examples/itemviews/spreadsheet/printview.cpp
+++ b/examples/itemviews/spreadsheet/printview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/printview.h b/examples/itemviews/spreadsheet/printview.h
index 358aee008a..641d6fd0c2 100644
--- a/examples/itemviews/spreadsheet/printview.h
+++ b/examples/itemviews/spreadsheet/printview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/spreadsheet.cpp b/examples/itemviews/spreadsheet/spreadsheet.cpp
index d3e57a5f4f..f18f654345 100644
--- a/examples/itemviews/spreadsheet/spreadsheet.cpp
+++ b/examples/itemviews/spreadsheet/spreadsheet.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/spreadsheet.h b/examples/itemviews/spreadsheet/spreadsheet.h
index 386a469c99..8877db98d4 100644
--- a/examples/itemviews/spreadsheet/spreadsheet.h
+++ b/examples/itemviews/spreadsheet/spreadsheet.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp b/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp
index 59f340ae3d..902f66af51 100644
--- a/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp
+++ b/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/spreadsheetdelegate.h b/examples/itemviews/spreadsheet/spreadsheetdelegate.h
index 7987f35499..9d8b28637a 100644
--- a/examples/itemviews/spreadsheet/spreadsheetdelegate.h
+++ b/examples/itemviews/spreadsheet/spreadsheetdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/spreadsheetitem.cpp b/examples/itemviews/spreadsheet/spreadsheetitem.cpp
index 74a1967a8a..0429f9da35 100644
--- a/examples/itemviews/spreadsheet/spreadsheetitem.cpp
+++ b/examples/itemviews/spreadsheet/spreadsheetitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/spreadsheet/spreadsheetitem.h b/examples/itemviews/spreadsheet/spreadsheetitem.h
index c7764ea1de..cc36f69841 100644
--- a/examples/itemviews/spreadsheet/spreadsheetitem.h
+++ b/examples/itemviews/spreadsheet/spreadsheetitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/main.cpp b/examples/itemviews/stardelegate/main.cpp
index 78245d005b..838cf0ff5d 100644
--- a/examples/itemviews/stardelegate/main.cpp
+++ b/examples/itemviews/stardelegate/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/stardelegate.cpp b/examples/itemviews/stardelegate/stardelegate.cpp
index 687ae0da2d..16d43aa87f 100644
--- a/examples/itemviews/stardelegate/stardelegate.cpp
+++ b/examples/itemviews/stardelegate/stardelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/stardelegate.h b/examples/itemviews/stardelegate/stardelegate.h
index 0e2a946c28..37118f870f 100644
--- a/examples/itemviews/stardelegate/stardelegate.h
+++ b/examples/itemviews/stardelegate/stardelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/stareditor.cpp b/examples/itemviews/stardelegate/stareditor.cpp
index 6a9092c058..46ebe93425 100644
--- a/examples/itemviews/stardelegate/stareditor.cpp
+++ b/examples/itemviews/stardelegate/stareditor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/stareditor.h b/examples/itemviews/stardelegate/stareditor.h
index 9dfc503124..a0bf1d1839 100644
--- a/examples/itemviews/stardelegate/stareditor.h
+++ b/examples/itemviews/stardelegate/stareditor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/starrating.cpp b/examples/itemviews/stardelegate/starrating.cpp
index c77a40b323..7ac80f32d4 100644
--- a/examples/itemviews/stardelegate/starrating.cpp
+++ b/examples/itemviews/stardelegate/starrating.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/itemviews/stardelegate/starrating.h b/examples/itemviews/stardelegate/starrating.h
index 68b747b94c..f685b77db4 100644
--- a/examples/itemviews/stardelegate/starrating.h
+++ b/examples/itemviews/stardelegate/starrating.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/ja_JP/linguist/hellotr/main.cpp b/examples/ja_JP/linguist/hellotr/main.cpp
index 517cb7b202..393087ebf9 100644
--- a/examples/ja_JP/linguist/hellotr/main.cpp
+++ b/examples/ja_JP/linguist/hellotr/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/basiclayouts/dialog.cpp b/examples/layouts/basiclayouts/dialog.cpp
index 91ae01cb0d..3814efe9f8 100644
--- a/examples/layouts/basiclayouts/dialog.cpp
+++ b/examples/layouts/basiclayouts/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/basiclayouts/dialog.h b/examples/layouts/basiclayouts/dialog.h
index 340740630b..9f45ba6721 100644
--- a/examples/layouts/basiclayouts/dialog.h
+++ b/examples/layouts/basiclayouts/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/basiclayouts/main.cpp b/examples/layouts/basiclayouts/main.cpp
index 767cf0f168..30de9c1f58 100644
--- a/examples/layouts/basiclayouts/main.cpp
+++ b/examples/layouts/basiclayouts/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/borderlayout/borderlayout.cpp b/examples/layouts/borderlayout/borderlayout.cpp
index c83ce0e476..e8cee5b9bb 100644
--- a/examples/layouts/borderlayout/borderlayout.cpp
+++ b/examples/layouts/borderlayout/borderlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/borderlayout/borderlayout.h b/examples/layouts/borderlayout/borderlayout.h
index d59c33a38b..ba6e868734 100644
--- a/examples/layouts/borderlayout/borderlayout.h
+++ b/examples/layouts/borderlayout/borderlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/borderlayout/main.cpp b/examples/layouts/borderlayout/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/layouts/borderlayout/main.cpp
+++ b/examples/layouts/borderlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/borderlayout/window.cpp b/examples/layouts/borderlayout/window.cpp
index 7501a7296c..40e20b425f 100644
--- a/examples/layouts/borderlayout/window.cpp
+++ b/examples/layouts/borderlayout/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/borderlayout/window.h b/examples/layouts/borderlayout/window.h
index 598bc0a3f7..cd4ca9bbbe 100644
--- a/examples/layouts/borderlayout/window.h
+++ b/examples/layouts/borderlayout/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/dynamiclayouts/dialog.cpp b/examples/layouts/dynamiclayouts/dialog.cpp
index 6e4f1efebc..4ee125d624 100644
--- a/examples/layouts/dynamiclayouts/dialog.cpp
+++ b/examples/layouts/dynamiclayouts/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/dynamiclayouts/dialog.h b/examples/layouts/dynamiclayouts/dialog.h
index f40d160363..9c9a0f64ad 100644
--- a/examples/layouts/dynamiclayouts/dialog.h
+++ b/examples/layouts/dynamiclayouts/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/dynamiclayouts/main.cpp b/examples/layouts/dynamiclayouts/main.cpp
index 03ac9ad84c..397075ff3b 100644
--- a/examples/layouts/dynamiclayouts/main.cpp
+++ b/examples/layouts/dynamiclayouts/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/flowlayout/flowlayout.cpp b/examples/layouts/flowlayout/flowlayout.cpp
index ddca09b71b..54f3a29a44 100644
--- a/examples/layouts/flowlayout/flowlayout.cpp
+++ b/examples/layouts/flowlayout/flowlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/flowlayout/flowlayout.h b/examples/layouts/flowlayout/flowlayout.h
index b54fc67b71..e30f9f1235 100644
--- a/examples/layouts/flowlayout/flowlayout.h
+++ b/examples/layouts/flowlayout/flowlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/flowlayout/main.cpp b/examples/layouts/flowlayout/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/layouts/flowlayout/main.cpp
+++ b/examples/layouts/flowlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/flowlayout/window.cpp b/examples/layouts/flowlayout/window.cpp
index 50782b9822..1d4521d934 100644
--- a/examples/layouts/flowlayout/window.cpp
+++ b/examples/layouts/flowlayout/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/layouts/flowlayout/window.h b/examples/layouts/flowlayout/window.h
index 4b57f47be3..b7b650fb7b 100644
--- a/examples/layouts/flowlayout/window.h
+++ b/examples/layouts/flowlayout/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/arrowpad/arrowpad.cpp b/examples/linguist/arrowpad/arrowpad.cpp
index 12e41474bf..c742c5cdc0 100644
--- a/examples/linguist/arrowpad/arrowpad.cpp
+++ b/examples/linguist/arrowpad/arrowpad.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/arrowpad/arrowpad.h b/examples/linguist/arrowpad/arrowpad.h
index f0c77dbf70..1418c89039 100644
--- a/examples/linguist/arrowpad/arrowpad.h
+++ b/examples/linguist/arrowpad/arrowpad.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/arrowpad/main.cpp b/examples/linguist/arrowpad/main.cpp
index 23f62b2ebf..8ca629a914 100644
--- a/examples/linguist/arrowpad/main.cpp
+++ b/examples/linguist/arrowpad/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/arrowpad/mainwindow.cpp b/examples/linguist/arrowpad/mainwindow.cpp
index 9e141904cd..e33687b5c9 100644
--- a/examples/linguist/arrowpad/mainwindow.cpp
+++ b/examples/linguist/arrowpad/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/arrowpad/mainwindow.h b/examples/linguist/arrowpad/mainwindow.h
index 3908c335b9..ad3c9c6039 100644
--- a/examples/linguist/arrowpad/mainwindow.h
+++ b/examples/linguist/arrowpad/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/hellotr/main.cpp b/examples/linguist/hellotr/main.cpp
index 5d3e4d75a4..e9cfda8bcc 100644
--- a/examples/linguist/hellotr/main.cpp
+++ b/examples/linguist/hellotr/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/trollprint/main.cpp b/examples/linguist/trollprint/main.cpp
index b2f2131927..231e32c65d 100644
--- a/examples/linguist/trollprint/main.cpp
+++ b/examples/linguist/trollprint/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/trollprint/mainwindow.cpp b/examples/linguist/trollprint/mainwindow.cpp
index 337b7aa8c4..f33d16bfaf 100644
--- a/examples/linguist/trollprint/mainwindow.cpp
+++ b/examples/linguist/trollprint/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/trollprint/mainwindow.h b/examples/linguist/trollprint/mainwindow.h
index 8febe1eb4c..42432baf66 100644
--- a/examples/linguist/trollprint/mainwindow.h
+++ b/examples/linguist/trollprint/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/trollprint/printpanel.cpp b/examples/linguist/trollprint/printpanel.cpp
index 74ddc18b59..8ec0931ed8 100644
--- a/examples/linguist/trollprint/printpanel.cpp
+++ b/examples/linguist/trollprint/printpanel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/linguist/trollprint/printpanel.h b/examples/linguist/trollprint/printpanel.h
index 45073199e5..2dfe44617b 100644
--- a/examples/linguist/trollprint/printpanel.h
+++ b/examples/linguist/trollprint/printpanel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/application/main.cpp b/examples/mainwindows/application/main.cpp
index 9a9dc9ca76..ac90a5481b 100644
--- a/examples/mainwindows/application/main.cpp
+++ b/examples/mainwindows/application/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index fd8fa97e68..6478146d26 100644
--- a/examples/mainwindows/application/mainwindow.cpp
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/application/mainwindow.h b/examples/mainwindows/application/mainwindow.h
index 9d40d30026..d7527f92f2 100644
--- a/examples/mainwindows/application/mainwindow.h
+++ b/examples/mainwindows/application/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/dockwidgets/main.cpp b/examples/mainwindows/dockwidgets/main.cpp
index 5c846a4dad..4edb870237 100644
--- a/examples/mainwindows/dockwidgets/main.cpp
+++ b/examples/mainwindows/dockwidgets/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
index 8ac897455f..f55e29a27a 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/dockwidgets/mainwindow.h b/examples/mainwindows/dockwidgets/mainwindow.h
index 6ac8ff3883..b39dee2d8c 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.h
+++ b/examples/mainwindows/dockwidgets/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/macmainwindow/macmainwindow.h b/examples/mainwindows/macmainwindow/macmainwindow.h
index 6be34654ab..14d3d6484c 100644
--- a/examples/mainwindows/macmainwindow/macmainwindow.h
+++ b/examples/mainwindows/macmainwindow/macmainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/macmainwindow/macmainwindow.mm b/examples/mainwindows/macmainwindow/macmainwindow.mm
index 4ad0134ec7..db212aa3ee 100644
--- a/examples/mainwindows/macmainwindow/macmainwindow.mm
+++ b/examples/mainwindows/macmainwindow/macmainwindow.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/macmainwindow/main.cpp b/examples/mainwindows/macmainwindow/main.cpp
index c984d80397..9b3c721d05 100644
--- a/examples/mainwindows/macmainwindow/main.cpp
+++ b/examples/mainwindows/macmainwindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/colorswatch.cpp b/examples/mainwindows/mainwindow/colorswatch.cpp
index dd16fddbe7..db0f5dab45 100644
--- a/examples/mainwindows/mainwindow/colorswatch.cpp
+++ b/examples/mainwindows/mainwindow/colorswatch.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/colorswatch.h b/examples/mainwindows/mainwindow/colorswatch.h
index 555f1c6cd4..7596446ae5 100644
--- a/examples/mainwindows/mainwindow/colorswatch.h
+++ b/examples/mainwindows/mainwindow/colorswatch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/main.cpp b/examples/mainwindows/mainwindow/main.cpp
index 71cff13cb8..de58a59310 100644
--- a/examples/mainwindows/mainwindow/main.cpp
+++ b/examples/mainwindows/mainwindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/mainwindow.cpp b/examples/mainwindows/mainwindow/mainwindow.cpp
index 15ee5bd927..7a8dd22c7c 100644
--- a/examples/mainwindows/mainwindow/mainwindow.cpp
+++ b/examples/mainwindows/mainwindow/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/mainwindow.h b/examples/mainwindows/mainwindow/mainwindow.h
index aa01ffa131..25d1e198ae 100644
--- a/examples/mainwindows/mainwindow/mainwindow.h
+++ b/examples/mainwindows/mainwindow/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/toolbar.cpp b/examples/mainwindows/mainwindow/toolbar.cpp
index 1176ee5480..25a1468bc1 100644
--- a/examples/mainwindows/mainwindow/toolbar.cpp
+++ b/examples/mainwindows/mainwindow/toolbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mainwindow/toolbar.h b/examples/mainwindows/mainwindow/toolbar.h
index 5b982ee73b..83429d4b3f 100644
--- a/examples/mainwindows/mainwindow/toolbar.h
+++ b/examples/mainwindows/mainwindow/toolbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mdi/main.cpp b/examples/mainwindows/mdi/main.cpp
index 1a10a19619..ae1b9ebc19 100644
--- a/examples/mainwindows/mdi/main.cpp
+++ b/examples/mainwindows/mdi/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp
index 816c8094da..84e2eee3ac 100644
--- a/examples/mainwindows/mdi/mainwindow.cpp
+++ b/examples/mainwindows/mdi/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mdi/mainwindow.h b/examples/mainwindows/mdi/mainwindow.h
index 906dee9bca..0dcff1c9f9 100644
--- a/examples/mainwindows/mdi/mainwindow.h
+++ b/examples/mainwindows/mdi/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mdi/mdichild.cpp b/examples/mainwindows/mdi/mdichild.cpp
index 0b55ee5223..bfa0c4777f 100644
--- a/examples/mainwindows/mdi/mdichild.cpp
+++ b/examples/mainwindows/mdi/mdichild.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/mdi/mdichild.h b/examples/mainwindows/mdi/mdichild.h
index e136d7f9ae..9fc99da918 100644
--- a/examples/mainwindows/mdi/mdichild.h
+++ b/examples/mainwindows/mdi/mdichild.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/menus/main.cpp b/examples/mainwindows/menus/main.cpp
index 01c8adae53..bfe61dcd01 100644
--- a/examples/mainwindows/menus/main.cpp
+++ b/examples/mainwindows/menus/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp
index 2a1c3da71d..65d020de0b 100644
--- a/examples/mainwindows/menus/mainwindow.cpp
+++ b/examples/mainwindows/menus/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/menus/mainwindow.h b/examples/mainwindows/menus/mainwindow.h
index 58b33fa257..8230f2e814 100644
--- a/examples/mainwindows/menus/mainwindow.h
+++ b/examples/mainwindows/menus/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/recentfiles/main.cpp b/examples/mainwindows/recentfiles/main.cpp
index 3bbf0137c1..bf1c4c1303 100644
--- a/examples/mainwindows/recentfiles/main.cpp
+++ b/examples/mainwindows/recentfiles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/recentfiles/mainwindow.cpp b/examples/mainwindows/recentfiles/mainwindow.cpp
index 4a8011d64a..71523d425f 100644
--- a/examples/mainwindows/recentfiles/mainwindow.cpp
+++ b/examples/mainwindows/recentfiles/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/recentfiles/mainwindow.h b/examples/mainwindows/recentfiles/mainwindow.h
index 8c41502bf1..07b106fa96 100644
--- a/examples/mainwindows/recentfiles/mainwindow.h
+++ b/examples/mainwindows/recentfiles/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/sdi/main.cpp b/examples/mainwindows/sdi/main.cpp
index 0fb8a0388d..319c9b91fb 100644
--- a/examples/mainwindows/sdi/main.cpp
+++ b/examples/mainwindows/sdi/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/sdi/mainwindow.cpp b/examples/mainwindows/sdi/mainwindow.cpp
index 7ae426d68c..676e84d5ab 100644
--- a/examples/mainwindows/sdi/mainwindow.cpp
+++ b/examples/mainwindows/sdi/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/mainwindows/sdi/mainwindow.h b/examples/mainwindows/sdi/mainwindow.h
index c8ca63f38b..b08c5dd806 100644
--- a/examples/mainwindows/sdi/mainwindow.h
+++ b/examples/mainwindows/sdi/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index a543c937c6..d0d406da5e 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
index c4199d6230..41672344c7 100644
--- a/examples/network/bearermonitor/bearermonitor.h
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/bearermonitor/main.cpp b/examples/network/bearermonitor/main.cpp
index cc6d918ee7..eb07302433 100644
--- a/examples/network/bearermonitor/main.cpp
+++ b/examples/network/bearermonitor/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp
index eed3660ca0..c827e393b1 100644
--- a/examples/network/bearermonitor/sessionwidget.cpp
+++ b/examples/network/bearermonitor/sessionwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index 4b14993082..21488ab0a6 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/blockingfortuneclient/blockingclient.cpp b/examples/network/blockingfortuneclient/blockingclient.cpp
index 8867e25678..2961f79498 100644
--- a/examples/network/blockingfortuneclient/blockingclient.cpp
+++ b/examples/network/blockingfortuneclient/blockingclient.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/blockingfortuneclient/blockingclient.h b/examples/network/blockingfortuneclient/blockingclient.h
index 99b97f13c5..ba564d9311 100644
--- a/examples/network/blockingfortuneclient/blockingclient.h
+++ b/examples/network/blockingfortuneclient/blockingclient.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/blockingfortuneclient/fortunethread.cpp b/examples/network/blockingfortuneclient/fortunethread.cpp
index ad3688bc5a..41b1a9187a 100644
--- a/examples/network/blockingfortuneclient/fortunethread.cpp
+++ b/examples/network/blockingfortuneclient/fortunethread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/blockingfortuneclient/fortunethread.h b/examples/network/blockingfortuneclient/fortunethread.h
index 3f4ca25c86..3e426fa7bb 100644
--- a/examples/network/blockingfortuneclient/fortunethread.h
+++ b/examples/network/blockingfortuneclient/fortunethread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/blockingfortuneclient/main.cpp b/examples/network/blockingfortuneclient/main.cpp
index b67464089b..d2eaf7a05a 100644
--- a/examples/network/blockingfortuneclient/main.cpp
+++ b/examples/network/blockingfortuneclient/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/broadcastreceiver/main.cpp b/examples/network/broadcastreceiver/main.cpp
index 748f4b5de1..7b451e0192 100644
--- a/examples/network/broadcastreceiver/main.cpp
+++ b/examples/network/broadcastreceiver/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/broadcastreceiver/receiver.cpp b/examples/network/broadcastreceiver/receiver.cpp
index 6a49046c91..e9dec57452 100644
--- a/examples/network/broadcastreceiver/receiver.cpp
+++ b/examples/network/broadcastreceiver/receiver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/broadcastreceiver/receiver.h b/examples/network/broadcastreceiver/receiver.h
index 7a282d2253..a415c83cda 100644
--- a/examples/network/broadcastreceiver/receiver.h
+++ b/examples/network/broadcastreceiver/receiver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/broadcastsender/main.cpp b/examples/network/broadcastsender/main.cpp
index 7c70255aec..e610902975 100644
--- a/examples/network/broadcastsender/main.cpp
+++ b/examples/network/broadcastsender/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/broadcastsender/sender.cpp b/examples/network/broadcastsender/sender.cpp
index 33b34a4a4c..9ddca66604 100644
--- a/examples/network/broadcastsender/sender.cpp
+++ b/examples/network/broadcastsender/sender.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/broadcastsender/sender.h b/examples/network/broadcastsender/sender.h
index 666269f38e..55bc7f2672 100644
--- a/examples/network/broadcastsender/sender.h
+++ b/examples/network/broadcastsender/sender.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp
index 1b7e54ba11..22d3b1db13 100644
--- a/examples/network/download/main.cpp
+++ b/examples/network/download/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/downloadmanager/downloadmanager.cpp b/examples/network/downloadmanager/downloadmanager.cpp
index d58ffdf99d..30f982e42e 100644
--- a/examples/network/downloadmanager/downloadmanager.cpp
+++ b/examples/network/downloadmanager/downloadmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/downloadmanager/downloadmanager.h b/examples/network/downloadmanager/downloadmanager.h
index 98e72b0f4c..389982835e 100644
--- a/examples/network/downloadmanager/downloadmanager.h
+++ b/examples/network/downloadmanager/downloadmanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/downloadmanager/main.cpp b/examples/network/downloadmanager/main.cpp
index ed738472f7..cb1c015b84 100644
--- a/examples/network/downloadmanager/main.cpp
+++ b/examples/network/downloadmanager/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/downloadmanager/textprogressbar.cpp b/examples/network/downloadmanager/textprogressbar.cpp
index 0303752b4b..cb986bd489 100644
--- a/examples/network/downloadmanager/textprogressbar.cpp
+++ b/examples/network/downloadmanager/textprogressbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/downloadmanager/textprogressbar.h b/examples/network/downloadmanager/textprogressbar.h
index 3d2be5565a..d42c357419 100644
--- a/examples/network/downloadmanager/textprogressbar.h
+++ b/examples/network/downloadmanager/textprogressbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
index 27443659df..1c5f1acf81 100644
--- a/examples/network/fortuneclient/client.cpp
+++ b/examples/network/fortuneclient/client.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/fortuneclient/client.h b/examples/network/fortuneclient/client.h
index f4a76c4dc2..1573580dda 100644
--- a/examples/network/fortuneclient/client.h
+++ b/examples/network/fortuneclient/client.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/fortuneclient/main.cpp b/examples/network/fortuneclient/main.cpp
index f6c459ee90..3678daece8 100644
--- a/examples/network/fortuneclient/main.cpp
+++ b/examples/network/fortuneclient/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/fortuneserver/main.cpp b/examples/network/fortuneserver/main.cpp
index 6c0e9ee9f3..77e3efa009 100644
--- a/examples/network/fortuneserver/main.cpp
+++ b/examples/network/fortuneserver/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
index 9ce6b650e0..e73c97b149 100644
--- a/examples/network/fortuneserver/server.cpp
+++ b/examples/network/fortuneserver/server.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/fortuneserver/server.h b/examples/network/fortuneserver/server.h
index a04dfa9e71..68402cad42 100644
--- a/examples/network/fortuneserver/server.h
+++ b/examples/network/fortuneserver/server.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp
index ed9ff6a20e..ad8c94353d 100644
--- a/examples/network/googlesuggest/googlesuggest.cpp
+++ b/examples/network/googlesuggest/googlesuggest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/googlesuggest/googlesuggest.h b/examples/network/googlesuggest/googlesuggest.h
index 6b4abff5d9..b5787c8adc 100644
--- a/examples/network/googlesuggest/googlesuggest.h
+++ b/examples/network/googlesuggest/googlesuggest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/googlesuggest/main.cpp b/examples/network/googlesuggest/main.cpp
index f20e8f6c0e..2f51df138b 100644
--- a/examples/network/googlesuggest/main.cpp
+++ b/examples/network/googlesuggest/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/googlesuggest/searchbox.cpp b/examples/network/googlesuggest/searchbox.cpp
index cf22fd1369..00960d488e 100644
--- a/examples/network/googlesuggest/searchbox.cpp
+++ b/examples/network/googlesuggest/searchbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/googlesuggest/searchbox.h b/examples/network/googlesuggest/searchbox.h
index 5ffcbc8614..30dfae1c79 100644
--- a/examples/network/googlesuggest/searchbox.h
+++ b/examples/network/googlesuggest/searchbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
index 082dc910ca..15492daff4 100644
--- a/examples/network/http/httpwindow.cpp
+++ b/examples/network/http/httpwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/http/httpwindow.h b/examples/network/http/httpwindow.h
index 0ec87af48a..01d7ca1cd2 100644
--- a/examples/network/http/httpwindow.h
+++ b/examples/network/http/httpwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp
index ae20f6f41c..e66d2ea1fa 100644
--- a/examples/network/http/main.cpp
+++ b/examples/network/http/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp
index 34fc999dcc..b7d970b5ef 100644
--- a/examples/network/loopback/dialog.cpp
+++ b/examples/network/loopback/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/loopback/dialog.h b/examples/network/loopback/dialog.h
index 8261b2279a..0b55f7cd42 100644
--- a/examples/network/loopback/dialog.h
+++ b/examples/network/loopback/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/loopback/main.cpp b/examples/network/loopback/main.cpp
index 03ac9ad84c..397075ff3b 100644
--- a/examples/network/loopback/main.cpp
+++ b/examples/network/loopback/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/multicastreceiver/main.cpp b/examples/network/multicastreceiver/main.cpp
index 041163178d..b14e222950 100644
--- a/examples/network/multicastreceiver/main.cpp
+++ b/examples/network/multicastreceiver/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/multicastreceiver/receiver.cpp b/examples/network/multicastreceiver/receiver.cpp
index 8db3042a4e..767aef52c2 100644
--- a/examples/network/multicastreceiver/receiver.cpp
+++ b/examples/network/multicastreceiver/receiver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/multicastreceiver/receiver.h b/examples/network/multicastreceiver/receiver.h
index fd1a67377f..9a5796cd38 100644
--- a/examples/network/multicastreceiver/receiver.h
+++ b/examples/network/multicastreceiver/receiver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/multicastsender/main.cpp b/examples/network/multicastsender/main.cpp
index 56e35c9540..163dfcb655 100644
--- a/examples/network/multicastsender/main.cpp
+++ b/examples/network/multicastsender/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/multicastsender/sender.cpp b/examples/network/multicastsender/sender.cpp
index 6172f07063..842f97579b 100644
--- a/examples/network/multicastsender/sender.cpp
+++ b/examples/network/multicastsender/sender.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/multicastsender/sender.h b/examples/network/multicastsender/sender.h
index 75ce4c93ea..ebcbdd3bd3 100644
--- a/examples/network/multicastsender/sender.h
+++ b/examples/network/multicastsender/sender.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp
index 9ad042e05f..732f43626a 100644
--- a/examples/network/network-chat/chatdialog.cpp
+++ b/examples/network/network-chat/chatdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/chatdialog.h b/examples/network/network-chat/chatdialog.h
index 258206a905..2007acac2c 100644
--- a/examples/network/network-chat/chatdialog.h
+++ b/examples/network/network-chat/chatdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp
index d9f594e8ac..f80b3783ef 100644
--- a/examples/network/network-chat/client.cpp
+++ b/examples/network/network-chat/client.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/client.h b/examples/network/network-chat/client.h
index 317fef36a8..9227b894a8 100644
--- a/examples/network/network-chat/client.h
+++ b/examples/network/network-chat/client.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/connection.cpp b/examples/network/network-chat/connection.cpp
index 9171d1fc5f..e02186fb85 100644
--- a/examples/network/network-chat/connection.cpp
+++ b/examples/network/network-chat/connection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/connection.h b/examples/network/network-chat/connection.h
index 5db5cc59e8..126ad53674 100644
--- a/examples/network/network-chat/connection.h
+++ b/examples/network/network-chat/connection.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/main.cpp b/examples/network/network-chat/main.cpp
index 94a4dacae8..05afc004da 100644
--- a/examples/network/network-chat/main.cpp
+++ b/examples/network/network-chat/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp
index a0374e7e7e..d774ce4158 100644
--- a/examples/network/network-chat/peermanager.cpp
+++ b/examples/network/network-chat/peermanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/peermanager.h b/examples/network/network-chat/peermanager.h
index a061bbbb53..b100d19652 100644
--- a/examples/network/network-chat/peermanager.h
+++ b/examples/network/network-chat/peermanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/network-chat/server.cpp b/examples/network/network-chat/server.cpp
index 4a3a28298a..f27cfa3894 100644
--- a/examples/network/network-chat/server.cpp
+++ b/examples/network/network-chat/server.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -49,7 +49,7 @@ Server::Server(QObject *parent)
listen(QHostAddress::Any);
}
-void Server::incomingConnection(int socketDescriptor)
+void Server::incomingConnection(qintptr socketDescriptor)
{
Connection *connection = new Connection(this);
connection->setSocketDescriptor(socketDescriptor);
diff --git a/examples/network/network-chat/server.h b/examples/network/network-chat/server.h
index 0d88c873da..8222bd3c50 100644
--- a/examples/network/network-chat/server.h
+++ b/examples/network/network-chat/server.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,7 +56,7 @@ signals:
void newConnection(Connection *connection);
protected:
- void incomingConnection(int socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor);
};
#endif
diff --git a/examples/network/network.pro b/examples/network/network.pro
index f12a6a1d47..0496cbb242 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -10,7 +10,6 @@ SUBDIRS = \
broadcastsender \
fortuneclient \
fortuneserver \
- qftp \
http \
loopback \
threadedfortuneserver \
diff --git a/examples/network/qftp/ftp.qrc b/examples/network/qftp/ftp.qrc
deleted file mode 100644
index b598ab8829..0000000000
--- a/examples/network/qftp/ftp.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>images/cdtoparent.png</file>
- <file>images/dir.png</file>
- <file>images/file.png</file>
-</qresource>
-</RCC>
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
deleted file mode 100644
index ba568d6ec0..0000000000
--- a/examples/network/qftp/ftpwindow.cpp
+++ /dev/null
@@ -1,406 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtWidgets>
-#include <QtNetwork>
-
-#include "ftpwindow.h"
-
-FtpWindow::FtpWindow(QWidget *parent)
- : QDialog(parent), ftp(0), networkSession(0)
-{
- ftpServerLabel = new QLabel(tr("Ftp &server:"));
- ftpServerLineEdit = new QLineEdit("ftp.qt.nokia.com");
- ftpServerLabel->setBuddy(ftpServerLineEdit);
-
- statusLabel = new QLabel(tr("Please enter the name of an FTP server."));
-
- fileList = new QTreeWidget;
- fileList->setEnabled(false);
- fileList->setRootIsDecorated(false);
- fileList->setHeaderLabels(QStringList() << tr("Name") << tr("Size") << tr("Owner") << tr("Group") << tr("Time"));
- fileList->header()->setStretchLastSection(false);
-
- connectButton = new QPushButton(tr("Connect"));
- connectButton->setDefault(true);
-
- cdToParentButton = new QPushButton;
- cdToParentButton->setIcon(QPixmap(":/images/cdtoparent.png"));
- cdToParentButton->setEnabled(false);
-
- downloadButton = new QPushButton(tr("Download"));
- downloadButton->setEnabled(false);
-
- quitButton = new QPushButton(tr("Quit"));
-
- buttonBox = new QDialogButtonBox;
- buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole);
- buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
-
- progressDialog = new QProgressDialog(this);
-
- connect(fileList, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
- this, SLOT(processItem(QTreeWidgetItem*,int)));
- connect(fileList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
- this, SLOT(enableDownloadButton()));
- connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
- connect(connectButton, SIGNAL(clicked()), this, SLOT(connectOrDisconnect()));
- connect(cdToParentButton, SIGNAL(clicked()), this, SLOT(cdToParent()));
- connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
- connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
-
- QHBoxLayout *topLayout = new QHBoxLayout;
- topLayout->addWidget(ftpServerLabel);
- topLayout->addWidget(ftpServerLineEdit);
- topLayout->addWidget(cdToParentButton);
- topLayout->addWidget(connectButton);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addLayout(topLayout);
- mainLayout->addWidget(fileList);
- mainLayout->addWidget(statusLabel);
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-
- setWindowTitle(tr("FTP"));
-}
-
-QSize FtpWindow::sizeHint() const
-{
- return QSize(500, 300);
-}
-
-//![0]
-void FtpWindow::connectOrDisconnect()
-{
- if (ftp) {
- ftp->abort();
- ftp->deleteLater();
- ftp = 0;
-//![0]
- fileList->setEnabled(false);
- cdToParentButton->setEnabled(false);
- downloadButton->setEnabled(false);
- connectButton->setEnabled(true);
- connectButton->setText(tr("Connect"));
-#ifndef QT_NO_CURSOR
- setCursor(Qt::ArrowCursor);
-#endif
- statusLabel->setText(tr("Please enter the name of an FTP server."));
- return;
- }
-
-#ifndef QT_NO_CURSOR
- setCursor(Qt::WaitCursor);
-#endif
-
- if (!networkSession || !networkSession->isOpen()) {
- if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
- if (!networkSession) {
- // Get saved network configuration
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
- settings.beginGroup(QLatin1String("QtNetwork"));
- const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
- settings.endGroup();
-
- // If the saved network configuration is not currently discovered use the system default
- QNetworkConfiguration config = manager.configurationFromIdentifier(id);
- if ((config.state() & QNetworkConfiguration::Discovered) !=
- QNetworkConfiguration::Discovered) {
- config = manager.defaultConfiguration();
- }
-
- networkSession = new QNetworkSession(config, this);
- connect(networkSession, SIGNAL(opened()), this, SLOT(connectToFtp()));
- connect(networkSession, SIGNAL(error(QNetworkSession::SessionError)), this, SLOT(enableConnectButton()));
- }
- connectButton->setEnabled(false);
- statusLabel->setText(tr("Opening network session."));
- networkSession->open();
- return;
- }
- }
- connectToFtp();
-}
-
-void FtpWindow::connectToFtp()
-{
-//![1]
- ftp = new QFtp(this);
- connect(ftp, SIGNAL(commandFinished(int,bool)),
- this, SLOT(ftpCommandFinished(int,bool)));
- connect(ftp, SIGNAL(listInfo(QUrlInfo)),
- this, SLOT(addToList(QUrlInfo)));
- connect(ftp, SIGNAL(dataTransferProgress(qint64,qint64)),
- this, SLOT(updateDataTransferProgress(qint64,qint64)));
-
- fileList->clear();
- currentPath.clear();
- isDirectory.clear();
-//![1]
-
-//![2]
- QUrl url(ftpServerLineEdit->text());
- if (!url.isValid() || url.scheme().toLower() != QLatin1String("ftp")) {
- ftp->connectToHost(ftpServerLineEdit->text(), 21);
- ftp->login();
- } else {
- ftp->connectToHost(url.host(), url.port(21));
-
- if (!url.userName().isEmpty())
- ftp->login(QUrl::fromPercentEncoding(url.userName().toLatin1()), url.password());
- else
- ftp->login();
- if (!url.path().isEmpty())
- ftp->cd(url.path());
- }
-//![2]
-
- fileList->setEnabled(true);
- connectButton->setEnabled(false);
- connectButton->setText(tr("Disconnect"));
- statusLabel->setText(tr("Connecting to FTP server %1...")
- .arg(ftpServerLineEdit->text()));
-}
-
-//![3]
-void FtpWindow::downloadFile()
-{
- QString fileName = fileList->currentItem()->text(0);
-//![3]
-//
- if (QFile::exists(fileName)) {
- QMessageBox::information(this, tr("FTP"),
- tr("There already exists a file called %1 in "
- "the current directory.")
- .arg(fileName));
- return;
- }
-
-//![4]
- file = new QFile(fileName);
- if (!file->open(QIODevice::WriteOnly)) {
- QMessageBox::information(this, tr("FTP"),
- tr("Unable to save the file %1: %2.")
- .arg(fileName).arg(file->errorString()));
- delete file;
- return;
- }
-
- ftp->get(fileList->currentItem()->text(0), file);
-
- progressDialog->setLabelText(tr("Downloading %1...").arg(fileName));
- downloadButton->setEnabled(false);
- progressDialog->exec();
-}
-//![4]
-
-//![5]
-void FtpWindow::cancelDownload()
-{
- ftp->abort();
-
- if (file->exists()) {
- file->close();
- file->remove();
- }
- delete file;
-}
-//![5]
-
-//![6]
-void FtpWindow::ftpCommandFinished(int, bool error)
-{
-#ifndef QT_NO_CURSOR
- setCursor(Qt::ArrowCursor);
-#endif
-
- if (ftp->currentCommand() == QFtp::ConnectToHost) {
- if (error) {
- QMessageBox::information(this, tr("FTP"),
- tr("Unable to connect to the FTP server "
- "at %1. Please check that the host "
- "name is correct.")
- .arg(ftpServerLineEdit->text()));
- connectOrDisconnect();
- return;
- }
- statusLabel->setText(tr("Logged onto %1.")
- .arg(ftpServerLineEdit->text()));
- fileList->setFocus();
- downloadButton->setDefault(true);
- connectButton->setEnabled(true);
- return;
- }
-//![6]
-
-//![7]
- if (ftp->currentCommand() == QFtp::Login)
- ftp->list();
-//![7]
-
-//![8]
- if (ftp->currentCommand() == QFtp::Get) {
- if (error) {
- statusLabel->setText(tr("Canceled download of %1.")
- .arg(file->fileName()));
- file->close();
- file->remove();
- } else {
- statusLabel->setText(tr("Downloaded %1 to current directory.")
- .arg(file->fileName()));
- file->close();
- }
- delete file;
- enableDownloadButton();
- progressDialog->hide();
-//![8]
-//![9]
- } else if (ftp->currentCommand() == QFtp::List) {
- if (isDirectory.isEmpty()) {
- fileList->addTopLevelItem(new QTreeWidgetItem(QStringList() << tr("<empty>")));
- fileList->setEnabled(false);
- }
- }
-//![9]
-}
-
-//![10]
-void FtpWindow::addToList(const QUrlInfo &urlInfo)
-{
- QTreeWidgetItem *item = new QTreeWidgetItem;
- item->setText(0, urlInfo.name());
- item->setText(1, QString::number(urlInfo.size()));
- item->setText(2, urlInfo.owner());
- item->setText(3, urlInfo.group());
- item->setText(4, urlInfo.lastModified().toString("MMM dd yyyy"));
-
- QPixmap pixmap(urlInfo.isDir() ? ":/images/dir.png" : ":/images/file.png");
- item->setIcon(0, pixmap);
-
- isDirectory[urlInfo.name()] = urlInfo.isDir();
- fileList->addTopLevelItem(item);
- if (!fileList->currentItem()) {
- fileList->setCurrentItem(fileList->topLevelItem(0));
- fileList->setEnabled(true);
- }
-}
-//![10]
-
-//![11]
-void FtpWindow::processItem(QTreeWidgetItem *item, int /*column*/)
-{
- QString name = item->text(0);
- if (isDirectory.value(name)) {
- fileList->clear();
- isDirectory.clear();
- currentPath += '/';
- currentPath += name;
- ftp->cd(name);
- ftp->list();
- cdToParentButton->setEnabled(true);
-#ifndef QT_NO_CURSOR
- setCursor(Qt::WaitCursor);
-#endif
- return;
- }
-}
-//![11]
-
-//![12]
-void FtpWindow::cdToParent()
-{
-#ifndef QT_NO_CURSOR
- setCursor(Qt::WaitCursor);
-#endif
- fileList->clear();
- isDirectory.clear();
- currentPath = currentPath.left(currentPath.lastIndexOf('/'));
- if (currentPath.isEmpty()) {
- cdToParentButton->setEnabled(false);
- ftp->cd("/");
- } else {
- ftp->cd(currentPath);
- }
- ftp->list();
-}
-//![12]
-
-//![13]
-void FtpWindow::updateDataTransferProgress(qint64 readBytes,
- qint64 totalBytes)
-{
- progressDialog->setMaximum(totalBytes);
- progressDialog->setValue(readBytes);
-}
-//![13]
-
-//![14]
-void FtpWindow::enableDownloadButton()
-{
- QTreeWidgetItem *current = fileList->currentItem();
- if (current) {
- QString currentFile = current->text(0);
- downloadButton->setEnabled(!isDirectory.value(currentFile));
- } else {
- downloadButton->setEnabled(false);
- }
-}
-//![14]
-
-void FtpWindow::enableConnectButton()
-{
- // Save the used configuration
- QNetworkConfiguration config = networkSession->configuration();
- QString id;
- if (config.type() == QNetworkConfiguration::UserChoice)
- id = networkSession->sessionProperty(QLatin1String("UserChoiceConfiguration")).toString();
- else
- id = config.identifier();
-
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
- settings.beginGroup(QLatin1String("QtNetwork"));
- settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
- settings.endGroup();
-
- connectButton->setEnabled(true);
- statusLabel->setText(tr("Please enter the name of an FTP server."));
-}
-
diff --git a/examples/network/qftp/ftpwindow.h b/examples/network/qftp/ftpwindow.h
deleted file mode 100644
index f060bfc0ce..0000000000
--- a/examples/network/qftp/ftpwindow.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef FTPWINDOW_H
-#define FTPWINDOW_H
-
-#include <QDialog>
-#include <QHash>
-#include <QNetworkConfigurationManager>
-
-QT_BEGIN_NAMESPACE
-class QDialogButtonBox;
-class QFile;
-class QFtp;
-class QLabel;
-class QLineEdit;
-class QTreeWidget;
-class QTreeWidgetItem;
-class QProgressDialog;
-class QPushButton;
-class QUrlInfo;
-class QNetworkSession;
-QT_END_NAMESPACE
-
-class FtpWindow : public QDialog
-{
- Q_OBJECT
-
-public:
- FtpWindow(QWidget *parent = 0);
- QSize sizeHint() const;
-
-//![0]
-private slots:
- void connectOrDisconnect();
- void downloadFile();
- void cancelDownload();
- void connectToFtp();
-
- void ftpCommandFinished(int commandId, bool error);
- void addToList(const QUrlInfo &urlInfo);
- void processItem(QTreeWidgetItem *item, int column);
- void cdToParent();
- void updateDataTransferProgress(qint64 readBytes,
- qint64 totalBytes);
- void enableDownloadButton();
- void enableConnectButton();
-//![0]
-
-private:
- QLabel *ftpServerLabel;
- QLineEdit *ftpServerLineEdit;
- QLabel *statusLabel;
- QTreeWidget *fileList;
- QPushButton *cdToParentButton;
- QPushButton *connectButton;
- QPushButton *downloadButton;
- QPushButton *quitButton;
- QDialogButtonBox *buttonBox;
- QProgressDialog *progressDialog;
-
-//![1]
- QHash<QString, bool> isDirectory;
- QString currentPath;
- QFtp *ftp;
- QFile *file;
-
- QNetworkSession *networkSession;
- QNetworkConfigurationManager manager;
-//![1]
-};
-
-#endif
diff --git a/examples/network/qftp/images/cdtoparent.png b/examples/network/qftp/images/cdtoparent.png
deleted file mode 100644
index 24b6180829..0000000000
--- a/examples/network/qftp/images/cdtoparent.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/qftp/images/dir.png b/examples/network/qftp/images/dir.png
deleted file mode 100644
index 0ce5ae75fc..0000000000
--- a/examples/network/qftp/images/dir.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/qftp/images/file.png b/examples/network/qftp/images/file.png
deleted file mode 100644
index be6c53089a..0000000000
--- a/examples/network/qftp/images/file.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/qftp/main.cpp b/examples/network/qftp/main.cpp
deleted file mode 100644
index 15689b5a55..0000000000
--- a/examples/network/qftp/main.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include "ftpwindow.h"
-
-
-int main(int argc, char *argv[])
-{
- Q_INIT_RESOURCE(ftp);
- QApplication app(argc, argv);
- FtpWindow ftpWin;
- ftpWin.show();
- return ftpWin.exec();
-}
diff --git a/examples/network/qftp/qftp.desktop b/examples/network/qftp/qftp.desktop
deleted file mode 100644
index 6149fe96df..0000000000
--- a/examples/network/qftp/qftp.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=FTP
-Exec=/opt/usr/bin/qftp
-Icon=qftp
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/network/qftp/qftp.pro b/examples/network/qftp/qftp.pro
deleted file mode 100644
index c554b37a03..0000000000
--- a/examples/network/qftp/qftp.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-QT += widgets
-
-HEADERS = ftpwindow.h
-SOURCES = ftpwindow.cpp \
- main.cpp
-RESOURCES += ftp.qrc
-QT += network
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/qftp
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/qftp
-INSTALLS += target sources
diff --git a/examples/network/securesocketclient/certificateinfo.cpp b/examples/network/securesocketclient/certificateinfo.cpp
index 9c9ffdeb4c..a3976dac16 100644
--- a/examples/network/securesocketclient/certificateinfo.cpp
+++ b/examples/network/securesocketclient/certificateinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/securesocketclient/certificateinfo.h b/examples/network/securesocketclient/certificateinfo.h
index cc5cc34e8a..3c54e2c229 100644
--- a/examples/network/securesocketclient/certificateinfo.h
+++ b/examples/network/securesocketclient/certificateinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/securesocketclient/main.cpp b/examples/network/securesocketclient/main.cpp
index c15534b523..349752d0ce 100644
--- a/examples/network/securesocketclient/main.cpp
+++ b/examples/network/securesocketclient/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
index 8d862c4c56..8527337e1b 100644
--- a/examples/network/securesocketclient/sslclient.cpp
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/securesocketclient/sslclient.h b/examples/network/securesocketclient/sslclient.h
index 4e0bc1891f..5c1317f131 100644
--- a/examples/network/securesocketclient/sslclient.h
+++ b/examples/network/securesocketclient/sslclient.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/threadedfortuneserver/dialog.cpp b/examples/network/threadedfortuneserver/dialog.cpp
index 2340a6bc5a..94a0c657e3 100644
--- a/examples/network/threadedfortuneserver/dialog.cpp
+++ b/examples/network/threadedfortuneserver/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/threadedfortuneserver/dialog.h b/examples/network/threadedfortuneserver/dialog.h
index 19a6fc2f47..1fdc4b21a0 100644
--- a/examples/network/threadedfortuneserver/dialog.h
+++ b/examples/network/threadedfortuneserver/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/threadedfortuneserver/fortuneserver.cpp b/examples/network/threadedfortuneserver/fortuneserver.cpp
index 7179ba51e8..9363497f76 100644
--- a/examples/network/threadedfortuneserver/fortuneserver.cpp
+++ b/examples/network/threadedfortuneserver/fortuneserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,7 +58,7 @@ FortuneServer::FortuneServer(QObject *parent)
//! [0]
//! [1]
-void FortuneServer::incomingConnection(int socketDescriptor)
+void FortuneServer::incomingConnection(qintptr socketDescriptor)
{
QString fortune = fortunes.at(qrand() % fortunes.size());
FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this);
diff --git a/examples/network/threadedfortuneserver/fortuneserver.h b/examples/network/threadedfortuneserver/fortuneserver.h
index 785a72e27e..8d1a6ed151 100644
--- a/examples/network/threadedfortuneserver/fortuneserver.h
+++ b/examples/network/threadedfortuneserver/fortuneserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,7 @@ public:
FortuneServer(QObject *parent = 0);
protected:
- void incomingConnection(int socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor);
private:
QStringList fortunes;
diff --git a/examples/network/threadedfortuneserver/fortunethread.cpp b/examples/network/threadedfortuneserver/fortunethread.cpp
index e9878e06d7..18c8f1f25a 100644
--- a/examples/network/threadedfortuneserver/fortunethread.cpp
+++ b/examples/network/threadedfortuneserver/fortunethread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/threadedfortuneserver/fortunethread.h b/examples/network/threadedfortuneserver/fortunethread.h
index 1d6f5608d8..b3b8a20ae4 100644
--- a/examples/network/threadedfortuneserver/fortunethread.h
+++ b/examples/network/threadedfortuneserver/fortunethread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/threadedfortuneserver/main.cpp b/examples/network/threadedfortuneserver/main.cpp
index 0bf75aa18c..1174b7e827 100644
--- a/examples/network/threadedfortuneserver/main.cpp
+++ b/examples/network/threadedfortuneserver/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/addtorrentdialog.cpp b/examples/network/torrent/addtorrentdialog.cpp
index c78535a309..5e473df15e 100644
--- a/examples/network/torrent/addtorrentdialog.cpp
+++ b/examples/network/torrent/addtorrentdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/addtorrentdialog.h b/examples/network/torrent/addtorrentdialog.h
index 09aa48c354..649296bdb2 100644
--- a/examples/network/torrent/addtorrentdialog.h
+++ b/examples/network/torrent/addtorrentdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/bencodeparser.cpp b/examples/network/torrent/bencodeparser.cpp
index edb04c6d6b..cccaede179 100644
--- a/examples/network/torrent/bencodeparser.cpp
+++ b/examples/network/torrent/bencodeparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/bencodeparser.h b/examples/network/torrent/bencodeparser.h
index de8b8ffd93..6e137a62e3 100644
--- a/examples/network/torrent/bencodeparser.h
+++ b/examples/network/torrent/bencodeparser.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/connectionmanager.cpp b/examples/network/torrent/connectionmanager.cpp
index 889933ea83..7c55c1f6a2 100644
--- a/examples/network/torrent/connectionmanager.cpp
+++ b/examples/network/torrent/connectionmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/connectionmanager.h b/examples/network/torrent/connectionmanager.h
index ef38507e45..90ce2841ec 100644
--- a/examples/network/torrent/connectionmanager.h
+++ b/examples/network/torrent/connectionmanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/filemanager.cpp b/examples/network/torrent/filemanager.cpp
index b4dfb25bca..bcb53f2685 100644
--- a/examples/network/torrent/filemanager.cpp
+++ b/examples/network/torrent/filemanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/filemanager.h b/examples/network/torrent/filemanager.h
index cf1a0f706b..cd59b57f9d 100644
--- a/examples/network/torrent/filemanager.h
+++ b/examples/network/torrent/filemanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/main.cpp b/examples/network/torrent/main.cpp
index 1023ae85a7..eaa637699b 100644
--- a/examples/network/torrent/main.cpp
+++ b/examples/network/torrent/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 3d264eb272..56a56ee164 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/mainwindow.h b/examples/network/torrent/mainwindow.h
index 0d42c91ce4..12d9a4fea0 100644
--- a/examples/network/torrent/mainwindow.h
+++ b/examples/network/torrent/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/metainfo.cpp b/examples/network/torrent/metainfo.cpp
index ba55ebace6..15efe7c30f 100644
--- a/examples/network/torrent/metainfo.cpp
+++ b/examples/network/torrent/metainfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/metainfo.h b/examples/network/torrent/metainfo.h
index afa824d74b..39c8e17e08 100644
--- a/examples/network/torrent/metainfo.h
+++ b/examples/network/torrent/metainfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/peerwireclient.cpp b/examples/network/torrent/peerwireclient.cpp
index 0d9580eeff..fa51343db6 100644
--- a/examples/network/torrent/peerwireclient.cpp
+++ b/examples/network/torrent/peerwireclient.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/peerwireclient.h b/examples/network/torrent/peerwireclient.h
index b8f8cb56e5..96d5c49770 100644
--- a/examples/network/torrent/peerwireclient.h
+++ b/examples/network/torrent/peerwireclient.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/ratecontroller.cpp b/examples/network/torrent/ratecontroller.cpp
index 47cf177ccb..af497a4437 100644
--- a/examples/network/torrent/ratecontroller.cpp
+++ b/examples/network/torrent/ratecontroller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/ratecontroller.h b/examples/network/torrent/ratecontroller.h
index 4949abb641..20b7df4664 100644
--- a/examples/network/torrent/ratecontroller.h
+++ b/examples/network/torrent/ratecontroller.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp
index 3df1bb886f..46f44a853b 100644
--- a/examples/network/torrent/torrentclient.cpp
+++ b/examples/network/torrent/torrentclient.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/torrentclient.h b/examples/network/torrent/torrentclient.h
index 7978e8e1f4..75bef55924 100644
--- a/examples/network/torrent/torrentclient.h
+++ b/examples/network/torrent/torrentclient.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp
index 7a9ff67972..ecc7ba098c 100644
--- a/examples/network/torrent/torrentserver.cpp
+++ b/examples/network/torrent/torrentserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -61,7 +61,7 @@ void TorrentServer::removeClient(TorrentClient *client)
clients.removeAll(client);
}
-void TorrentServer::incomingConnection(int socketDescriptor)
+void TorrentServer::incomingConnection(qintptr socketDescriptor)
{
PeerWireClient *client =
new PeerWireClient(ConnectionManager::instance()->clientId(), this);
diff --git a/examples/network/torrent/torrentserver.h b/examples/network/torrent/torrentserver.h
index 2622384cfd..fd939ae641 100644
--- a/examples/network/torrent/torrentserver.h
+++ b/examples/network/torrent/torrentserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,7 +58,7 @@ public:
void removeClient(TorrentClient *client);
protected:
- void incomingConnection(int socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor);
private slots:
void removeClient();
diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp
index 0b9a5815c9..43c60ac9bd 100644
--- a/examples/network/torrent/trackerclient.cpp
+++ b/examples/network/torrent/trackerclient.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,6 +45,7 @@
#include "trackerclient.h"
#include <QtCore>
+#include <QNetworkRequest>
TrackerClient::TrackerClient(TorrentClient *downloader, QObject *parent)
: QObject(parent), torrentDownloader(downloader)
@@ -56,7 +57,7 @@ TrackerClient::TrackerClient(TorrentClient *downloader, QObject *parent)
lastTrackerRequest = false;
firstSeeding = true;
- connect(&http, SIGNAL(done(bool)), this, SLOT(httpRequestDone(bool)));
+ connect(&http, SIGNAL(finished(QNetworkReply*)), this, SLOT(httpRequestDone(QNetworkReply*)));
}
void TrackerClient::start(const MetaInfo &info)
@@ -82,15 +83,13 @@ void TrackerClient::startSeeding()
void TrackerClient::stop()
{
lastTrackerRequest = true;
- http.abort();
fetchPeerList();
}
void TrackerClient::timerEvent(QTimerEvent *event)
{
if (event->timerId() == requestIntervalTimer) {
- if (http.state() == QHttp::Unconnected)
- fetchPeerList();
+ fetchPeerList();
} else {
QObject::timerEvent(event);
}
@@ -148,32 +147,35 @@ void TrackerClient::fetchPeerList()
if (!trackerId.isEmpty())
query += "&trackerid=" + trackerId;
- http.setHost(url.host(), url.port() == -1 ? 80 : url.port());
- if (!url.userName().isEmpty())
- http.setUser(url.userName(), url.password());
- http.get(query);
+ QNetworkRequest req(url);
+ if (!url.userName().isEmpty()) {
+ uname = url.userName();
+ pwd = url.password();
+ connect(&http, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(provideAuthentication(QNetworkReply*,QAuthenticator*)));
+ }
+ http.get(req);
}
-void TrackerClient::httpRequestDone(bool error)
+void TrackerClient::httpRequestDone(QNetworkReply *reply)
{
+ reply->deleteLater();
if (lastTrackerRequest) {
emit stopped();
return;
}
- if (error) {
- emit connectionError(http.error());
+ if (reply->error() != QNetworkReply::NoError) {
+ emit connectionError(reply->error());
return;
}
- QByteArray response = http.readAll();
- http.abort();
+ QByteArray response = reply->readAll();
+ reply->abort();
BencodeParser parser;
if (!parser.parse(response)) {
qWarning("Error parsing bencode response from tracker: %s",
qPrintable(parser.errorString()));
- http.abort();
return;
}
@@ -234,3 +236,10 @@ void TrackerClient::httpRequestDone(bool error)
emit peerListUpdated(peers);
}
}
+
+void TrackerClient::provideAuthentication(QNetworkReply *reply, QAuthenticator *auth)
+{
+ Q_UNUSED(reply);
+ auth->setUser(uname);
+ auth->setPassword(pwd);
+}
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h
index de63a8f87f..723b3aa4b7 100644
--- a/examples/network/torrent/trackerclient.h
+++ b/examples/network/torrent/trackerclient.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,9 @@
#include <QList>
#include <QObject>
#include <QHostAddress>
-#include <QHttp>
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
+#include <QAuthenticator>
#include "metainfo.h"
#include "torrentclient.h"
@@ -64,7 +66,7 @@ public:
void startSeeding();
signals:
- void connectionError(QHttp::Error error);
+ void connectionError(QNetworkReply::NetworkError error);
void failure(const QString &reason);
void warning(const QString &message);
@@ -80,20 +82,23 @@ protected:
private slots:
void fetchPeerList();
- void httpRequestDone(bool error);
+ void httpRequestDone(QNetworkReply *reply);
+ void provideAuthentication(QNetworkReply *reply, QAuthenticator *auth);
private:
TorrentClient *torrentDownloader;
int requestInterval;
int requestIntervalTimer;
- QHttp http;
+ QNetworkAccessManager http;
MetaInfo metaInfo;
QByteArray trackerId;
QList<TorrentPeer> peers;
qint64 uploadedBytes;
qint64 downloadedBytes;
qint64 length;
+ QString uname;
+ QString pwd;
bool firstTrackerRequest;
bool lastTrackerRequest;
diff --git a/examples/opengl/2dpainting/glwidget.cpp b/examples/opengl/2dpainting/glwidget.cpp
index 800e947385..318801db4b 100644
--- a/examples/opengl/2dpainting/glwidget.cpp
+++ b/examples/opengl/2dpainting/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h
index c012960f31..a395f8ac50 100644
--- a/examples/opengl/2dpainting/glwidget.h
+++ b/examples/opengl/2dpainting/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/helper.cpp b/examples/opengl/2dpainting/helper.cpp
index dc18c60a4b..b8484e9c61 100644
--- a/examples/opengl/2dpainting/helper.cpp
+++ b/examples/opengl/2dpainting/helper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/helper.h b/examples/opengl/2dpainting/helper.h
index 380399fa50..ce74f27a70 100644
--- a/examples/opengl/2dpainting/helper.h
+++ b/examples/opengl/2dpainting/helper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/main.cpp b/examples/opengl/2dpainting/main.cpp
index aedfd9f8d3..027c8bd3d1 100644
--- a/examples/opengl/2dpainting/main.cpp
+++ b/examples/opengl/2dpainting/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/widget.cpp b/examples/opengl/2dpainting/widget.cpp
index 35eedae240..0c682de876 100644
--- a/examples/opengl/2dpainting/widget.cpp
+++ b/examples/opengl/2dpainting/widget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h
index 7a67aaf1bf..d2c1534271 100644
--- a/examples/opengl/2dpainting/widget.h
+++ b/examples/opengl/2dpainting/widget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
index 0186670f38..29341d2a4e 100644
--- a/examples/opengl/2dpainting/window.cpp
+++ b/examples/opengl/2dpainting/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/2dpainting/window.h b/examples/opengl/2dpainting/window.h
index 0f983d20ac..f6f1700fdb 100644
--- a/examples/opengl/2dpainting/window.h
+++ b/examples/opengl/2dpainting/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
index c05dde56f8..3c5fe4fe8c 100644
--- a/examples/opengl/cube/geometryengine.cpp
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/cube/geometryengine.h b/examples/opengl/cube/geometryengine.h
index e071ef6202..ddb34fb3d3 100644
--- a/examples/opengl/cube/geometryengine.h
+++ b/examples/opengl/cube/geometryengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/cube/main.cpp b/examples/opengl/cube/main.cpp
index ef6efdc4dc..bdf1a7161f 100644
--- a/examples/opengl/cube/main.cpp
+++ b/examples/opengl/cube/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
index c095888f98..60bef9e54e 100644
--- a/examples/opengl/cube/mainwidget.cpp
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index eb509d0d40..90c1bd11cc 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/framebufferobject2/glwidget.cpp b/examples/opengl/framebufferobject2/glwidget.cpp
index 7a5adf904d..eb85797133 100644
--- a/examples/opengl/framebufferobject2/glwidget.cpp
+++ b/examples/opengl/framebufferobject2/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/framebufferobject2/glwidget.h b/examples/opengl/framebufferobject2/glwidget.h
index ccb46a3b83..6cfceb8498 100644
--- a/examples/opengl/framebufferobject2/glwidget.h
+++ b/examples/opengl/framebufferobject2/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/framebufferobject2/main.cpp b/examples/opengl/framebufferobject2/main.cpp
index 313e683da5..4c0b8420de 100644
--- a/examples/opengl/framebufferobject2/main.cpp
+++ b/examples/opengl/framebufferobject2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/grabber/glwidget.cpp b/examples/opengl/grabber/glwidget.cpp
index 52d0b2662a..60974571bd 100644
--- a/examples/opengl/grabber/glwidget.cpp
+++ b/examples/opengl/grabber/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/grabber/glwidget.h b/examples/opengl/grabber/glwidget.h
index f86d5d06d6..5f3981f8ae 100644
--- a/examples/opengl/grabber/glwidget.h
+++ b/examples/opengl/grabber/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/grabber/main.cpp b/examples/opengl/grabber/main.cpp
index 923c1f8514..18ff180690 100644
--- a/examples/opengl/grabber/main.cpp
+++ b/examples/opengl/grabber/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
index 965c49ab1a..7d0fdefa0c 100644
--- a/examples/opengl/grabber/mainwindow.cpp
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/grabber/mainwindow.h b/examples/opengl/grabber/mainwindow.h
index 044d2a8dd7..48fc11f8b8 100644
--- a/examples/opengl/grabber/mainwindow.h
+++ b/examples/opengl/grabber/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
index 38333d8560..c30f4b7a00 100644
--- a/examples/opengl/hellogl/glwidget.cpp
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl/glwidget.h b/examples/opengl/hellogl/glwidget.h
index 1f12b11e32..877afa90f3 100644
--- a/examples/opengl/hellogl/glwidget.h
+++ b/examples/opengl/hellogl/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl/main.cpp b/examples/opengl/hellogl/main.cpp
index cc14a70bcc..073d9e108d 100644
--- a/examples/opengl/hellogl/main.cpp
+++ b/examples/opengl/hellogl/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl/window.cpp b/examples/opengl/hellogl/window.cpp
index 9f7d6be68b..52f8a85143 100644
--- a/examples/opengl/hellogl/window.cpp
+++ b/examples/opengl/hellogl/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl/window.h b/examples/opengl/hellogl/window.h
index 0ac3d64ee4..90f26e0f38 100644
--- a/examples/opengl/hellogl/window.h
+++ b/examples/opengl/hellogl/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es/glwindow.cpp b/examples/opengl/hellogl_es/glwindow.cpp
index 407cb53354..e8e00f53d4 100644
--- a/examples/opengl/hellogl_es/glwindow.cpp
+++ b/examples/opengl/hellogl_es/glwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es/glwindow.h b/examples/opengl/hellogl_es/glwindow.h
index f1f1f2ae18..bbcfc370d5 100644
--- a/examples/opengl/hellogl_es/glwindow.h
+++ b/examples/opengl/hellogl_es/glwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es/main.cpp b/examples/opengl/hellogl_es/main.cpp
index 1b42a48fe1..a18db04e6e 100644
--- a/examples/opengl/hellogl_es/main.cpp
+++ b/examples/opengl/hellogl_es/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/bubble.cpp b/examples/opengl/hellogl_es2/bubble.cpp
index 6db14e32bd..bac2eea09b 100644
--- a/examples/opengl/hellogl_es2/bubble.cpp
+++ b/examples/opengl/hellogl_es2/bubble.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/bubble.h b/examples/opengl/hellogl_es2/bubble.h
index 21f5add43e..211a127e0b 100644
--- a/examples/opengl/hellogl_es2/bubble.h
+++ b/examples/opengl/hellogl_es2/bubble.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp
index a22fbdacb8..fcff502d39 100644
--- a/examples/opengl/hellogl_es2/glwidget.cpp
+++ b/examples/opengl/hellogl_es2/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/glwidget.h b/examples/opengl/hellogl_es2/glwidget.h
index 44b78d6120..a23bee5c7e 100644
--- a/examples/opengl/hellogl_es2/glwidget.h
+++ b/examples/opengl/hellogl_es2/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/main.cpp b/examples/opengl/hellogl_es2/main.cpp
index 5693d7ad55..5148dd5ecc 100644
--- a/examples/opengl/hellogl_es2/main.cpp
+++ b/examples/opengl/hellogl_es2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/mainwindow.cpp b/examples/opengl/hellogl_es2/mainwindow.cpp
index cd253fcd19..4e0f7e570c 100644
--- a/examples/opengl/hellogl_es2/mainwindow.cpp
+++ b/examples/opengl/hellogl_es2/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellogl_es2/mainwindow.h b/examples/opengl/hellogl_es2/mainwindow.h
index a0a6adfc3c..f7276a66c6 100644
--- a/examples/opengl/hellogl_es2/mainwindow.h
+++ b/examples/opengl/hellogl_es2/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
index 742de251f4..f02ce91e2e 100644
--- a/examples/opengl/hellowindow/hellowindow.cpp
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index b257cef20f..e88719348f 100644
--- a/examples/opengl/hellowindow/hellowindow.h
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp
index 36cbc414dd..fa2309dc8b 100644
--- a/examples/opengl/hellowindow/main.cpp
+++ b/examples/opengl/hellowindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/overpainting/bubble.cpp b/examples/opengl/overpainting/bubble.cpp
index bb6d2b8070..228d6e1bf0 100644
--- a/examples/opengl/overpainting/bubble.cpp
+++ b/examples/opengl/overpainting/bubble.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/overpainting/bubble.h b/examples/opengl/overpainting/bubble.h
index 025e92bc00..aaf9ff5af7 100644
--- a/examples/opengl/overpainting/bubble.h
+++ b/examples/opengl/overpainting/bubble.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp
index 4572e69644..9a426db8b0 100644
--- a/examples/opengl/overpainting/glwidget.cpp
+++ b/examples/opengl/overpainting/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/overpainting/glwidget.h b/examples/opengl/overpainting/glwidget.h
index 178fdf7fe5..7e68a3bc75 100644
--- a/examples/opengl/overpainting/glwidget.h
+++ b/examples/opengl/overpainting/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/overpainting/main.cpp b/examples/opengl/overpainting/main.cpp
index fd9b206b69..c38793242b 100644
--- a/examples/opengl/overpainting/main.cpp
+++ b/examples/opengl/overpainting/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/paintedwindow/main.cpp b/examples/opengl/paintedwindow/main.cpp
index c672798558..2d9a5ec675 100644
--- a/examples/opengl/paintedwindow/main.cpp
+++ b/examples/opengl/paintedwindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
index 78539d7ff1..e3dda43d3e 100644
--- a/examples/opengl/paintedwindow/paintedwindow.cpp
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
index 28e06ec4df..8215fe0f4c 100644
--- a/examples/opengl/paintedwindow/paintedwindow.h
+++ b/examples/opengl/paintedwindow/paintedwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers/cube.cpp b/examples/opengl/pbuffers/cube.cpp
index 631595a2d7..b5bd2feff6 100644
--- a/examples/opengl/pbuffers/cube.cpp
+++ b/examples/opengl/pbuffers/cube.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers/cube.h b/examples/opengl/pbuffers/cube.h
index 5c985a3782..bb870961d4 100644
--- a/examples/opengl/pbuffers/cube.h
+++ b/examples/opengl/pbuffers/cube.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers/glwidget.cpp b/examples/opengl/pbuffers/glwidget.cpp
index f6f89e5a0e..3272762bc6 100644
--- a/examples/opengl/pbuffers/glwidget.cpp
+++ b/examples/opengl/pbuffers/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers/glwidget.h b/examples/opengl/pbuffers/glwidget.h
index 7a8244f4f9..651053eaba 100644
--- a/examples/opengl/pbuffers/glwidget.h
+++ b/examples/opengl/pbuffers/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers/main.cpp b/examples/opengl/pbuffers/main.cpp
index aac6d1939c..0e0a133f44 100644
--- a/examples/opengl/pbuffers/main.cpp
+++ b/examples/opengl/pbuffers/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers2/glwidget.cpp b/examples/opengl/pbuffers2/glwidget.cpp
index 53b1c5f95b..8d91e46f51 100644
--- a/examples/opengl/pbuffers2/glwidget.cpp
+++ b/examples/opengl/pbuffers2/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers2/glwidget.h b/examples/opengl/pbuffers2/glwidget.h
index 515d5b44fc..2ca16ed400 100644
--- a/examples/opengl/pbuffers2/glwidget.h
+++ b/examples/opengl/pbuffers2/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/pbuffers2/main.cpp b/examples/opengl/pbuffers2/main.cpp
index 573b7f2cda..25d80d56ce 100644
--- a/examples/opengl/pbuffers2/main.cpp
+++ b/examples/opengl/pbuffers2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/samplebuffers/glwidget.cpp b/examples/opengl/samplebuffers/glwidget.cpp
index 537dbd9bba..615f026fcf 100644
--- a/examples/opengl/samplebuffers/glwidget.cpp
+++ b/examples/opengl/samplebuffers/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/samplebuffers/glwidget.h b/examples/opengl/samplebuffers/glwidget.h
index 1d9b7b54a1..d4f289a3ec 100644
--- a/examples/opengl/samplebuffers/glwidget.h
+++ b/examples/opengl/samplebuffers/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/samplebuffers/main.cpp b/examples/opengl/samplebuffers/main.cpp
index c940541327..67f9c92220 100644
--- a/examples/opengl/samplebuffers/main.cpp
+++ b/examples/opengl/samplebuffers/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/shared/qtlogo.cpp b/examples/opengl/shared/qtlogo.cpp
index 93b92809e0..afdf565fc0 100644
--- a/examples/opengl/shared/qtlogo.cpp
+++ b/examples/opengl/shared/qtlogo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/shared/qtlogo.h b/examples/opengl/shared/qtlogo.h
index 4c16ec1c4e..070089e812 100644
--- a/examples/opengl/shared/qtlogo.h
+++ b/examples/opengl/shared/qtlogo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp
index 4e74cf9d1d..87252df2df 100644
--- a/examples/opengl/textures/glwidget.cpp
+++ b/examples/opengl/textures/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index 86dc889107..6f324048d9 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/textures/main.cpp b/examples/opengl/textures/main.cpp
index b477e7b05b..4cfb015b5c 100644
--- a/examples/opengl/textures/main.cpp
+++ b/examples/opengl/textures/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/textures/window.cpp b/examples/opengl/textures/window.cpp
index 16f402efab..5c0789b4fe 100644
--- a/examples/opengl/textures/window.cpp
+++ b/examples/opengl/textures/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/opengl/textures/window.h b/examples/opengl/textures/window.h
index 571fae47bc..71aee4b2c2 100644
--- a/examples/opengl/textures/window.h
+++ b/examples/opengl/textures/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/affine/main.cpp b/examples/painting/affine/main.cpp
index 19758938f8..8edd497187 100644
--- a/examples/painting/affine/main.cpp
+++ b/examples/painting/affine/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/affine/xform.cpp b/examples/painting/affine/xform.cpp
index 43f8ce4da1..d6a3e972ea 100644
--- a/examples/painting/affine/xform.cpp
+++ b/examples/painting/affine/xform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/affine/xform.h b/examples/painting/affine/xform.h
index 0cf837cbdd..cf0b26d885 100644
--- a/examples/painting/affine/xform.h
+++ b/examples/painting/affine/xform.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/basicdrawing/main.cpp b/examples/painting/basicdrawing/main.cpp
index 6662742166..e99c121588 100644
--- a/examples/painting/basicdrawing/main.cpp
+++ b/examples/painting/basicdrawing/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/basicdrawing/renderarea.cpp b/examples/painting/basicdrawing/renderarea.cpp
index 87e6c187d3..a8b78f084f 100644
--- a/examples/painting/basicdrawing/renderarea.cpp
+++ b/examples/painting/basicdrawing/renderarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/basicdrawing/renderarea.h b/examples/painting/basicdrawing/renderarea.h
index 02e9b268f5..f440a50d4b 100644
--- a/examples/painting/basicdrawing/renderarea.h
+++ b/examples/painting/basicdrawing/renderarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/basicdrawing/window.cpp b/examples/painting/basicdrawing/window.cpp
index 949f4c8179..ce61e9a701 100644
--- a/examples/painting/basicdrawing/window.cpp
+++ b/examples/painting/basicdrawing/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/basicdrawing/window.h b/examples/painting/basicdrawing/window.h
index 2f939fb741..18aae56053 100644
--- a/examples/painting/basicdrawing/window.h
+++ b/examples/painting/basicdrawing/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/composition/composition.cpp b/examples/painting/composition/composition.cpp
index e376d90733..437dfaa512 100644
--- a/examples/painting/composition/composition.cpp
+++ b/examples/painting/composition/composition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/composition/composition.h b/examples/painting/composition/composition.h
index 73d49bf227..c63ffe3c15 100644
--- a/examples/painting/composition/composition.h
+++ b/examples/painting/composition/composition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/composition/main.cpp b/examples/painting/composition/main.cpp
index 3c6a16aaf5..6d4a2c3fdc 100644
--- a/examples/painting/composition/main.cpp
+++ b/examples/painting/composition/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/concentriccircles/circlewidget.cpp b/examples/painting/concentriccircles/circlewidget.cpp
index 1ffab63944..9ed2cd7929 100644
--- a/examples/painting/concentriccircles/circlewidget.cpp
+++ b/examples/painting/concentriccircles/circlewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/concentriccircles/circlewidget.h b/examples/painting/concentriccircles/circlewidget.h
index e8f583d643..7276667d69 100644
--- a/examples/painting/concentriccircles/circlewidget.h
+++ b/examples/painting/concentriccircles/circlewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/concentriccircles/main.cpp b/examples/painting/concentriccircles/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/painting/concentriccircles/main.cpp
+++ b/examples/painting/concentriccircles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/concentriccircles/window.cpp b/examples/painting/concentriccircles/window.cpp
index c4c5ed8e08..c0949f01dc 100644
--- a/examples/painting/concentriccircles/window.cpp
+++ b/examples/painting/concentriccircles/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/concentriccircles/window.h b/examples/painting/concentriccircles/window.h
index b5cc7d9a97..253030fb92 100644
--- a/examples/painting/concentriccircles/window.h
+++ b/examples/painting/concentriccircles/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/deform/main.cpp b/examples/painting/deform/main.cpp
index c49117a2f2..562176ba47 100644
--- a/examples/painting/deform/main.cpp
+++ b/examples/painting/deform/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/deform/pathdeform.cpp b/examples/painting/deform/pathdeform.cpp
index f80ef2b8be..ecf14563e9 100644
--- a/examples/painting/deform/pathdeform.cpp
+++ b/examples/painting/deform/pathdeform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/deform/pathdeform.h b/examples/painting/deform/pathdeform.h
index 73a1955082..cfc5afe626 100644
--- a/examples/painting/deform/pathdeform.h
+++ b/examples/painting/deform/pathdeform.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/fontsampler/main.cpp b/examples/painting/fontsampler/main.cpp
index 01c8adae53..bfe61dcd01 100644
--- a/examples/painting/fontsampler/main.cpp
+++ b/examples/painting/fontsampler/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp
index ad0ce55ede..bd9f38554b 100644
--- a/examples/painting/fontsampler/mainwindow.cpp
+++ b/examples/painting/fontsampler/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/fontsampler/mainwindow.h b/examples/painting/fontsampler/mainwindow.h
index 1b66c3c370..9abd481827 100644
--- a/examples/painting/fontsampler/mainwindow.h
+++ b/examples/painting/fontsampler/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/gradients/gradients.cpp b/examples/painting/gradients/gradients.cpp
index 338d8ebabd..13411bb4ac 100644
--- a/examples/painting/gradients/gradients.cpp
+++ b/examples/painting/gradients/gradients.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/gradients/gradients.h b/examples/painting/gradients/gradients.h
index 3277c4b21d..45fa269c86 100644
--- a/examples/painting/gradients/gradients.h
+++ b/examples/painting/gradients/gradients.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/gradients/main.cpp b/examples/painting/gradients/main.cpp
index 1d2f0d5775..ef0a010280 100644
--- a/examples/painting/gradients/main.cpp
+++ b/examples/painting/gradients/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/imagecomposition/imagecomposer.cpp b/examples/painting/imagecomposition/imagecomposer.cpp
index fee4f2a338..f206d1eeda 100644
--- a/examples/painting/imagecomposition/imagecomposer.cpp
+++ b/examples/painting/imagecomposition/imagecomposer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/imagecomposition/imagecomposer.h b/examples/painting/imagecomposition/imagecomposer.h
index 2248ba3033..601542b5b6 100644
--- a/examples/painting/imagecomposition/imagecomposer.h
+++ b/examples/painting/imagecomposition/imagecomposer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/imagecomposition/main.cpp b/examples/painting/imagecomposition/main.cpp
index e70fa5fae9..1c530d1e35 100644
--- a/examples/painting/imagecomposition/main.cpp
+++ b/examples/painting/imagecomposition/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/painterpaths/main.cpp b/examples/painting/painterpaths/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/painting/painterpaths/main.cpp
+++ b/examples/painting/painterpaths/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/painterpaths/renderarea.cpp b/examples/painting/painterpaths/renderarea.cpp
index 9bff70bb41..8f3ae8bd31 100644
--- a/examples/painting/painterpaths/renderarea.cpp
+++ b/examples/painting/painterpaths/renderarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/painterpaths/renderarea.h b/examples/painting/painterpaths/renderarea.h
index 2c50ecb353..b274cbf32a 100644
--- a/examples/painting/painterpaths/renderarea.h
+++ b/examples/painting/painterpaths/renderarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/painterpaths/window.cpp b/examples/painting/painterpaths/window.cpp
index 641d3597ed..c278f367c1 100644
--- a/examples/painting/painterpaths/window.cpp
+++ b/examples/painting/painterpaths/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/painterpaths/window.h b/examples/painting/painterpaths/window.h
index b95cd93851..467b11b0b9 100644
--- a/examples/painting/painterpaths/window.h
+++ b/examples/painting/painterpaths/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/pathstroke/main.cpp b/examples/painting/pathstroke/main.cpp
index b357f99336..b895438203 100644
--- a/examples/painting/pathstroke/main.cpp
+++ b/examples/painting/pathstroke/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/pathstroke/pathstroke.cpp b/examples/painting/pathstroke/pathstroke.cpp
index 02c35f7721..70baaaa0f0 100644
--- a/examples/painting/pathstroke/pathstroke.cpp
+++ b/examples/painting/pathstroke/pathstroke.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/pathstroke/pathstroke.h b/examples/painting/pathstroke/pathstroke.h
index 72b897a994..19b6d95c81 100644
--- a/examples/painting/pathstroke/pathstroke.h
+++ b/examples/painting/pathstroke/pathstroke.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/shared/arthurstyle.cpp b/examples/painting/shared/arthurstyle.cpp
index 432b8b34e5..a371e1187c 100644
--- a/examples/painting/shared/arthurstyle.cpp
+++ b/examples/painting/shared/arthurstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/shared/arthurstyle.h b/examples/painting/shared/arthurstyle.h
index 32c7fad970..2a1eec2c44 100644
--- a/examples/painting/shared/arthurstyle.h
+++ b/examples/painting/shared/arthurstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/shared/arthurwidgets.cpp b/examples/painting/shared/arthurwidgets.cpp
index 6a0183288c..c9b1faa3fd 100644
--- a/examples/painting/shared/arthurwidgets.cpp
+++ b/examples/painting/shared/arthurwidgets.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/shared/arthurwidgets.h b/examples/painting/shared/arthurwidgets.h
index dc8f92505d..4c6443696c 100644
--- a/examples/painting/shared/arthurwidgets.h
+++ b/examples/painting/shared/arthurwidgets.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/shared/hoverpoints.cpp b/examples/painting/shared/hoverpoints.cpp
index 36c24186d3..e60f096e8c 100644
--- a/examples/painting/shared/hoverpoints.cpp
+++ b/examples/painting/shared/hoverpoints.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/shared/hoverpoints.h b/examples/painting/shared/hoverpoints.h
index af755a2a50..e131aeee55 100644
--- a/examples/painting/shared/hoverpoints.h
+++ b/examples/painting/shared/hoverpoints.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/transformations/main.cpp b/examples/painting/transformations/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/painting/transformations/main.cpp
+++ b/examples/painting/transformations/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/transformations/renderarea.cpp b/examples/painting/transformations/renderarea.cpp
index 04a6eb511f..07dfffaf23 100644
--- a/examples/painting/transformations/renderarea.cpp
+++ b/examples/painting/transformations/renderarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/transformations/renderarea.h b/examples/painting/transformations/renderarea.h
index 039430d9a3..00d0f04954 100644
--- a/examples/painting/transformations/renderarea.h
+++ b/examples/painting/transformations/renderarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/transformations/window.cpp b/examples/painting/transformations/window.cpp
index 24d0a6f5ce..aab2750836 100644
--- a/examples/painting/transformations/window.cpp
+++ b/examples/painting/transformations/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/painting/transformations/window.h b/examples/painting/transformations/window.h
index b7cd575a81..da76e9743d 100644
--- a/examples/painting/transformations/window.h
+++ b/examples/painting/transformations/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/main.cpp b/examples/qmake/precompile/main.cpp
index 033fed35cb..0a3d16e901 100644
--- a/examples/qmake/precompile/main.cpp
+++ b/examples/qmake/precompile/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/mydialog.cpp b/examples/qmake/precompile/mydialog.cpp
index 96d3fb0313..e1464ed4cf 100644
--- a/examples/qmake/precompile/mydialog.cpp
+++ b/examples/qmake/precompile/mydialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/mydialog.h b/examples/qmake/precompile/mydialog.h
index 5e2a06f923..f29172039b 100644
--- a/examples/qmake/precompile/mydialog.h
+++ b/examples/qmake/precompile/mydialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/myobject.cpp b/examples/qmake/precompile/myobject.cpp
index 3a8cef7991..eb87b114f6 100644
--- a/examples/qmake/precompile/myobject.cpp
+++ b/examples/qmake/precompile/myobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/myobject.h b/examples/qmake/precompile/myobject.h
index 8953832b82..e5c65b3f24 100644
--- a/examples/qmake/precompile/myobject.h
+++ b/examples/qmake/precompile/myobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/stable.h b/examples/qmake/precompile/stable.h
index 140af3c053..f884009dc3 100644
--- a/examples/qmake/precompile/stable.h
+++ b/examples/qmake/precompile/stable.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/precompile/util.cpp b/examples/qmake/precompile/util.cpp
index ba85b14f87..d99a19dae2 100644
--- a/examples/qmake/precompile/util.cpp
+++ b/examples/qmake/precompile/util.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/tutorial/hello.cpp b/examples/qmake/tutorial/hello.cpp
index 9edb4e349f..a87ab8621a 100644
--- a/examples/qmake/tutorial/hello.cpp
+++ b/examples/qmake/tutorial/hello.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/tutorial/hello.h b/examples/qmake/tutorial/hello.h
index 05bdeef036..4acf5ae1d8 100644
--- a/examples/qmake/tutorial/hello.h
+++ b/examples/qmake/tutorial/hello.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/tutorial/hellounix.cpp b/examples/qmake/tutorial/hellounix.cpp
index 8594546455..8207505a5c 100644
--- a/examples/qmake/tutorial/hellounix.cpp
+++ b/examples/qmake/tutorial/hellounix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/tutorial/hellowin.cpp b/examples/qmake/tutorial/hellowin.cpp
index b23d940d96..16fc6f9620 100644
--- a/examples/qmake/tutorial/hellowin.cpp
+++ b/examples/qmake/tutorial/hellowin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qmake/tutorial/main.cpp b/examples/qmake/tutorial/main.cpp
index c68602ce22..2bf9c34e61 100644
--- a/examples/qmake/tutorial/main.cpp
+++ b/examples/qmake/tutorial/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qpa/windows/main.cpp b/examples/qpa/windows/main.cpp
index 01f63db282..37c931c732 100644
--- a/examples/qpa/windows/main.cpp
+++ b/examples/qpa/windows/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qpa/windows/window.cpp b/examples/qpa/windows/window.cpp
index 7ea00f8d4c..c22ad2878e 100644
--- a/examples/qpa/windows/window.cpp
+++ b/examples/qpa/windows/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qpa/windows/window.h b/examples/qpa/windows/window.h
index 19a09a6cfa..31b6e1b12f 100644
--- a/examples/qpa/windows/window.h
+++ b/examples/qpa/windows/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.cpp b/examples/qtconcurrent/imagescaling/imagescaling.cpp
index fe2e3f4dad..d4d47069d7 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.cpp
+++ b/examples/qtconcurrent/imagescaling/imagescaling.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.h b/examples/qtconcurrent/imagescaling/imagescaling.h
index 5bc9187dea..b56d07f2cb 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.h
+++ b/examples/qtconcurrent/imagescaling/imagescaling.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/imagescaling/main.cpp b/examples/qtconcurrent/imagescaling/main.cpp
index bca840810a..8e06c968ca 100644
--- a/examples/qtconcurrent/imagescaling/main.cpp
+++ b/examples/qtconcurrent/imagescaling/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp
index a3618b4e59..1dee9412a5 100644
--- a/examples/qtconcurrent/map/main.cpp
+++ b/examples/qtconcurrent/map/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp
index 956d059911..26de3e22b7 100644
--- a/examples/qtconcurrent/progressdialog/main.cpp
+++ b/examples/qtconcurrent/progressdialog/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp
index f369ee8417..4003204536 100644
--- a/examples/qtconcurrent/runfunction/main.cpp
+++ b/examples/qtconcurrent/runfunction/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtconcurrent/wordcount/main.cpp b/examples/qtconcurrent/wordcount/main.cpp
index 25ded55f50..a5ca67a460 100644
--- a/examples/qtconcurrent/wordcount/main.cpp
+++ b/examples/qtconcurrent/wordcount/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtestlib/tutorial1/testqstring.cpp b/examples/qtestlib/tutorial1/testqstring.cpp
index 79f2bfd782..76fa98c512 100644
--- a/examples/qtestlib/tutorial1/testqstring.cpp
+++ b/examples/qtestlib/tutorial1/testqstring.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtestlib/tutorial2/testqstring.cpp b/examples/qtestlib/tutorial2/testqstring.cpp
index cd0e3f186b..7bfa3bcbeb 100644
--- a/examples/qtestlib/tutorial2/testqstring.cpp
+++ b/examples/qtestlib/tutorial2/testqstring.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtestlib/tutorial3/testgui.cpp b/examples/qtestlib/tutorial3/testgui.cpp
index 6618d86c14..d90f0299c7 100644
--- a/examples/qtestlib/tutorial3/testgui.cpp
+++ b/examples/qtestlib/tutorial3/testgui.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtestlib/tutorial4/testgui.cpp b/examples/qtestlib/tutorial4/testgui.cpp
index 66a6cbe7c5..fd884d237b 100644
--- a/examples/qtestlib/tutorial4/testgui.cpp
+++ b/examples/qtestlib/tutorial4/testgui.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtestlib/tutorial5/benchmarking.cpp b/examples/qtestlib/tutorial5/benchmarking.cpp
index f844c2e66c..bc0cf304bb 100644
--- a/examples/qtestlib/tutorial5/benchmarking.cpp
+++ b/examples/qtestlib/tutorial5/benchmarking.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qtestlib/tutorial5/containers.cpp b/examples/qtestlib/tutorial5/containers.cpp
index 345f9e9c43..a966045905 100644
--- a/examples/qtestlib/tutorial5/containers.cpp
+++ b/examples/qtestlib/tutorial5/containers.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/dbscreen/dbscreen.cpp b/examples/qws/dbscreen/dbscreen.cpp
index 61953d98c2..a67358afe1 100644
--- a/examples/qws/dbscreen/dbscreen.cpp
+++ b/examples/qws/dbscreen/dbscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/dbscreen/dbscreen.h b/examples/qws/dbscreen/dbscreen.h
index a708f07f1f..2731a5ceae 100644
--- a/examples/qws/dbscreen/dbscreen.h
+++ b/examples/qws/dbscreen/dbscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/dbscreen/dbscreendriverplugin.cpp b/examples/qws/dbscreen/dbscreendriverplugin.cpp
index 7d70431900..507dcecf48 100644
--- a/examples/qws/dbscreen/dbscreendriverplugin.cpp
+++ b/examples/qws/dbscreen/dbscreendriverplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/framebuffer/main.c b/examples/qws/framebuffer/main.c
index ab1a0fd373..f9d29e6712 100644
--- a/examples/qws/framebuffer/main.c
+++ b/examples/qws/framebuffer/main.c
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/mousecalibration/calibration.cpp b/examples/qws/mousecalibration/calibration.cpp
index c0746c9aeb..d39cf62fe5 100644
--- a/examples/qws/mousecalibration/calibration.cpp
+++ b/examples/qws/mousecalibration/calibration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/mousecalibration/calibration.h b/examples/qws/mousecalibration/calibration.h
index 4988b6e755..335b2d50a3 100644
--- a/examples/qws/mousecalibration/calibration.h
+++ b/examples/qws/mousecalibration/calibration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/mousecalibration/main.cpp b/examples/qws/mousecalibration/main.cpp
index 3db11cd109..9393c84f13 100644
--- a/examples/qws/mousecalibration/main.cpp
+++ b/examples/qws/mousecalibration/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/mousecalibration/scribblewidget.cpp b/examples/qws/mousecalibration/scribblewidget.cpp
index cc24aeb3bf..705c60798f 100644
--- a/examples/qws/mousecalibration/scribblewidget.cpp
+++ b/examples/qws/mousecalibration/scribblewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/mousecalibration/scribblewidget.h b/examples/qws/mousecalibration/scribblewidget.h
index a8957b4664..a5e11e2dab 100644
--- a/examples/qws/mousecalibration/scribblewidget.h
+++ b/examples/qws/mousecalibration/scribblewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/simpledecoration/analogclock.cpp b/examples/qws/simpledecoration/analogclock.cpp
index c922c9fe18..57246c86f4 100644
--- a/examples/qws/simpledecoration/analogclock.cpp
+++ b/examples/qws/simpledecoration/analogclock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/simpledecoration/analogclock.h b/examples/qws/simpledecoration/analogclock.h
index 6fef764ee1..43e81ff60c 100644
--- a/examples/qws/simpledecoration/analogclock.h
+++ b/examples/qws/simpledecoration/analogclock.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/simpledecoration/main.cpp b/examples/qws/simpledecoration/main.cpp
index 9a8f913ee5..2d616311b8 100644
--- a/examples/qws/simpledecoration/main.cpp
+++ b/examples/qws/simpledecoration/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/simpledecoration/mydecoration.cpp b/examples/qws/simpledecoration/mydecoration.cpp
index 907fd6d8c2..f2eb14f319 100644
--- a/examples/qws/simpledecoration/mydecoration.cpp
+++ b/examples/qws/simpledecoration/mydecoration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/simpledecoration/mydecoration.h b/examples/qws/simpledecoration/mydecoration.h
index 6d8aebf6b2..e397775e21 100644
--- a/examples/qws/simpledecoration/mydecoration.h
+++ b/examples/qws/simpledecoration/mydecoration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibpaintdevice.cpp b/examples/qws/svgalib/svgalibpaintdevice.cpp
index 5b1ecb0717..5d25eccf43 100644
--- a/examples/qws/svgalib/svgalibpaintdevice.cpp
+++ b/examples/qws/svgalib/svgalibpaintdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibpaintdevice.h b/examples/qws/svgalib/svgalibpaintdevice.h
index 0b70b86df9..75415ac2bb 100644
--- a/examples/qws/svgalib/svgalibpaintdevice.h
+++ b/examples/qws/svgalib/svgalibpaintdevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibpaintengine.cpp b/examples/qws/svgalib/svgalibpaintengine.cpp
index f6774d0683..ebcc46e780 100644
--- a/examples/qws/svgalib/svgalibpaintengine.cpp
+++ b/examples/qws/svgalib/svgalibpaintengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibpaintengine.h b/examples/qws/svgalib/svgalibpaintengine.h
index d3d85ba7a8..20c1fd0f48 100644
--- a/examples/qws/svgalib/svgalibpaintengine.h
+++ b/examples/qws/svgalib/svgalibpaintengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibplugin.cpp b/examples/qws/svgalib/svgalibplugin.cpp
index 9be629e63b..dc60f5e4b1 100644
--- a/examples/qws/svgalib/svgalibplugin.cpp
+++ b/examples/qws/svgalib/svgalibplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibscreen.cpp b/examples/qws/svgalib/svgalibscreen.cpp
index 163259178c..4fe97e0889 100644
--- a/examples/qws/svgalib/svgalibscreen.cpp
+++ b/examples/qws/svgalib/svgalibscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibscreen.h b/examples/qws/svgalib/svgalibscreen.h
index da3b05e103..68e236485f 100644
--- a/examples/qws/svgalib/svgalibscreen.h
+++ b/examples/qws/svgalib/svgalibscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibsurface.cpp b/examples/qws/svgalib/svgalibsurface.cpp
index ad270a1783..027e3f980a 100644
--- a/examples/qws/svgalib/svgalibsurface.cpp
+++ b/examples/qws/svgalib/svgalibsurface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/qws/svgalib/svgalibsurface.h b/examples/qws/svgalib/svgalibsurface.h
index 5c25e72521..08a65d0fb8 100644
--- a/examples/qws/svgalib/svgalibsurface.h
+++ b/examples/qws/svgalib/svgalibsurface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/calendar/main.cpp b/examples/richtext/calendar/main.cpp
index 808f72480b..913c41317f 100644
--- a/examples/richtext/calendar/main.cpp
+++ b/examples/richtext/calendar/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/calendar/mainwindow.cpp b/examples/richtext/calendar/mainwindow.cpp
index c8cb833078..5a7867c162 100644
--- a/examples/richtext/calendar/mainwindow.cpp
+++ b/examples/richtext/calendar/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/calendar/mainwindow.h b/examples/richtext/calendar/mainwindow.h
index a9cf5216a7..25c126e3d7 100644
--- a/examples/richtext/calendar/mainwindow.h
+++ b/examples/richtext/calendar/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/orderform/detailsdialog.cpp b/examples/richtext/orderform/detailsdialog.cpp
index ba395ec2bb..a1b5145b9e 100644
--- a/examples/richtext/orderform/detailsdialog.cpp
+++ b/examples/richtext/orderform/detailsdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/orderform/detailsdialog.h b/examples/richtext/orderform/detailsdialog.h
index dea3ea125e..830290af4f 100644
--- a/examples/richtext/orderform/detailsdialog.h
+++ b/examples/richtext/orderform/detailsdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/orderform/main.cpp b/examples/richtext/orderform/main.cpp
index eb8155fd9a..211f80e7a3 100644
--- a/examples/richtext/orderform/main.cpp
+++ b/examples/richtext/orderform/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/orderform/mainwindow.cpp b/examples/richtext/orderform/mainwindow.cpp
index e94d4e6316..eb538d5957 100644
--- a/examples/richtext/orderform/mainwindow.cpp
+++ b/examples/richtext/orderform/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/orderform/mainwindow.h b/examples/richtext/orderform/mainwindow.h
index af923f9760..23468759b2 100644
--- a/examples/richtext/orderform/mainwindow.h
+++ b/examples/richtext/orderform/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/syntaxhighlighter/highlighter.cpp b/examples/richtext/syntaxhighlighter/highlighter.cpp
index d14d0241fe..7ba21c407e 100644
--- a/examples/richtext/syntaxhighlighter/highlighter.cpp
+++ b/examples/richtext/syntaxhighlighter/highlighter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/syntaxhighlighter/highlighter.h b/examples/richtext/syntaxhighlighter/highlighter.h
index 5bc69fc218..2ed082b470 100644
--- a/examples/richtext/syntaxhighlighter/highlighter.h
+++ b/examples/richtext/syntaxhighlighter/highlighter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/syntaxhighlighter/main.cpp b/examples/richtext/syntaxhighlighter/main.cpp
index eecfb12bdc..d2437372e2 100644
--- a/examples/richtext/syntaxhighlighter/main.cpp
+++ b/examples/richtext/syntaxhighlighter/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/syntaxhighlighter/mainwindow.cpp b/examples/richtext/syntaxhighlighter/mainwindow.cpp
index 298ba3c472..0b8655511f 100644
--- a/examples/richtext/syntaxhighlighter/mainwindow.cpp
+++ b/examples/richtext/syntaxhighlighter/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/syntaxhighlighter/mainwindow.h b/examples/richtext/syntaxhighlighter/mainwindow.h
index cc7cf053f3..3400474553 100644
--- a/examples/richtext/syntaxhighlighter/mainwindow.h
+++ b/examples/richtext/syntaxhighlighter/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/textedit/main.cpp b/examples/richtext/textedit/main.cpp
index 036fa80ba7..8b3d259011 100644
--- a/examples/richtext/textedit/main.cpp
+++ b/examples/richtext/textedit/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/textedit/textedit.cpp b/examples/richtext/textedit/textedit.cpp
index d76d9dec2d..12c1d55e91 100644
--- a/examples/richtext/textedit/textedit.cpp
+++ b/examples/richtext/textedit/textedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/textedit/textedit.h b/examples/richtext/textedit/textedit.h
index ed2057214e..a6cd1e63e4 100644
--- a/examples/richtext/textedit/textedit.h
+++ b/examples/richtext/textedit/textedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/richtext/textedit/textedit.qdoc b/examples/richtext/textedit/textedit.qdoc
index 8fc9609407..b9cc886d5d 100644
--- a/examples/richtext/textedit/textedit.qdoc
+++ b/examples/richtext/textedit/textedit.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/scroller/graphicsview/main.cpp b/examples/scroller/graphicsview/main.cpp
index ec92f031e1..3942edc757 100644
--- a/examples/scroller/graphicsview/main.cpp
+++ b/examples/scroller/graphicsview/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/books/bookdelegate.cpp b/examples/sql/books/bookdelegate.cpp
index a4cf5d3a26..391b2014bd 100644
--- a/examples/sql/books/bookdelegate.cpp
+++ b/examples/sql/books/bookdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/books/bookdelegate.h b/examples/sql/books/bookdelegate.h
index 5dc39c0223..9c86dcd13c 100644
--- a/examples/sql/books/bookdelegate.h
+++ b/examples/sql/books/bookdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/books/bookwindow.cpp b/examples/sql/books/bookwindow.cpp
index 40d23d1761..3485212e76 100644
--- a/examples/sql/books/bookwindow.cpp
+++ b/examples/sql/books/bookwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/books/bookwindow.h b/examples/sql/books/bookwindow.h
index 781a2f8bb3..ae72805ce8 100644
--- a/examples/sql/books/bookwindow.h
+++ b/examples/sql/books/bookwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/books/initdb.h b/examples/sql/books/initdb.h
index 9c9bebcba1..233ebd7f48 100644
--- a/examples/sql/books/initdb.h
+++ b/examples/sql/books/initdb.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/books/main.cpp b/examples/sql/books/main.cpp
index e08fb156c3..23fe8ed46c 100644
--- a/examples/sql/books/main.cpp
+++ b/examples/sql/books/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/cachedtable/main.cpp b/examples/sql/cachedtable/main.cpp
index 3869f7ad5a..4915e2253b 100644
--- a/examples/sql/cachedtable/main.cpp
+++ b/examples/sql/cachedtable/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp
index 4f90de12e5..0518db56c7 100644
--- a/examples/sql/cachedtable/tableeditor.cpp
+++ b/examples/sql/cachedtable/tableeditor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/cachedtable/tableeditor.h b/examples/sql/cachedtable/tableeditor.h
index f13bd3d5bf..6956f74f14 100644
--- a/examples/sql/cachedtable/tableeditor.h
+++ b/examples/sql/cachedtable/tableeditor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/connection.h b/examples/sql/connection.h
index cd2d1d44b6..3b35612024 100644
--- a/examples/sql/connection.h
+++ b/examples/sql/connection.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/imageitem.cpp b/examples/sql/drilldown/imageitem.cpp
index 52dff716d5..9942fdde5f 100644
--- a/examples/sql/drilldown/imageitem.cpp
+++ b/examples/sql/drilldown/imageitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/imageitem.h b/examples/sql/drilldown/imageitem.h
index f2bd27bc9e..fb51e7795a 100644
--- a/examples/sql/drilldown/imageitem.h
+++ b/examples/sql/drilldown/imageitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp
index 351b98dd0f..ce90779f3a 100644
--- a/examples/sql/drilldown/informationwindow.cpp
+++ b/examples/sql/drilldown/informationwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/informationwindow.h b/examples/sql/drilldown/informationwindow.h
index b5cf25a8e0..a7af8a8d5c 100644
--- a/examples/sql/drilldown/informationwindow.h
+++ b/examples/sql/drilldown/informationwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp
index c38e3439fe..7d7f93acde 100644
--- a/examples/sql/drilldown/main.cpp
+++ b/examples/sql/drilldown/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp
index d0f240be9e..23d47332ca 100644
--- a/examples/sql/drilldown/view.cpp
+++ b/examples/sql/drilldown/view.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/drilldown/view.h b/examples/sql/drilldown/view.h
index 98855350bd..4453662f74 100644
--- a/examples/sql/drilldown/view.h
+++ b/examples/sql/drilldown/view.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/masterdetail/database.h b/examples/sql/masterdetail/database.h
index ab9a8ff2d6..a75e390f65 100644
--- a/examples/sql/masterdetail/database.h
+++ b/examples/sql/masterdetail/database.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/masterdetail/dialog.cpp b/examples/sql/masterdetail/dialog.cpp
index 9dc0fe14e3..d78d4953c5 100644
--- a/examples/sql/masterdetail/dialog.cpp
+++ b/examples/sql/masterdetail/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/masterdetail/dialog.h b/examples/sql/masterdetail/dialog.h
index e311554597..2b08b13156 100644
--- a/examples/sql/masterdetail/dialog.h
+++ b/examples/sql/masterdetail/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/masterdetail/main.cpp b/examples/sql/masterdetail/main.cpp
index 0e2aca5d2e..b8338a636b 100644
--- a/examples/sql/masterdetail/main.cpp
+++ b/examples/sql/masterdetail/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index d00946cb39..127f18630f 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/masterdetail/mainwindow.h b/examples/sql/masterdetail/mainwindow.h
index e087b68ee3..586a22a722 100644
--- a/examples/sql/masterdetail/mainwindow.h
+++ b/examples/sql/masterdetail/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/querymodel/customsqlmodel.cpp b/examples/sql/querymodel/customsqlmodel.cpp
index 534707e8e1..c7999de9dc 100644
--- a/examples/sql/querymodel/customsqlmodel.cpp
+++ b/examples/sql/querymodel/customsqlmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/querymodel/customsqlmodel.h b/examples/sql/querymodel/customsqlmodel.h
index 0ea1bf1e04..7627c785d2 100644
--- a/examples/sql/querymodel/customsqlmodel.h
+++ b/examples/sql/querymodel/customsqlmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/querymodel/editablesqlmodel.cpp b/examples/sql/querymodel/editablesqlmodel.cpp
index b47995ada3..2a2fadac84 100644
--- a/examples/sql/querymodel/editablesqlmodel.cpp
+++ b/examples/sql/querymodel/editablesqlmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/querymodel/editablesqlmodel.h b/examples/sql/querymodel/editablesqlmodel.h
index b63409d958..f3a8bf7547 100644
--- a/examples/sql/querymodel/editablesqlmodel.h
+++ b/examples/sql/querymodel/editablesqlmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/querymodel/main.cpp b/examples/sql/querymodel/main.cpp
index 30b4954026..f40c5bd1c4 100644
--- a/examples/sql/querymodel/main.cpp
+++ b/examples/sql/querymodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.cpp b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
index 41dbdd2890..4497599f31 100644
--- a/examples/sql/relationaltablemodel/relationaltablemodel.cpp
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/browser.cpp b/examples/sql/sqlbrowser/browser.cpp
index 67ceefd20b..df0bee5d47 100644
--- a/examples/sql/sqlbrowser/browser.cpp
+++ b/examples/sql/sqlbrowser/browser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/browser.h b/examples/sql/sqlbrowser/browser.h
index 11f9e36211..f49f36c44a 100644
--- a/examples/sql/sqlbrowser/browser.h
+++ b/examples/sql/sqlbrowser/browser.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/connectionwidget.cpp b/examples/sql/sqlbrowser/connectionwidget.cpp
index b68a20b309..12f6f18fbe 100644
--- a/examples/sql/sqlbrowser/connectionwidget.cpp
+++ b/examples/sql/sqlbrowser/connectionwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/connectionwidget.h b/examples/sql/sqlbrowser/connectionwidget.h
index aa04fc25bf..4243825b2b 100644
--- a/examples/sql/sqlbrowser/connectionwidget.h
+++ b/examples/sql/sqlbrowser/connectionwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/main.cpp b/examples/sql/sqlbrowser/main.cpp
index 6e0b129445..3b80899512 100644
--- a/examples/sql/sqlbrowser/main.cpp
+++ b/examples/sql/sqlbrowser/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/qsqlconnectiondialog.cpp b/examples/sql/sqlbrowser/qsqlconnectiondialog.cpp
index 56b6c031db..4a0a0d2793 100644
--- a/examples/sql/sqlbrowser/qsqlconnectiondialog.cpp
+++ b/examples/sql/sqlbrowser/qsqlconnectiondialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlbrowser/qsqlconnectiondialog.h b/examples/sql/sqlbrowser/qsqlconnectiondialog.h
index 8c4519a195..5a088548e0 100644
--- a/examples/sql/sqlbrowser/qsqlconnectiondialog.h
+++ b/examples/sql/sqlbrowser/qsqlconnectiondialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlwidgetmapper/main.cpp b/examples/sql/sqlwidgetmapper/main.cpp
index 41e756d8ad..3cbf4b5880 100644
--- a/examples/sql/sqlwidgetmapper/main.cpp
+++ b/examples/sql/sqlwidgetmapper/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlwidgetmapper/window.cpp b/examples/sql/sqlwidgetmapper/window.cpp
index 4370f50869..e38e253728 100644
--- a/examples/sql/sqlwidgetmapper/window.cpp
+++ b/examples/sql/sqlwidgetmapper/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/sqlwidgetmapper/window.h b/examples/sql/sqlwidgetmapper/window.h
index ee8b7d6672..a99907c226 100644
--- a/examples/sql/sqlwidgetmapper/window.h
+++ b/examples/sql/sqlwidgetmapper/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/sql/tablemodel/tablemodel.cpp b/examples/sql/tablemodel/tablemodel.cpp
index dc246d799e..0e46660728 100644
--- a/examples/sql/tablemodel/tablemodel.cpp
+++ b/examples/sql/tablemodel/tablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/eventtransitions/main.cpp b/examples/statemachine/eventtransitions/main.cpp
index e202f5e0f7..def62392a4 100644
--- a/examples/statemachine/eventtransitions/main.cpp
+++ b/examples/statemachine/eventtransitions/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/factorial/main.cpp b/examples/statemachine/factorial/main.cpp
index 15e1306e24..5a0c0054bc 100644
--- a/examples/statemachine/factorial/main.cpp
+++ b/examples/statemachine/factorial/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/pingpong/main.cpp b/examples/statemachine/pingpong/main.cpp
index 330824d3e8..1355f1e7b2 100644
--- a/examples/statemachine/pingpong/main.cpp
+++ b/examples/statemachine/pingpong/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/rogue/main.cpp b/examples/statemachine/rogue/main.cpp
index b52b55fccf..6ab41243c5 100644
--- a/examples/statemachine/rogue/main.cpp
+++ b/examples/statemachine/rogue/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/rogue/movementtransition.h b/examples/statemachine/rogue/movementtransition.h
index f2dcde3375..00cd54f088 100644
--- a/examples/statemachine/rogue/movementtransition.h
+++ b/examples/statemachine/rogue/movementtransition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/rogue/window.cpp b/examples/statemachine/rogue/window.cpp
index d5c06608c1..d0962ee28f 100644
--- a/examples/statemachine/rogue/window.cpp
+++ b/examples/statemachine/rogue/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/rogue/window.h b/examples/statemachine/rogue/window.h
index 025ec79600..4426d1d4d4 100644
--- a/examples/statemachine/rogue/window.h
+++ b/examples/statemachine/rogue/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/trafficlight/main.cpp b/examples/statemachine/trafficlight/main.cpp
index 9b10360ae2..33925dea90 100644
--- a/examples/statemachine/trafficlight/main.cpp
+++ b/examples/statemachine/trafficlight/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/statemachine/twowaybutton/main.cpp b/examples/statemachine/twowaybutton/main.cpp
index a6c7000446..aa985e202c 100644
--- a/examples/statemachine/twowaybutton/main.cpp
+++ b/examples/statemachine/twowaybutton/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/mandelbrot/main.cpp b/examples/threads/mandelbrot/main.cpp
index 610534d4a3..9232de23e4 100644
--- a/examples/threads/mandelbrot/main.cpp
+++ b/examples/threads/mandelbrot/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
index 0db19a71c6..5d2a615ea9 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
index ead394cc6a..7b9b6f7606 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/mandelbrot/renderthread.cpp b/examples/threads/mandelbrot/renderthread.cpp
index d4f3b8ad50..886f40e7bc 100644
--- a/examples/threads/mandelbrot/renderthread.cpp
+++ b/examples/threads/mandelbrot/renderthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/mandelbrot/renderthread.h b/examples/threads/mandelbrot/renderthread.h
index 3370d9df4b..6e270e46d3 100644
--- a/examples/threads/mandelbrot/renderthread.h
+++ b/examples/threads/mandelbrot/renderthread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/block.cpp b/examples/threads/queuedcustomtype/block.cpp
index a4252cb258..9316e82129 100644
--- a/examples/threads/queuedcustomtype/block.cpp
+++ b/examples/threads/queuedcustomtype/block.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/block.h b/examples/threads/queuedcustomtype/block.h
index 1c37f82d0e..d157a5741e 100644
--- a/examples/threads/queuedcustomtype/block.h
+++ b/examples/threads/queuedcustomtype/block.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/main.cpp b/examples/threads/queuedcustomtype/main.cpp
index d70a88a095..a4836690cf 100644
--- a/examples/threads/queuedcustomtype/main.cpp
+++ b/examples/threads/queuedcustomtype/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/renderthread.cpp b/examples/threads/queuedcustomtype/renderthread.cpp
index a44ac2315a..fc9c60a6e8 100644
--- a/examples/threads/queuedcustomtype/renderthread.cpp
+++ b/examples/threads/queuedcustomtype/renderthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/renderthread.h b/examples/threads/queuedcustomtype/renderthread.h
index 99f72c3e01..44db807eaa 100644
--- a/examples/threads/queuedcustomtype/renderthread.h
+++ b/examples/threads/queuedcustomtype/renderthread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/window.cpp b/examples/threads/queuedcustomtype/window.cpp
index 26a78af969..78a595c38f 100644
--- a/examples/threads/queuedcustomtype/window.cpp
+++ b/examples/threads/queuedcustomtype/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/queuedcustomtype/window.h b/examples/threads/queuedcustomtype/window.h
index 539c240cd7..e5596eea91 100644
--- a/examples/threads/queuedcustomtype/window.h
+++ b/examples/threads/queuedcustomtype/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/semaphores/semaphores.cpp b/examples/threads/semaphores/semaphores.cpp
index 9b818f394e..8085de59a6 100644
--- a/examples/threads/semaphores/semaphores.cpp
+++ b/examples/threads/semaphores/semaphores.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/threads/waitconditions/waitconditions.cpp b/examples/threads/waitconditions/waitconditions.cpp
index 36c358308a..403a01511f 100644
--- a/examples/threads/waitconditions/waitconditions.cpp
+++ b/examples/threads/waitconditions/waitconditions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/codecs/main.cpp b/examples/tools/codecs/main.cpp
index 923c1f8514..18ff180690 100644
--- a/examples/tools/codecs/main.cpp
+++ b/examples/tools/codecs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/codecs/mainwindow.cpp b/examples/tools/codecs/mainwindow.cpp
index bad23e9531..1658e476ee 100644
--- a/examples/tools/codecs/mainwindow.cpp
+++ b/examples/tools/codecs/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/codecs/mainwindow.h b/examples/tools/codecs/mainwindow.h
index 9a59e27310..65f89e997b 100644
--- a/examples/tools/codecs/mainwindow.h
+++ b/examples/tools/codecs/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/codecs/previewform.cpp b/examples/tools/codecs/previewform.cpp
index 1fc87c978d..2751ea773b 100644
--- a/examples/tools/codecs/previewform.cpp
+++ b/examples/tools/codecs/previewform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/codecs/previewform.h b/examples/tools/codecs/previewform.h
index 21a2e13722..d035ee337b 100644
--- a/examples/tools/codecs/previewform.h
+++ b/examples/tools/codecs/previewform.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/completer/fsmodel.cpp b/examples/tools/completer/fsmodel.cpp
index 645017f099..b7fd9425bf 100644
--- a/examples/tools/completer/fsmodel.cpp
+++ b/examples/tools/completer/fsmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/completer/fsmodel.h b/examples/tools/completer/fsmodel.h
index f9a59b2a3d..b0296cd1c0 100644
--- a/examples/tools/completer/fsmodel.h
+++ b/examples/tools/completer/fsmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/completer/main.cpp b/examples/tools/completer/main.cpp
index 6edd7406c2..aaa21cf2a7 100644
--- a/examples/tools/completer/main.cpp
+++ b/examples/tools/completer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/completer/mainwindow.cpp b/examples/tools/completer/mainwindow.cpp
index d56ed01108..3a81c681a0 100644
--- a/examples/tools/completer/mainwindow.cpp
+++ b/examples/tools/completer/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/completer/mainwindow.h b/examples/tools/completer/mainwindow.h
index e22a32d83e..79ff6bcc97 100644
--- a/examples/tools/completer/mainwindow.h
+++ b/examples/tools/completer/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/contiguouscache/main.cpp b/examples/tools/contiguouscache/main.cpp
index d578a389bf..15004c8392 100644
--- a/examples/tools/contiguouscache/main.cpp
+++ b/examples/tools/contiguouscache/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/contiguouscache/randomlistmodel.cpp b/examples/tools/contiguouscache/randomlistmodel.cpp
index 845b1e7a2a..36594cc857 100644
--- a/examples/tools/contiguouscache/randomlistmodel.cpp
+++ b/examples/tools/contiguouscache/randomlistmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/contiguouscache/randomlistmodel.h b/examples/tools/contiguouscache/randomlistmodel.h
index 96a4dc0c8b..c88ea145a6 100644
--- a/examples/tools/contiguouscache/randomlistmodel.h
+++ b/examples/tools/contiguouscache/randomlistmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customcompleter/main.cpp b/examples/tools/customcompleter/main.cpp
index 2024f50a85..c11e7c89aa 100644
--- a/examples/tools/customcompleter/main.cpp
+++ b/examples/tools/customcompleter/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customcompleter/mainwindow.cpp b/examples/tools/customcompleter/mainwindow.cpp
index ecb246f15b..3c0fc79ea6 100644
--- a/examples/tools/customcompleter/mainwindow.cpp
+++ b/examples/tools/customcompleter/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customcompleter/mainwindow.h b/examples/tools/customcompleter/mainwindow.h
index b645984826..20efdda8c1 100644
--- a/examples/tools/customcompleter/mainwindow.h
+++ b/examples/tools/customcompleter/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customcompleter/textedit.cpp b/examples/tools/customcompleter/textedit.cpp
index 4f6ae07e58..d14842ec2b 100644
--- a/examples/tools/customcompleter/textedit.cpp
+++ b/examples/tools/customcompleter/textedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customcompleter/textedit.h b/examples/tools/customcompleter/textedit.h
index 7ab21b740d..9b8f91c370 100644
--- a/examples/tools/customcompleter/textedit.h
+++ b/examples/tools/customcompleter/textedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtype/main.cpp b/examples/tools/customtype/main.cpp
index 6bb5889d25..f4e291d2a9 100644
--- a/examples/tools/customtype/main.cpp
+++ b/examples/tools/customtype/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtype/message.cpp b/examples/tools/customtype/message.cpp
index 9eb67165cb..665871ce2b 100644
--- a/examples/tools/customtype/message.cpp
+++ b/examples/tools/customtype/message.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtype/message.h b/examples/tools/customtype/message.h
index 1dcb46e23e..94d54b5009 100644
--- a/examples/tools/customtype/message.h
+++ b/examples/tools/customtype/message.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtypesending/main.cpp b/examples/tools/customtypesending/main.cpp
index 436f467a4b..12ee4fc4bc 100644
--- a/examples/tools/customtypesending/main.cpp
+++ b/examples/tools/customtypesending/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtypesending/message.cpp b/examples/tools/customtypesending/message.cpp
index 0a23ff1938..1934c63d8f 100644
--- a/examples/tools/customtypesending/message.cpp
+++ b/examples/tools/customtypesending/message.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtypesending/message.h b/examples/tools/customtypesending/message.h
index 429022bad3..1b683ad513 100644
--- a/examples/tools/customtypesending/message.h
+++ b/examples/tools/customtypesending/message.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtypesending/window.cpp b/examples/tools/customtypesending/window.cpp
index 813fea9b1d..f3f68c6a6c 100644
--- a/examples/tools/customtypesending/window.cpp
+++ b/examples/tools/customtypesending/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/customtypesending/window.h b/examples/tools/customtypesending/window.h
index a4e7ec2302..60479c9443 100644
--- a/examples/tools/customtypesending/window.h
+++ b/examples/tools/customtypesending/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/echoplugin/echowindow/echointerface.h b/examples/tools/echoplugin/echowindow/echointerface.h
index 885dd63848..60236eca44 100644
--- a/examples/tools/echoplugin/echowindow/echointerface.h
+++ b/examples/tools/echoplugin/echowindow/echointerface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/echoplugin/echowindow/echowindow.cpp b/examples/tools/echoplugin/echowindow/echowindow.cpp
index 75e9f161b1..aa45b5221d 100644
--- a/examples/tools/echoplugin/echowindow/echowindow.cpp
+++ b/examples/tools/echoplugin/echowindow/echowindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/echoplugin/echowindow/echowindow.h b/examples/tools/echoplugin/echowindow/echowindow.h
index dc1ebdb685..249824f70b 100644
--- a/examples/tools/echoplugin/echowindow/echowindow.h
+++ b/examples/tools/echoplugin/echowindow/echowindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/echoplugin/echowindow/main.cpp b/examples/tools/echoplugin/echowindow/main.cpp
index c4659d8813..e8a9c15861 100644
--- a/examples/tools/echoplugin/echowindow/main.cpp
+++ b/examples/tools/echoplugin/echowindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/echoplugin/plugin/echoplugin.cpp b/examples/tools/echoplugin/plugin/echoplugin.cpp
index daa95aa63c..648488fb53 100644
--- a/examples/tools/echoplugin/plugin/echoplugin.cpp
+++ b/examples/tools/echoplugin/plugin/echoplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/echoplugin/plugin/echoplugin.h b/examples/tools/echoplugin/plugin/echoplugin.h
index dca889c5f2..daeec9e7a5 100644
--- a/examples/tools/echoplugin/plugin/echoplugin.h
+++ b/examples/tools/echoplugin/plugin/echoplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/i18n/languagechooser.cpp b/examples/tools/i18n/languagechooser.cpp
index 1c03453793..9874430457 100644
--- a/examples/tools/i18n/languagechooser.cpp
+++ b/examples/tools/i18n/languagechooser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/i18n/languagechooser.h b/examples/tools/i18n/languagechooser.h
index 15378df7f3..b13a0c149a 100644
--- a/examples/tools/i18n/languagechooser.h
+++ b/examples/tools/i18n/languagechooser.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/i18n/main.cpp b/examples/tools/i18n/main.cpp
index ebc7a2bb27..7b4b63557e 100644
--- a/examples/tools/i18n/main.cpp
+++ b/examples/tools/i18n/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/i18n/mainwindow.cpp b/examples/tools/i18n/mainwindow.cpp
index 34fd99d868..ef0d33837a 100644
--- a/examples/tools/i18n/mainwindow.cpp
+++ b/examples/tools/i18n/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/i18n/mainwindow.h b/examples/tools/i18n/mainwindow.h
index dff0767742..eb3c6b91a5 100644
--- a/examples/tools/i18n/mainwindow.h
+++ b/examples/tools/i18n/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/inputpanel/inputpanel.desktop b/examples/tools/inputpanel/inputpanel.desktop
deleted file mode 100644
index 3cc9bd078a..0000000000
--- a/examples/tools/inputpanel/inputpanel.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=Input Panel
-Exec=/opt/usr/bin/inputpanel
-Icon=inputpanel
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/tools/inputpanel/inputpanel.pro b/examples/tools/inputpanel/inputpanel.pro
deleted file mode 100644
index 62e35e9c23..0000000000
--- a/examples/tools/inputpanel/inputpanel.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-SOURCES += main.cpp \
- myinputpanel.cpp \
- myinputpanelcontext.cpp
-
-HEADERS += myinputpanel.h \
- myinputpanelcontext.h
-
-FORMS += mainform.ui \
- myinputpanelform.ui
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/inputpanel
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS inputpanel.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/inputpanel
-INSTALLS += target sources
-
-QT += widgets
-
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/tools/inputpanel/main.cpp b/examples/tools/inputpanel/main.cpp
deleted file mode 100644
index 9d0c350faa..0000000000
--- a/examples/tools/inputpanel/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QWidget>
-
-//! [main]
-#include "myinputpanelcontext.h"
-#include "ui_mainform.h"
-
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
-
- MyInputPanelContext *ic = new MyInputPanelContext;
- app.setInputContext(ic);
-
- QWidget widget;
- Ui::MainForm form;
- form.setupUi(&widget);
- widget.show();
- return app.exec();
-}
-//! [main]
diff --git a/examples/tools/inputpanel/mainform.ui b/examples/tools/inputpanel/mainform.ui
deleted file mode 100644
index c16ae31510..0000000000
--- a/examples/tools/inputpanel/mainform.ui
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainForm</class>
- <widget class="QWidget" name="MainForm">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>140</width>
- <height>200</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Input Panel Example</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>My age:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
- </property>
- <property name="buddy">
- <cstring>lineEdit</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="lineEdit"/>
- </item>
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>My phone number:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
- </property>
- <property name="buddy">
- <cstring>lineEdit_2</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="lineEdit_2"/>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>My gender:</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QRadioButton" name="radioButton">
- <property name="text">
- <string>Male</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton_2">
- <property name="text">
- <string>Female</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/tools/inputpanel/myinputpanel.cpp b/examples/tools/inputpanel/myinputpanel.cpp
deleted file mode 100644
index c58d27d790..0000000000
--- a/examples/tools/inputpanel/myinputpanel.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "myinputpanel.h"
-
-//! [0]
-
-MyInputPanel::MyInputPanel()
- : QWidget(0, Qt::Tool | Qt::WindowStaysOnTopHint),
- lastFocusedWidget(0)
-{
- form.setupUi(this);
-
- connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)),
- this, SLOT(saveFocusWidget(QWidget*,QWidget*)));
-
- signalMapper.setMapping(form.panelButton_1, form.panelButton_1);
- signalMapper.setMapping(form.panelButton_2, form.panelButton_2);
- signalMapper.setMapping(form.panelButton_3, form.panelButton_3);
- signalMapper.setMapping(form.panelButton_4, form.panelButton_4);
- signalMapper.setMapping(form.panelButton_5, form.panelButton_5);
- signalMapper.setMapping(form.panelButton_6, form.panelButton_6);
- signalMapper.setMapping(form.panelButton_7, form.panelButton_7);
- signalMapper.setMapping(form.panelButton_8, form.panelButton_8);
- signalMapper.setMapping(form.panelButton_9, form.panelButton_9);
- signalMapper.setMapping(form.panelButton_star, form.panelButton_star);
- signalMapper.setMapping(form.panelButton_0, form.panelButton_0);
- signalMapper.setMapping(form.panelButton_hash, form.panelButton_hash);
-
- connect(form.panelButton_1, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_2, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_3, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_4, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_5, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_6, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_7, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_8, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_9, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_star, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_0, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
- connect(form.panelButton_hash, SIGNAL(clicked()),
- &signalMapper, SLOT(map()));
-
- connect(&signalMapper, SIGNAL(mapped(QWidget*)),
- this, SLOT(buttonClicked(QWidget*)));
-}
-
-//! [0]
-
-bool MyInputPanel::event(QEvent *e)
-{
- switch (e->type()) {
-//! [1]
- case QEvent::WindowActivate:
- if (lastFocusedWidget)
- lastFocusedWidget->activateWindow();
- break;
-//! [1]
- default:
- break;
- }
-
- return QWidget::event(e);
-}
-
-//! [2]
-
-void MyInputPanel::saveFocusWidget(QWidget * /*oldFocus*/, QWidget *newFocus)
-{
- if (newFocus != 0 && !this->isAncestorOf(newFocus)) {
- lastFocusedWidget = newFocus;
- }
-}
-
-//! [2]
-
-//! [3]
-
-void MyInputPanel::buttonClicked(QWidget *w)
-{
- QChar chr = qvariant_cast<QChar>(w->property("buttonValue"));
- emit characterGenerated(chr);
-}
-
-//! [3]
diff --git a/examples/tools/inputpanel/myinputpanel.h b/examples/tools/inputpanel/myinputpanel.h
deleted file mode 100644
index 0d11e9c038..0000000000
--- a/examples/tools/inputpanel/myinputpanel.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MYINPUTPANEL_H
-#define MYINPUTPANEL_H
-
-#include <QtWidgets>
-#include <QtCore>
-
-#include "ui_myinputpanelform.h"
-
-//! [0]
-
-class MyInputPanel : public QWidget
-{
- Q_OBJECT
-
-public:
- MyInputPanel();
-
-signals:
- void characterGenerated(QChar character);
-
-protected:
- bool event(QEvent *e);
-
-private slots:
- void saveFocusWidget(QWidget *oldFocus, QWidget *newFocus);
- void buttonClicked(QWidget *w);
-
-private:
- Ui::MyInputPanelForm form;
- QWidget *lastFocusedWidget;
- QSignalMapper signalMapper;
-};
-
-//! [0]
-
-#endif // MYINPUTPANEL_H
diff --git a/examples/tools/inputpanel/myinputpanelcontext.cpp b/examples/tools/inputpanel/myinputpanelcontext.cpp
deleted file mode 100644
index a09964ab9e..0000000000
--- a/examples/tools/inputpanel/myinputpanelcontext.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore>
-
-#include "myinputpanelcontext.h"
-
-//! [0]
-
-MyInputPanelContext::MyInputPanelContext()
-{
- inputPanel = new MyInputPanel;
- connect(inputPanel, SIGNAL(characterGenerated(QChar)), SLOT(sendCharacter(QChar)));
-}
-
-//! [0]
-
-MyInputPanelContext::~MyInputPanelContext()
-{
- delete inputPanel;
-}
-
-//! [1]
-
-bool MyInputPanelContext::filterEvent(const QEvent* event)
-{
- if (event->type() == QEvent::RequestSoftwareInputPanel) {
- updatePosition();
- inputPanel->show();
- return true;
- } else if (event->type() == QEvent::CloseSoftwareInputPanel) {
- inputPanel->hide();
- return true;
- }
- return false;
-}
-
-//! [1]
-
-QString MyInputPanelContext::identifierName()
-{
- return "MyInputPanelContext";
-}
-
-void MyInputPanelContext::reset()
-{
-}
-
-bool MyInputPanelContext::isComposing() const
-{
- return false;
-}
-
-QString MyInputPanelContext::language()
-{
- return "en_US";
-}
-
-//! [2]
-
-void MyInputPanelContext::sendCharacter(QChar character)
-{
- QPointer<QWidget> w = focusWidget();
-
- if (!w)
- return;
-
- QKeyEvent keyPress(QEvent::KeyPress, character.unicode(), Qt::NoModifier, QString(character));
- QApplication::sendEvent(w, &keyPress);
-
- if (!w)
- return;
-
- QKeyEvent keyRelease(QEvent::KeyPress, character.unicode(), Qt::NoModifier, QString());
- QApplication::sendEvent(w, &keyRelease);
-}
-
-//! [2]
-
-//! [3]
-
-void MyInputPanelContext::updatePosition()
-{
- QWidget *widget = focusWidget();
- if (!widget)
- return;
-
- QRect widgetRect = widget->rect();
- QPoint panelPos = QPoint(widgetRect.left(), widgetRect.bottom() + 2);
- panelPos = widget->mapToGlobal(panelPos);
- inputPanel->move(panelPos);
-}
-
-//! [3]
diff --git a/examples/tools/inputpanel/myinputpanelcontext.h b/examples/tools/inputpanel/myinputpanelcontext.h
deleted file mode 100644
index e69a496040..0000000000
--- a/examples/tools/inputpanel/myinputpanelcontext.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MYINPUTPANELCONTEXT_H
-#define MYINPUTPANELCONTEXT_H
-
-#include <QtWidgets/QInputContext>
-
-#include "myinputpanel.h"
-
-class MyInputPanel;
-
-//! [0]
-
-class MyInputPanelContext : public QInputContext
-{
- Q_OBJECT
-
-public:
- MyInputPanelContext();
- ~MyInputPanelContext();
-
- bool filterEvent(const QEvent* event);
-
- QString identifierName();
- QString language();
-
- bool isComposing() const;
-
- void reset();
-
-private slots:
- void sendCharacter(QChar character);
-
-private:
- void updatePosition();
-
-private:
- MyInputPanel *inputPanel;
-};
-
-//! [0]
-
-#endif // MYINPUTPANELCONTEXT_H
diff --git a/examples/tools/inputpanel/myinputpanelform.ui b/examples/tools/inputpanel/myinputpanelform.ui
deleted file mode 100644
index fe78442aff..0000000000
--- a/examples/tools/inputpanel/myinputpanelform.ui
+++ /dev/null
@@ -1,398 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MyInputPanelForm</class>
- <widget class="QWidget" name="MyInputPanelForm">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>167</width>
- <height>233</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Input Panel</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QPushButton" name="panelButton_1">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>1</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>49</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QPushButton" name="panelButton_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>2</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>50</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QPushButton" name="panelButton_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>3</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>51</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QPushButton" name="panelButton_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>4</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>52</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QPushButton" name="panelButton_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>5</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>53</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QPushButton" name="panelButton_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>6</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>54</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QPushButton" name="panelButton_7">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>7</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>55</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QPushButton" name="panelButton_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>8</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>56</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QPushButton" name="panelButton_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>9</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>57</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QPushButton" name="panelButton_star">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>*</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>42</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QPushButton" name="panelButton_0">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>0</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>48</unicode>
- </char>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QPushButton" name="panelButton_hash">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>40</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>#</string>
- </property>
- <property name="buttonValue" stdset="0">
- <char>
- <unicode>35</unicode>
- </char>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="closeButton">
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>closeButton</sender>
- <signal>clicked()</signal>
- <receiver>MyInputPanelForm</receiver>
- <slot>hide()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>114</x>
- <y>209</y>
- </hint>
- <hint type="destinationlabel">
- <x>83</x>
- <y>116</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/examples/tools/plugandpaint/interfaces.h b/examples/tools/plugandpaint/interfaces.h
index 785f3a1610..709fee509a 100644
--- a/examples/tools/plugandpaint/interfaces.h
+++ b/examples/tools/plugandpaint/interfaces.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/main.cpp b/examples/tools/plugandpaint/main.cpp
index f5ae1da83f..e3a4efa02b 100644
--- a/examples/tools/plugandpaint/main.cpp
+++ b/examples/tools/plugandpaint/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/mainwindow.cpp b/examples/tools/plugandpaint/mainwindow.cpp
index 292cae1fe7..fcd0507fee 100644
--- a/examples/tools/plugandpaint/mainwindow.cpp
+++ b/examples/tools/plugandpaint/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/mainwindow.h b/examples/tools/plugandpaint/mainwindow.h
index 526e3d5005..88c2f10ac1 100644
--- a/examples/tools/plugandpaint/mainwindow.h
+++ b/examples/tools/plugandpaint/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/paintarea.cpp b/examples/tools/plugandpaint/paintarea.cpp
index f6ace44ea5..ed01f80347 100644
--- a/examples/tools/plugandpaint/paintarea.cpp
+++ b/examples/tools/plugandpaint/paintarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/paintarea.h b/examples/tools/plugandpaint/paintarea.h
index d1185b287c..552d923853 100644
--- a/examples/tools/plugandpaint/paintarea.h
+++ b/examples/tools/plugandpaint/paintarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/plugindialog.cpp b/examples/tools/plugandpaint/plugindialog.cpp
index 66a51ee8ae..7c01d2507c 100644
--- a/examples/tools/plugandpaint/plugindialog.cpp
+++ b/examples/tools/plugandpaint/plugindialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaint/plugindialog.h b/examples/tools/plugandpaint/plugindialog.h
index 36e79f5bf5..9c4f202921 100644
--- a/examples/tools/plugandpaint/plugindialog.h
+++ b/examples/tools/plugandpaint/plugindialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
index 3e0af26efa..3b4592a5df 100644
--- a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
+++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h
index 79bcc5a088..f5611275d8 100644
--- a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h
+++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
index e58fde2205..d6cf3d4c68 100644
--- a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h
index db5679f016..4b4cd857d4 100644
--- a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/regexp/main.cpp b/examples/tools/regexp/main.cpp
index fe3fda64f0..207c3c4ab1 100644
--- a/examples/tools/regexp/main.cpp
+++ b/examples/tools/regexp/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/regexp/regexpdialog.cpp b/examples/tools/regexp/regexpdialog.cpp
index b9468bd49f..7fe163f012 100644
--- a/examples/tools/regexp/regexpdialog.cpp
+++ b/examples/tools/regexp/regexpdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/regexp/regexpdialog.h b/examples/tools/regexp/regexpdialog.h
index c157668cd1..85635cb114 100644
--- a/examples/tools/regexp/regexpdialog.h
+++ b/examples/tools/regexp/regexpdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/locationdialog.cpp b/examples/tools/settingseditor/locationdialog.cpp
index dcf190363a..b10b721c94 100644
--- a/examples/tools/settingseditor/locationdialog.cpp
+++ b/examples/tools/settingseditor/locationdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/locationdialog.h b/examples/tools/settingseditor/locationdialog.h
index a8a20e460f..20aef3fc76 100644
--- a/examples/tools/settingseditor/locationdialog.h
+++ b/examples/tools/settingseditor/locationdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/main.cpp b/examples/tools/settingseditor/main.cpp
index 923c1f8514..18ff180690 100644
--- a/examples/tools/settingseditor/main.cpp
+++ b/examples/tools/settingseditor/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/mainwindow.cpp b/examples/tools/settingseditor/mainwindow.cpp
index fc389cd009..06287db335 100644
--- a/examples/tools/settingseditor/mainwindow.cpp
+++ b/examples/tools/settingseditor/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/mainwindow.h b/examples/tools/settingseditor/mainwindow.h
index 6d997fa759..bfd276f9bb 100644
--- a/examples/tools/settingseditor/mainwindow.h
+++ b/examples/tools/settingseditor/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/settingstree.cpp b/examples/tools/settingseditor/settingstree.cpp
index 892cb30590..664ff28908 100644
--- a/examples/tools/settingseditor/settingstree.cpp
+++ b/examples/tools/settingseditor/settingstree.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/settingstree.h b/examples/tools/settingseditor/settingstree.h
index 63deb2a294..1d929ceed7 100644
--- a/examples/tools/settingseditor/settingstree.h
+++ b/examples/tools/settingseditor/settingstree.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/variantdelegate.cpp b/examples/tools/settingseditor/variantdelegate.cpp
index e4b532f9fe..e64ac791e3 100644
--- a/examples/tools/settingseditor/variantdelegate.cpp
+++ b/examples/tools/settingseditor/variantdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/settingseditor/variantdelegate.h b/examples/tools/settingseditor/variantdelegate.h
index abd4d93b8f..350e2311ae 100644
--- a/examples/tools/settingseditor/variantdelegate.h
+++ b/examples/tools/settingseditor/variantdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/plugin/simplestyle.cpp b/examples/tools/styleplugin/plugin/simplestyle.cpp
index d897f3a39b..e2fb8cf4fc 100644
--- a/examples/tools/styleplugin/plugin/simplestyle.cpp
+++ b/examples/tools/styleplugin/plugin/simplestyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/plugin/simplestyle.h b/examples/tools/styleplugin/plugin/simplestyle.h
index 1d4d9d84ae..a855399377 100644
--- a/examples/tools/styleplugin/plugin/simplestyle.h
+++ b/examples/tools/styleplugin/plugin/simplestyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
index d5acd08206..fc7b73f919 100644
--- a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
+++ b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.h b/examples/tools/styleplugin/plugin/simplestyleplugin.h
index 8a26cf6012..3ae73cdb29 100644
--- a/examples/tools/styleplugin/plugin/simplestyleplugin.h
+++ b/examples/tools/styleplugin/plugin/simplestyleplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/stylewindow/main.cpp b/examples/tools/styleplugin/stylewindow/main.cpp
index da6e218000..3baa02ff86 100644
--- a/examples/tools/styleplugin/stylewindow/main.cpp
+++ b/examples/tools/styleplugin/stylewindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.cpp b/examples/tools/styleplugin/stylewindow/stylewindow.cpp
index 3a4da98494..5e2f4ceab3 100644
--- a/examples/tools/styleplugin/stylewindow/stylewindow.cpp
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.h b/examples/tools/styleplugin/stylewindow/stylewindow.h
index aed21c77cc..bba1467ee5 100644
--- a/examples/tools/styleplugin/stylewindow/stylewindow.h
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro
index da86fb5286..d18670f7c9 100644
--- a/examples/tools/tools.pro
+++ b/examples/tools/tools.pro
@@ -5,7 +5,6 @@ SUBDIRS = codecs \
customcompleter \
echoplugin \
i18n \
- inputpanel \
contiguouscache \
plugandpaintplugins \
plugandpaint \
diff --git a/examples/tools/treemodelcompleter/main.cpp b/examples/tools/treemodelcompleter/main.cpp
index 6c53f171d6..61d8f34206 100644
--- a/examples/tools/treemodelcompleter/main.cpp
+++ b/examples/tools/treemodelcompleter/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp
index 6d8c7aec80..4aafae445e 100644
--- a/examples/tools/treemodelcompleter/mainwindow.cpp
+++ b/examples/tools/treemodelcompleter/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/treemodelcompleter/mainwindow.h b/examples/tools/treemodelcompleter/mainwindow.h
index a6bbf472fb..02fd043c38 100644
--- a/examples/tools/treemodelcompleter/mainwindow.h
+++ b/examples/tools/treemodelcompleter/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.cpp b/examples/tools/treemodelcompleter/treemodelcompleter.cpp
index bd4cd223db..359cbc6675 100644
--- a/examples/tools/treemodelcompleter/treemodelcompleter.cpp
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.h b/examples/tools/treemodelcompleter/treemodelcompleter.h
index df79f8f700..d1182b3885 100644
--- a/examples/tools/treemodelcompleter/treemodelcompleter.h
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/commands.cpp b/examples/tools/undo/commands.cpp
index e688cad602..adb69cbbc3 100644
--- a/examples/tools/undo/commands.cpp
+++ b/examples/tools/undo/commands.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/commands.h b/examples/tools/undo/commands.h
index ca7bd2b307..899d01daed 100644
--- a/examples/tools/undo/commands.h
+++ b/examples/tools/undo/commands.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/document.cpp b/examples/tools/undo/document.cpp
index e143f98061..8c04701df2 100644
--- a/examples/tools/undo/document.cpp
+++ b/examples/tools/undo/document.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/document.h b/examples/tools/undo/document.h
index b0eda92d41..22de77166a 100644
--- a/examples/tools/undo/document.h
+++ b/examples/tools/undo/document.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/main.cpp b/examples/tools/undo/main.cpp
index a1bb49533a..ddab6fdbec 100644
--- a/examples/tools/undo/main.cpp
+++ b/examples/tools/undo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/mainwindow.cpp b/examples/tools/undo/mainwindow.cpp
index fb16606686..896fcec706 100644
--- a/examples/tools/undo/mainwindow.cpp
+++ b/examples/tools/undo/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undo/mainwindow.h b/examples/tools/undo/mainwindow.h
index 4500c6d68d..7aebed0e56 100644
--- a/examples/tools/undo/mainwindow.h
+++ b/examples/tools/undo/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/commands.cpp b/examples/tools/undoframework/commands.cpp
index 03f8b98d74..6ce7fe2c80 100644
--- a/examples/tools/undoframework/commands.cpp
+++ b/examples/tools/undoframework/commands.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/commands.h b/examples/tools/undoframework/commands.h
index a4e4ab9549..d2cd50c5b6 100644
--- a/examples/tools/undoframework/commands.h
+++ b/examples/tools/undoframework/commands.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/diagramitem.cpp b/examples/tools/undoframework/diagramitem.cpp
index 815c8dd69e..2a367904ff 100644
--- a/examples/tools/undoframework/diagramitem.cpp
+++ b/examples/tools/undoframework/diagramitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/diagramitem.h b/examples/tools/undoframework/diagramitem.h
index 9ca3c0a399..04ea2cf07c 100644
--- a/examples/tools/undoframework/diagramitem.h
+++ b/examples/tools/undoframework/diagramitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/diagramscene.cpp b/examples/tools/undoframework/diagramscene.cpp
index c60ccc915b..af22849e80 100644
--- a/examples/tools/undoframework/diagramscene.cpp
+++ b/examples/tools/undoframework/diagramscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/diagramscene.h b/examples/tools/undoframework/diagramscene.h
index 6ee50fb337..76e14798a9 100644
--- a/examples/tools/undoframework/diagramscene.h
+++ b/examples/tools/undoframework/diagramscene.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/main.cpp b/examples/tools/undoframework/main.cpp
index 385311cb1d..e056e6fe23 100644
--- a/examples/tools/undoframework/main.cpp
+++ b/examples/tools/undoframework/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
index 52a2cffac3..aac08f4c29 100644
--- a/examples/tools/undoframework/mainwindow.cpp
+++ b/examples/tools/undoframework/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tools/undoframework/mainwindow.h b/examples/tools/undoframework/mainwindow.h
index c21ffa0a5e..4169b11b68 100644
--- a/examples/tools/undoframework/mainwindow.h
+++ b/examples/tools/undoframework/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/dials/main.cpp b/examples/touch/dials/main.cpp
index f361984b31..e5545ca533 100644
--- a/examples/touch/dials/main.cpp
+++ b/examples/touch/dials/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/fingerpaint/main.cpp b/examples/touch/fingerpaint/main.cpp
index e50c13b230..859b47c348 100644
--- a/examples/touch/fingerpaint/main.cpp
+++ b/examples/touch/fingerpaint/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/fingerpaint/mainwindow.cpp b/examples/touch/fingerpaint/mainwindow.cpp
index 8388522432..8dd8e44ba6 100644
--- a/examples/touch/fingerpaint/mainwindow.cpp
+++ b/examples/touch/fingerpaint/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/fingerpaint/mainwindow.h b/examples/touch/fingerpaint/mainwindow.h
index cd08e223d7..830507a195 100644
--- a/examples/touch/fingerpaint/mainwindow.h
+++ b/examples/touch/fingerpaint/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp
index a83a9f3f1d..e9b07a36df 100644
--- a/examples/touch/fingerpaint/scribblearea.cpp
+++ b/examples/touch/fingerpaint/scribblearea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/fingerpaint/scribblearea.h b/examples/touch/fingerpaint/scribblearea.h
index e698be4f2d..69b81f52c9 100644
--- a/examples/touch/fingerpaint/scribblearea.h
+++ b/examples/touch/fingerpaint/scribblearea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/knobs/knob.cpp b/examples/touch/knobs/knob.cpp
index 031c0e10da..6a80dbec67 100644
--- a/examples/touch/knobs/knob.cpp
+++ b/examples/touch/knobs/knob.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/knobs/knob.h b/examples/touch/knobs/knob.h
index 863df532f5..861b763ca3 100644
--- a/examples/touch/knobs/knob.h
+++ b/examples/touch/knobs/knob.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/knobs/main.cpp b/examples/touch/knobs/main.cpp
index 8ffa81944a..6c073af69d 100644
--- a/examples/touch/knobs/main.cpp
+++ b/examples/touch/knobs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/pinchzoom/graphicsview.cpp b/examples/touch/pinchzoom/graphicsview.cpp
index 8c30857b64..5fc217b1fb 100644
--- a/examples/touch/pinchzoom/graphicsview.cpp
+++ b/examples/touch/pinchzoom/graphicsview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/pinchzoom/graphicsview.h b/examples/touch/pinchzoom/graphicsview.h
index 3f227f4fc6..31e947bd7e 100644
--- a/examples/touch/pinchzoom/graphicsview.h
+++ b/examples/touch/pinchzoom/graphicsview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/pinchzoom/main.cpp b/examples/touch/pinchzoom/main.cpp
index bf8528c1e4..c6d8363dba 100644
--- a/examples/touch/pinchzoom/main.cpp
+++ b/examples/touch/pinchzoom/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/pinchzoom/mouse.cpp b/examples/touch/pinchzoom/mouse.cpp
index 74ff462f78..1abc03a8a6 100644
--- a/examples/touch/pinchzoom/mouse.cpp
+++ b/examples/touch/pinchzoom/mouse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/touch/pinchzoom/mouse.h b/examples/touch/pinchzoom/mouse.h
index 3a392bdb6e..4d9c140138 100644
--- a/examples/touch/pinchzoom/mouse.h
+++ b/examples/touch/pinchzoom/mouse.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part1/addressbook.cpp b/examples/tutorials/addressbook-fr/part1/addressbook.cpp
index 372aa43ed0..34cbb6ffa1 100644
--- a/examples/tutorials/addressbook-fr/part1/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part1/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part1/addressbook.h b/examples/tutorials/addressbook-fr/part1/addressbook.h
index 90b9b0ed48..7bc525dd75 100644
--- a/examples/tutorials/addressbook-fr/part1/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part1/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part1/main.cpp b/examples/tutorials/addressbook-fr/part1/main.cpp
index a17c894a4b..5ef2a510b7 100644
--- a/examples/tutorials/addressbook-fr/part1/main.cpp
+++ b/examples/tutorials/addressbook-fr/part1/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.cpp b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
index 04d4b2c693..2315dc52e0 100644
--- a/examples/tutorials/addressbook-fr/part2/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.h b/examples/tutorials/addressbook-fr/part2/addressbook.h
index 9f9b2b0b91..9e1938c744 100644
--- a/examples/tutorials/addressbook-fr/part2/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part2/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part2/main.cpp b/examples/tutorials/addressbook-fr/part2/main.cpp
index a17c894a4b..5ef2a510b7 100644
--- a/examples/tutorials/addressbook-fr/part2/main.cpp
+++ b/examples/tutorials/addressbook-fr/part2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
index ee57b19b08..b594c8daa5 100644
--- a/examples/tutorials/addressbook-fr/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.h b/examples/tutorials/addressbook-fr/part3/addressbook.h
index 192a5aef46..5d208af0eb 100644
--- a/examples/tutorials/addressbook-fr/part3/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part3/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part3/main.cpp b/examples/tutorials/addressbook-fr/part3/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook-fr/part3/main.cpp
+++ b/examples/tutorials/addressbook-fr/part3/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.cpp b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
index 047bc6e05c..1ef7396fe8 100644
--- a/examples/tutorials/addressbook-fr/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.h b/examples/tutorials/addressbook-fr/part4/addressbook.h
index 4d653d1fad..6cfe3d2cce 100644
--- a/examples/tutorials/addressbook-fr/part4/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part4/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part4/main.cpp b/examples/tutorials/addressbook-fr/part4/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook-fr/part4/main.cpp
+++ b/examples/tutorials/addressbook-fr/part4/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.cpp b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
index 3f381766c6..b7739f7c58 100644
--- a/examples/tutorials/addressbook-fr/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.h b/examples/tutorials/addressbook-fr/part5/addressbook.h
index e33f63273c..7bdea0af5f 100644
--- a/examples/tutorials/addressbook-fr/part5/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part5/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part5/finddialog.cpp b/examples/tutorials/addressbook-fr/part5/finddialog.cpp
index 5bba3afd94..fa2c6a8683 100644
--- a/examples/tutorials/addressbook-fr/part5/finddialog.cpp
+++ b/examples/tutorials/addressbook-fr/part5/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part5/finddialog.h b/examples/tutorials/addressbook-fr/part5/finddialog.h
index 1c154885b2..59c369818c 100644
--- a/examples/tutorials/addressbook-fr/part5/finddialog.h
+++ b/examples/tutorials/addressbook-fr/part5/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part5/main.cpp b/examples/tutorials/addressbook-fr/part5/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook-fr/part5/main.cpp
+++ b/examples/tutorials/addressbook-fr/part5/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.cpp b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
index 354b482742..0e9b5ff8e9 100644
--- a/examples/tutorials/addressbook-fr/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.h b/examples/tutorials/addressbook-fr/part6/addressbook.h
index abdc6bc8e2..f1a5c48976 100644
--- a/examples/tutorials/addressbook-fr/part6/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part6/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part6/finddialog.cpp b/examples/tutorials/addressbook-fr/part6/finddialog.cpp
index 86d4df9227..bdbae59107 100644
--- a/examples/tutorials/addressbook-fr/part6/finddialog.cpp
+++ b/examples/tutorials/addressbook-fr/part6/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part6/finddialog.h b/examples/tutorials/addressbook-fr/part6/finddialog.h
index 607a4fefc6..3b845edcb4 100644
--- a/examples/tutorials/addressbook-fr/part6/finddialog.h
+++ b/examples/tutorials/addressbook-fr/part6/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part6/main.cpp b/examples/tutorials/addressbook-fr/part6/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook-fr/part6/main.cpp
+++ b/examples/tutorials/addressbook-fr/part6/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
index 73ec3dcf23..4e97296832 100644
--- a/examples/tutorials/addressbook-fr/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.h b/examples/tutorials/addressbook-fr/part7/addressbook.h
index 3ab4be53fa..34daca70ec 100644
--- a/examples/tutorials/addressbook-fr/part7/addressbook.h
+++ b/examples/tutorials/addressbook-fr/part7/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part7/finddialog.cpp b/examples/tutorials/addressbook-fr/part7/finddialog.cpp
index 86d4df9227..bdbae59107 100644
--- a/examples/tutorials/addressbook-fr/part7/finddialog.cpp
+++ b/examples/tutorials/addressbook-fr/part7/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part7/finddialog.h b/examples/tutorials/addressbook-fr/part7/finddialog.h
index 607a4fefc6..3b845edcb4 100644
--- a/examples/tutorials/addressbook-fr/part7/finddialog.h
+++ b/examples/tutorials/addressbook-fr/part7/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook-fr/part7/main.cpp b/examples/tutorials/addressbook-fr/part7/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook-fr/part7/main.cpp
+++ b/examples/tutorials/addressbook-fr/part7/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part1/addressbook.cpp b/examples/tutorials/addressbook/part1/addressbook.cpp
index 372aa43ed0..34cbb6ffa1 100644
--- a/examples/tutorials/addressbook/part1/addressbook.cpp
+++ b/examples/tutorials/addressbook/part1/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part1/addressbook.h b/examples/tutorials/addressbook/part1/addressbook.h
index 90b9b0ed48..7bc525dd75 100644
--- a/examples/tutorials/addressbook/part1/addressbook.h
+++ b/examples/tutorials/addressbook/part1/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part1/main.cpp b/examples/tutorials/addressbook/part1/main.cpp
index a17c894a4b..5ef2a510b7 100644
--- a/examples/tutorials/addressbook/part1/main.cpp
+++ b/examples/tutorials/addressbook/part1/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part2/addressbook.cpp b/examples/tutorials/addressbook/part2/addressbook.cpp
index a7d50017c6..2cf44e0b1d 100644
--- a/examples/tutorials/addressbook/part2/addressbook.cpp
+++ b/examples/tutorials/addressbook/part2/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part2/addressbook.h b/examples/tutorials/addressbook/part2/addressbook.h
index 9f9b2b0b91..9e1938c744 100644
--- a/examples/tutorials/addressbook/part2/addressbook.h
+++ b/examples/tutorials/addressbook/part2/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part2/main.cpp b/examples/tutorials/addressbook/part2/main.cpp
index a17c894a4b..5ef2a510b7 100644
--- a/examples/tutorials/addressbook/part2/main.cpp
+++ b/examples/tutorials/addressbook/part2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index b539c01776..b3daed2801 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part3/addressbook.h b/examples/tutorials/addressbook/part3/addressbook.h
index 192a5aef46..5d208af0eb 100644
--- a/examples/tutorials/addressbook/part3/addressbook.h
+++ b/examples/tutorials/addressbook/part3/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part3/main.cpp b/examples/tutorials/addressbook/part3/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook/part3/main.cpp
+++ b/examples/tutorials/addressbook/part3/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index d82dda74c4..064cae9231 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part4/addressbook.h b/examples/tutorials/addressbook/part4/addressbook.h
index 4d653d1fad..6cfe3d2cce 100644
--- a/examples/tutorials/addressbook/part4/addressbook.h
+++ b/examples/tutorials/addressbook/part4/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part4/main.cpp b/examples/tutorials/addressbook/part4/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook/part4/main.cpp
+++ b/examples/tutorials/addressbook/part4/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
index 6342db3f8d..6fffe4072c 100644
--- a/examples/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part5/addressbook.h b/examples/tutorials/addressbook/part5/addressbook.h
index e33f63273c..7bdea0af5f 100644
--- a/examples/tutorials/addressbook/part5/addressbook.h
+++ b/examples/tutorials/addressbook/part5/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part5/finddialog.cpp b/examples/tutorials/addressbook/part5/finddialog.cpp
index 5bba3afd94..fa2c6a8683 100644
--- a/examples/tutorials/addressbook/part5/finddialog.cpp
+++ b/examples/tutorials/addressbook/part5/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part5/finddialog.h b/examples/tutorials/addressbook/part5/finddialog.h
index 1c154885b2..59c369818c 100644
--- a/examples/tutorials/addressbook/part5/finddialog.h
+++ b/examples/tutorials/addressbook/part5/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part5/main.cpp b/examples/tutorials/addressbook/part5/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook/part5/main.cpp
+++ b/examples/tutorials/addressbook/part5/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
index 20425d15c2..39106ab2da 100644
--- a/examples/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part6/addressbook.h b/examples/tutorials/addressbook/part6/addressbook.h
index abdc6bc8e2..f1a5c48976 100644
--- a/examples/tutorials/addressbook/part6/addressbook.h
+++ b/examples/tutorials/addressbook/part6/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part6/finddialog.cpp b/examples/tutorials/addressbook/part6/finddialog.cpp
index 86d4df9227..bdbae59107 100644
--- a/examples/tutorials/addressbook/part6/finddialog.cpp
+++ b/examples/tutorials/addressbook/part6/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part6/finddialog.h b/examples/tutorials/addressbook/part6/finddialog.h
index 607a4fefc6..3b845edcb4 100644
--- a/examples/tutorials/addressbook/part6/finddialog.h
+++ b/examples/tutorials/addressbook/part6/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part6/main.cpp b/examples/tutorials/addressbook/part6/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook/part6/main.cpp
+++ b/examples/tutorials/addressbook/part6/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
index 88847f2ea0..2bfc81a042 100644
--- a/examples/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part7/addressbook.h b/examples/tutorials/addressbook/part7/addressbook.h
index 3ab4be53fa..34daca70ec 100644
--- a/examples/tutorials/addressbook/part7/addressbook.h
+++ b/examples/tutorials/addressbook/part7/addressbook.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part7/finddialog.cpp b/examples/tutorials/addressbook/part7/finddialog.cpp
index 86d4df9227..bdbae59107 100644
--- a/examples/tutorials/addressbook/part7/finddialog.cpp
+++ b/examples/tutorials/addressbook/part7/finddialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part7/finddialog.h b/examples/tutorials/addressbook/part7/finddialog.h
index 607a4fefc6..3b845edcb4 100644
--- a/examples/tutorials/addressbook/part7/finddialog.h
+++ b/examples/tutorials/addressbook/part7/finddialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/addressbook/part7/main.cpp b/examples/tutorials/addressbook/part7/main.cpp
index 15991677c2..a97c279b64 100644
--- a/examples/tutorials/addressbook/part7/main.cpp
+++ b/examples/tutorials/addressbook/part7/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/gettingStarted/gsQt/gsqt.pro b/examples/tutorials/gettingStarted/gsQt/gsqt.pro
index 3dac79afce..3dac79afce 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/gsqt.pro
+++ b/examples/tutorials/gettingStarted/gsQt/gsqt.pro
diff --git a/examples/tutorials/gettingStarted/gsQt/part1/main.cpp b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
index 5f5ac7384b..d3e29b4205 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/gettingStarted/gsQt/part1/part1.pro b/examples/tutorials/gettingStarted/gsQt/part1/part1.pro
index f52a6331b5..f52a6331b5 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part1/part1.pro
+++ b/examples/tutorials/gettingStarted/gsQt/part1/part1.pro
diff --git a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
index c2b94a3d0c..e76be0f456 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/gettingStarted/gsQt/part2/part2.pro b/examples/tutorials/gettingStarted/gsQt/part2/part2.pro
index 383c3ce5ba..383c3ce5ba 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part2/part2.pro
+++ b/examples/tutorials/gettingStarted/gsQt/part2/part2.pro
diff --git a/examples/tutorials/gettingStarted/gsQt/part3/main.cpp b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
index 00fb70a4ab..98091b0190 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/gettingStarted/gsQt/part3/part3.pro b/examples/tutorials/gettingStarted/gsQt/part3/part3.pro
index d194acb2e2..d194acb2e2 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part3/part3.pro
+++ b/examples/tutorials/gettingStarted/gsQt/part3/part3.pro
diff --git a/examples/tutorials/gettingStarted/gsQt/part4/main.cpp b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
index a8cefe5347..6bb95c9c3a 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/gettingStarted/gsQt/part4/part4.pro b/examples/tutorials/gettingStarted/gsQt/part4/part4.pro
index 3de03accc0..3de03accc0 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part4/part4.pro
+++ b/examples/tutorials/gettingStarted/gsQt/part4/part4.pro
diff --git a/examples/tutorials/gettingStarted/gsQt/part5/main.cpp b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
index f25bbd02c1..71caf03b64 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/gettingStarted/gsQt/part5/part5.pro b/examples/tutorials/gettingStarted/gsQt/part5/part5.pro
index 711cac212a..711cac212a 100755..100644
--- a/examples/tutorials/gettingStarted/gsQt/part5/part5.pro
+++ b/examples/tutorials/gettingStarted/gsQt/part5/part5.pro
diff --git a/examples/tutorials/modelview/1_readonly/main.cpp b/examples/tutorials/modelview/1_readonly/main.cpp
index fb1b670896..37b541168e 100755..100644
--- a/examples/tutorials/modelview/1_readonly/main.cpp
+++ b/examples/tutorials/modelview/1_readonly/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/1_readonly/mymodel.cpp b/examples/tutorials/modelview/1_readonly/mymodel.cpp
index 9b5bdd7df2..30a5af1e83 100755..100644
--- a/examples/tutorials/modelview/1_readonly/mymodel.cpp
+++ b/examples/tutorials/modelview/1_readonly/mymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/1_readonly/mymodel.h b/examples/tutorials/modelview/1_readonly/mymodel.h
index f60546897a..3bb69d8e6f 100755..100644
--- a/examples/tutorials/modelview/1_readonly/mymodel.h
+++ b/examples/tutorials/modelview/1_readonly/mymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/2_formatting/main.cpp b/examples/tutorials/modelview/2_formatting/main.cpp
index fb1b670896..37b541168e 100755..100644
--- a/examples/tutorials/modelview/2_formatting/main.cpp
+++ b/examples/tutorials/modelview/2_formatting/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/2_formatting/mymodel.cpp b/examples/tutorials/modelview/2_formatting/mymodel.cpp
index 8363af9252..8c713101cd 100755..100644
--- a/examples/tutorials/modelview/2_formatting/mymodel.cpp
+++ b/examples/tutorials/modelview/2_formatting/mymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/2_formatting/mymodel.h b/examples/tutorials/modelview/2_formatting/mymodel.h
index 7ad876c1bf..ea36923e19 100755..100644
--- a/examples/tutorials/modelview/2_formatting/mymodel.h
+++ b/examples/tutorials/modelview/2_formatting/mymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/3_changingmodel/main.cpp b/examples/tutorials/modelview/3_changingmodel/main.cpp
index 424c1dc438..a11f74dddf 100755..100644
--- a/examples/tutorials/modelview/3_changingmodel/main.cpp
+++ b/examples/tutorials/modelview/3_changingmodel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.cpp b/examples/tutorials/modelview/3_changingmodel/mymodel.cpp
index fa50005701..24798c0431 100755..100644
--- a/examples/tutorials/modelview/3_changingmodel/mymodel.cpp
+++ b/examples/tutorials/modelview/3_changingmodel/mymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h
index be59c59207..da03df25fe 100755..100644
--- a/examples/tutorials/modelview/3_changingmodel/mymodel.h
+++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/4_headers/main.cpp b/examples/tutorials/modelview/4_headers/main.cpp
index 9dadb071a7..e435b4a0f7 100755..100644
--- a/examples/tutorials/modelview/4_headers/main.cpp
+++ b/examples/tutorials/modelview/4_headers/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/4_headers/mymodel.cpp b/examples/tutorials/modelview/4_headers/mymodel.cpp
index ee0e609228..f312bf19fb 100755..100644
--- a/examples/tutorials/modelview/4_headers/mymodel.cpp
+++ b/examples/tutorials/modelview/4_headers/mymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/4_headers/mymodel.h b/examples/tutorials/modelview/4_headers/mymodel.h
index 5a185d92e4..385d02a0d7 100755..100644
--- a/examples/tutorials/modelview/4_headers/mymodel.h
+++ b/examples/tutorials/modelview/4_headers/mymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/5_edit/main.cpp b/examples/tutorials/modelview/5_edit/main.cpp
index 2a78dd09e9..3160aa2257 100755..100644
--- a/examples/tutorials/modelview/5_edit/main.cpp
+++ b/examples/tutorials/modelview/5_edit/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/5_edit/mainwindow.cpp b/examples/tutorials/modelview/5_edit/mainwindow.cpp
index 4b7e59a290..6285ab9274 100755..100644
--- a/examples/tutorials/modelview/5_edit/mainwindow.cpp
+++ b/examples/tutorials/modelview/5_edit/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/5_edit/mainwindow.h b/examples/tutorials/modelview/5_edit/mainwindow.h
index 7db37919e3..a76d76fa1c 100755..100644
--- a/examples/tutorials/modelview/5_edit/mainwindow.h
+++ b/examples/tutorials/modelview/5_edit/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/5_edit/mymodel.cpp b/examples/tutorials/modelview/5_edit/mymodel.cpp
index e5d20949b3..32d4bad104 100755..100644
--- a/examples/tutorials/modelview/5_edit/mymodel.cpp
+++ b/examples/tutorials/modelview/5_edit/mymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/5_edit/mymodel.h b/examples/tutorials/modelview/5_edit/mymodel.h
index ecfd58ef6b..050bbf097a 100755..100644
--- a/examples/tutorials/modelview/5_edit/mymodel.h
+++ b/examples/tutorials/modelview/5_edit/mymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/6_treeview/main.cpp b/examples/tutorials/modelview/6_treeview/main.cpp
index 2a78dd09e9..3160aa2257 100755..100644
--- a/examples/tutorials/modelview/6_treeview/main.cpp
+++ b/examples/tutorials/modelview/6_treeview/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.cpp b/examples/tutorials/modelview/6_treeview/mainwindow.cpp
index 0fa8da0ec4..71ee7f29c8 100755..100644
--- a/examples/tutorials/modelview/6_treeview/mainwindow.cpp
+++ b/examples/tutorials/modelview/6_treeview/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h
index 4e35a3ffc4..9dd9508651 100755..100644
--- a/examples/tutorials/modelview/6_treeview/mainwindow.h
+++ b/examples/tutorials/modelview/6_treeview/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/7_selections/main.cpp b/examples/tutorials/modelview/7_selections/main.cpp
index 2a78dd09e9..3160aa2257 100755..100644
--- a/examples/tutorials/modelview/7_selections/main.cpp
+++ b/examples/tutorials/modelview/7_selections/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/7_selections/mainwindow.cpp b/examples/tutorials/modelview/7_selections/mainwindow.cpp
index 3bd36d9df4..d0f678f4b9 100755..100644
--- a/examples/tutorials/modelview/7_selections/mainwindow.cpp
+++ b/examples/tutorials/modelview/7_selections/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h
index e78befbbc0..ee938ffa93 100755..100644
--- a/examples/tutorials/modelview/7_selections/mainwindow.h
+++ b/examples/tutorials/modelview/7_selections/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/clock/clockthread.cpp b/examples/tutorials/threads/clock/clockthread.cpp
index f4721d8ed4..795c5f6de2 100644
--- a/examples/tutorials/threads/clock/clockthread.cpp
+++ b/examples/tutorials/threads/clock/clockthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/clock/clockthread.h b/examples/tutorials/threads/clock/clockthread.h
index 966dbeaa73..e1d4b3141b 100644
--- a/examples/tutorials/threads/clock/clockthread.h
+++ b/examples/tutorials/threads/clock/clockthread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/clock/main.cpp b/examples/tutorials/threads/clock/main.cpp
index 99cbd4e693..6f98576eb4 100755..100644
--- a/examples/tutorials/threads/clock/main.cpp
+++ b/examples/tutorials/threads/clock/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp b/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
index 26ee2557a9..93713c9f54 100755..100644
--- a/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
+++ b/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/hellothread/hellothread.cpp b/examples/tutorials/threads/hellothread/hellothread.cpp
index 01cd0f5b3c..932c10f119 100755..100644
--- a/examples/tutorials/threads/hellothread/hellothread.cpp
+++ b/examples/tutorials/threads/hellothread/hellothread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/hellothread/hellothread.h b/examples/tutorials/threads/hellothread/hellothread.h
index a3202c6396..35345697b4 100755..100644
--- a/examples/tutorials/threads/hellothread/hellothread.h
+++ b/examples/tutorials/threads/hellothread/hellothread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/hellothread/main.cpp b/examples/tutorials/threads/hellothread/main.cpp
index 9a548ea96a..1606c4302e 100755..100644
--- a/examples/tutorials/threads/hellothread/main.cpp
+++ b/examples/tutorials/threads/hellothread/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp b/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
index 30410a5570..14f7d0eccb 100755..100644
--- a/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
+++ b/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/movedobject/main.cpp b/examples/tutorials/threads/movedobject/main.cpp
index a244316689..2b1e082b5d 100755..100644
--- a/examples/tutorials/threads/movedobject/main.cpp
+++ b/examples/tutorials/threads/movedobject/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/movedobject/thread.cpp b/examples/tutorials/threads/movedobject/thread.cpp
index 5ebd873482..797dcaf4d0 100644
--- a/examples/tutorials/threads/movedobject/thread.cpp
+++ b/examples/tutorials/threads/movedobject/thread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/movedobject/thread.h b/examples/tutorials/threads/movedobject/thread.h
index e941e99123..68291cc11d 100644
--- a/examples/tutorials/threads/movedobject/thread.h
+++ b/examples/tutorials/threads/movedobject/thread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/movedobject/workerobject.cpp b/examples/tutorials/threads/movedobject/workerobject.cpp
index 819da20bc2..e45a70f6a9 100644
--- a/examples/tutorials/threads/movedobject/workerobject.cpp
+++ b/examples/tutorials/threads/movedobject/workerobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/threads/movedobject/workerobject.h b/examples/tutorials/threads/movedobject/workerobject.h
index 09a827c4da..ae7d8ee4ef 100644
--- a/examples/tutorials/threads/movedobject/workerobject.h
+++ b/examples/tutorials/threads/movedobject/workerobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/widgets/childwidget/main.cpp b/examples/tutorials/widgets/childwidget/main.cpp
index 01e8b3f5d6..c1a23140aa 100644
--- a/examples/tutorials/widgets/childwidget/main.cpp
+++ b/examples/tutorials/widgets/childwidget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/widgets/nestedlayouts/main.cpp b/examples/tutorials/widgets/nestedlayouts/main.cpp
index 6783b718a7..f8a3d3788a 100644
--- a/examples/tutorials/widgets/nestedlayouts/main.cpp
+++ b/examples/tutorials/widgets/nestedlayouts/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/widgets/toplevel/main.cpp b/examples/tutorials/widgets/toplevel/main.cpp
index 6b84037ab2..b6fd4a46da 100644
--- a/examples/tutorials/widgets/toplevel/main.cpp
+++ b/examples/tutorials/widgets/toplevel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/tutorials/widgets/windowlayout/main.cpp b/examples/tutorials/widgets/windowlayout/main.cpp
index bb5ed125b5..d41a49f5d3 100644
--- a/examples/tutorials/widgets/windowlayout/main.cpp
+++ b/examples/tutorials/widgets/windowlayout/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/_image_assets.htm b/examples/webkit/webkit-guide/_image_assets.htm
index 5c3f3a076f..5640e2c3c4 100644
--- a/examples/webkit/webkit-guide/_image_assets.htm
+++ b/examples/webkit/webkit-guide/_image_assets.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_accord.htm b/examples/webkit/webkit-guide/anim_accord.htm
index 9efd3b1a0e..9f2cf55ef3 100644
--- a/examples/webkit/webkit-guide/anim_accord.htm
+++ b/examples/webkit/webkit-guide/anim_accord.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_demo-rotate.htm b/examples/webkit/webkit-guide/anim_demo-rotate.htm
index 299fd98327..5856e302d6 100644
--- a/examples/webkit/webkit-guide/anim_demo-rotate.htm
+++ b/examples/webkit/webkit-guide/anim_demo-rotate.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_demo-scale.htm b/examples/webkit/webkit-guide/anim_demo-scale.htm
index e6f0f79c26..b1abf409d7 100644
--- a/examples/webkit/webkit-guide/anim_demo-scale.htm
+++ b/examples/webkit/webkit-guide/anim_demo-scale.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_demo-skew.htm b/examples/webkit/webkit-guide/anim_demo-skew.htm
index c183f646d2..07c1ae3ef5 100644
--- a/examples/webkit/webkit-guide/anim_demo-skew.htm
+++ b/examples/webkit/webkit-guide/anim_demo-skew.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_gallery.htm b/examples/webkit/webkit-guide/anim_gallery.htm
index 3bb7e07f2c..11a1141c2a 100644
--- a/examples/webkit/webkit-guide/anim_gallery.htm
+++ b/examples/webkit/webkit-guide/anim_gallery.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_panel.htm b/examples/webkit/webkit-guide/anim_panel.htm
index 07ecd62177..04dabeef89 100644
--- a/examples/webkit/webkit-guide/anim_panel.htm
+++ b/examples/webkit/webkit-guide/anim_panel.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_pulse.htm b/examples/webkit/webkit-guide/anim_pulse.htm
index 97666c997f..15a47db9b1 100644
--- a/examples/webkit/webkit-guide/anim_pulse.htm
+++ b/examples/webkit/webkit-guide/anim_pulse.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_skew.htm b/examples/webkit/webkit-guide/anim_skew.htm
index 077fe17a5e..89e5983403 100644
--- a/examples/webkit/webkit-guide/anim_skew.htm
+++ b/examples/webkit/webkit-guide/anim_skew.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_slide1.htm b/examples/webkit/webkit-guide/anim_slide1.htm
index 866cecc44b..949e041ea1 100644
--- a/examples/webkit/webkit-guide/anim_slide1.htm
+++ b/examples/webkit/webkit-guide/anim_slide1.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_slide2.htm b/examples/webkit/webkit-guide/anim_slide2.htm
index 474de36d6f..0d11d9b9ca 100644
--- a/examples/webkit/webkit-guide/anim_slide2.htm
+++ b/examples/webkit/webkit-guide/anim_slide2.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_slide3.htm b/examples/webkit/webkit-guide/anim_slide3.htm
index 0da926ea63..14ffdde283 100644
--- a/examples/webkit/webkit-guide/anim_slide3.htm
+++ b/examples/webkit/webkit-guide/anim_slide3.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/anim_tabbedSkew.htm b/examples/webkit/webkit-guide/anim_tabbedSkew.htm
index 387e0a7bb1..b648797c61 100644
--- a/examples/webkit/webkit-guide/anim_tabbedSkew.htm
+++ b/examples/webkit/webkit-guide/anim_tabbedSkew.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css/anim_accord.css b/examples/webkit/webkit-guide/css/anim_accord.css
index c9c013affa..8d1f8d97d8 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_accord.css
+++ b/examples/webkit/webkit-guide/css/anim_accord.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_demo-rotate.css b/examples/webkit/webkit-guide/css/anim_demo-rotate.css
index fa3bd0dee8..8043791011 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_demo-rotate.css
+++ b/examples/webkit/webkit-guide/css/anim_demo-rotate.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_demo-scale.css b/examples/webkit/webkit-guide/css/anim_demo-scale.css
index 4af469a61e..30469222ee 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_demo-scale.css
+++ b/examples/webkit/webkit-guide/css/anim_demo-scale.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_demo-skew.css b/examples/webkit/webkit-guide/css/anim_demo-skew.css
index 2d90bf9574..4c2843a7ba 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_demo-skew.css
+++ b/examples/webkit/webkit-guide/css/anim_demo-skew.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_gallery.css b/examples/webkit/webkit-guide/css/anim_gallery.css
index fe14aa263c..cdab9f1b11 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_gallery.css
+++ b/examples/webkit/webkit-guide/css/anim_gallery.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_panel.css b/examples/webkit/webkit-guide/css/anim_panel.css
index 87037c9a9e..9b57fa4b06 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_panel.css
+++ b/examples/webkit/webkit-guide/css/anim_panel.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_pulse.css b/examples/webkit/webkit-guide/css/anim_pulse.css
index 4b850b9bc8..e376f3fafb 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_pulse.css
+++ b/examples/webkit/webkit-guide/css/anim_pulse.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_skew.css b/examples/webkit/webkit-guide/css/anim_skew.css
index e44a633e96..5074feadac 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_skew.css
+++ b/examples/webkit/webkit-guide/css/anim_skew.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_slide.css b/examples/webkit/webkit-guide/css/anim_slide.css
index 7997cc2c2b..e5a8831265 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_slide.css
+++ b/examples/webkit/webkit-guide/css/anim_slide.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/anim_tabbedSkew.css b/examples/webkit/webkit-guide/css/anim_tabbedSkew.css
index 1c03e48966..1809dc95d2 100755..100644
--- a/examples/webkit/webkit-guide/css/anim_tabbedSkew.css
+++ b/examples/webkit/webkit-guide/css/anim_tabbedSkew.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_backgrounds.css b/examples/webkit/webkit-guide/css/css3_backgrounds.css
index c2a3a300e0..e251758a26 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_backgrounds.css
+++ b/examples/webkit/webkit-guide/css/css3_backgrounds.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_border-img.css b/examples/webkit/webkit-guide/css/css3_border-img.css
index 1293e2e27c..b5ce67a2e7 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_border-img.css
+++ b/examples/webkit/webkit-guide/css/css3_border-img.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_grad-radial.css b/examples/webkit/webkit-guide/css/css3_grad-radial.css
index 7799153dbd..3278cca18e 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_grad-radial.css
+++ b/examples/webkit/webkit-guide/css/css3_grad-radial.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_gradientBack.css b/examples/webkit/webkit-guide/css/css3_gradientBack.css
index 48f9d68633..c2dc65deba 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_gradientBack.css
+++ b/examples/webkit/webkit-guide/css/css3_gradientBack.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_gradientBackStop.css b/examples/webkit/webkit-guide/css/css3_gradientBackStop.css
index 0fbaf526ef..5138d0312a 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_gradientBackStop.css
+++ b/examples/webkit/webkit-guide/css/css3_gradientBackStop.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_gradientButton.css b/examples/webkit/webkit-guide/css/css3_gradientButton.css
index 6d0c9f77c8..f11265271a 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_gradientButton.css
+++ b/examples/webkit/webkit-guide/css/css3_gradientButton.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_mask-grad.css b/examples/webkit/webkit-guide/css/css3_mask-grad.css
index 24f0b227a7..515904615a 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_mask-grad.css
+++ b/examples/webkit/webkit-guide/css/css3_mask-grad.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_mask-img.css b/examples/webkit/webkit-guide/css/css3_mask-img.css
index 0203d814fc..f77527949c 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_mask-img.css
+++ b/examples/webkit/webkit-guide/css/css3_mask-img.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_multicol.css b/examples/webkit/webkit-guide/css/css3_multicol.css
index 3c07f8b604..0ea9fd461d 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_multicol.css
+++ b/examples/webkit/webkit-guide/css/css3_multicol.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_reflect.css b/examples/webkit/webkit-guide/css/css3_reflect.css
index 1f2e4542e8..1286b15c23 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_reflect.css
+++ b/examples/webkit/webkit-guide/css/css3_reflect.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_scroll.css b/examples/webkit/webkit-guide/css/css3_scroll.css
index ae37c34d1e..85c4c3c19e 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_scroll.css
+++ b/examples/webkit/webkit-guide/css/css3_scroll.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_sel-nth.css b/examples/webkit/webkit-guide/css/css3_sel-nth.css
index aa1e04b52a..24dc19f8cd 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_sel-nth.css
+++ b/examples/webkit/webkit-guide/css/css3_sel-nth.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_shadow.css b/examples/webkit/webkit-guide/css/css3_shadow.css
index d2f3040a4a..c65c560075 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_shadow.css
+++ b/examples/webkit/webkit-guide/css/css3_shadow.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_shadowBlur.css b/examples/webkit/webkit-guide/css/css3_shadowBlur.css
index f44892735d..bad17238e1 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_shadowBlur.css
+++ b/examples/webkit/webkit-guide/css/css3_shadowBlur.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_text-overflow.css b/examples/webkit/webkit-guide/css/css3_text-overflow.css
index ba491c41ae..064bb14024 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_text-overflow.css
+++ b/examples/webkit/webkit-guide/css/css3_text-overflow.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_text-shadow.css b/examples/webkit/webkit-guide/css/css3_text-shadow.css
index 9f06662c95..3f0b8fab96 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_text-shadow.css
+++ b/examples/webkit/webkit-guide/css/css3_text-shadow.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/css3_text-stroke.css b/examples/webkit/webkit-guide/css/css3_text-stroke.css
index 4116de8223..c005d77b6f 100755..100644
--- a/examples/webkit/webkit-guide/css/css3_text-stroke.css
+++ b/examples/webkit/webkit-guide/css/css3_text-stroke.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/form_tapper.css b/examples/webkit/webkit-guide/css/form_tapper.css
index 75142b5b19..ee7ff6cb5e 100755..100644
--- a/examples/webkit/webkit-guide/css/form_tapper.css
+++ b/examples/webkit/webkit-guide/css/form_tapper.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/form_toggler.css b/examples/webkit/webkit-guide/css/form_toggler.css
index 224053f834..e290ce1261 100755..100644
--- a/examples/webkit/webkit-guide/css/form_toggler.css
+++ b/examples/webkit/webkit-guide/css/form_toggler.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/layout_link-fmt.css b/examples/webkit/webkit-guide/css/layout_link-fmt.css
index 5a31aa0736..f78ed0e46c 100755..100644
--- a/examples/webkit/webkit-guide/css/layout_link-fmt.css
+++ b/examples/webkit/webkit-guide/css/layout_link-fmt.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css b/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css
index 1205822e6d..8362a0b4d8 100755..100644
--- a/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css
+++ b/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mob_condjs.css b/examples/webkit/webkit-guide/css/mob_condjs.css
index 6e312926ec..f97ebbce42 100755..100644
--- a/examples/webkit/webkit-guide/css/mob_condjs.css
+++ b/examples/webkit/webkit-guide/css/mob_condjs.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mob_mediaquery.css b/examples/webkit/webkit-guide/css/mob_mediaquery.css
index bbd0fbcc88..04382461d1 100755..100644
--- a/examples/webkit/webkit-guide/css/mob_mediaquery.css
+++ b/examples/webkit/webkit-guide/css/mob_mediaquery.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mobile.css b/examples/webkit/webkit-guide/css/mobile.css
index 5b9332c3ce..68623f05af 100755..100644
--- a/examples/webkit/webkit-guide/css/mobile.css
+++ b/examples/webkit/webkit-guide/css/mobile.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mq_desktop.css b/examples/webkit/webkit-guide/css/mq_desktop.css
index 32d49bfa63..3fc1f37b31 100755..100644
--- a/examples/webkit/webkit-guide/css/mq_desktop.css
+++ b/examples/webkit/webkit-guide/css/mq_desktop.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mq_mobile.css b/examples/webkit/webkit-guide/css/mq_mobile.css
index f1e87f67ce..6eaa3e9083 100755..100644
--- a/examples/webkit/webkit-guide/css/mq_mobile.css
+++ b/examples/webkit/webkit-guide/css/mq_mobile.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mq_touch.css b/examples/webkit/webkit-guide/css/mq_touch.css
index 3d2a5b6cd5..61a387ca80 100755..100644
--- a/examples/webkit/webkit-guide/css/mq_touch.css
+++ b/examples/webkit/webkit-guide/css/mq_touch.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mqlayout_desktop.css b/examples/webkit/webkit-guide/css/mqlayout_desktop.css
index 0875732145..78f8b52e46 100755..100644
--- a/examples/webkit/webkit-guide/css/mqlayout_desktop.css
+++ b/examples/webkit/webkit-guide/css/mqlayout_desktop.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mqlayout_mobile.css b/examples/webkit/webkit-guide/css/mqlayout_mobile.css
index dcd4943749..37801c240e 100755..100644
--- a/examples/webkit/webkit-guide/css/mqlayout_mobile.css
+++ b/examples/webkit/webkit-guide/css/mqlayout_mobile.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/mqlayout_touch.css b/examples/webkit/webkit-guide/css/mqlayout_touch.css
index 78ed1741c3..15081b5535 100755..100644
--- a/examples/webkit/webkit-guide/css/mqlayout_touch.css
+++ b/examples/webkit/webkit-guide/css/mqlayout_touch.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css/storage.css b/examples/webkit/webkit-guide/css/storage.css
index a1f1a13921..9881708139 100755..100644
--- a/examples/webkit/webkit-guide/css/storage.css
+++ b/examples/webkit/webkit-guide/css/storage.css
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/css3_backgrounds.htm b/examples/webkit/webkit-guide/css3_backgrounds.htm
index 0739830125..f1f9306f4f 100644
--- a/examples/webkit/webkit-guide/css3_backgrounds.htm
+++ b/examples/webkit/webkit-guide/css3_backgrounds.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_border-img.htm b/examples/webkit/webkit-guide/css3_border-img.htm
index b991104f86..b0522ac81f 100644
--- a/examples/webkit/webkit-guide/css3_border-img.htm
+++ b/examples/webkit/webkit-guide/css3_border-img.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_grad-radial.htm b/examples/webkit/webkit-guide/css3_grad-radial.htm
index 3bbb7f0be1..70598287b7 100644
--- a/examples/webkit/webkit-guide/css3_grad-radial.htm
+++ b/examples/webkit/webkit-guide/css3_grad-radial.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_gradientBack.htm b/examples/webkit/webkit-guide/css3_gradientBack.htm
index 1d025cf730..c8b46f3385 100644
--- a/examples/webkit/webkit-guide/css3_gradientBack.htm
+++ b/examples/webkit/webkit-guide/css3_gradientBack.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_gradientBackStop.htm b/examples/webkit/webkit-guide/css3_gradientBackStop.htm
index 4558fe3466..f62548954f 100644
--- a/examples/webkit/webkit-guide/css3_gradientBackStop.htm
+++ b/examples/webkit/webkit-guide/css3_gradientBackStop.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_gradientButton.htm b/examples/webkit/webkit-guide/css3_gradientButton.htm
index c765e45590..031b0201a3 100644
--- a/examples/webkit/webkit-guide/css3_gradientButton.htm
+++ b/examples/webkit/webkit-guide/css3_gradientButton.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_mask-grad.htm b/examples/webkit/webkit-guide/css3_mask-grad.htm
index 9014e5d5d9..7a8523786a 100644
--- a/examples/webkit/webkit-guide/css3_mask-grad.htm
+++ b/examples/webkit/webkit-guide/css3_mask-grad.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_mask-img.htm b/examples/webkit/webkit-guide/css3_mask-img.htm
index c102e96a1a..dd11220394 100644
--- a/examples/webkit/webkit-guide/css3_mask-img.htm
+++ b/examples/webkit/webkit-guide/css3_mask-img.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_multicol.htm b/examples/webkit/webkit-guide/css3_multicol.htm
index 4b3fb6a792..04e4672be7 100644
--- a/examples/webkit/webkit-guide/css3_multicol.htm
+++ b/examples/webkit/webkit-guide/css3_multicol.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_reflect.htm b/examples/webkit/webkit-guide/css3_reflect.htm
index 97e6ee20ce..950f741091 100644
--- a/examples/webkit/webkit-guide/css3_reflect.htm
+++ b/examples/webkit/webkit-guide/css3_reflect.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_scroll.htm b/examples/webkit/webkit-guide/css3_scroll.htm
index c2d3ea7b08..472b1bb363 100644
--- a/examples/webkit/webkit-guide/css3_scroll.htm
+++ b/examples/webkit/webkit-guide/css3_scroll.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_sel-nth.htm b/examples/webkit/webkit-guide/css3_sel-nth.htm
index 29f0605d05..16731736ab 100644
--- a/examples/webkit/webkit-guide/css3_sel-nth.htm
+++ b/examples/webkit/webkit-guide/css3_sel-nth.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_shadow.htm b/examples/webkit/webkit-guide/css3_shadow.htm
index 7028047983..1321cbf920 100644
--- a/examples/webkit/webkit-guide/css3_shadow.htm
+++ b/examples/webkit/webkit-guide/css3_shadow.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_text-overflow.htm b/examples/webkit/webkit-guide/css3_text-overflow.htm
index d56ac778b6..52984c84a2 100644
--- a/examples/webkit/webkit-guide/css3_text-overflow.htm
+++ b/examples/webkit/webkit-guide/css3_text-overflow.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_text-shadow.htm b/examples/webkit/webkit-guide/css3_text-shadow.htm
index 60e2d22471..714e884094 100644
--- a/examples/webkit/webkit-guide/css3_text-shadow.htm
+++ b/examples/webkit/webkit-guide/css3_text-shadow.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/css3_text-stroke.htm b/examples/webkit/webkit-guide/css3_text-stroke.htm
index 25dfb1c4aa..851bfef63b 100644
--- a/examples/webkit/webkit-guide/css3_text-stroke.htm
+++ b/examples/webkit/webkit-guide/css3_text-stroke.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/form_tapper.htm b/examples/webkit/webkit-guide/form_tapper.htm
index 94751dc9a3..e90ffadbc2 100644
--- a/examples/webkit/webkit-guide/form_tapper.htm
+++ b/examples/webkit/webkit-guide/form_tapper.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/form_toggler.htm b/examples/webkit/webkit-guide/form_toggler.htm
index f4b170253e..597b75a2e9 100644
--- a/examples/webkit/webkit-guide/form_toggler.htm
+++ b/examples/webkit/webkit-guide/form_toggler.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/img/border-frame.png b/examples/webkit/webkit-guide/img/border-frame.png
index 7a0894cabc..7a0894cabc 100755..100644
--- a/examples/webkit/webkit-guide/img/border-frame.png
+++ b/examples/webkit/webkit-guide/img/border-frame.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gradient.jpg b/examples/webkit/webkit-guide/img/gradient.jpg
index 014386e275..014386e275 100755..100644
--- a/examples/webkit/webkit-guide/img/gradient.jpg
+++ b/examples/webkit/webkit-guide/img/gradient.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gray_icon_close.png b/examples/webkit/webkit-guide/img/gray_icon_close.png
index 8e7450153e..8e7450153e 100755..100644
--- a/examples/webkit/webkit-guide/img/gray_icon_close.png
+++ b/examples/webkit/webkit-guide/img/gray_icon_close.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_016.png b/examples/webkit/webkit-guide/img/ic_ag_016.png
index bb961cb393..bb961cb393 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ag_016.png
+++ b/examples/webkit/webkit-guide/img/ic_ag_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_032.png b/examples/webkit/webkit-guide/img/ic_ag_032.png
index edb051f50e..edb051f50e 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ag_032.png
+++ b/examples/webkit/webkit-guide/img/ic_ag_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_036.png b/examples/webkit/webkit-guide/img/ic_ag_036.png
index e555e92071..e555e92071 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ag_036.png
+++ b/examples/webkit/webkit-guide/img/ic_ag_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_048.png b/examples/webkit/webkit-guide/img/ic_ag_048.png
index d2d417da2e..d2d417da2e 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ag_048.png
+++ b/examples/webkit/webkit-guide/img/ic_ag_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_016.png b/examples/webkit/webkit-guide/img/ic_al_016.png
index 0f1c0240fb..0f1c0240fb 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_al_016.png
+++ b/examples/webkit/webkit-guide/img/ic_al_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_032.png b/examples/webkit/webkit-guide/img/ic_al_032.png
index 5727a5104e..5727a5104e 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_al_032.png
+++ b/examples/webkit/webkit-guide/img/ic_al_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_036.png b/examples/webkit/webkit-guide/img/ic_al_036.png
index 76382779b8..76382779b8 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_al_036.png
+++ b/examples/webkit/webkit-guide/img/ic_al_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_048.png b/examples/webkit/webkit-guide/img/ic_al_048.png
index 9671d86944..9671d86944 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_al_048.png
+++ b/examples/webkit/webkit-guide/img/ic_al_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_016.png b/examples/webkit/webkit-guide/img/ic_ar_016.png
index fa91e96dca..fa91e96dca 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ar_016.png
+++ b/examples/webkit/webkit-guide/img/ic_ar_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_032.png b/examples/webkit/webkit-guide/img/ic_ar_032.png
index d899c41fdb..d899c41fdb 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ar_032.png
+++ b/examples/webkit/webkit-guide/img/ic_ar_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_036.png b/examples/webkit/webkit-guide/img/ic_ar_036.png
index 836593f4bc..836593f4bc 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ar_036.png
+++ b/examples/webkit/webkit-guide/img/ic_ar_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_048.png b/examples/webkit/webkit-guide/img/ic_ar_048.png
index e1c77aca74..e1c77aca74 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ar_048.png
+++ b/examples/webkit/webkit-guide/img/ic_ar_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_016.png b/examples/webkit/webkit-guide/img/ic_b_016.png
index a0ebdf7964..a0ebdf7964 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_b_016.png
+++ b/examples/webkit/webkit-guide/img/ic_b_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_032.png b/examples/webkit/webkit-guide/img/ic_b_032.png
index f5571f2bb9..f5571f2bb9 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_b_032.png
+++ b/examples/webkit/webkit-guide/img/ic_b_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_036.png b/examples/webkit/webkit-guide/img/ic_b_036.png
index 4aff7eb601..4aff7eb601 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_b_036.png
+++ b/examples/webkit/webkit-guide/img/ic_b_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_048.png b/examples/webkit/webkit-guide/img/ic_b_048.png
index b84434cec4..b84434cec4 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_b_048.png
+++ b/examples/webkit/webkit-guide/img/ic_b_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_016.png b/examples/webkit/webkit-guide/img/ic_be_016.png
index 0297cd827d..0297cd827d 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_be_016.png
+++ b/examples/webkit/webkit-guide/img/ic_be_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_032.png b/examples/webkit/webkit-guide/img/ic_be_032.png
index 5c5b9cd9e1..5c5b9cd9e1 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_be_032.png
+++ b/examples/webkit/webkit-guide/img/ic_be_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_036.png b/examples/webkit/webkit-guide/img/ic_be_036.png
index 96ec4bb4ca..96ec4bb4ca 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_be_036.png
+++ b/examples/webkit/webkit-guide/img/ic_be_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_048.png b/examples/webkit/webkit-guide/img/ic_be_048.png
index afcdf183dd..afcdf183dd 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_be_048.png
+++ b/examples/webkit/webkit-guide/img/ic_be_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_016.png b/examples/webkit/webkit-guide/img/ic_c_016.png
index a3cc4cfadf..a3cc4cfadf 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_c_016.png
+++ b/examples/webkit/webkit-guide/img/ic_c_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_032.png b/examples/webkit/webkit-guide/img/ic_c_032.png
index 404babecf1..404babecf1 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_c_032.png
+++ b/examples/webkit/webkit-guide/img/ic_c_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_036.png b/examples/webkit/webkit-guide/img/ic_c_036.png
index 78d71500d9..78d71500d9 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_c_036.png
+++ b/examples/webkit/webkit-guide/img/ic_c_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_048.png b/examples/webkit/webkit-guide/img/ic_c_048.png
index 73462ad394..73462ad394 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_c_048.png
+++ b/examples/webkit/webkit-guide/img/ic_c_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_016.png b/examples/webkit/webkit-guide/img/ic_ca_016.png
index af4c37b0e5..af4c37b0e5 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ca_016.png
+++ b/examples/webkit/webkit-guide/img/ic_ca_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_032.png b/examples/webkit/webkit-guide/img/ic_ca_032.png
index 6ac8db4ce6..6ac8db4ce6 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ca_032.png
+++ b/examples/webkit/webkit-guide/img/ic_ca_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_036.png b/examples/webkit/webkit-guide/img/ic_ca_036.png
index 19988c165d..19988c165d 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ca_036.png
+++ b/examples/webkit/webkit-guide/img/ic_ca_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_048.png b/examples/webkit/webkit-guide/img/ic_ca_048.png
index 0349061038..0349061038 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ca_048.png
+++ b/examples/webkit/webkit-guide/img/ic_ca_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_016.png b/examples/webkit/webkit-guide/img/ic_cl_016.png
index e9b421e70c..e9b421e70c 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cl_016.png
+++ b/examples/webkit/webkit-guide/img/ic_cl_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_032.png b/examples/webkit/webkit-guide/img/ic_cl_032.png
index f5968d5dfe..f5968d5dfe 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cl_032.png
+++ b/examples/webkit/webkit-guide/img/ic_cl_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_036.png b/examples/webkit/webkit-guide/img/ic_cl_036.png
index 2a6721d780..2a6721d780 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cl_036.png
+++ b/examples/webkit/webkit-guide/img/ic_cl_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_048.png b/examples/webkit/webkit-guide/img/ic_cl_048.png
index f32981fe81..f32981fe81 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cl_048.png
+++ b/examples/webkit/webkit-guide/img/ic_cl_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_016.png b/examples/webkit/webkit-guide/img/ic_cu_016.png
index 129f99ffd1..129f99ffd1 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cu_016.png
+++ b/examples/webkit/webkit-guide/img/ic_cu_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_032.png b/examples/webkit/webkit-guide/img/ic_cu_032.png
index a07933ea68..a07933ea68 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cu_032.png
+++ b/examples/webkit/webkit-guide/img/ic_cu_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_036.png b/examples/webkit/webkit-guide/img/ic_cu_036.png
index 5eb6ed6363..5eb6ed6363 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cu_036.png
+++ b/examples/webkit/webkit-guide/img/ic_cu_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_048.png b/examples/webkit/webkit-guide/img/ic_cu_048.png
index f21593cf78..f21593cf78 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_cu_048.png
+++ b/examples/webkit/webkit-guide/img/ic_cu_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_016.png b/examples/webkit/webkit-guide/img/ic_f_016.png
index ff2e3fb5f4..ff2e3fb5f4 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_f_016.png
+++ b/examples/webkit/webkit-guide/img/ic_f_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_032.png b/examples/webkit/webkit-guide/img/ic_f_032.png
index 3424799317..3424799317 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_f_032.png
+++ b/examples/webkit/webkit-guide/img/ic_f_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_036.png b/examples/webkit/webkit-guide/img/ic_f_036.png
index 019b7032a6..019b7032a6 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_f_036.png
+++ b/examples/webkit/webkit-guide/img/ic_f_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_048.png b/examples/webkit/webkit-guide/img/ic_f_048.png
index 567d30310a..567d30310a 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_f_048.png
+++ b/examples/webkit/webkit-guide/img/ic_f_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_016.png b/examples/webkit/webkit-guide/img/ic_fe_016.png
index e6d9b829b9..e6d9b829b9 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_fe_016.png
+++ b/examples/webkit/webkit-guide/img/ic_fe_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_032.png b/examples/webkit/webkit-guide/img/ic_fe_032.png
index f2b4e4b417..f2b4e4b417 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_fe_032.png
+++ b/examples/webkit/webkit-guide/img/ic_fe_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_036.png b/examples/webkit/webkit-guide/img/ic_fe_036.png
index 2aa81b5fec..2aa81b5fec 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_fe_036.png
+++ b/examples/webkit/webkit-guide/img/ic_fe_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_048.png b/examples/webkit/webkit-guide/img/ic_fe_048.png
index b6914735d9..b6914735d9 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_fe_048.png
+++ b/examples/webkit/webkit-guide/img/ic_fe_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_016.png b/examples/webkit/webkit-guide/img/ic_h_016.png
index 957a1ffabe..957a1ffabe 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_h_016.png
+++ b/examples/webkit/webkit-guide/img/ic_h_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_032.png b/examples/webkit/webkit-guide/img/ic_h_032.png
index 824620d4a2..824620d4a2 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_h_032.png
+++ b/examples/webkit/webkit-guide/img/ic_h_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_036.png b/examples/webkit/webkit-guide/img/ic_h_036.png
index fba59a5d27..fba59a5d27 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_h_036.png
+++ b/examples/webkit/webkit-guide/img/ic_h_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_048.png b/examples/webkit/webkit-guide/img/ic_h_048.png
index f75822c3aa..f75822c3aa 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_h_048.png
+++ b/examples/webkit/webkit-guide/img/ic_h_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_016.png b/examples/webkit/webkit-guide/img/ic_he_016.png
index 33fe83677f..33fe83677f 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_he_016.png
+++ b/examples/webkit/webkit-guide/img/ic_he_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_032.png b/examples/webkit/webkit-guide/img/ic_he_032.png
index 425c525b69..425c525b69 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_he_032.png
+++ b/examples/webkit/webkit-guide/img/ic_he_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_036.png b/examples/webkit/webkit-guide/img/ic_he_036.png
index a976aece8b..a976aece8b 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_he_036.png
+++ b/examples/webkit/webkit-guide/img/ic_he_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_048.png b/examples/webkit/webkit-guide/img/ic_he_048.png
index f8f9d4d853..f8f9d4d853 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_he_048.png
+++ b/examples/webkit/webkit-guide/img/ic_he_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_016.png b/examples/webkit/webkit-guide/img/ic_k_016.png
index 860bd62f96..860bd62f96 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_k_016.png
+++ b/examples/webkit/webkit-guide/img/ic_k_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_032.png b/examples/webkit/webkit-guide/img/ic_k_032.png
index a14f2c65e9..a14f2c65e9 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_k_032.png
+++ b/examples/webkit/webkit-guide/img/ic_k_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_036.png b/examples/webkit/webkit-guide/img/ic_k_036.png
index 49f19e6df0..49f19e6df0 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_k_036.png
+++ b/examples/webkit/webkit-guide/img/ic_k_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_048.png b/examples/webkit/webkit-guide/img/ic_k_048.png
index a7515cd782..a7515cd782 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_k_048.png
+++ b/examples/webkit/webkit-guide/img/ic_k_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_016.png b/examples/webkit/webkit-guide/img/ic_li_016.png
index c16d81a4bc..c16d81a4bc 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_li_016.png
+++ b/examples/webkit/webkit-guide/img/ic_li_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_032.png b/examples/webkit/webkit-guide/img/ic_li_032.png
index 3a34f37066..3a34f37066 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_li_032.png
+++ b/examples/webkit/webkit-guide/img/ic_li_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_036.png b/examples/webkit/webkit-guide/img/ic_li_036.png
index e5b97a7a2e..e5b97a7a2e 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_li_036.png
+++ b/examples/webkit/webkit-guide/img/ic_li_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_048.png b/examples/webkit/webkit-guide/img/ic_li_048.png
index 7b030e4cd7..7b030e4cd7 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_li_048.png
+++ b/examples/webkit/webkit-guide/img/ic_li_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_016.png b/examples/webkit/webkit-guide/img/ic_mg_016.png
index 2606336415..2606336415 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_mg_016.png
+++ b/examples/webkit/webkit-guide/img/ic_mg_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_032.png b/examples/webkit/webkit-guide/img/ic_mg_032.png
index 2f9d03e6b0..2f9d03e6b0 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_mg_032.png
+++ b/examples/webkit/webkit-guide/img/ic_mg_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_036.png b/examples/webkit/webkit-guide/img/ic_mg_036.png
index 584078db84..584078db84 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_mg_036.png
+++ b/examples/webkit/webkit-guide/img/ic_mg_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_048.png b/examples/webkit/webkit-guide/img/ic_mg_048.png
index 8cd2f3acc7..8cd2f3acc7 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_mg_048.png
+++ b/examples/webkit/webkit-guide/img/ic_mg_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_016.png b/examples/webkit/webkit-guide/img/ic_n_016.png
index 90e8f9fec9..90e8f9fec9 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_n_016.png
+++ b/examples/webkit/webkit-guide/img/ic_n_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_032.png b/examples/webkit/webkit-guide/img/ic_n_032.png
index afeb47a105..afeb47a105 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_n_032.png
+++ b/examples/webkit/webkit-guide/img/ic_n_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_036.png b/examples/webkit/webkit-guide/img/ic_n_036.png
index 0b7a11deed..0b7a11deed 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_n_036.png
+++ b/examples/webkit/webkit-guide/img/ic_n_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_048.png b/examples/webkit/webkit-guide/img/ic_n_048.png
index c0d7c0699e..c0d7c0699e 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_n_048.png
+++ b/examples/webkit/webkit-guide/img/ic_n_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_016.png b/examples/webkit/webkit-guide/img/ic_na_016.png
index 7888d0f9c0..7888d0f9c0 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_na_016.png
+++ b/examples/webkit/webkit-guide/img/ic_na_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_032.png b/examples/webkit/webkit-guide/img/ic_na_032.png
index 801ddca50b..801ddca50b 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_na_032.png
+++ b/examples/webkit/webkit-guide/img/ic_na_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_036.png b/examples/webkit/webkit-guide/img/ic_na_036.png
index a6878d45d7..a6878d45d7 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_na_036.png
+++ b/examples/webkit/webkit-guide/img/ic_na_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_048.png b/examples/webkit/webkit-guide/img/ic_na_048.png
index 76adaf479c..76adaf479c 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_na_048.png
+++ b/examples/webkit/webkit-guide/img/ic_na_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_016.png b/examples/webkit/webkit-guide/img/ic_ne_016.png
index 64562fc2d5..64562fc2d5 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ne_016.png
+++ b/examples/webkit/webkit-guide/img/ic_ne_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_032.png b/examples/webkit/webkit-guide/img/ic_ne_032.png
index fab5cd8fcb..fab5cd8fcb 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ne_032.png
+++ b/examples/webkit/webkit-guide/img/ic_ne_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_036.png b/examples/webkit/webkit-guide/img/ic_ne_036.png
index 41092bf3e7..41092bf3e7 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ne_036.png
+++ b/examples/webkit/webkit-guide/img/ic_ne_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_048.png b/examples/webkit/webkit-guide/img/ic_ne_048.png
index 4ec0db0806..4ec0db0806 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ne_048.png
+++ b/examples/webkit/webkit-guide/img/ic_ne_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_016.png b/examples/webkit/webkit-guide/img/ic_ni_016.png
index 9b88e368a2..9b88e368a2 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ni_016.png
+++ b/examples/webkit/webkit-guide/img/ic_ni_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_032.png b/examples/webkit/webkit-guide/img/ic_ni_032.png
index fc4fcf3ebc..fc4fcf3ebc 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ni_032.png
+++ b/examples/webkit/webkit-guide/img/ic_ni_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_036.png b/examples/webkit/webkit-guide/img/ic_ni_036.png
index 9d527470bb..9d527470bb 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ni_036.png
+++ b/examples/webkit/webkit-guide/img/ic_ni_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_048.png b/examples/webkit/webkit-guide/img/ic_ni_048.png
index b563c50361..b563c50361 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_ni_048.png
+++ b/examples/webkit/webkit-guide/img/ic_ni_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_016.png b/examples/webkit/webkit-guide/img/ic_o_016.png
index a95460d457..a95460d457 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_o_016.png
+++ b/examples/webkit/webkit-guide/img/ic_o_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_032.png b/examples/webkit/webkit-guide/img/ic_o_032.png
index 1d4864dded..1d4864dded 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_o_032.png
+++ b/examples/webkit/webkit-guide/img/ic_o_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_036.png b/examples/webkit/webkit-guide/img/ic_o_036.png
index 7f5dd02ed2..7f5dd02ed2 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_o_036.png
+++ b/examples/webkit/webkit-guide/img/ic_o_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_048.png b/examples/webkit/webkit-guide/img/ic_o_048.png
index 7461a8e9e4..7461a8e9e4 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_o_048.png
+++ b/examples/webkit/webkit-guide/img/ic_o_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_016.png b/examples/webkit/webkit-guide/img/ic_pt_016.png
index 513eb97a30..513eb97a30 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_pt_016.png
+++ b/examples/webkit/webkit-guide/img/ic_pt_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_032.png b/examples/webkit/webkit-guide/img/ic_pt_032.png
index 1550c399c8..1550c399c8 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_pt_032.png
+++ b/examples/webkit/webkit-guide/img/ic_pt_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_036.png b/examples/webkit/webkit-guide/img/ic_pt_036.png
index 7eec4d0ce4..7eec4d0ce4 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_pt_036.png
+++ b/examples/webkit/webkit-guide/img/ic_pt_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_048.png b/examples/webkit/webkit-guide/img/ic_pt_048.png
index 50dece6610..50dece6610 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_pt_048.png
+++ b/examples/webkit/webkit-guide/img/ic_pt_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_016.png b/examples/webkit/webkit-guide/img/ic_si_016.png
index e639b683ae..e639b683ae 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_si_016.png
+++ b/examples/webkit/webkit-guide/img/ic_si_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_032.png b/examples/webkit/webkit-guide/img/ic_si_032.png
index 8657e6276f..8657e6276f 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_si_032.png
+++ b/examples/webkit/webkit-guide/img/ic_si_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_036.png b/examples/webkit/webkit-guide/img/ic_si_036.png
index ffe0ee27fc..ffe0ee27fc 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_si_036.png
+++ b/examples/webkit/webkit-guide/img/ic_si_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_048.png b/examples/webkit/webkit-guide/img/ic_si_048.png
index 5b9400dbdc..5b9400dbdc 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_si_048.png
+++ b/examples/webkit/webkit-guide/img/ic_si_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_016.png b/examples/webkit/webkit-guide/img/ic_zn_016.png
index 11e5705130..11e5705130 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_zn_016.png
+++ b/examples/webkit/webkit-guide/img/ic_zn_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_032.png b/examples/webkit/webkit-guide/img/ic_zn_032.png
index cb78a5c139..cb78a5c139 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_zn_032.png
+++ b/examples/webkit/webkit-guide/img/ic_zn_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_036.png b/examples/webkit/webkit-guide/img/ic_zn_036.png
index 66abffd40d..66abffd40d 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_zn_036.png
+++ b/examples/webkit/webkit-guide/img/ic_zn_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_048.png b/examples/webkit/webkit-guide/img/ic_zn_048.png
index d8361ad6c0..d8361ad6c0 100755..100644
--- a/examples/webkit/webkit-guide/img/ic_zn_048.png
+++ b/examples/webkit/webkit-guide/img/ic_zn_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_check.png b/examples/webkit/webkit-guide/img/icon_check.png
index 294b62d24d..294b62d24d 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_check.png
+++ b/examples/webkit/webkit-guide/img/icon_check.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_check_x24green.png b/examples/webkit/webkit-guide/img/icon_check_x24green.png
index 803928c231..803928c231 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_check_x24green.png
+++ b/examples/webkit/webkit-guide/img/icon_check_x24green.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_dismiss.png b/examples/webkit/webkit-guide/img/icon_dismiss.png
index e7a842640a..e7a842640a 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_dismiss.png
+++ b/examples/webkit/webkit-guide/img/icon_dismiss.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_dismiss_x22.png b/examples/webkit/webkit-guide/img/icon_dismiss_x22.png
index e52a62a598..e52a62a598 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_dismiss_x22.png
+++ b/examples/webkit/webkit-guide/img/icon_dismiss_x22.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-down.png b/examples/webkit/webkit-guide/img/icon_drill-down.png
index 7928c6e59e..7928c6e59e 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_drill-down.png
+++ b/examples/webkit/webkit-guide/img/icon_drill-down.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-down_x32.png b/examples/webkit/webkit-guide/img/icon_drill-down_x32.png
index 477d7cda0d..477d7cda0d 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_drill-down_x32.png
+++ b/examples/webkit/webkit-guide/img/icon_drill-down_x32.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-up.png b/examples/webkit/webkit-guide/img/icon_drill-up.png
index ff7594054d..ff7594054d 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_drill-up.png
+++ b/examples/webkit/webkit-guide/img/icon_drill-up.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-up_x32.png b/examples/webkit/webkit-guide/img/icon_drill-up_x32.png
index d63fe083a1..d63fe083a1 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_drill-up_x32.png
+++ b/examples/webkit/webkit-guide/img/icon_drill-up_x32.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_expand-nav.png b/examples/webkit/webkit-guide/img/icon_expand-nav.png
index 7ec5aa68d1..7ec5aa68d1 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_expand-nav.png
+++ b/examples/webkit/webkit-guide/img/icon_expand-nav.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed.png b/examples/webkit/webkit-guide/img/icon_head-collapsed.png
index ed47838b5b..ed47838b5b 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_head-collapsed.png
+++ b/examples/webkit/webkit-guide/img/icon_head-collapsed.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png b/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png
index 6892dc08a6..6892dc08a6 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png
+++ b/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded.png b/examples/webkit/webkit-guide/img/icon_head-expanded.png
index ee7e0a767a..ee7e0a767a 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_head-expanded.png
+++ b/examples/webkit/webkit-guide/img/icon_head-expanded.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png b/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png
index 40e8eeb4c1..40e8eeb4c1 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png
+++ b/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_info.png b/examples/webkit/webkit-guide/img/icon_info.png
index b70c760621..b70c760621 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_info.png
+++ b/examples/webkit/webkit-guide/img/icon_info.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_info_x24.png b/examples/webkit/webkit-guide/img/icon_info_x24.png
index 9f4f352c84..9f4f352c84 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_info_x24.png
+++ b/examples/webkit/webkit-guide/img/icon_info_x24.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-doc.png b/examples/webkit/webkit-guide/img/icon_link-doc.png
index fc9bd54e06..fc9bd54e06 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-doc.png
+++ b/examples/webkit/webkit-guide/img/icon_link-doc.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-email.png b/examples/webkit/webkit-guide/img/icon_link-email.png
index ef5f95d318..ef5f95d318 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-email.png
+++ b/examples/webkit/webkit-guide/img/icon_link-email.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-external.png b/examples/webkit/webkit-guide/img/icon_link-external.png
index 47ddd807e4..47ddd807e4 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-external.png
+++ b/examples/webkit/webkit-guide/img/icon_link-external.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-pdf.png b/examples/webkit/webkit-guide/img/icon_link-pdf.png
index fb90a6a2b9..fb90a6a2b9 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-pdf.png
+++ b/examples/webkit/webkit-guide/img/icon_link-pdf.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-ppt.png b/examples/webkit/webkit-guide/img/icon_link-ppt.png
index c6a532878c..c6a532878c 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-ppt.png
+++ b/examples/webkit/webkit-guide/img/icon_link-ppt.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-rss.png b/examples/webkit/webkit-guide/img/icon_link-rss.png
index d3cf2c4916..d3cf2c4916 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-rss.png
+++ b/examples/webkit/webkit-guide/img/icon_link-rss.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-sms.png b/examples/webkit/webkit-guide/img/icon_link-sms.png
index f36de100f8..f36de100f8 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-sms.png
+++ b/examples/webkit/webkit-guide/img/icon_link-sms.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-tel.png b/examples/webkit/webkit-guide/img/icon_link-tel.png
index 7b665ee5de..7b665ee5de 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-tel.png
+++ b/examples/webkit/webkit-guide/img/icon_link-tel.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-xls.png b/examples/webkit/webkit-guide/img/icon_link-xls.png
index 977c868eae..977c868eae 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_link-xls.png
+++ b/examples/webkit/webkit-guide/img/icon_link-xls.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_list-all.png b/examples/webkit/webkit-guide/img/icon_list-all.png
index 97ce879fb8..97ce879fb8 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_list-all.png
+++ b/examples/webkit/webkit-guide/img/icon_list-all.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_list-all_circ.png b/examples/webkit/webkit-guide/img/icon_list-all_circ.png
index 6c5828e835..6c5828e835 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_list-all_circ.png
+++ b/examples/webkit/webkit-guide/img/icon_list-all_circ.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav-start.png b/examples/webkit/webkit-guide/img/icon_nav-start.png
index cbe127fdc9..cbe127fdc9 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_nav-start.png
+++ b/examples/webkit/webkit-guide/img/icon_nav-start.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav-top.png b/examples/webkit/webkit-guide/img/icon_nav-top.png
index d57d3efa11..d57d3efa11 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_nav-top.png
+++ b/examples/webkit/webkit-guide/img/icon_nav-top.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav-up.png b/examples/webkit/webkit-guide/img/icon_nav-up.png
index bab32593e3..bab32593e3 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_nav-up.png
+++ b/examples/webkit/webkit-guide/img/icon_nav-up.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav_end.png b/examples/webkit/webkit-guide/img/icon_nav_end.png
index 6d7dd319b4..6d7dd319b4 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_nav_end.png
+++ b/examples/webkit/webkit-guide/img/icon_nav_end.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_question.png b/examples/webkit/webkit-guide/img/icon_question.png
index 28c2ae1f12..28c2ae1f12 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_question.png
+++ b/examples/webkit/webkit-guide/img/icon_question.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_scroll-left.png b/examples/webkit/webkit-guide/img/icon_scroll-left.png
index 38b3c3fa0e..38b3c3fa0e 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_scroll-left.png
+++ b/examples/webkit/webkit-guide/img/icon_scroll-left.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_scroll-right.png b/examples/webkit/webkit-guide/img/icon_scroll-right.png
index 4d6191942b..4d6191942b 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_scroll-right.png
+++ b/examples/webkit/webkit-guide/img/icon_scroll-right.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_trash.png b/examples/webkit/webkit-guide/img/icon_trash.png
index b5f6eaae73..b5f6eaae73 100755..100644
--- a/examples/webkit/webkit-guide/img/icon_trash.png
+++ b/examples/webkit/webkit-guide/img/icon_trash.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/mask.png b/examples/webkit/webkit-guide/img/mask.png
index f9764b54aa..f9764b54aa 100755..100644
--- a/examples/webkit/webkit-guide/img/mask.png
+++ b/examples/webkit/webkit-guide/img/mask.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/js/anim_accord.js b/examples/webkit/webkit-guide/js/anim_accord.js
index 8d58a18c7e..7d4a0ffad8 100755
--- a/examples/webkit/webkit-guide/js/anim_accord.js
+++ b/examples/webkit/webkit-guide/js/anim_accord.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/anim_gallery.js b/examples/webkit/webkit-guide/js/anim_gallery.js
index 3e00bc6f30..d853b0b0fe 100755
--- a/examples/webkit/webkit-guide/js/anim_gallery.js
+++ b/examples/webkit/webkit-guide/js/anim_gallery.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/anim_panel.js b/examples/webkit/webkit-guide/js/anim_panel.js
index 365210d84a..f4795da2a0 100755
--- a/examples/webkit/webkit-guide/js/anim_panel.js
+++ b/examples/webkit/webkit-guide/js/anim_panel.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/anim_skew.js b/examples/webkit/webkit-guide/js/anim_skew.js
index 1a80a6d7a8..7b412b32fa 100755
--- a/examples/webkit/webkit-guide/js/anim_skew.js
+++ b/examples/webkit/webkit-guide/js/anim_skew.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/css3_backgrounds.js b/examples/webkit/webkit-guide/js/css3_backgrounds.js
index 0c834d1dc8..f591bae032 100755
--- a/examples/webkit/webkit-guide/js/css3_backgrounds.js
+++ b/examples/webkit/webkit-guide/js/css3_backgrounds.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/css3_border-img.js b/examples/webkit/webkit-guide/js/css3_border-img.js
index b440afbfb5..b3d075c960 100755
--- a/examples/webkit/webkit-guide/js/css3_border-img.js
+++ b/examples/webkit/webkit-guide/js/css3_border-img.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/css3_grad-radial.js b/examples/webkit/webkit-guide/js/css3_grad-radial.js
index 46601e4d69..63377375ea 100755
--- a/examples/webkit/webkit-guide/js/css3_grad-radial.js
+++ b/examples/webkit/webkit-guide/js/css3_grad-radial.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/css3_mask-grad.js b/examples/webkit/webkit-guide/js/css3_mask-grad.js
index 5d516aa93c..987934458e 100755
--- a/examples/webkit/webkit-guide/js/css3_mask-grad.js
+++ b/examples/webkit/webkit-guide/js/css3_mask-grad.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/css3_mask-img.js b/examples/webkit/webkit-guide/js/css3_mask-img.js
index b440afbfb5..b3d075c960 100755
--- a/examples/webkit/webkit-guide/js/css3_mask-img.js
+++ b/examples/webkit/webkit-guide/js/css3_mask-img.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/css3_text-overflow.js b/examples/webkit/webkit-guide/js/css3_text-overflow.js
index 1a87cb3c83..a84496f5c2 100755
--- a/examples/webkit/webkit-guide/js/css3_text-overflow.js
+++ b/examples/webkit/webkit-guide/js/css3_text-overflow.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/form_tapper.js b/examples/webkit/webkit-guide/js/form_tapper.js
index bb0c9dca19..e9bf7cfd65 100755
--- a/examples/webkit/webkit-guide/js/form_tapper.js
+++ b/examples/webkit/webkit-guide/js/form_tapper.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/mob_condjs.js b/examples/webkit/webkit-guide/js/mob_condjs.js
index 1ba445e4b2..c79e040b2c 100755
--- a/examples/webkit/webkit-guide/js/mob_condjs.js
+++ b/examples/webkit/webkit-guide/js/mob_condjs.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/mobile.js b/examples/webkit/webkit-guide/js/mobile.js
index 880d6e45bc..5054786f49 100755
--- a/examples/webkit/webkit-guide/js/mobile.js
+++ b/examples/webkit/webkit-guide/js/mobile.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/js/storage.js b/examples/webkit/webkit-guide/js/storage.js
index 62dca84808..1bfc21e2ea 100755
--- a/examples/webkit/webkit-guide/js/storage.js
+++ b/examples/webkit/webkit-guide/js/storage.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/webkit/webkit-guide/layout_link-fmt.htm b/examples/webkit/webkit-guide/layout_link-fmt.htm
index 436d97c1f9..2bef2c4525 100644
--- a/examples/webkit/webkit-guide/layout_link-fmt.htm
+++ b/examples/webkit/webkit-guide/layout_link-fmt.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/layout_tbl-keyhole.htm b/examples/webkit/webkit-guide/layout_tbl-keyhole.htm
index 73d332d0c6..56e6f87f64 100644
--- a/examples/webkit/webkit-guide/layout_tbl-keyhole.htm
+++ b/examples/webkit/webkit-guide/layout_tbl-keyhole.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/mob_condjs.htm b/examples/webkit/webkit-guide/mob_condjs.htm
index 710a3710fb..657f6d62a6 100644
--- a/examples/webkit/webkit-guide/mob_condjs.htm
+++ b/examples/webkit/webkit-guide/mob_condjs.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/mob_layout.htm b/examples/webkit/webkit-guide/mob_layout.htm
index cad6f6c635..dea52e2a02 100644
--- a/examples/webkit/webkit-guide/mob_layout.htm
+++ b/examples/webkit/webkit-guide/mob_layout.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). All
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). All
rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/mob_mediaquery.htm b/examples/webkit/webkit-guide/mob_mediaquery.htm
index 3b0e3b4e9c..c7b9794b0f 100644
--- a/examples/webkit/webkit-guide/mob_mediaquery.htm
+++ b/examples/webkit/webkit-guide/mob_mediaquery.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/webkit/webkit-guide/storage.htm b/examples/webkit/webkit-guide/storage.htm
index d154c81567..33eb4dfad9 100644
--- a/examples/webkit/webkit-guide/storage.htm
+++ b/examples/webkit/webkit-guide/storage.htm
@@ -2,7 +2,7 @@
This file is part of QtWebKit
-Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
You may use this file under the terms of the BSD license as follows:
diff --git a/examples/widgets/analogclock/analogclock.cpp b/examples/widgets/analogclock/analogclock.cpp
index 606b962d4c..c9050b8a29 100644
--- a/examples/widgets/analogclock/analogclock.cpp
+++ b/examples/widgets/analogclock/analogclock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/analogclock/analogclock.h b/examples/widgets/analogclock/analogclock.h
index 5da2780f62..f5a3ebc5c8 100644
--- a/examples/widgets/analogclock/analogclock.h
+++ b/examples/widgets/analogclock/analogclock.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/analogclock/main.cpp b/examples/widgets/analogclock/main.cpp
index 0f31f07573..6335a534f0 100644
--- a/examples/widgets/analogclock/main.cpp
+++ b/examples/widgets/analogclock/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/applicationicon/main.cpp b/examples/widgets/applicationicon/main.cpp
index 0573383620..1c6e08959d 100644
--- a/examples/widgets/applicationicon/main.cpp
+++ b/examples/widgets/applicationicon/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calculator/button.cpp b/examples/widgets/calculator/button.cpp
index eaf6000893..0d2293ce04 100644
--- a/examples/widgets/calculator/button.cpp
+++ b/examples/widgets/calculator/button.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calculator/button.h b/examples/widgets/calculator/button.h
index 385c1db7df..adfc0d74bc 100644
--- a/examples/widgets/calculator/button.h
+++ b/examples/widgets/calculator/button.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calculator/calculator.cpp b/examples/widgets/calculator/calculator.cpp
index 1e5db2f0b2..b4431297a1 100644
--- a/examples/widgets/calculator/calculator.cpp
+++ b/examples/widgets/calculator/calculator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calculator/calculator.h b/examples/widgets/calculator/calculator.h
index 3548b85625..c637dbccbe 100644
--- a/examples/widgets/calculator/calculator.h
+++ b/examples/widgets/calculator/calculator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calculator/main.cpp b/examples/widgets/calculator/main.cpp
index 0038aa10dd..d51e8430d0 100644
--- a/examples/widgets/calculator/main.cpp
+++ b/examples/widgets/calculator/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calendarwidget/main.cpp b/examples/widgets/calendarwidget/main.cpp
index 76565357ce..ab0b7b63e3 100644
--- a/examples/widgets/calendarwidget/main.cpp
+++ b/examples/widgets/calendarwidget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calendarwidget/window.cpp b/examples/widgets/calendarwidget/window.cpp
index 4df7242efa..8d21a0b75c 100644
--- a/examples/widgets/calendarwidget/window.cpp
+++ b/examples/widgets/calendarwidget/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/calendarwidget/window.h b/examples/widgets/calendarwidget/window.h
index 55f2963189..2c18ebdf9b 100644
--- a/examples/widgets/calendarwidget/window.h
+++ b/examples/widgets/calendarwidget/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/charactermap/characterwidget.cpp b/examples/widgets/charactermap/characterwidget.cpp
index 7724421d3c..86b744f78b 100644
--- a/examples/widgets/charactermap/characterwidget.cpp
+++ b/examples/widgets/charactermap/characterwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/charactermap/characterwidget.h b/examples/widgets/charactermap/characterwidget.h
index 2ccb0aefed..4e531b6d84 100644
--- a/examples/widgets/charactermap/characterwidget.h
+++ b/examples/widgets/charactermap/characterwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/charactermap/main.cpp b/examples/widgets/charactermap/main.cpp
index 01c8adae53..bfe61dcd01 100644
--- a/examples/widgets/charactermap/main.cpp
+++ b/examples/widgets/charactermap/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/charactermap/mainwindow.cpp b/examples/widgets/charactermap/mainwindow.cpp
index 20c3bf407e..e2fa72fa3f 100644
--- a/examples/widgets/charactermap/mainwindow.cpp
+++ b/examples/widgets/charactermap/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/charactermap/mainwindow.h b/examples/widgets/charactermap/mainwindow.h
index 9c4e4f50ab..a77d6f1d4d 100644
--- a/examples/widgets/charactermap/mainwindow.h
+++ b/examples/widgets/charactermap/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/codeeditor/codeeditor.cpp b/examples/widgets/codeeditor/codeeditor.cpp
index 8676e48359..a7093f4698 100644
--- a/examples/widgets/codeeditor/codeeditor.cpp
+++ b/examples/widgets/codeeditor/codeeditor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/codeeditor/codeeditor.h b/examples/widgets/codeeditor/codeeditor.h
index 84ce5c698a..aed1c4758e 100644
--- a/examples/widgets/codeeditor/codeeditor.h
+++ b/examples/widgets/codeeditor/codeeditor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/codeeditor/main.cpp b/examples/widgets/codeeditor/main.cpp
index 1bce70e03f..cd8729f3d6 100644
--- a/examples/widgets/codeeditor/main.cpp
+++ b/examples/widgets/codeeditor/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/digitalclock/digitalclock.cpp b/examples/widgets/digitalclock/digitalclock.cpp
index bbedf0f858..7564026e90 100644
--- a/examples/widgets/digitalclock/digitalclock.cpp
+++ b/examples/widgets/digitalclock/digitalclock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/digitalclock/digitalclock.h b/examples/widgets/digitalclock/digitalclock.h
index 3902b14869..4b4e9ff801 100644
--- a/examples/widgets/digitalclock/digitalclock.h
+++ b/examples/widgets/digitalclock/digitalclock.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/digitalclock/main.cpp b/examples/widgets/digitalclock/main.cpp
index c43162bade..1a865235a4 100644
--- a/examples/widgets/digitalclock/main.cpp
+++ b/examples/widgets/digitalclock/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/elidedlabel/elidedlabel.cpp b/examples/widgets/elidedlabel/elidedlabel.cpp
index fcee5c893a..1d00552bf9 100644
--- a/examples/widgets/elidedlabel/elidedlabel.cpp
+++ b/examples/widgets/elidedlabel/elidedlabel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/elidedlabel/elidedlabel.h b/examples/widgets/elidedlabel/elidedlabel.h
index 29fe46fd4c..807fcc469a 100644
--- a/examples/widgets/elidedlabel/elidedlabel.h
+++ b/examples/widgets/elidedlabel/elidedlabel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/elidedlabel/main.cpp b/examples/widgets/elidedlabel/main.cpp
index ee24d39a5a..666ee0cd59 100644
--- a/examples/widgets/elidedlabel/main.cpp
+++ b/examples/widgets/elidedlabel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/elidedlabel/testwidget.cpp b/examples/widgets/elidedlabel/testwidget.cpp
index 72c5170d97..4cfe9628a5 100644
--- a/examples/widgets/elidedlabel/testwidget.cpp
+++ b/examples/widgets/elidedlabel/testwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/elidedlabel/testwidget.h b/examples/widgets/elidedlabel/testwidget.h
index 31c5f566cc..a71b510dbe 100644
--- a/examples/widgets/elidedlabel/testwidget.h
+++ b/examples/widgets/elidedlabel/testwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/groupbox/main.cpp b/examples/widgets/groupbox/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/widgets/groupbox/main.cpp
+++ b/examples/widgets/groupbox/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/groupbox/window.cpp b/examples/widgets/groupbox/window.cpp
index 82c042e40e..e135bd0a85 100644
--- a/examples/widgets/groupbox/window.cpp
+++ b/examples/widgets/groupbox/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/groupbox/window.h b/examples/widgets/groupbox/window.h
index 1029d534c8..d4a9f3e53e 100644
--- a/examples/widgets/groupbox/window.h
+++ b/examples/widgets/groupbox/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/iconpreviewarea.cpp b/examples/widgets/icons/iconpreviewarea.cpp
index 8ff82fcbfb..7a26ce5059 100644
--- a/examples/widgets/icons/iconpreviewarea.cpp
+++ b/examples/widgets/icons/iconpreviewarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/iconpreviewarea.h b/examples/widgets/icons/iconpreviewarea.h
index def2b3b1de..204f213a79 100644
--- a/examples/widgets/icons/iconpreviewarea.h
+++ b/examples/widgets/icons/iconpreviewarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/iconsizespinbox.cpp b/examples/widgets/icons/iconsizespinbox.cpp
index 3c6061a1f4..711ec641ee 100644
--- a/examples/widgets/icons/iconsizespinbox.cpp
+++ b/examples/widgets/icons/iconsizespinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/iconsizespinbox.h b/examples/widgets/icons/iconsizespinbox.h
index da6b9d3c7b..8adaf54103 100644
--- a/examples/widgets/icons/iconsizespinbox.h
+++ b/examples/widgets/icons/iconsizespinbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/imagedelegate.cpp b/examples/widgets/icons/imagedelegate.cpp
index 20747eac1e..1c88f19429 100644
--- a/examples/widgets/icons/imagedelegate.cpp
+++ b/examples/widgets/icons/imagedelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/imagedelegate.h b/examples/widgets/icons/imagedelegate.h
index 979e12253c..1ffa920105 100644
--- a/examples/widgets/icons/imagedelegate.h
+++ b/examples/widgets/icons/imagedelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/main.cpp b/examples/widgets/icons/main.cpp
index 923c1f8514..18ff180690 100644
--- a/examples/widgets/icons/main.cpp
+++ b/examples/widgets/icons/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/mainwindow.cpp b/examples/widgets/icons/mainwindow.cpp
index 91ce27646d..02ea8dc6bb 100644
--- a/examples/widgets/icons/mainwindow.cpp
+++ b/examples/widgets/icons/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/icons/mainwindow.h b/examples/widgets/icons/mainwindow.h
index 1d2eab01a6..2689b09bd2 100644
--- a/examples/widgets/icons/mainwindow.h
+++ b/examples/widgets/icons/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/imageviewer/imageviewer.cpp b/examples/widgets/imageviewer/imageviewer.cpp
index edee9ce00b..0f07e7e23a 100644
--- a/examples/widgets/imageviewer/imageviewer.cpp
+++ b/examples/widgets/imageviewer/imageviewer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/imageviewer/imageviewer.h b/examples/widgets/imageviewer/imageviewer.h
index 81ddf6c30a..c2e4b7c81a 100644
--- a/examples/widgets/imageviewer/imageviewer.h
+++ b/examples/widgets/imageviewer/imageviewer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/imageviewer/main.cpp b/examples/widgets/imageviewer/main.cpp
index 55a362a622..b6c6877244 100644
--- a/examples/widgets/imageviewer/main.cpp
+++ b/examples/widgets/imageviewer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/lineedits/main.cpp b/examples/widgets/lineedits/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/widgets/lineedits/main.cpp
+++ b/examples/widgets/lineedits/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/lineedits/window.cpp b/examples/widgets/lineedits/window.cpp
index ff6c0a3d8e..0183dc59d3 100644
--- a/examples/widgets/lineedits/window.cpp
+++ b/examples/widgets/lineedits/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/lineedits/window.h b/examples/widgets/lineedits/window.h
index 6bda9d0f5a..b3f0c4b73c 100644
--- a/examples/widgets/lineedits/window.h
+++ b/examples/widgets/lineedits/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/movie/main.cpp b/examples/widgets/movie/main.cpp
index c686eec157..6b17eabd56 100644
--- a/examples/widgets/movie/main.cpp
+++ b/examples/widgets/movie/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/movie/movieplayer.cpp b/examples/widgets/movie/movieplayer.cpp
index e12d49763d..b53a8112bd 100644
--- a/examples/widgets/movie/movieplayer.cpp
+++ b/examples/widgets/movie/movieplayer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/movie/movieplayer.h b/examples/widgets/movie/movieplayer.h
index 415a2bebb5..ad9dd553fe 100644
--- a/examples/widgets/movie/movieplayer.h
+++ b/examples/widgets/movie/movieplayer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/orientation/main.cpp b/examples/widgets/orientation/main.cpp
index 29e161d352..2abb59f224 100644
--- a/examples/widgets/orientation/main.cpp
+++ b/examples/widgets/orientation/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/orientation/mainwindow.cpp b/examples/widgets/orientation/mainwindow.cpp
index 74f1803261..ab20f6b67b 100644
--- a/examples/widgets/orientation/mainwindow.cpp
+++ b/examples/widgets/orientation/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/orientation/mainwindow.h b/examples/widgets/orientation/mainwindow.h
index 45907c31be..ad325704b1 100644
--- a/examples/widgets/orientation/mainwindow.h
+++ b/examples/widgets/orientation/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/scribble/main.cpp b/examples/widgets/scribble/main.cpp
index 01c8adae53..bfe61dcd01 100644
--- a/examples/widgets/scribble/main.cpp
+++ b/examples/widgets/scribble/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/scribble/mainwindow.cpp b/examples/widgets/scribble/mainwindow.cpp
index fb9d42ab31..29fb61b422 100644
--- a/examples/widgets/scribble/mainwindow.cpp
+++ b/examples/widgets/scribble/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/scribble/mainwindow.h b/examples/widgets/scribble/mainwindow.h
index 547d35f04f..40cee56df1 100644
--- a/examples/widgets/scribble/mainwindow.h
+++ b/examples/widgets/scribble/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/scribble/scribblearea.cpp b/examples/widgets/scribble/scribblearea.cpp
index 7e76d16eda..11271fdb47 100644
--- a/examples/widgets/scribble/scribblearea.cpp
+++ b/examples/widgets/scribble/scribblearea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/scribble/scribblearea.h b/examples/widgets/scribble/scribblearea.h
index c93102df42..290a7fa404 100644
--- a/examples/widgets/scribble/scribblearea.h
+++ b/examples/widgets/scribble/scribblearea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/shapedclock/main.cpp b/examples/widgets/shapedclock/main.cpp
index 9b7f951a48..e60d6fdf24 100644
--- a/examples/widgets/shapedclock/main.cpp
+++ b/examples/widgets/shapedclock/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/shapedclock/shapedclock.cpp b/examples/widgets/shapedclock/shapedclock.cpp
index 77cf685259..c7c43fc2bd 100644
--- a/examples/widgets/shapedclock/shapedclock.cpp
+++ b/examples/widgets/shapedclock/shapedclock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/shapedclock/shapedclock.h b/examples/widgets/shapedclock/shapedclock.h
index b34d34c2e5..cad5f0cac1 100644
--- a/examples/widgets/shapedclock/shapedclock.h
+++ b/examples/widgets/shapedclock/shapedclock.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/sliders/main.cpp b/examples/widgets/sliders/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/widgets/sliders/main.cpp
+++ b/examples/widgets/sliders/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/sliders/slidersgroup.cpp b/examples/widgets/sliders/slidersgroup.cpp
index bf05cc1d87..7474e8bd8f 100644
--- a/examples/widgets/sliders/slidersgroup.cpp
+++ b/examples/widgets/sliders/slidersgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/sliders/slidersgroup.h b/examples/widgets/sliders/slidersgroup.h
index dbfba22aea..8f89b09307 100644
--- a/examples/widgets/sliders/slidersgroup.h
+++ b/examples/widgets/sliders/slidersgroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/sliders/window.cpp b/examples/widgets/sliders/window.cpp
index 541279a84d..9c775e88ee 100644
--- a/examples/widgets/sliders/window.cpp
+++ b/examples/widgets/sliders/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/sliders/window.h b/examples/widgets/sliders/window.h
index 3931d18ac2..cd747b2b46 100644
--- a/examples/widgets/sliders/window.h
+++ b/examples/widgets/sliders/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/softkeys/main.cpp b/examples/widgets/softkeys/main.cpp
index c23a3685d9..96cb208c63 100644
--- a/examples/widgets/softkeys/main.cpp
+++ b/examples/widgets/softkeys/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp
index d3be9c6e7b..142c7dd85f 100644
--- a/examples/widgets/softkeys/softkeys.cpp
+++ b/examples/widgets/softkeys/softkeys.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/softkeys/softkeys.h b/examples/widgets/softkeys/softkeys.h
index 6e2b2665ea..f7a9187e72 100644
--- a/examples/widgets/softkeys/softkeys.h
+++ b/examples/widgets/softkeys/softkeys.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/spinboxes/main.cpp b/examples/widgets/spinboxes/main.cpp
index f2079f511b..218d30316c 100644
--- a/examples/widgets/spinboxes/main.cpp
+++ b/examples/widgets/spinboxes/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/spinboxes/window.cpp b/examples/widgets/spinboxes/window.cpp
index 9a3eb02e95..d3ff7b78d4 100644
--- a/examples/widgets/spinboxes/window.cpp
+++ b/examples/widgets/spinboxes/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/spinboxes/window.h b/examples/widgets/spinboxes/window.h
index 41d75916eb..9cd35b236c 100644
--- a/examples/widgets/spinboxes/window.h
+++ b/examples/widgets/spinboxes/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/styles/main.cpp b/examples/widgets/styles/main.cpp
index 3d6d29c474..6086c363b7 100644
--- a/examples/widgets/styles/main.cpp
+++ b/examples/widgets/styles/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/styles/norwegianwoodstyle.cpp b/examples/widgets/styles/norwegianwoodstyle.cpp
index 637b9a3705..94161f4381 100644
--- a/examples/widgets/styles/norwegianwoodstyle.cpp
+++ b/examples/widgets/styles/norwegianwoodstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/styles/norwegianwoodstyle.h b/examples/widgets/styles/norwegianwoodstyle.h
index cc77a406d6..5d8b5fc291 100644
--- a/examples/widgets/styles/norwegianwoodstyle.h
+++ b/examples/widgets/styles/norwegianwoodstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/styles/widgetgallery.cpp b/examples/widgets/styles/widgetgallery.cpp
index 82b7e37296..30b69c63ed 100644
--- a/examples/widgets/styles/widgetgallery.cpp
+++ b/examples/widgets/styles/widgetgallery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/styles/widgetgallery.h b/examples/widgets/styles/widgetgallery.h
index 31ccc6fb3e..d58896be5e 100644
--- a/examples/widgets/styles/widgetgallery.h
+++ b/examples/widgets/styles/widgetgallery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/stylesheet/main.cpp b/examples/widgets/stylesheet/main.cpp
index 2c05ee950d..dbd91e73b8 100644
--- a/examples/widgets/stylesheet/main.cpp
+++ b/examples/widgets/stylesheet/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/stylesheet/mainwindow.cpp b/examples/widgets/stylesheet/mainwindow.cpp
index 221fbcc765..74096d372f 100644
--- a/examples/widgets/stylesheet/mainwindow.cpp
+++ b/examples/widgets/stylesheet/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/stylesheet/mainwindow.h b/examples/widgets/stylesheet/mainwindow.h
index 7430039594..673c43da6d 100644
--- a/examples/widgets/stylesheet/mainwindow.h
+++ b/examples/widgets/stylesheet/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/stylesheet/stylesheeteditor.cpp b/examples/widgets/stylesheet/stylesheeteditor.cpp
index 36d217cbb4..94da628fdf 100644
--- a/examples/widgets/stylesheet/stylesheeteditor.cpp
+++ b/examples/widgets/stylesheet/stylesheeteditor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/stylesheet/stylesheeteditor.h b/examples/widgets/stylesheet/stylesheeteditor.h
index b2dfd431ed..ca42a852b6 100644
--- a/examples/widgets/stylesheet/stylesheeteditor.h
+++ b/examples/widgets/stylesheet/stylesheeteditor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/main.cpp b/examples/widgets/tablet/main.cpp
index 40c41bfc9a..98f8791472 100644
--- a/examples/widgets/tablet/main.cpp
+++ b/examples/widgets/tablet/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/mainwindow.cpp b/examples/widgets/tablet/mainwindow.cpp
index ac2825bcd2..cb40198d3b 100644
--- a/examples/widgets/tablet/mainwindow.cpp
+++ b/examples/widgets/tablet/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/mainwindow.h b/examples/widgets/tablet/mainwindow.h
index 6d3a11af61..e92aebfaf9 100644
--- a/examples/widgets/tablet/mainwindow.h
+++ b/examples/widgets/tablet/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/tabletapplication.cpp b/examples/widgets/tablet/tabletapplication.cpp
index 2830ef80ab..79aafcb943 100644
--- a/examples/widgets/tablet/tabletapplication.cpp
+++ b/examples/widgets/tablet/tabletapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/tabletapplication.h b/examples/widgets/tablet/tabletapplication.h
index 064c5af964..07edd3edd5 100644
--- a/examples/widgets/tablet/tabletapplication.h
+++ b/examples/widgets/tablet/tabletapplication.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/tabletcanvas.cpp b/examples/widgets/tablet/tabletcanvas.cpp
index 72f13b42ba..8bb9556c12 100644
--- a/examples/widgets/tablet/tabletcanvas.cpp
+++ b/examples/widgets/tablet/tabletcanvas.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tablet/tabletcanvas.h b/examples/widgets/tablet/tabletcanvas.h
index 591a5f3f7d..c81478f8a8 100644
--- a/examples/widgets/tablet/tabletcanvas.h
+++ b/examples/widgets/tablet/tabletcanvas.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/main.cpp b/examples/widgets/tetrix/main.cpp
index 6c30ae5cae..2fb0a99045 100644
--- a/examples/widgets/tetrix/main.cpp
+++ b/examples/widgets/tetrix/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/tetrixboard.cpp b/examples/widgets/tetrix/tetrixboard.cpp
index efdd11f5d8..46858e3ee2 100644
--- a/examples/widgets/tetrix/tetrixboard.cpp
+++ b/examples/widgets/tetrix/tetrixboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/tetrixboard.h b/examples/widgets/tetrix/tetrixboard.h
index 4c06734469..f842c0feef 100644
--- a/examples/widgets/tetrix/tetrixboard.h
+++ b/examples/widgets/tetrix/tetrixboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/tetrixpiece.cpp b/examples/widgets/tetrix/tetrixpiece.cpp
index c06c904a01..49b5aaaace 100644
--- a/examples/widgets/tetrix/tetrixpiece.cpp
+++ b/examples/widgets/tetrix/tetrixpiece.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/tetrixpiece.h b/examples/widgets/tetrix/tetrixpiece.h
index c28db43f8a..f162e9f4ba 100644
--- a/examples/widgets/tetrix/tetrixpiece.h
+++ b/examples/widgets/tetrix/tetrixpiece.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/tetrixwindow.cpp b/examples/widgets/tetrix/tetrixwindow.cpp
index e637392521..d33830e883 100644
--- a/examples/widgets/tetrix/tetrixwindow.cpp
+++ b/examples/widgets/tetrix/tetrixwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tetrix/tetrixwindow.h b/examples/widgets/tetrix/tetrixwindow.h
index 6b0ec7b4f6..10d16bac21 100644
--- a/examples/widgets/tetrix/tetrixwindow.h
+++ b/examples/widgets/tetrix/tetrixwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tooltips/main.cpp b/examples/widgets/tooltips/main.cpp
index 893b65da86..e5326286f1 100644
--- a/examples/widgets/tooltips/main.cpp
+++ b/examples/widgets/tooltips/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tooltips/shapeitem.cpp b/examples/widgets/tooltips/shapeitem.cpp
index 65dbfd16eb..6c319e4f0e 100644
--- a/examples/widgets/tooltips/shapeitem.cpp
+++ b/examples/widgets/tooltips/shapeitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tooltips/shapeitem.h b/examples/widgets/tooltips/shapeitem.h
index c79019abef..b75ebb9bef 100644
--- a/examples/widgets/tooltips/shapeitem.h
+++ b/examples/widgets/tooltips/shapeitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tooltips/sortingbox.cpp b/examples/widgets/tooltips/sortingbox.cpp
index f5b45f1d7d..9d23669c97 100644
--- a/examples/widgets/tooltips/sortingbox.cpp
+++ b/examples/widgets/tooltips/sortingbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/tooltips/sortingbox.h b/examples/widgets/tooltips/sortingbox.h
index 0110a2310d..f7e8297f3b 100644
--- a/examples/widgets/tooltips/sortingbox.h
+++ b/examples/widgets/tooltips/sortingbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/validators/ledwidget.cpp b/examples/widgets/validators/ledwidget.cpp
index c63321ec63..a637e36645 100644
--- a/examples/widgets/validators/ledwidget.cpp
+++ b/examples/widgets/validators/ledwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/validators/ledwidget.h b/examples/widgets/validators/ledwidget.h
index 33c477dcbd..41033d7bb5 100644
--- a/examples/widgets/validators/ledwidget.h
+++ b/examples/widgets/validators/ledwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/validators/localeselector.cpp b/examples/widgets/validators/localeselector.cpp
index bcf5d91ba9..cfd711f669 100644
--- a/examples/widgets/validators/localeselector.cpp
+++ b/examples/widgets/validators/localeselector.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/validators/localeselector.h b/examples/widgets/validators/localeselector.h
index ea09224f75..5c3bbac8b1 100644
--- a/examples/widgets/validators/localeselector.h
+++ b/examples/widgets/validators/localeselector.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/validators/main.cpp b/examples/widgets/validators/main.cpp
index 5e5765e957..f8d5dec77b 100644
--- a/examples/widgets/validators/main.cpp
+++ b/examples/widgets/validators/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/wiggly/dialog.cpp b/examples/widgets/wiggly/dialog.cpp
index d2053d84ac..9db53445fe 100644
--- a/examples/widgets/wiggly/dialog.cpp
+++ b/examples/widgets/wiggly/dialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/wiggly/dialog.h b/examples/widgets/wiggly/dialog.h
index aa12a375fe..0d3ece7a89 100644
--- a/examples/widgets/wiggly/dialog.h
+++ b/examples/widgets/wiggly/dialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp
index c64e352f47..c7f21f4b79 100644
--- a/examples/widgets/wiggly/main.cpp
+++ b/examples/widgets/wiggly/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/wiggly/wigglywidget.cpp b/examples/widgets/wiggly/wigglywidget.cpp
index b55efaa1fa..afd8ea96a6 100644
--- a/examples/widgets/wiggly/wigglywidget.cpp
+++ b/examples/widgets/wiggly/wigglywidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/wiggly/wigglywidget.h b/examples/widgets/wiggly/wigglywidget.h
index 7e8d8b5c39..26e17826fb 100644
--- a/examples/widgets/wiggly/wigglywidget.h
+++ b/examples/widgets/wiggly/wigglywidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/windowflags/controllerwindow.cpp b/examples/widgets/windowflags/controllerwindow.cpp
index b2b929842f..41505e8014 100644
--- a/examples/widgets/windowflags/controllerwindow.cpp
+++ b/examples/widgets/windowflags/controllerwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/windowflags/controllerwindow.h b/examples/widgets/windowflags/controllerwindow.h
index caa76987b1..853ec29a08 100644
--- a/examples/widgets/windowflags/controllerwindow.h
+++ b/examples/widgets/windowflags/controllerwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/windowflags/main.cpp b/examples/widgets/windowflags/main.cpp
index 8dd71ed0a5..2d7cef12c5 100644
--- a/examples/widgets/windowflags/main.cpp
+++ b/examples/widgets/windowflags/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/windowflags/previewwindow.cpp b/examples/widgets/windowflags/previewwindow.cpp
index 1cd74619e7..4b129ef0d6 100644
--- a/examples/widgets/windowflags/previewwindow.cpp
+++ b/examples/widgets/windowflags/previewwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/widgets/windowflags/previewwindow.h b/examples/widgets/windowflags/previewwindow.h
index 15c849aa48..cec6614a0c 100644
--- a/examples/widgets/windowflags/previewwindow.h
+++ b/examples/widgets/windowflags/previewwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/dombookmarks/main.cpp b/examples/xml/dombookmarks/main.cpp
index d23af14af2..4f38a08938 100644
--- a/examples/xml/dombookmarks/main.cpp
+++ b/examples/xml/dombookmarks/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/dombookmarks/mainwindow.cpp b/examples/xml/dombookmarks/mainwindow.cpp
index 0c3ceafc88..118bc96cf2 100644
--- a/examples/xml/dombookmarks/mainwindow.cpp
+++ b/examples/xml/dombookmarks/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/dombookmarks/mainwindow.h b/examples/xml/dombookmarks/mainwindow.h
index 058f5cc221..f6911b36f1 100644
--- a/examples/xml/dombookmarks/mainwindow.h
+++ b/examples/xml/dombookmarks/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/dombookmarks/xbeltree.cpp b/examples/xml/dombookmarks/xbeltree.cpp
index 67c85aca40..32fbab6e6e 100644
--- a/examples/xml/dombookmarks/xbeltree.cpp
+++ b/examples/xml/dombookmarks/xbeltree.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/dombookmarks/xbeltree.h b/examples/xml/dombookmarks/xbeltree.h
index ad30de520c..74bee7deac 100644
--- a/examples/xml/dombookmarks/xbeltree.h
+++ b/examples/xml/dombookmarks/xbeltree.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp
index 4e36b1c2cd..ef13609249 100644
--- a/examples/xml/htmlinfo/main.cpp
+++ b/examples/xml/htmlinfo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/rsslisting/main.cpp b/examples/xml/rsslisting/main.cpp
index a646c602db..7b0230f025 100644
--- a/examples/xml/rsslisting/main.cpp
+++ b/examples/xml/rsslisting/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp
index 4fa160f9ed..bfc44bc67c 100644
--- a/examples/xml/rsslisting/rsslisting.cpp
+++ b/examples/xml/rsslisting/rsslisting.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/rsslisting/rsslisting.h b/examples/xml/rsslisting/rsslisting.h
index 22d222e2b9..960d51cafd 100644
--- a/examples/xml/rsslisting/rsslisting.h
+++ b/examples/xml/rsslisting/rsslisting.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/main.cpp b/examples/xml/saxbookmarks/main.cpp
index 71ce6aec0b..04717e79fd 100644
--- a/examples/xml/saxbookmarks/main.cpp
+++ b/examples/xml/saxbookmarks/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/mainwindow.cpp b/examples/xml/saxbookmarks/mainwindow.cpp
index 0f65c1f71c..29b99437e0 100644
--- a/examples/xml/saxbookmarks/mainwindow.cpp
+++ b/examples/xml/saxbookmarks/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/mainwindow.h b/examples/xml/saxbookmarks/mainwindow.h
index 3313d8f574..dc8a4d0a6f 100644
--- a/examples/xml/saxbookmarks/mainwindow.h
+++ b/examples/xml/saxbookmarks/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/xbelgenerator.cpp b/examples/xml/saxbookmarks/xbelgenerator.cpp
index 7712d83d10..e5d7e4aa9f 100644
--- a/examples/xml/saxbookmarks/xbelgenerator.cpp
+++ b/examples/xml/saxbookmarks/xbelgenerator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/xbelgenerator.h b/examples/xml/saxbookmarks/xbelgenerator.h
index 84011a262f..cf17000381 100644
--- a/examples/xml/saxbookmarks/xbelgenerator.h
+++ b/examples/xml/saxbookmarks/xbelgenerator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/xbelhandler.cpp b/examples/xml/saxbookmarks/xbelhandler.cpp
index da65c2bf88..8266268fcd 100644
--- a/examples/xml/saxbookmarks/xbelhandler.cpp
+++ b/examples/xml/saxbookmarks/xbelhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/saxbookmarks/xbelhandler.h b/examples/xml/saxbookmarks/xbelhandler.h
index cee1bafe48..27c973b788 100644
--- a/examples/xml/saxbookmarks/xbelhandler.h
+++ b/examples/xml/saxbookmarks/xbelhandler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/main.cpp b/examples/xml/streambookmarks/main.cpp
index c44e921e82..f0141e6bbd 100644
--- a/examples/xml/streambookmarks/main.cpp
+++ b/examples/xml/streambookmarks/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp
index ed765995e7..85db5e84c1 100644
--- a/examples/xml/streambookmarks/mainwindow.cpp
+++ b/examples/xml/streambookmarks/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/mainwindow.h b/examples/xml/streambookmarks/mainwindow.h
index f27c4088bc..8eb5b00fc5 100644
--- a/examples/xml/streambookmarks/mainwindow.h
+++ b/examples/xml/streambookmarks/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/xbelreader.cpp b/examples/xml/streambookmarks/xbelreader.cpp
index 063243528b..30c783226d 100644
--- a/examples/xml/streambookmarks/xbelreader.cpp
+++ b/examples/xml/streambookmarks/xbelreader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/xbelreader.h b/examples/xml/streambookmarks/xbelreader.h
index 1ca1190235..7807b54b67 100644
--- a/examples/xml/streambookmarks/xbelreader.h
+++ b/examples/xml/streambookmarks/xbelreader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/xbelwriter.cpp b/examples/xml/streambookmarks/xbelwriter.cpp
index aa100d401e..43a391ceb7 100644
--- a/examples/xml/streambookmarks/xbelwriter.cpp
+++ b/examples/xml/streambookmarks/xbelwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/streambookmarks/xbelwriter.h b/examples/xml/streambookmarks/xbelwriter.h
index 8160a87b52..c0ceaf24b6 100644
--- a/examples/xml/streambookmarks/xbelwriter.h
+++ b/examples/xml/streambookmarks/xbelwriter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/examples/xml/xmlstreamlint/main.cpp b/examples/xml/xmlstreamlint/main.cpp
index 78f40f64fa..2e9d8973da 100644
--- a/examples/xml/xmlstreamlint/main.cpp
+++ b/examples/xml/xmlstreamlint/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/header.BSD b/header.BSD
index 105868ed07..6955c9ecc1 100644
--- a/header.BSD
+++ b/header.BSD
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/header.FDL b/header.FDL
index 6418fa2b58..238e22df51 100644
--- a/header.FDL
+++ b/header.FDL
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/header.LGPL b/header.LGPL
index 977ccaaa38..971b9a98f7 100644
--- a/header.LGPL
+++ b/header.LGPL
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/header.LGPL-ONLY b/header.LGPL-ONLY
index 4f16e90d97..ef11ac962e 100644
--- a/header.LGPL-ONLY
+++ b/header.LGPL-ONLY
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h
index 7e51e420a9..517d928867 100644
--- a/mkspecs/aix-g++-64/qplatformdefs.h
+++ b/mkspecs/aix-g++-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h
index 7e51e420a9..517d928867 100644
--- a/mkspecs/aix-g++/qplatformdefs.h
+++ b/mkspecs/aix-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h
index 7e51e420a9..517d928867 100644
--- a/mkspecs/aix-xlc-64/qplatformdefs.h
+++ b/mkspecs/aix-xlc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h
index 7e51e420a9..517d928867 100644
--- a/mkspecs/aix-xlc/qplatformdefs.h
+++ b/mkspecs/aix-xlc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/cmake/Qt5BasicConfig.cmake.in b/mkspecs/cmake/Qt5BasicConfig.cmake.in
index 4435b79a38..77d1f5dbf3 100644
--- a/mkspecs/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/cmake/Qt5BasicConfig.cmake.in
@@ -14,17 +14,25 @@ set(Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS QT_\${_CMAKE_MODULE_NAME_UPPER}
set(_Qt5_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
-if (NOT \"$${CMAKE_MODULE_EXTRAS}\" STREQUAL \"\")
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
-endif()
-
-if (NOT \"$${CMAKE_MODULE_MACROS}\" STREQUAL \"\")
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
-endif()
+foreach(_module_dep ${_Qt5_MODULE_DEPENDENCIES})
+ if (NOT Qt5${_module_dep}_FOUND)
+ find_package(Qt5${_module_dep} REQUIRED)
+ endif()
+ list(APPEND Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${Qt5${_module_dep}_INCLUDE_DIRS})
+ list(APPEND Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
+ list(APPEND Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
+endforeach()
+list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS)
+list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
+list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
if (NOT _Qt5$${CMAKE_MODULE_NAME}_target)
set(_Qt5$${CMAKE_MODULE_NAME}_target 1)
- add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
+ if (\"$${CMAKE_STATIC_TYPE}\" STREQUAL \"\")
+ add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
+ else()
+ add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
+ endif()
if (NOT \"$${CMAKE_BUILD_IS_FRAMEWORK}\" STREQUAL \"\")
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
endif()
@@ -55,3 +63,11 @@ if (NOT \"$${release_type}\" STREQUAL \"\")
)
endif()
endif()
+
+if (NOT \"$${CMAKE_MODULE_EXTRAS}\" STREQUAL \"\")
+ include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
+endif()
+
+if (NOT \"$${CMAKE_MODULE_MACROS}\" STREQUAL \"\")
+ include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
+endif()
diff --git a/mkspecs/common/aix/qplatformdefs.h b/mkspecs/common/aix/qplatformdefs.h
index b5fc02d985..317ca7a7c5 100644
--- a/mkspecs/common/aix/qplatformdefs.h
+++ b/mkspecs/common/aix/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/common/c89/qplatformdefs.h b/mkspecs/common/c89/qplatformdefs.h
index 8bd1c100c3..f6dda15d0a 100644
--- a/mkspecs/common/c89/qplatformdefs.h
+++ b/mkspecs/common/c89/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
index d60533e923..de28ec7d1f 100644
--- a/mkspecs/common/linux.conf
+++ b/mkspecs/common/linux.conf
@@ -40,6 +40,7 @@ QMAKE_INCDIR_WAYLAND =
QMAKE_LIBS_WAYLAND =
QMAKE_LIBDIR_WAYLAND =
QMAKE_DEFINES_WAYLAND =
+QMAKE_WAYLAND_SCANNER = wayland-scanner
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h
index 98bb014aed..b10ed54e9b 100644
--- a/mkspecs/common/mac/qplatformdefs.h
+++ b/mkspecs/common/mac/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h
index 6fac11b2b1..daecc008c3 100644
--- a/mkspecs/common/posix/qplatformdefs.h
+++ b/mkspecs/common/posix/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/common/wince/qplatformdefs.h b/mkspecs/common/wince/qplatformdefs.h
index 4bc947bac8..1733c34a64 100644
--- a/mkspecs/common/wince/qplatformdefs.h
+++ b/mkspecs/common/wince/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 7219839d4c..254f54068f 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
index 4aba62d8b7..bc92c3c548 100644
--- a/mkspecs/darwin-g++/qplatformdefs.h
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 6691e3f49c..0a14b5cea4 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -35,17 +35,33 @@ macx {
CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
CMAKE_BUILD_IS_FRAMEWORK = "true"
} else {
- CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.$$eval(QT.$${MODULE}.VERSION).dylib
- CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.$$eval(QT.$${MODULE}.VERSION).dylib
+ static {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
+ CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
+ } else {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.$$eval(QT.$${MODULE}.VERSION).dylib
+ CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.$$eval(QT.$${MODULE}.VERSION).dylib
+ }
}
} else:win32 {
- CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).dll
- CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).dll
- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).lib
- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).lib
+ static {
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.lib
+ } else {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).dll
+ CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).dll
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).lib
+ }
+ CMAKE_BIN_SUFFIX = ".exe"
} else {
- CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
- CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
+ static {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
+ CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
+ } else {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
+ CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
+ }
}
debug_type =
@@ -56,6 +72,8 @@ debug_and_release|release:release_type = release
INSTALLS += cmake_qt5_module_files
+static:CMAKE_STATIC_TYPE = true
+
cmake_config_file.input = $$PWD/../cmake/Qt5BasicConfig.cmake.in
cmake_config_file.output = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
diff --git a/mkspecs/features/declarative_debug.prf b/mkspecs/features/declarative_debug.prf
index 7a9ba9adf7..59e45f662f 100644
--- a/mkspecs/features/declarative_debug.prf
+++ b/mkspecs/features/declarative_debug.prf
@@ -1 +1 @@
-contains(QT, declarative)|contains(QT, declarative-private):DEFINES += QT_DECLARATIVE_DEBUG
+DEFINES += QT_DECLARATIVE_DEBUG
diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf
index 6104362c0b..208ab592e1 100644
--- a/mkspecs/features/qt_module_config.prf
+++ b/mkspecs/features/qt_module_config.prf
@@ -148,7 +148,6 @@ win32-g++* {
contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
-contains(QT_CONFIG, gui-qt3support):DEFINES *= QT3_SUPPORT
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
DEFINES *= QT_USE_QSTRINGBUILDER
diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf
index af1a32bb02..ec15869b0f 100644
--- a/mkspecs/features/qt_targets.prf
+++ b/mkspecs/features/qt_targets.prf
@@ -1,4 +1,4 @@
QMAKE_TARGET_COMPANY = Nokia Corporation and/or its subsidiary(-ies)
QMAKE_TARGET_PRODUCT = Qt4
QMAKE_TARGET_DESCRIPTION = C++ application development framework.
-QMAKE_TARGET_COPYRIGHT = Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+QMAKE_TARGET_COPYRIGHT = Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf
deleted file mode 100644
index 1712e94660..0000000000
--- a/mkspecs/features/qttest_p4.prf
+++ /dev/null
@@ -1,13 +0,0 @@
-isEmpty(TEMPLATE):TEMPLATE=app
-CONFIG += qt warn_on console depend_includepath testcase
-
-qtAddLibrary(QtTest)
-
-# prefix test binary with tst_
-!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
-
-isEmpty(target.path) {
- target.path += $$[QT_INSTALL_PREFIX]/tests/qt4/$${TARGET}
-}
-
-INSTALLS += target
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 15135e1f89..f890e97733 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -126,3 +126,28 @@ contains(INSTALLS, target) {
}
+defineTest(installTestHelperApp) {
+ # args: relativeSource, relativeDestination, targetName
+ # description: install executables from other project directories as part of your installation.
+ # relativeSource - file to install including relative path
+ # relativeDestination - relative directory to install to
+ # targetName - executable without extension
+ targetName = $$replace(3, ' ', '_') # handle spaces in name
+ subTarget = $${targetName}.target
+ subInstall = $${targetName}_install
+ subConfig = $${subInstall}.CONFIG
+ subFiles = $${subInstall}.files
+ subPath = $${subInstall}.path
+ win32: extension = .exe
+ $$subTarget = $${2}/$${3}$${extension}
+ $$subFiles = $${1}$${extension}
+ $$subPath = $${target.path}/$${2}
+ $$subConfig += no_check_exist executable
+ INSTALLS += $${subInstall}
+ export(INSTALLS)
+ export($$subTarget)
+ export($$subFiles)
+ export($$subPath)
+ export($$subConfig)
+}
+
diff --git a/mkspecs/features/unix/default_pre.prf b/mkspecs/features/unix/default_pre.prf
new file mode 100644
index 0000000000..d978d14166
--- /dev/null
+++ b/mkspecs/features/unix/default_pre.prf
@@ -0,0 +1,4 @@
+linux*:CONFIG = wayland-scanner $$CONFIG
+
+load(default_pre)
+
diff --git a/mkspecs/features/wayland-scanner.prf b/mkspecs/features/wayland-scanner.prf
new file mode 100644
index 0000000000..90e1e0f953
--- /dev/null
+++ b/mkspecs/features/wayland-scanner.prf
@@ -0,0 +1,32 @@
+#
+# Wayland-scanner extra-compiler for handling files specified in the WAYLANDSOURCES variable
+#
+
+isEmpty(QMAKE_WAYLAND_SCANNER):error("QMAKE_WAYLAND_SCANNER not defined for this mkspec")
+
+wayland-server-header.name = wayland ${QMAKE_FILE_BASE}
+wayland-server-header.input = WAYLANDSOURCES
+wayland-server-header.variable_out = HEADERS
+wayland-server-header.output = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
+wayland-server-header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+
+silent:wayland-server-header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland-server-header.commands
+QMAKE_EXTRA_COMPILERS += wayland-server-header
+
+wayland-client-header.name = wayland ${QMAKE_FILE_BASE}
+wayland-client-header.input = WAYLANDSOURCES
+wayland-client-header.variable_out = HEADERS
+wayland-client-header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
+wayland-client-header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+
+silent:wayland-client-header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland-client-header.commands
+QMAKE_EXTRA_COMPILERS += wayland-client-header
+
+wayland-code.name = wayland ${QMAKE_FILE_BASE}
+wayland-code.input = WAYLANDSOURCES
+wayland-code.variable_out = SOURCES
+wayland-code.output = wayland-${QMAKE_FILE_BASE}-protocol.c
+wayland-code.commands = $$QMAKE_WAYLAND_SCANNER code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+
+silent:wayland-code.commands = @echo Wayland code header ${QMAKE_FILE_IN} && $$wayland-code.commands
+QMAKE_EXTRA_COMPILERS += wayland-code
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
index f3c33a214e..6f6d9aa2ab 100644
--- a/mkspecs/freebsd-g++/qplatformdefs.h
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/freebsd-g++34/qplatformdefs.h b/mkspecs/freebsd-g++34/qplatformdefs.h
index 695198777e..3f6b1f4272 100644
--- a/mkspecs/freebsd-g++34/qplatformdefs.h
+++ b/mkspecs/freebsd-g++34/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/freebsd-g++40/qplatformdefs.h b/mkspecs/freebsd-g++40/qplatformdefs.h
index 695198777e..3f6b1f4272 100644
--- a/mkspecs/freebsd-g++40/qplatformdefs.h
+++ b/mkspecs/freebsd-g++40/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/freebsd-icc/qplatformdefs.h b/mkspecs/freebsd-icc/qplatformdefs.h
index 695198777e..3f6b1f4272 100644
--- a/mkspecs/freebsd-icc/qplatformdefs.h
+++ b/mkspecs/freebsd-icc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h
index 20f1f50b7f..c8ef9bd61d 100644
--- a/mkspecs/hpux-acc-64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h
index 4d65f0d426..cf46eb3957 100644
--- a/mkspecs/hpux-acc-o64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-o64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h
index 8a44f7d772..8a0e5c61fa 100644
--- a/mkspecs/hpux-acc/qplatformdefs.h
+++ b/mkspecs/hpux-acc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h
index c19964ea73..2e4a591a86 100644
--- a/mkspecs/hpux-g++-64/qplatformdefs.h
+++ b/mkspecs/hpux-g++-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h
index 9ae5461796..f1f665a81d 100644
--- a/mkspecs/hpux-g++/qplatformdefs.h
+++ b/mkspecs/hpux-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h
index 2f67f0e86b..f59906935a 100644
--- a/mkspecs/hpuxi-acc-32/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-32/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h
index 2f67f0e86b..f59906935a 100644
--- a/mkspecs/hpuxi-acc-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h
index 4151ef0ffd..ab36a8c098 100644
--- a/mkspecs/hpuxi-g++-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index c85a722dff..1ee8800fb0 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h
index 4d55287c7a..fce2513474 100644
--- a/mkspecs/irix-cc-64/qplatformdefs.h
+++ b/mkspecs/irix-cc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h
index 4d55287c7a..fce2513474 100644
--- a/mkspecs/irix-cc/qplatformdefs.h
+++ b/mkspecs/irix-cc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/irix-g++-64/qplatformdefs.h b/mkspecs/irix-g++-64/qplatformdefs.h
index e1dd43671b..37417289f4 100644
--- a/mkspecs/irix-g++-64/qplatformdefs.h
+++ b/mkspecs/irix-g++-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h
index 41c668ea1d..af54fb1f3f 100644
--- a/mkspecs/irix-g++/qplatformdefs.h
+++ b/mkspecs/irix-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h b/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h
index 533ef8b661..f63efdfbe1 100644
--- a/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h
+++ b/mkspecs/linux-arm-gnueabi-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
index 917cca4779..496032f3da 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h
index 917cca4779..496032f3da 100644
--- a/mkspecs/linux-ecc-64/qplatformdefs.h
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-g++-32/qplatformdefs.h b/mkspecs/linux-g++-32/qplatformdefs.h
index 533ef8b661..f63efdfbe1 100644
--- a/mkspecs/linux-g++-32/qplatformdefs.h
+++ b/mkspecs/linux-g++-32/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-g++-64/qplatformdefs.h b/mkspecs/linux-g++-64/qplatformdefs.h
index 533ef8b661..f63efdfbe1 100644
--- a/mkspecs/linux-g++-64/qplatformdefs.h
+++ b/mkspecs/linux-g++-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-g++-maemo/qplatformdefs.h b/mkspecs/linux-g++-maemo/qplatformdefs.h
index 3d9a124394..416ce77c79 100644
--- a/mkspecs/linux-g++-maemo/qplatformdefs.h
+++ b/mkspecs/linux-g++-maemo/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index 07cab1db11..9e68978b34 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-icc-32/qplatformdefs.h b/mkspecs/linux-icc-32/qplatformdefs.h
index 533ef8b661..f63efdfbe1 100644
--- a/mkspecs/linux-icc-32/qplatformdefs.h
+++ b/mkspecs/linux-icc-32/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-icc-64/qplatformdefs.h b/mkspecs/linux-icc-64/qplatformdefs.h
index 533ef8b661..f63efdfbe1 100644
--- a/mkspecs/linux-icc-64/qplatformdefs.h
+++ b/mkspecs/linux-icc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-icc/qplatformdefs.h b/mkspecs/linux-icc/qplatformdefs.h
index 533ef8b661..f63efdfbe1 100644
--- a/mkspecs/linux-icc/qplatformdefs.h
+++ b/mkspecs/linux-icc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
index 68996996a7..9c5146b067 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
index ca44938dcc..c189a51f83 100644
--- a/mkspecs/linux-llvm/qplatformdefs.h
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
index 61bd18e9d5..eeb7062a8d 100644
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
index 917cca4779..496032f3da 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
index 1e88227445..e3921f575a 100644
--- a/mkspecs/lynxos-g++/qplatformdefs.h
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
index 2bab72008a..cef8dde12e 100644
--- a/mkspecs/macx-g++/qplatformdefs.h
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h
index 2bab72008a..cef8dde12e 100644
--- a/mkspecs/macx-g++40/qplatformdefs.h
+++ b/mkspecs/macx-g++40/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
index 2bab72008a..cef8dde12e 100644
--- a/mkspecs/macx-g++42/qplatformdefs.h
+++ b/mkspecs/macx-g++42/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-icc/qplatformdefs.h b/mkspecs/macx-icc/qplatformdefs.h
index 2bab72008a..cef8dde12e 100644
--- a/mkspecs/macx-icc/qplatformdefs.h
+++ b/mkspecs/macx-icc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
index 2bab72008a..cef8dde12e 100644
--- a/mkspecs/macx-llvm/qplatformdefs.h
+++ b/mkspecs/macx-llvm/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-pbuilder/qmake.conf b/mkspecs/macx-pbuilder/qmake.conf
index 2418c7c6f3..2418c7c6f3 100755..100644
--- a/mkspecs/macx-pbuilder/qmake.conf
+++ b/mkspecs/macx-pbuilder/qmake.conf
diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h
index f9bc2920dd..c13bf512b8 100644
--- a/mkspecs/macx-pbuilder/qplatformdefs.h
+++ b/mkspecs/macx-pbuilder/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-xcode/qmake.conf b/mkspecs/macx-xcode/qmake.conf
index 4cb462696e..4cb462696e 100755..100644
--- a/mkspecs/macx-xcode/qmake.conf
+++ b/mkspecs/macx-xcode/qmake.conf
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
index 2bab72008a..cef8dde12e 100644
--- a/mkspecs/macx-xcode/qplatformdefs.h
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h
index 850e4f28eb..faf2beb7bd 100644
--- a/mkspecs/macx-xlc/qplatformdefs.h
+++ b/mkspecs/macx-xlc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
index 66679c4d82..56f52f04bf 100644
--- a/mkspecs/netbsd-g++/qplatformdefs.h
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
index 162e75e42b..b97e2d51e2 100644
--- a/mkspecs/openbsd-g++/qplatformdefs.h
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h
index 51a0d5bd7b..fe0230afd9 100644
--- a/mkspecs/sco-cc/qplatformdefs.h
+++ b/mkspecs/sco-cc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h
index dabcda2c5a..d5fa0bffe9 100644
--- a/mkspecs/sco-g++/qplatformdefs.h
+++ b/mkspecs/sco-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/solaris-cc-64-stlport/qplatformdefs.h b/mkspecs/solaris-cc-64-stlport/qplatformdefs.h
index 61e5a9234a..ed5ca4ebdd 100644
--- a/mkspecs/solaris-cc-64-stlport/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64-stlport/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
index 05a877c8ff..1ce441f2cc 100644
--- a/mkspecs/solaris-cc-64/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/solaris-cc-stlport/qplatformdefs.h b/mkspecs/solaris-cc-stlport/qplatformdefs.h
index bb0681af02..76a188792d 100644
--- a/mkspecs/solaris-cc-stlport/qplatformdefs.h
+++ b/mkspecs/solaris-cc-stlport/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
index 18b87208c0..9b00cce85f 100644
--- a/mkspecs/solaris-cc/qplatformdefs.h
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
index aeb99071c4..c0fcc53833 100644
--- a/mkspecs/solaris-g++-64/qplatformdefs.h
+++ b/mkspecs/solaris-g++-64/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
index 37a61d6691..b4131eaea0 100644
--- a/mkspecs/solaris-g++/qplatformdefs.h
+++ b/mkspecs/solaris-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h
index f99952e2be..9f6e33355f 100644
--- a/mkspecs/tru64-cxx/qplatformdefs.h
+++ b/mkspecs/tru64-cxx/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h
index f99952e2be..9f6e33355f 100644
--- a/mkspecs/tru64-g++/qplatformdefs.h
+++ b/mkspecs/tru64-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h
index abce75cd20..f76ea1db84 100644
--- a/mkspecs/unixware-cc/qplatformdefs.h
+++ b/mkspecs/unixware-cc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h
index abce75cd20..f76ea1db84 100644
--- a/mkspecs/unixware-g++/qplatformdefs.h
+++ b/mkspecs/unixware-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/integrity-ghs/qplatformdefs.h b/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
index 589b3bf352..107535c6a3 100644
--- a/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
+++ b/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/linux-armcc/qplatformdefs.h b/mkspecs/unsupported/linux-armcc/qplatformdefs.h
index 1b5dcc3d79..70f47bfdb0 100644
--- a/mkspecs/unsupported/linux-armcc/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-armcc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/linux-clang/qplatformdefs.h b/mkspecs/unsupported/linux-clang/qplatformdefs.h
index 336453dfde..a903c8ceae 100644
--- a/mkspecs/unsupported/linux-clang/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-clang/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/linux-host-g++/qplatformdefs.h b/mkspecs/unsupported/linux-host-g++/qplatformdefs.h
index 701c330144..f7f0d3b16a 100644
--- a/mkspecs/unsupported/linux-host-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-host-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h b/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h
index 701c330144..f7f0d3b16a 100644
--- a/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-scratchbox2-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/macx-clang/qplatformdefs.h b/mkspecs/unsupported/macx-clang/qplatformdefs.h
index db69115967..63b72927c6 100644
--- a/mkspecs/unsupported/macx-clang/qplatformdefs.h
+++ b/mkspecs/unsupported/macx-clang/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qnx-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
index 8b50f92746..a524bb5fbc 100644
--- a/mkspecs/unsupported/qnx-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/integrity-arm-cxarm/qplatformdefs.h b/mkspecs/unsupported/qws/integrity-arm-cxarm/qplatformdefs.h
index 0484a3366a..71ddfd7460 100644
--- a/mkspecs/unsupported/qws/integrity-arm-cxarm/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/integrity-arm-cxarm/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/integrity-ppc-cxppc/qplatformdefs.h b/mkspecs/unsupported/qws/integrity-ppc-cxppc/qplatformdefs.h
index 0484a3366a..71ddfd7460 100644
--- a/mkspecs/unsupported/qws/integrity-ppc-cxppc/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/integrity-ppc-cxppc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h b/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
index 06641b567f..ee5db1c3cd 100644
--- a/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
index 0c71265ede..4be41b1e6c 100644
--- a/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h
index 0c71265ede..4be41b1e6c 100644
--- a/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h
index 0c71265ede..4be41b1e6c 100644
--- a/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h
index 0c71265ede..4be41b1e6c 100644
--- a/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h b/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h
index 7ceb75ae59..19dafe2bfc 100644
--- a/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h
index 7ceb75ae59..19dafe2bfc 100644
--- a/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h
index 7ceb75ae59..19dafe2bfc 100644
--- a/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
index 6dcdfdeacf..975c6af635 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/win32-borland/qplatformdefs.h b/mkspecs/unsupported/win32-borland/qplatformdefs.h
index e1dfe710c2..6aecf9138d 100644
--- a/mkspecs/unsupported/win32-borland/qplatformdefs.h
+++ b/mkspecs/unsupported/win32-borland/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf
index 0538e868b7..7f41c8aab3 100644
--- a/mkspecs/unsupported/win32-g++-cross/qmake.conf
+++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf
@@ -1,7 +1,7 @@
#
# qmake configuration for win32-g++-cross
#
-# Written for MinGW cross building on Unix
+# Written for MinGW cross building on Unix / gcc 4.6 or higher
#
MAKEFILE_GENERATOR = MINGW
@@ -19,7 +19,7 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall
QMAKE_CFLAGS_WARN_OFF = -w
@@ -79,7 +79,7 @@ QMAKE_SH = bash
MINGW_IN_SHELL = 1
QMAKE_DIR_SEP = /
QMAKE_COPY = cp
-QMAKE_COPY_DIR = cp -r
+QMAKE_COPY_DIR = cp -R
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm -f
QMAKE_MKDIR = mkdir -p
diff --git a/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h b/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h
index 99349bfc8d..15d6be5666 100644
--- a/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h
+++ b/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h b/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h
index e14f8d044a..8f42708c1d 100644
--- a/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h
+++ b/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h
index 36eacb2b39..55d2b7c65a 100644
--- a/mkspecs/win32-g++/qplatformdefs.h
+++ b/mkspecs/win32-g++/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h
index 65218be812..bd969aef8d 100644
--- a/mkspecs/win32-icc/qplatformdefs.h
+++ b/mkspecs/win32-icc/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc2005/qplatformdefs.h
index 4a5a75d7cc..d13e7be877 100644
--- a/mkspecs/win32-msvc2005/qplatformdefs.h
+++ b/mkspecs/win32-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/win32-msvc2008/qplatformdefs.h b/mkspecs/win32-msvc2008/qplatformdefs.h
index ec11b7c39d..339e85239a 100644
--- a/mkspecs/win32-msvc2008/qplatformdefs.h
+++ b/mkspecs/win32-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/win32-msvc2010/qplatformdefs.h b/mkspecs/win32-msvc2010/qplatformdefs.h
index ec11b7c39d..339e85239a 100644
--- a/mkspecs/win32-msvc2010/qplatformdefs.h
+++ b/mkspecs/win32-msvc2010/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h
+++ b/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h
+++ b/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h
+++ b/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h
+++ b/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h
+++ b/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h b/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h b/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h
+++ b/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wince70embedded-armv4i-msvc2008/default_post.prf b/mkspecs/wince70embedded-armv4i-msvc2008/default_post.prf
new file mode 100644
index 0000000000..f2d9c33396
--- /dev/null
+++ b/mkspecs/wince70embedded-armv4i-msvc2008/default_post.prf
@@ -0,0 +1 @@
+include(../wince50standard-x86-msvc2005/default_post.prf)
diff --git a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf
new file mode 100644
index 0000000000..1cda0cf32f
--- /dev/null
+++ b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf
@@ -0,0 +1,28 @@
+# qmake configuration for Windows Embedded Compact 7 with VS2008 on ARM targets
+#
+# This is just a template for creating WEC7 mkspecs for ARM targets
+# Replace the SDK name with actual SDK name.
+
+include(../common/wince/qmake.conf)
+
+CE_SDK = WEC7_SDK_NAME # replace with actual SDK name
+CE_ARCH = armv4i
+
+DEFINES += QT_NO_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_
+
+QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup
+QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB
+QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /DLL /SAFESEH:NO
+QMAKE_LIBFLAGS_RELEASE = /LTCG
+QMAKE_LIBS = corelibc.lib coredll.lib
+QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
+QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
+QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
+QMAKE_LIBS_OPENGL =
+QMAKE_LIBS_COMPAT =
+QMAKE_LIBS_OPENVG = libopenvg.lib
+
+QMAKE_RC = rc
+
+QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
+QMAKE_COMPILER_DEFINES += _MSC_VER=1500
diff --git a/config.tests/unix/icd/icd.cpp b/mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h
index 4582ba3629..cd9eac3274 100644
--- a/config.tests/unix/icd/icd.cpp
+++ b/mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the config.tests of the Qt Toolkit.
+** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
@@ -39,17 +39,5 @@
**
****************************************************************************/
-#include <wlancond.h>
+#include "../common/wince/qplatformdefs.h"
-#include <icd/dbus_api.h>
-#include <icd/network_api_defines.h>
-
-#include <icd/osso-ic.h>
-#include <icd/osso-ic-dbus.h>
-
-#include <conn_settings.h>
-
-int main(int, char **)
-{
- return 0;
-}
diff --git a/mkspecs/wince70embedded-x86-msvc2008/default_post.prf b/mkspecs/wince70embedded-x86-msvc2008/default_post.prf
new file mode 100644
index 0000000000..f2d9c33396
--- /dev/null
+++ b/mkspecs/wince70embedded-x86-msvc2008/default_post.prf
@@ -0,0 +1 @@
+include(../wince50standard-x86-msvc2005/default_post.prf)
diff --git a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf
new file mode 100644
index 0000000000..febd183521
--- /dev/null
+++ b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf
@@ -0,0 +1,27 @@
+# qmake configuration for Windows Embedded Compact 7 with VS2008 platform builder target
+#
+#
+
+include(../common/wince/qmake.conf)
+
+CE_SDK = Platform Builder
+CE_ARCH = _TGTCPU
+
+DEFINES += QT_NO_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86
+
+QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 /ENTRY:mainACRTStartup
+QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86
+QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 /DLL /SAFESEH:NO
+QMAKE_LIBFLAGS_RELEASE = /LTCG
+QMAKE_LIBS = corelibc.lib coredll.lib
+QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
+QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
+QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
+QMAKE_LIBS_OPENGL =
+QMAKE_LIBS_COMPAT =
+QMAKE_LIBS_OPENVG = libopenvg.lib
+
+QMAKE_RC = rc
+
+QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
+QMAKE_COMPILER_DEFINES += _MSC_VER=1500
diff --git a/tests/auto/v8/v8test.h b/mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h
index 7d389f85a8..cd9eac3274 100644
--- a/tests/auto/v8/v8test.h
+++ b/mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the test suite of the Qt Toolkit.
+** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
@@ -39,20 +39,5 @@
**
****************************************************************************/
-#ifndef V8TEST_H
-#define V8TEST_H
-
-#ifdef QT_CORE_LIB
-#include <private/v8.h>
-#else
-#include <v8.h>
-#endif
-
-bool v8test_eval();
-bool v8test_evalwithinwith();
-bool v8test_userobjectcompare();
-bool v8test_externalteardown();
-bool v8test_globalcall();
-
-#endif // V8TEST_H
+#include "../common/wince/qplatformdefs.h"
diff --git a/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h b/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h
+++ b/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h b/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h
+++ b/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h b/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h
+++ b/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h b/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h
+++ b/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h b/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h
+++ b/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h b/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h
+++ b/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h b/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h
+++ b/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h b/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h
+++ b/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h b/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h
+++ b/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h b/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h
index 364f57b842..cd9eac3274 100644
--- a/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h
+++ b/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 647c78edb9..286e2ebcbc 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -74,7 +74,6 @@ CPPFLAGS = -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 \
-I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \
-I$(BUILD_PATH)/src/corelib/global -I$(BUILD_PATH)/src/corelib/xml \
-I$(SOURCE_PATH)/tools/shared \
- -DQT_NO_PCRE \
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL \
-DQT_NO_COMPRESS -I$(QMAKESPEC) -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT \
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 404b2c7171..e767786001 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -40,7 +40,7 @@ CFLAGS_BARE = -c -Fo./ \
-I$(SOURCE_PATH)\tools\shared \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \
-DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \
- -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED
+ -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED
CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)
CXXFLAGS_BARE = $(CFLAGS_BARE)
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index 28dbe1cc55..443dba390a 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -22,7 +22,7 @@ CFLAGS = -c -o$@ -O \
-I$(BUILD_PATH)/src/corelib/xml \
-I$(SOURCE_PATH)/mkspecs/win32-g++ \
-I$(SOURCE_PATH)/tools/shared \
- -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \
+ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT \
-DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DQT_BOOTSTRAPPED
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index f68e3bf46d..bc8356e178 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -22,7 +22,7 @@ CFLAGS = -c -o$@ -O \
-I$(BUILD_PATH)/src/corelib/xml \
-I$(SOURCE_PATH)/mkspecs/win32-g++ \
-I$(SOURCE_PATH)/tools/shared \
- -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \
+ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT \
-DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DQT_BOOTSTRAPPED
diff --git a/qmake/cachekeys.h b/qmake/cachekeys.h
index 2307150ff2..64d068a6e6 100644
--- a/qmake/cachekeys.h
+++ b/qmake/cachekeys.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp
index f9fdb3885b..e3d1d69598 100644
--- a/qmake/generators/integrity/gbuild.cpp
+++ b/qmake/generators/integrity/gbuild.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/integrity/gbuild.h b/qmake/generators/integrity/gbuild.h
index 0927a2e228..67646186e7 100644
--- a/qmake/generators/integrity/gbuild.h
+++ b/qmake/generators/integrity/gbuild.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index b7aec00c30..d6b2235e31 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -168,8 +168,8 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
if(tmp_proj.read(fn)) {
if(Option::debug_level) {
debug_msg(1, "Dumping all variables:");
- QMap<QString, QStringList> &vars = tmp_proj.variables();
- for(QMap<QString, QStringList>::Iterator it = vars.begin();
+ QHash<QString, QStringList> &vars = tmp_proj.variables();
+ for(QHash<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
if(it.key().left(1) != "." && !it.value().isEmpty())
debug_msg(1, "%s: %s === %s", fn.toLatin1().constData(), it.key().toLatin1().constData(),
diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h
index 9d814dfd13..f4568be0f7 100644
--- a/qmake/generators/mac/pbuilder_pbx.h
+++ b/qmake/generators/mac/pbuilder_pbx.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,7 +56,7 @@ class ProjectBuilderMakefileGenerator : public UnixMakefileGenerator
bool writeMakefile(QTextStream &);
QString pbxbuild();
- QMap<QString, QString> keys;
+ QHash<QString, QString> keys;
QString keyFor(const QString &file);
QString findProgram(const QString &prog);
QString fixForOutput(const QString &file);
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 3ad240db01..564d44d98f 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -165,7 +165,7 @@ MakefileGenerator::MakefileGenerator() :
void
MakefileGenerator::verifyCompilers()
{
- QMap<QString, QStringList> &v = project->variables();
+ QHash<QString, QStringList> &v = project->variables();
QStringList &quc = v["QMAKE_EXTRA_COMPILERS"];
for(int i = 0; i < quc.size(); ) {
bool error = false;
@@ -195,7 +195,7 @@ MakefileGenerator::initOutPaths()
return;
verifyCompilers();
init_opath_already = true;
- QMap<QString, QStringList> &v = project->variables();
+ QHash<QString, QStringList> &v = project->variables();
//for shadow builds
if(!v.contains("QMAKE_ABSOLUTE_SOURCE_PATH")) {
if(Option::mkfile::do_cache && !Option::mkfile::cachefile.isEmpty() &&
@@ -317,7 +317,7 @@ QStringList
MakefileGenerator::findFilesInVPATH(QStringList l, uchar flags, const QString &vpath_var)
{
QStringList vpath;
- QMap<QString, QStringList> &v = project->variables();
+ QHash<QString, QStringList> &v = project->variables();
for(int val_it = 0; val_it < l.count(); ) {
bool remove_file = false;
QString &val = l[val_it];
@@ -411,7 +411,7 @@ MakefileGenerator::findFilesInVPATH(QStringList l, uchar flags, const QString &v
void
MakefileGenerator::initCompiler(const MakefileGenerator::Compiler &comp)
{
- QMap<QString, QStringList> &v = project->variables();
+ QHash<QString, QStringList> &v = project->variables();
QStringList &l = v[comp.variable_in];
// find all the relevant file inputs
if(!init_compiler_already.contains(comp.variable_in)) {
@@ -431,7 +431,7 @@ MakefileGenerator::init()
verifyCompilers();
init_already = true;
- QMap<QString, QStringList> &v = project->variables();
+ QHash<QString, QStringList> &v = project->variables();
QStringList &quc = v["QMAKE_EXTRA_COMPILERS"];
//make sure the COMPILERS are in the correct input/output chain order
@@ -875,8 +875,8 @@ MakefileGenerator::processPrlFile(QString &file)
debug_msg(2, "Ignored meta file %s [%s]", real_meta_file.toLatin1().constData(), libinfo.type().toLatin1().constData());
} else {
ret = true;
- QMap<QString, QStringList> &vars = libinfo.variables();
- for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it)
+ QHash<QString, QStringList> &vars = libinfo.variables();
+ for(QHash<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it)
processPrlVariable(it.key(), it.value());
if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
QString dir;
@@ -1300,15 +1300,15 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
cmd = "-$(INSTALL_PROGRAM)";
else
cmd = "-$(INSTALL_FILE)";
- cmd += " " + escapeFilePath(wild) + " " + dst_file + "\n";
+ cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file) + "\n";
target += cmd;
if(!project->isActiveConfig("debug") && !project->isActiveConfig("nostrip") &&
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
target += QString("\t-") + var("QMAKE_STRIP") + " " +
- filePrefixRoot(root, fileFixify(dst + filestr, FileFixifyAbsolute, false)) + "\n";
+ escapeFilePath(filePrefixRoot(root, fileFixify(dst + filestr, FileFixifyAbsolute, false))) + "\n";
if(!uninst.isEmpty())
uninst.append("\n\t");
- uninst.append(rm_dir_contents + " " + filePrefixRoot(root, fileFixify(dst + filestr, FileFixifyAbsolute, false)));
+ uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst + filestr, FileFixifyAbsolute, false))));
continue;
}
QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
@@ -1332,11 +1332,11 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
} else {
cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)");
}
- cmd += " " + wild + " " + dst_file + "\n";
+ cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file) + "\n";
target += cmd;
if(!uninst.isEmpty())
uninst.append("\n\t");
- uninst.append(rm_dir_contents + " " + filePrefixRoot(root, fileFixify(dst + filestr, FileFixifyAbsolute, false)));
+ uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst + filestr, FileFixifyAbsolute, false))));
}
for(int x = 0; x < files.count(); x++) {
QString file = files[x];
@@ -1344,7 +1344,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
continue;
if(!uninst.isEmpty())
uninst.append("\n\t");
- uninst.append(rm_dir_contents + " " + filePrefixRoot(root, fileFixify(dst + file, FileFixifyAbsolute, false)));
+ uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst + file, FileFixifyAbsolute, false))));
QFileInfo fi(fileInfo(dirstr + file));
if(!target.isEmpty())
target += "\t";
@@ -1355,12 +1355,12 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
dst_file += fi.fileName();
}
QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " " +
- dirstr + file + " " + dst_file + "\n";
+ escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file) + "\n";
target += cmd;
if(!project->isActiveConfig("debug") && !project->isActiveConfig("nostrip") &&
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
target += QString("\t-") + var("QMAKE_STRIP") + " " +
- filePrefixRoot(root, fileFixify(dst + file, FileFixifyAbsolute, false)) +
+ escapeFilePath(filePrefixRoot(root, fileFixify(dst + file, FileFixifyAbsolute, false))) +
"\n";
}
}
@@ -2138,23 +2138,22 @@ MakefileGenerator::writeExtraCompilerVariables(QTextStream &t)
void
MakefileGenerator::writeExtraVariables(QTextStream &t)
{
- bool first = true;
- QMap<QString, QStringList> &vars = project->variables();
+ t << endl;
+
+ QStringList outlist;
+ QHash<QString, QStringList> &vars = project->variables();
QStringList &exports = project->values("QMAKE_EXTRA_VARIABLES");
- for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
- for(QStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
+ for (QHash<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
+ for (QStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
QRegExp rx((*exp_it), Qt::CaseInsensitive, QRegExp::Wildcard);
- if(rx.exactMatch(it.key())) {
- if(first) {
- t << "\n####### Custom Variables" << endl;
- first = false;
- }
- t << "EXPORT_" << it.key() << " = " << it.value().join(" ") << endl;
- }
+ if (rx.exactMatch(it.key()))
+ outlist << ("EXPORT_" + it.key() + " = " + it.value().join(" "));
}
}
- if(!first)
- t << endl;
+ if (!outlist.isEmpty()) {
+ t << "####### Custom Variables" << endl;
+ t << outlist.join("\n") << endl << endl;
+ }
}
bool
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 26b5f0e659..4324a9455a 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp
index 4f4c1ff57e..85fbe1e393 100644
--- a/qmake/generators/makefiledeps.cpp
+++ b/qmake/generators/makefiledeps.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/makefiledeps.h b/qmake/generators/makefiledeps.h
index d6e5a14e46..963ade85e9 100644
--- a/qmake/generators/makefiledeps.h
+++ b/qmake/generators/makefiledeps.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index f06a46b821..e60d1c44ec 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -218,8 +218,8 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd)
// debugging
if(Option::debug_level) {
debug_msg(1, "Dumping all variables:");
- QMap<QString, QStringList> &vars = project->variables();
- for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
+ QHash<QString, QStringList> &vars = project->variables();
+ for(QHash<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
if(!it.key().startsWith(".") && !it.value().isEmpty())
debug_msg(1, "%s === %s", it.key().toLatin1().constData(),
it.value().join(" :: ").toLatin1().constData());
@@ -237,7 +237,7 @@ MakefileGenerator
project->projectFile().toLatin1().constData(),build.toLatin1().constData());
//initialize the base
- QMap<QString, QStringList> basevars;
+ QHash<QString, QStringList> basevars;
if(!project->isEmpty(build + ".CONFIG"))
basevars["CONFIG"] += project->values(build + ".CONFIG");
basevars["CONFIG"] += build;
diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h
index 91c93644bc..babf2f0ec6 100644
--- a/qmake/generators/metamakefile.h
+++ b/qmake/generators/metamakefile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index b43d7a1c22..ddbee4b39a 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -79,7 +79,7 @@ ProjectGenerator::init()
project->read(QMakeProject::ReadFeatures);
project->variables()["CONFIG"].clear();
- QMap<QString, QStringList> &v = project->variables();
+ QHash<QString, QStringList> &v = project->variables();
QString templ = Option::user_template.isEmpty() ? QString("app") : Option::user_template;
if(!Option::user_template_prefix.isEmpty())
templ.prepend(Option::user_template_prefix);
diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h
index b8aff4a10c..562b108dc9 100644
--- a/qmake/generators/projectgenerator.h
+++ b/qmake/generators/projectgenerator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index cb4e67e8ca..c5e43b0552 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index 04ee0ee873..12b42f7bf2 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 3582ef1776..173be72919 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp
index f8278424d5..086636f219 100644
--- a/qmake/generators/win32/borland_bmake.cpp
+++ b/qmake/generators/win32/borland_bmake.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/borland_bmake.h b/qmake/generators/win32/borland_bmake.h
index c38af03a76..603c413244 100644
--- a/qmake/generators/win32/borland_bmake.h
+++ b/qmake/generators/win32/borland_bmake.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 29381eb7f4..c82259e5ae 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
index 1dbfa07724..fda1ca4187 100644
--- a/qmake/generators/win32/mingw_make.h
+++ b/qmake/generators/win32/mingw_make.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 4435c5f389..de95ad10be 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -925,15 +925,17 @@ static inline QString toString(inlineExpansionOption option)
static inline QString toString(optimizeOption option)
{
switch (option) {
- case optimizeDisabled:
- case optimizeFull:
case optimizeCustom:
case optimizeDefault:
break;
+ case optimizeDisabled:
+ return "Disabled";
case optimizeMinSpace:
return "MinSpace";
case optimizeMaxSpeed:
return "MaxSpeed";
+ case optimizeFull:
+ return "Full";
}
return QString();
}
diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h
index bd5e5d137c..5e9d06dd9f 100644
--- a/qmake/generators/win32/msbuild_objectmodel.h
+++ b/qmake/generators/win32/msbuild_objectmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index dd4e34d967..f75ea05567 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h
index 99f7279cc2..c758d5eb81 100644
--- a/qmake/generators/win32/msvc_nmake.h
+++ b/qmake/generators/win32/msvc_nmake.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 85a642badc..96c230e98c 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -649,11 +649,11 @@ bool VCCLCompilerTool::parseOption(const char* option)
RuntimeLibrary = rtMultiThreadedDebug;
break;
} else if (second == 'P') {
- if (config->CompilerVersion >= NET2005) {
- AdditionalOptions += option;
- } else if (config->CompilerVersion >= NET2010) {
+ if (config->CompilerVersion >= NET2010) {
MultiProcessorCompilation = _True;
MultiProcessorCompilationProcessorCount = option+3;
+ } else if (config->CompilerVersion >= NET2005) {
+ AdditionalOptions += option;
} else {
warn_msg(WarnLogic, "/MP option is not supported in Visual C++ < 2005, ignoring.");
}
@@ -2303,13 +2303,14 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
deps += CustomBuildTool.AdditionalDependencies;
deps += cmd.left(cmd.indexOf(' '));
// Make sure that all deps are only once
- QMap<QString, bool> uniqDeps;
+ QHash<QString, bool> uniqDeps;
for (int c = 0; c < deps.count(); ++c) {
QString aDep = deps.at(c).trimmed();
if (!aDep.isEmpty())
uniqDeps[aDep] = false;
}
CustomBuildTool.AdditionalDependencies = uniqDeps.keys();
+ CustomBuildTool.AdditionalDependencies.sort();
}
// Ensure that none of the output files are also dependencies. Or else, the custom buildstep
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 950176d00d..7a530c8e5a 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 0a3f5fb27c..55d3fa8455 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -467,8 +467,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
Option::qmake_mode = old_mode;
if(Option::debug_level) {
debug_msg(1, "Dumping all variables:");
- QMap<QString, QStringList> &vars = tmp_proj.variables();
- for(QMap<QString, QStringList>::Iterator it = vars.begin();
+ QHash<QString, QStringList> &vars = tmp_proj.variables();
+ for(QHash<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
if(it.key().left(1) != "." && !it.value().isEmpty())
debug_msg(1, "%s: %s === %s", fn.toLatin1().constData(), it.key().toLatin1().constData(),
@@ -949,6 +949,10 @@ void VcprojGenerator::initCompilerTool()
placement = ".\\";
VCConfiguration &conf = vcProject.Configuration;
+ if (conf.CompilerVersion >= NET2010) {
+ // adjust compiler tool defaults for VS 2010 and above
+ conf.compiler.Optimization = optimizeDisabled;
+ }
conf.compiler.AssemblerListingLocation = placement ;
conf.compiler.ProgramDataBaseFileName = ".\\" ;
conf.compiler.ObjectFile = placement ;
@@ -1571,7 +1575,7 @@ void VcprojGenerator::outputVariables()
{
#if 0
qDebug("Generator: MSVC.NET: List of current variables:");
- for(QMap<QString, QStringList>::ConstIterator it = project->variables().begin(); it != project->variables().end(); ++it)
+ for(QHash<QString, QStringList>::ConstIterator it = project->variables().begin(); it != project->variables().end(); ++it)
qDebug("Generator: MSVC.NET: %s => %s", qPrintable(it.key()), qPrintable(it.value().join(" | ")));
#endif
}
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 5c3cb89b78..35ac670c62 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,7 @@ enum Target {
StaticLib
};
-struct QUuid;
+class QUuid;
class VcprojGenerator : public Win32MakefileGenerator
{
bool init_flag;
@@ -76,8 +76,8 @@ public:
bool autogenPrecompCPP;
static bool hasBuiltinCompiler(const QString &file);
- QMap<QString, QStringList> extraCompilerSources;
- QMap<QString, QStringList> extraCompilerOutputs;
+ QHash<QString, QStringList> extraCompilerSources;
+ QHash<QString, QStringList> extraCompilerOutputs;
bool usePCH;
VCProjectWriter *projectWriter;
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index 429025f801..5d2047fd2f 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/msvc_vcxproj.h b/qmake/generators/win32/msvc_vcxproj.h
index 702dca3652..0c43a0a8d8 100644
--- a/qmake/generators/win32/msvc_vcxproj.h
+++ b/qmake/generators/win32/msvc_vcxproj.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 62466e203d..11927dbd94 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index d3513aa41e..1e8b706088 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp
index 4a35b215e8..1b39f38203 100644
--- a/qmake/generators/xmloutput.cpp
+++ b/qmake/generators/xmloutput.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/generators/xmloutput.h b/qmake/generators/xmloutput.h
index e1c744c0df..6560ebc7b6 100644
--- a/qmake/generators/xmloutput.h
+++ b/qmake/generators/xmloutput.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 561f4aaf6a..99015177b2 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/meta.cpp b/qmake/meta.cpp
index fd043d4e3d..f5edff3ceb 100644
--- a/qmake/meta.cpp
+++ b/qmake/meta.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-QMap<QString, QMap<QString, QStringList> > QMakeMetaInfo::cache_vars;
+QHash<QString, QHash<QString, QStringList> > QMakeMetaInfo::cache_vars;
QMakeMetaInfo::QMakeMetaInfo()
{
@@ -140,8 +140,8 @@ QMakeMetaInfo::readLibtoolFile(const QString &f)
dirf = "";
else if(!dirf.isEmpty() && !dirf.endsWith(Option::output_dir))
dirf += Option::dir_sep;
- QMap<QString, QStringList> &v = proj.variables();
- for(QMap<QString, QStringList>::Iterator it = v.begin(); it != v.end(); ++it) {
+ QHash<QString, QStringList> &v = proj.variables();
+ for(QHash<QString, QStringList>::Iterator it = v.begin(); it != v.end(); ++it) {
QStringList lst = it.value();
if(lst.count() == 1 && (lst.first().startsWith("'") || lst.first().startsWith("\"")) &&
lst.first().endsWith(QString(lst.first()[0])))
diff --git a/qmake/meta.h b/qmake/meta.h
index 32ca5ed4a6..d20fc97924 100644
--- a/qmake/meta.h
+++ b/qmake/meta.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,7 @@
#ifndef META_H
#define META_H
-#include <qmap.h>
+#include <qhash.h>
#include <qstringlist.h>
#include <qstring.h>
@@ -52,9 +52,9 @@ class QMakeMetaInfo
{
bool readLibtoolFile(const QString &f);
bool readPkgCfgFile(const QString &f);
- QMap<QString, QStringList> vars;
+ QHash<QString, QStringList> vars;
QString meta_type;
- static QMap<QString, QMap<QString, QStringList> > cache_vars;
+ static QHash<QString, QHash<QString, QStringList> > cache_vars;
void clear();
public:
QMakeMetaInfo();
@@ -67,7 +67,7 @@ public:
bool isEmpty(const QString &v);
QStringList &values(const QString &v);
QString first(const QString &v);
- QMap<QString, QStringList> &variables();
+ QHash<QString, QStringList> &variables();
};
inline bool QMakeMetaInfo::isEmpty(const QString &v)
@@ -92,7 +92,7 @@ inline QString QMakeMetaInfo::first(const QString &v)
#endif
}
-inline QMap<QString, QStringList> &QMakeMetaInfo::variables()
+inline QHash<QString, QStringList> &QMakeMetaInfo::variables()
{ return vars; }
inline bool QMakeMetaInfo::libExists(QString lib)
diff --git a/qmake/option.cpp b/qmake/option.cpp
index c3e89de818..8ad8a22f79 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/option.h b/qmake/option.h
index 23fc9543da..ffccb8efc5 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/project.cpp b/qmake/project.cpp
index f1d000f05e..eb2b10b92f 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,7 +52,6 @@
#include <qregexp.h>
#include <qtextstream.h>
#include <qstack.h>
-#include <qhash.h>
#include <qdebug.h>
#ifdef Q_OS_UNIX
#include <unistd.h>
@@ -79,12 +78,12 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_REPLACE,
E_SIZE, E_SORT_DEPENDS, E_RESOLVE_DEPENDS };
-QMap<QString, ExpandFunc> qmake_expandFunctions()
+QHash<QString, ExpandFunc> qmake_expandFunctions()
{
- static QMap<QString, ExpandFunc> *qmake_expand_functions = 0;
+ static QHash<QString, ExpandFunc> *qmake_expand_functions = 0;
if(!qmake_expand_functions) {
- qmake_expand_functions = new QMap<QString, ExpandFunc>;
- qmakeAddCacheClear(qmakeDeleteCacheClear<QMap<QString, ExpandFunc> >, (void**)&qmake_expand_functions);
+ qmake_expand_functions = new QHash<QString, ExpandFunc>;
+ qmakeAddCacheClear(qmakeDeleteCacheClear<QHash<QString, ExpandFunc> >, (void**)&qmake_expand_functions);
qmake_expand_functions->insert("member", E_MEMBER);
qmake_expand_functions->insert("first", E_FIRST);
qmake_expand_functions->insert("last", E_LAST);
@@ -121,11 +120,11 @@ enum TestFunc { T_REQUIRES=1, T_GREATERTHAN, T_LESSTHAN, T_EQUALS,
T_RETURN, T_BREAK, T_NEXT, T_DEFINED, T_CONTAINS, T_INFILE,
T_COUNT, T_ISEMPTY, T_INCLUDE, T_LOAD, T_DEBUG, T_ERROR,
T_MESSAGE, T_WARNING, T_IF, T_OPTION };
-QMap<QString, TestFunc> qmake_testFunctions()
+QHash<QString, TestFunc> qmake_testFunctions()
{
- static QMap<QString, TestFunc> *qmake_test_functions = 0;
+ static QHash<QString, TestFunc> *qmake_test_functions = 0;
if(!qmake_test_functions) {
- qmake_test_functions = new QMap<QString, TestFunc>;
+ qmake_test_functions = new QHash<QString, TestFunc>;
qmake_test_functions->insert("requires", T_REQUIRES);
qmake_test_functions->insert("greaterThan", T_GREATERTHAN);
qmake_test_functions->insert("lessThan", T_LESSTHAN);
@@ -347,10 +346,10 @@ struct ParsableBlock
protected:
int ref_cnt;
virtual bool continueBlock() = 0;
- bool eval(QMakeProject *p, QMap<QString, QStringList> &place);
+ bool eval(QMakeProject *p, QHash<QString, QStringList> &place);
};
-bool ParsableBlock::eval(QMakeProject *p, QMap<QString, QStringList> &place)
+bool ParsableBlock::eval(QMakeProject *p, QHash<QString, QStringList> &place)
{
//save state
parser_info pi = parser;
@@ -376,19 +375,19 @@ struct FunctionBlock : public ParsableBlock
{
FunctionBlock() : calling_place(0), scope_level(1), cause_return(false) { }
- QMap<QString, QStringList> vars;
- QMap<QString, QStringList> *calling_place;
+ QHash<QString, QStringList> vars;
+ QHash<QString, QStringList> *calling_place;
QStringList return_value;
int scope_level;
bool cause_return;
bool exec(const QList<QStringList> &args,
- QMakeProject *p, QMap<QString, QStringList> &place, QStringList &functionReturn);
+ QMakeProject *p, QHash<QString, QStringList> &place, QStringList &functionReturn);
virtual bool continueBlock() { return !cause_return; }
};
bool FunctionBlock::exec(const QList<QStringList> &args,
- QMakeProject *proj, QMap<QString, QStringList> &place,
+ QMakeProject *proj, QHash<QString, QStringList> &place,
QStringList &functionReturn)
{
//save state
@@ -442,10 +441,10 @@ struct IteratorBlock : public ParsableBlock
bool loop_forever, cause_break, cause_next;
QStringList list;
- bool exec(QMakeProject *p, QMap<QString, QStringList> &place);
+ bool exec(QMakeProject *p, QHash<QString, QStringList> &place);
virtual bool continueBlock() { return !cause_next && !cause_break; }
};
-bool IteratorBlock::exec(QMakeProject *p, QMap<QString, QStringList> &place)
+bool IteratorBlock::exec(QMakeProject *p, QHash<QString, QStringList> &place)
{
bool ret = true;
QStringList::Iterator it;
@@ -621,12 +620,12 @@ QMakeProject::~QMakeProject()
{
if(own_prop)
delete prop;
- for(QMap<QString, FunctionBlock*>::iterator it = replaceFunctions.begin(); it != replaceFunctions.end(); ++it) {
+ for(QHash<QString, FunctionBlock*>::iterator it = replaceFunctions.begin(); it != replaceFunctions.end(); ++it) {
if(!it.value()->deref())
delete it.value();
}
replaceFunctions.clear();
- for(QMap<QString, FunctionBlock*>::iterator it = testFunctions.begin(); it != testFunctions.end(); ++it) {
+ for(QHash<QString, FunctionBlock*>::iterator it = testFunctions.begin(); it != testFunctions.end(); ++it) {
if(!it.value()->deref())
delete it.value();
}
@@ -635,7 +634,7 @@ QMakeProject::~QMakeProject()
void
-QMakeProject::init(QMakeProperty *p, const QMap<QString, QStringList> *vars)
+QMakeProject::init(QMakeProperty *p, const QHash<QString, QStringList> *vars)
{
if(vars)
base_vars = *vars;
@@ -650,14 +649,14 @@ QMakeProject::init(QMakeProperty *p, const QMap<QString, QStringList> *vars)
reset();
}
-QMakeProject::QMakeProject(QMakeProject *p, const QMap<QString, QStringList> *vars)
+QMakeProject::QMakeProject(QMakeProject *p, const QHash<QString, QStringList> *vars)
{
init(p->properties(), vars ? vars : &p->variables());
- for(QMap<QString, FunctionBlock*>::iterator it = p->replaceFunctions.begin(); it != p->replaceFunctions.end(); ++it) {
+ for(QHash<QString, FunctionBlock*>::iterator it = p->replaceFunctions.begin(); it != p->replaceFunctions.end(); ++it) {
it.value()->ref();
replaceFunctions.insert(it.key(), it.value());
}
- for(QMap<QString, FunctionBlock*>::iterator it = p->testFunctions.begin(); it != p->testFunctions.end(); ++it) {
+ for(QHash<QString, FunctionBlock*>::iterator it = p->testFunctions.begin(); it != p->testFunctions.end(); ++it) {
it.value()->ref();
testFunctions.insert(it.key(), it.value());
}
@@ -675,7 +674,7 @@ QMakeProject::reset()
}
bool
-QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int numLines)
+QMakeProject::parse(const QString &t, QHash<QString, QStringList> &place, int numLines)
{
// To preserve the integrity of any UTF-8 characters in .pro file, temporarily replace the
// non-breaking space (0xA0) characters with another non-space character, so that
@@ -944,7 +943,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int num
parser.file.toLatin1().constData(), parser.line_no, func.toLatin1().constData());
return false;
}
- QMap<QString, FunctionBlock*> *map = 0;
+ QHash<QString, FunctionBlock*> *map = 0;
if(func == "defineTest")
map = &testFunctions;
else
@@ -1184,7 +1183,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int num
}
bool
-QMakeProject::read(QTextStream &file, QMap<QString, QStringList> &place)
+QMakeProject::read(QTextStream &file, QHash<QString, QStringList> &place)
{
int numLines = 0;
bool ret = true;
@@ -1227,7 +1226,7 @@ QMakeProject::read(QTextStream &file, QMap<QString, QStringList> &place)
}
bool
-QMakeProject::read(const QString &file, QMap<QString, QStringList> &place)
+QMakeProject::read(const QString &file, QHash<QString, QStringList> &place)
{
parser_info pi = parser;
reset();
@@ -1520,7 +1519,7 @@ void QMakeProject::validateModes()
}
bool
-QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QStringList> *place)
+QMakeProject::isActiveConfig(const QString &x, bool regex, QHash<QString, QStringList> *place)
{
if(x.isEmpty())
return true;
@@ -1594,7 +1593,7 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString
}
bool
-QMakeProject::doProjectTest(QString str, QMap<QString, QStringList> &place)
+QMakeProject::doProjectTest(QString str, QHash<QString, QStringList> &place)
{
QString chk = remove_quotes(str);
if(chk.isEmpty())
@@ -1623,13 +1622,13 @@ QMakeProject::doProjectTest(QString str, QMap<QString, QStringList> &place)
bool
QMakeProject::doProjectTest(QString func, const QString &params,
- QMap<QString, QStringList> &place)
+ QHash<QString, QStringList> &place)
{
return doProjectTest(func, split_arg_list(params), place);
}
QMakeProject::IncludeStatus
-QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringList> &place)
+QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QStringList> &place)
{
enum { UnknownFormat, ProFormat, JSFormat } format = UnknownFormat;
if(flags & IncludeFlagFeature) {
@@ -1766,14 +1765,14 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringL
QStringList
QMakeProject::doProjectExpand(QString func, const QString &params,
- QMap<QString, QStringList> &place)
+ QHash<QString, QStringList> &place)
{
return doProjectExpand(func, split_arg_list(params), place);
}
QStringList
QMakeProject::doProjectExpand(QString func, QStringList args,
- QMap<QString, QStringList> &place)
+ QHash<QString, QStringList> &place)
{
QList<QStringList> args_list;
for(int i = 0; i < args.size(); ++i) {
@@ -1788,7 +1787,7 @@ QMakeProject::doProjectExpand(QString func, QStringList args,
static void
populateDeps(const QStringList &deps, const QString &prefix,
QHash<QString, QSet<QString> > &dependencies, QHash<QString, QStringList> &dependees,
- QStringList &rootSet, QMap<QString, QStringList> &place)
+ QStringList &rootSet, QHash<QString, QStringList> &place)
{
foreach (const QString &item, deps)
if (!dependencies.contains(item)) {
@@ -1808,7 +1807,7 @@ populateDeps(const QStringList &deps, const QString &prefix,
QStringList
QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
- QMap<QString, QStringList> &place)
+ QHash<QString, QStringList> &place)
{
func = func.trimmed();
if(replaceFunctions.contains(func)) {
@@ -1931,7 +1930,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
QString file = args[0], seek_var = args[1];
file = Option::fixPathToLocalOS(file);
- QMap<QString, QStringList> tmp;
+ QHash<QString, QStringList> tmp;
if(doProjectInclude(file, IncludeFlagNewParser, tmp) == IncludeSuccess) {
if(tmp.contains("QMAKE_INTERNAL_INCLUDED_FILES")) {
QStringList &out = place["QMAKE_INTERNAL_INCLUDED_FILES"];
@@ -1951,7 +1950,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
parser.file.toLatin1().constData(), parser.line_no);
} else {
- const QMap<QString, QStringList> *source = &place;
+ const QHash<QString, QStringList> *source = &place;
if(args.count() == 2) {
if(args.at(1) == "Global") {
source = &vars;
@@ -1970,7 +1969,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
QString tmp;
tmp.sprintf(".QMAKE_INTERNAL_TMP_VAR_%d", x++);
ret = QStringList(tmp);
- QStringList &lst = (*((QMap<QString, QStringList>*)&place))[tmp];
+ QStringList &lst = (*((QHash<QString, QStringList>*)&place))[tmp];
lst.clear();
for(QStringList::ConstIterator arg_it = args.begin();
arg_it != args.end(); ++arg_it)
@@ -2281,7 +2280,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
}
bool
-QMakeProject::doProjectTest(QString func, QStringList args, QMap<QString, QStringList> &place)
+QMakeProject::doProjectTest(QString func, QStringList args, QHash<QString, QStringList> &place)
{
QList<QStringList> args_list;
for(int i = 0; i < args.size(); ++i) {
@@ -2294,7 +2293,7 @@ QMakeProject::doProjectTest(QString func, QStringList args, QMap<QString, QStrin
}
bool
-QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QString, QStringList> &place)
+QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QHash<QString, QStringList> &place)
{
func = func.trimmed();
@@ -2580,7 +2579,7 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
}
bool ret = false;
- QMap<QString, QStringList> tmp;
+ QHash<QString, QStringList> tmp;
if(doProjectInclude(Option::fixPathToLocalOS(args[0]), IncludeFlagNewParser, tmp) == IncludeSuccess) {
if(tmp.contains("QMAKE_INTERNAL_INCLUDED_FILES")) {
QStringList &out = place["QMAKE_INTERNAL_INCLUDED_FILES"];
@@ -2666,16 +2665,16 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
flags |= IncludeFlagFeature;
IncludeStatus stat = IncludeFailure;
if(!parseInto.isEmpty()) {
- QMap<QString, QStringList> symbols;
+ QHash<QString, QStringList> symbols;
stat = doProjectInclude(file, flags|IncludeFlagNewProject, symbols);
if(stat == IncludeSuccess) {
- QMap<QString, QStringList> out_place;
- for(QMap<QString, QStringList>::ConstIterator it = place.begin(); it != place.end(); ++it) {
+ QHash<QString, QStringList> out_place;
+ for(QHash<QString, QStringList>::ConstIterator it = place.begin(); it != place.end(); ++it) {
const QString var = it.key();
if(var != parseInto && !var.startsWith(parseInto + "."))
out_place.insert(var, it.value());
}
- for(QMap<QString, QStringList>::ConstIterator it = symbols.begin(); it != symbols.end(); ++it) {
+ for(QHash<QString, QStringList>::ConstIterator it = symbols.begin(); it != symbols.end(); ++it) {
const QString var = it.key();
if(!var.startsWith("."))
out_place.insert(parseInto + "." + it.key(), it.value());
@@ -2754,7 +2753,7 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
}
bool
-QMakeProject::doProjectCheckReqs(const QStringList &deps, QMap<QString, QStringList> &place)
+QMakeProject::doProjectCheckReqs(const QStringList &deps, QHash<QString, QStringList> &place)
{
bool ret = false;
for(QStringList::ConstIterator it = deps.begin(); it != deps.end(); ++it) {
@@ -2773,14 +2772,14 @@ QMakeProject::doProjectCheckReqs(const QStringList &deps, QMap<QString, QStringL
bool
QMakeProject::test(const QString &v)
{
- QMap<QString, QStringList> tmp = vars;
+ QHash<QString, QStringList> tmp = vars;
return doProjectTest(v, tmp);
}
bool
QMakeProject::test(const QString &func, const QList<QStringList> &args)
{
- QMap<QString, QStringList> tmp = vars;
+ QHash<QString, QStringList> tmp = vars;
return doProjectTest(func, args, tmp);
}
@@ -2788,7 +2787,7 @@ QStringList
QMakeProject::expand(const QString &str)
{
bool ok;
- QMap<QString, QStringList> tmp = vars;
+ QHash<QString, QStringList> tmp = vars;
const QStringList ret = doVariableReplaceExpand(str, tmp, &ok);
if(ok)
return ret;
@@ -2803,7 +2802,7 @@ QMakeProject::expand(const QString &str, const QString &file, int line)
parser.file = file;
parser.line_no = line;
parser.from_file = false;
- QMap<QString, QStringList> tmp = vars;
+ QHash<QString, QStringList> tmp = vars;
const QStringList ret = doVariableReplaceExpand(str, tmp, &ok);
parser = pi;
return ok ? ret.join(QString(Option::field_sep)) : QString();
@@ -2812,12 +2811,12 @@ QMakeProject::expand(const QString &str, const QString &file, int line)
QStringList
QMakeProject::expand(const QString &func, const QList<QStringList> &args)
{
- QMap<QString, QStringList> tmp = vars;
+ QHash<QString, QStringList> tmp = vars;
return doProjectExpand(func, args, tmp);
}
bool
-QMakeProject::doVariableReplace(QString &str, QMap<QString, QStringList> &place)
+QMakeProject::doVariableReplace(QString &str, QHash<QString, QStringList> &place)
{
bool ret;
str = doVariableReplaceExpand(str, place, &ret).join(QString(Option::field_sep));
@@ -2825,7 +2824,7 @@ QMakeProject::doVariableReplace(QString &str, QMap<QString, QStringList> &place)
}
QStringList
-QMakeProject::doVariableReplaceExpand(const QString &str, QMap<QString, QStringList> &place, bool *ok)
+QMakeProject::doVariableReplaceExpand(const QString &str, QHash<QString, QStringList> &place, bool *ok)
{
QStringList ret;
if(ok)
@@ -3015,7 +3014,7 @@ QMakeProject::doVariableReplaceExpand(const QString &str, QMap<QString, QStringL
return ret;
}
-QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList> &place)
+QStringList &QMakeProject::values(const QString &_var, QHash<QString, QStringList> &place)
{
QString var = varMap(_var);
if(var == QLatin1String("LITERAL_WHITESPACE")) { //a real space in a token)
@@ -3185,7 +3184,7 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
bool QMakeProject::isEmpty(const QString &v)
{
- QMap<QString, QStringList>::ConstIterator it = vars.constFind(varMap(v));
+ QHash<QString, QStringList>::ConstIterator it = vars.constFind(varMap(v));
return it == vars.constEnd() || it->isEmpty();
}
diff --git a/qmake/project.h b/qmake/project.h
index 68110a8448..8a49eb584d 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,7 +46,7 @@
#include <qtextstream.h>
#include <qstring.h>
#include <qstack.h>
-#include <qmap.h>
+#include <qhash.h>
#include <qmetatype.h>
QT_BEGIN_NAMESPACE
@@ -76,7 +76,7 @@ class QMakeProject
QStack<FunctionBlock *> function_blocks;
IteratorBlock *iterator;
FunctionBlock *function;
- QMap<QString, FunctionBlock*> testFunctions, replaceFunctions;
+ QHash<QString, FunctionBlock*> testFunctions, replaceFunctions;
bool recursive;
bool own_prop;
@@ -84,8 +84,8 @@ class QMakeProject
QString pfile, cfile;
QMakeProperty *prop;
void reset();
- QMap<QString, QStringList> vars, base_vars, cache;
- bool parse(const QString &text, QMap<QString, QStringList> &place, int line_count=1);
+ QHash<QString, QStringList> vars, base_vars, cache;
+ bool parse(const QString &text, QHash<QString, QStringList> &place, int line_count=1);
enum IncludeStatus {
IncludeSuccess,
@@ -100,21 +100,21 @@ class QMakeProject
IncludeFlagNewParser = 0x02,
IncludeFlagNewProject = 0x04
};
- IncludeStatus doProjectInclude(QString file, uchar flags, QMap<QString, QStringList> &place);
+ IncludeStatus doProjectInclude(QString file, uchar flags, QHash<QString, QStringList> &place);
- bool doProjectCheckReqs(const QStringList &deps, QMap<QString, QStringList> &place);
- bool doVariableReplace(QString &str, QMap<QString, QStringList> &place);
- QStringList doVariableReplaceExpand(const QString &str, QMap<QString, QStringList> &place, bool *ok=0);
- void init(QMakeProperty *, const QMap<QString, QStringList> *);
- QStringList &values(const QString &v, QMap<QString, QStringList> &place);
+ bool doProjectCheckReqs(const QStringList &deps, QHash<QString, QStringList> &place);
+ bool doVariableReplace(QString &str, QHash<QString, QStringList> &place);
+ QStringList doVariableReplaceExpand(const QString &str, QHash<QString, QStringList> &place, bool *ok=0);
+ void init(QMakeProperty *, const QHash<QString, QStringList> *);
+ QStringList &values(const QString &v, QHash<QString, QStringList> &place);
void validateModes();
public:
QMakeProject() { init(0, 0); }
QMakeProject(QMakeProperty *p) { init(p, 0); }
- QMakeProject(QMakeProject *p, const QMap<QString, QStringList> *nvars=0);
- QMakeProject(const QMap<QString, QStringList> &nvars) { init(0, &nvars); }
- QMakeProject(QMakeProperty *p, const QMap<QString, QStringList> &nvars) { init(p, &nvars); }
+ QMakeProject(QMakeProject *p, const QHash<QString, QStringList> *nvars=0);
+ QMakeProject(const QHash<QString, QStringList> &nvars) { init(0, &nvars); }
+ QMakeProject(QMakeProperty *p, const QHash<QString, QStringList> &nvars) { init(p, &nvars); }
~QMakeProject();
enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08,
@@ -129,19 +129,19 @@ public:
QString projectFile();
inline QMakeProperty *properties() { return prop; }
- bool doProjectTest(QString str, QMap<QString, QStringList> &place);
+ bool doProjectTest(QString str, QHash<QString, QStringList> &place);
bool doProjectTest(QString func, const QString &params,
- QMap<QString, QStringList> &place);
+ QHash<QString, QStringList> &place);
bool doProjectTest(QString func, QStringList args,
- QMap<QString, QStringList> &place);
+ QHash<QString, QStringList> &place);
bool doProjectTest(QString func, QList<QStringList> args,
- QMap<QString, QStringList> &place);
+ QHash<QString, QStringList> &place);
QStringList doProjectExpand(QString func, const QString &params,
- QMap<QString, QStringList> &place);
+ QHash<QString, QStringList> &place);
QStringList doProjectExpand(QString func, QStringList args,
- QMap<QString, QStringList> &place);
+ QHash<QString, QStringList> &place);
QStringList doProjectExpand(QString func, QList<QStringList> args,
- QMap<QString, QStringList> &place);
+ QHash<QString, QStringList> &place);
QStringList expand(const QString &v);
QString expand(const QString &v, const QString &file, int line);
@@ -149,20 +149,20 @@ public:
bool test(const QString &v);
bool test(const QString &func, const QList<QStringList> &args);
bool isActiveConfig(const QString &x, bool regex=false,
- QMap<QString, QStringList> *place=NULL);
+ QHash<QString, QStringList> *place=NULL);
bool isSet(const QString &v); // No compat mapping, no magic variables
bool isEmpty(const QString &v); // With compat mapping, but no magic variables
QStringList &values(const QString &v); // With compat mapping and magic variables
QString first(const QString &v); // ditto
- QMap<QString, QStringList> &variables(); // No compat mapping and magic, obviously
+ QHash<QString, QStringList> &variables(); // No compat mapping and magic, obviously
bool isRecursive() const { return recursive; }
protected:
friend class MakefileGenerator;
- bool read(const QString &file, QMap<QString, QStringList> &place);
- bool read(QTextStream &file, QMap<QString, QStringList> &place);
+ bool read(const QString &file, QHash<QString, QStringList> &place);
+ bool read(QTextStream &file, QHash<QString, QStringList> &place);
};
Q_DECLARE_METATYPE(QMakeProject*)
@@ -188,7 +188,7 @@ inline QString QMakeProject::first(const QString &v)
return vals.first();
}
-inline QMap<QString, QStringList> &QMakeProject::variables()
+inline QHash<QString, QStringList> &QMakeProject::variables()
{ return vars; }
QT_END_NAMESPACE
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 29e3857838..c1efef0d2b 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,7 +43,6 @@
#include "option.h"
#include <qdir.h>
-#include <qmap.h>
#include <qsettings.h>
#include <qstringlist.h>
#include <stdio.h>
diff --git a/qmake/property.h b/qmake/property.h
index 5c1c28ff38..22a8957e53 100644
--- a/qmake/property.h
+++ b/qmake/property.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/qmake/qmake_pch.h b/qmake/qmake_pch.h
index 351ef486a0..a24c2f7c92 100644
--- a/qmake/qmake_pch.h
+++ b/qmake/qmake_pch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-greek.c b/src/3rdparty/harfbuzz/src/harfbuzz-greek.c
index 8099838323..f3c0ff62ef 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-greek.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-greek.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/libpng/pnglibconf.h b/src/3rdparty/libpng/pnglibconf.h
index b1d2169105..c46dde3a0f 100644
--- a/src/3rdparty/libpng/pnglibconf.h
+++ b/src/3rdparty/libpng/pnglibconf.h
@@ -100,7 +100,9 @@
#define PNG_WRITE_SHIFT_SUPPORTED
#define PNG_PROGRESSIVE_READ_SUPPORTED
#define PNG_READ_SHIFT_SUPPORTED
-#define PNG_CONVERT_tIME_SUPPORTED
+#ifndef _WIN32_WCE
+ #define PNG_CONVERT_tIME_SUPPORTED
+#endif
#define PNG_READ_USER_TRANSFORM_SUPPORTED
#define PNG_READ_INT_FUNCTIONS_SUPPORTED
#define PNG_READ_USER_CHUNKS_SUPPORTED
diff --git a/src/3rdparty/s60/eiksoftkeyimage.h b/src/3rdparty/s60/eiksoftkeyimage.h
index d2b1cf7ce0..01a41a5b47 100644
--- a/src/3rdparty/s60/eiksoftkeyimage.h
+++ b/src/3rdparty/s60/eiksoftkeyimage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index fc64b027bb..b901da5dcf 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -13540,6 +13540,16 @@ static void clearYMD_HMS_TZ(DateTime *p){
#ifndef SQLITE_OMIT_LOCALTIME
/*
+** Windows CE does not declare the localtime
+** function as it is not defined anywhere.
+** Anyway we need the forward-declaration to be
+** able to define it later on.
+*/
+#if defined(_WIN32_WCE) && (_WIN32_WCE >= 0x600)
+static struct tm *__cdecl localtime(const time_t *t);
+#endif
+
+/*
** The following routine implements the rough equivalent of localtime_r()
** using whatever operating-system specific localtime facility that
** is available. This routine returns 0 on success and
@@ -13574,19 +13584,6 @@ static int osLocaltime(time_t *t, struct tm *pTm){
#endif /* HAVE_LOCALTIME_R || HAVE_LOCALTIME_S */
return rc;
}
-#endif /* SQLITE_OMIT_LOCALTIME */
-
-
-#ifndef SQLITE_OMIT_LOCALTIME
-/*
-** Windows CE does not declare the localtime
-** function as it is not defined anywhere.
-** Anyway we need the forward-declaration to be
-** able to define it later on.
-*/
-#if defined(_WIN32_WCE) && (_WIN32_WCE >= 0x600)
-static struct tm *__cdecl localtime(const time_t *t);
-#endif
/*
** Compute the difference (in milliseconds) between localtime and UTC
diff --git a/src/3rdparty/v8 b/src/3rdparty/v8
deleted file mode 160000
-Subproject d28b6a024826aaa48a8b3e69c096d01c91aff2c
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 154069411a..e97493f65d 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -2,10 +2,6 @@
get_filename_component(_qt5_corelib_install_prefix ${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR} ABSOLUTE)
# Required by default:
-set(QT_QMAKE_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/qmake\")
-set(QT_MOC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/moc\")
-set(QT_RCC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/rcc\")
-
-set(Qt5Core_PLUGIN_TYPES codecs)
-
-set(Qt5_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs )
+set(QT_QMAKE_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/qmake$$CMAKE_BIN_SUFFIX\")
+set(QT_MOC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/moc$$CMAKE_BIN_SUFFIX\")
+set(QT_RCC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/rcc$$CMAKE_BIN_SUFFIX\")
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index b7f785b716..abfe49ec84 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -39,167 +39,166 @@
include(CMakeParseArguments)
# macro used to create the names of output files preserving relative dirs
-MACRO (QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
- STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
- STRING(LENGTH ${infile} _infileLength)
- SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
- IF(_infileLength GREATER _binlength)
- STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
- IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
- ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- ELSE(_infileLength GREATER _binlength)
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(_infileLength GREATER _binlength)
- IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
- STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
- ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:")
- SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
- STRING(REPLACE ".." "__" _outfile ${_outfile})
- GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
- GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
- FILE(MAKE_DIRECTORY ${outpath})
- SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
-ENDMACRO (QT5_MAKE_OUTPUT_FILE )
-
-
-MACRO (QT5_GET_MOC_FLAGS _moc_flags)
- SET(${_moc_flags})
- GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
- FOREACH(_current ${_inc_DIRS})
- IF("${_current}" MATCHES "\\.framework/?$")
- STRING(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
- SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
- ELSE("${_current}" MATCHES "\\.framework/?$")
- SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
- ENDIF("${_current}" MATCHES "\\.framework/?$")
- ENDFOREACH(_current ${_inc_DIRS})
-
- GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
- FOREACH(_current ${_defines})
- SET(${_moc_flags} ${${_moc_flags}} "-D${_current}")
- ENDFOREACH(_current ${_defines})
-
- IF(Q_WS_WIN)
- SET(${_moc_flags} ${${_moc_flags}} -DWIN32)
- ENDIF(Q_WS_WIN)
-
-ENDMACRO(QT5_GET_MOC_FLAGS)
+macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
+ string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
+ string(LENGTH ${infile} _infileLength)
+ set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
+ if(_infileLength GREATER _binlength)
+ string(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
+ if(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
+ else()
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ endif()
+ else()
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ endif()
+ if(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
+ string(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
+ endif()
+ set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
+ string(REPLACE ".." "__" _outfile ${_outfile})
+ get_filename_component(outpath ${_outfile} PATH)
+ get_filename_component(_outfile ${_outfile} NAME_WE)
+ file(MAKE_DIRECTORY ${outpath})
+ set(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
+endmacro()
+
+
+macro(QT5_GET_MOC_FLAGS _moc_flags)
+ set(${_moc_flags})
+ get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+
+ foreach(_current ${_inc_DIRS})
+ if("${_current}" MATCHES "\\.framework/?$")
+ string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
+ set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
+ else()
+ set(${_moc_flags} ${${_moc_flags}} "-I${_current}")
+ endif()
+ endforeach()
+
+ get_directory_property(_defines COMPILE_DEFINITIONS)
+ foreach(_current ${_defines})
+ set(${_moc_flags} ${${_moc_flags}} "-D${_current}")
+ endforeach()
+
+ if(Q_WS_WIN)
+ set(${_moc_flags} ${${_moc_flags}} -DWIN32)
+ endif()
+endmacro()
# helper macro to set up a moc rule
-MACRO (QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
- # For Windows, create a parameters file to work around command line length limit
- IF (WIN32)
- # Pass the parameters in a file. Set the working directory to
- # be that containing the parameters file and reference it by
- # just the file name. This is necessary because the moc tool on
- # MinGW builds does not seem to handle spaces in the path to the
- # file given with the @ syntax.
- GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME)
- GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH)
- IF(_moc_outfile_dir)
- SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
- ENDIF(_moc_outfile_dir)
- SET (_moc_parameters_file ${outfile}_parameters)
- SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
- STRING (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
- FILE (WRITE ${_moc_parameters_file} "${_moc_parameters}")
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
- DEPENDS ${infile}
- ${_moc_working_dir}
- VERBATIM)
- ELSE (WIN32)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_MOC_EXECUTABLE}
- ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
- DEPENDS ${infile} VERBATIM)
- ENDIF (WIN32)
-ENDMACRO (QT5_CREATE_MOC_COMMAND)
-
-
-MACRO (QT5_GENERATE_MOC infile outfile )
-# get include dirs and flags
- QT5_GET_MOC_FLAGS(moc_flags)
- GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
- SET(_outfile "${outfile}")
- IF(NOT IS_ABSOLUTE "${outfile}")
- SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
- ENDIF(NOT IS_ABSOLUTE "${outfile}")
- QT5_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "")
- SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
-ENDMACRO (QT5_GENERATE_MOC)
-
-
-# QT5_WRAP_CPP(outfiles inputfile ... )
-
-MACRO (QT5_WRAP_CPP outfiles )
- # get include dirs
- QT5_GET_MOC_FLAGS(moc_flags)
-
- set(options)
- set(oneValueArgs)
- set(multiValueArgs OPTIONS)
-
- cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
- set(moc_files ${_WRAP_CPP_UNPARSED_ARGUMENTS})
- set(moc_options ${_WRAP_CPP_OPTIONS})
- FOREACH (it ${moc_files})
- GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
- QT5_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile)
- QT5_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}")
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH(it)
-
-ENDMACRO (QT5_WRAP_CPP)
-
-
-# QT5_ADD_RESOURCES(outfiles inputfile ... )
-
-MACRO (QT5_ADD_RESOURCES outfiles )
-
- set(options)
- set(oneValueArgs)
- set(multiValueArgs OPTIONS)
-
- cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
- set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
- set(rcc_options ${_RCC_OPTIONS})
-
- FOREACH (it ${rcc_files})
- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
- GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
- # parse file for dependencies
- # all files are absolute paths or relative to the location of the qrc file
- FILE(READ "${infile}" _RC_FILE_CONTENTS)
- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
- SET(_RC_DEPENDS)
- FOREACH(_RC_FILE ${_RC_FILES})
- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
- IF(NOT IS_ABSOLUTE "${_RC_FILE}")
- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
- ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
- ENDFOREACH(_RC_FILE)
- # Since this cmake macro is doing the dependency scanning for these files,
- # let's make a configured file and add it as a dependency so cmake is run
- # again when dependencies need to be recomputed.
- QT5_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
- CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_RCC_EXECUTABLE}
- ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
- MAIN_DEPENDENCY ${infile}
- DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH (it)
-
-ENDMACRO (QT5_ADD_RESOURCES)
+macro(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
+ # For Windows, create a parameters file to work around command line length limit
+ if(WIN32)
+ # Pass the parameters in a file. Set the working directory to
+ # be that containing the parameters file and reference it by
+ # just the file name. This is necessary because the moc tool on
+ # MinGW builds does not seem to handle spaces in the path to the
+ # file given with the @ syntax.
+ get_filename_component(_moc_outfile_name "${outfile}" NAME)
+ get_filename_component(_moc_outfile_dir "${outfile}" PATH)
+ if(_moc_outfile_dir)
+ set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
+ endif()
+ set(_moc_parameters_file ${outfile}_parameters)
+ set(_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
+ string(REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
+ file(WRITE ${_moc_parameters_file} "${_moc_parameters}")
+ add_custom_command(OUTPUT ${outfile}
+ COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
+ DEPENDS ${infile}
+ ${_moc_working_dir}
+ VERBATIM)
+ else()
+ add_custom_command(OUTPUT ${outfile}
+ COMMAND ${QT_MOC_EXECUTABLE}
+ ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
+ DEPENDS ${infile} VERBATIM)
+ endif()
+endmacro()
+
+
+function(QT5_GENERATE_MOC infile outfile )
+ # get include dirs and flags
+ qt5_get_moc_flags(moc_flags)
+ get_filename_component(abs_infile ${infile} ABSOLUTE)
+ set(_outfile "${outfile}")
+ if(NOT IS_ABSOLUTE "${outfile}")
+ set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
+ endif()
+ qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "")
+ set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
+endfunction()
+
+
+# qt5_wrap_cpp(outfiles inputfile ... )
+
+function(QT5_WRAP_CPP outfiles )
+ # get include dirs
+ qt5_get_moc_flags(moc_flags)
+
+ set(options)
+ set(oneValueArgs)
+ set(multiValueArgs OPTIONS)
+
+ cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ set(moc_files ${_WRAP_CPP_UNPARSED_ARGUMENTS})
+ set(moc_options ${_WRAP_CPP_OPTIONS})
+ foreach(it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
+ qt5_make_output_file(${it} moc_ cxx outfile)
+ qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}")
+ list(APPEND ${outfiles} ${outfile})
+ endforeach()
+ set(${outfiles} ${${outfiles}} PARENT_SCOPE)
+endfunction()
+
+
+# qt5_add_resources(outfiles inputfile ... )
+
+function(QT5_ADD_RESOURCES outfiles )
+
+ set(options)
+ set(oneValueArgs)
+ set(multiValueArgs OPTIONS)
+
+ cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
+ set(rcc_options ${_RCC_OPTIONS})
+
+ foreach(it ${rcc_files})
+ get_filename_component(outfilename ${it} NAME_WE)
+ get_filename_component(infile ${it} ABSOLUTE)
+ get_filename_component(rc_path ${infile} PATH)
+ set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
+ # parse file for dependencies
+ # all files are absolute paths or relative to the location of the qrc file
+ file(READ "${infile}" _RC_FILE_CONTENTS)
+ string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+ set(_RC_DEPENDS)
+ foreach(_RC_FILE ${_RC_FILES})
+ string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+ if(NOT IS_ABSOLUTE "${_RC_FILE}")
+ set(_RC_FILE "${rc_path}/${_RC_FILE}")
+ endif()
+ set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+ endforeach()
+ # Since this cmake function is doing the dependency scanning for these files,
+ # let's make a configured file and add it as a dependency so cmake is run
+ # again when dependencies need to be recomputed.
+ qt5_make_output_file("${infile}" "" "qrc.depends" out_depends)
+ configure_file("${infile}" "${out_depends}" COPY_ONLY)
+ add_custom_command(OUTPUT ${outfile}
+ COMMAND ${QT_RCC_EXECUTABLE}
+ ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+ MAIN_DEPENDENCY ${infile}
+ DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
+ list(APPEND ${outfiles} ${outfile})
+ endforeach()
+ set(${outfiles} ${${outfiles}} PARENT_SCOPE)
+endfunction()
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index b529359f71..040715f54a 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -157,18 +157,69 @@
#ifndef QT_NO_ANIMATION
#define DEFAULT_TIMER_INTERVAL 16
-#define STARTSTOP_TIMER_DELAY 0
+#define PAUSE_TIMER_COARSE_THRESHOLD 2000
QT_BEGIN_NAMESPACE
+/*!
+ \class QAbstractAnimationTimer
+ \brief QAbstractAnimationTimer is the base class for animation timers.
+ \internal
+
+ Subclass QAbstractAnimationTimer to provide an animation timer that is run by
+ QUnifiedTimer and can in turn be used to run any number of animations.
+
+ Currently two subclasses have been implemented: QAnimationTimer to drive the Qt C++
+ animation framework (QAbstractAnimation and subclasses) and QDeclarativeAnimationTimer
+ to drive the Qt QML animation framework.
+*/
+
+/*!
+ \fn virtual void QAbstractAnimationTimer::updateAnimationsTime(qint64 delta) = 0;
+ \internal
+
+ This pure virtual function is called when the animation timer needs to update
+ the current time for all animations it is running.
+*/
+
+/*!
+ \fn virtual void QAbstractAnimationTimer::restartAnimationTimer() = 0;
+ \internal
+
+ This pure virtual function restarts the animation timer as needed.
+
+ Classes implementing this function may choose to pause or resume the timer
+ as appropriate, or conditionally restart it.
+*/
+
+/*!
+ \fn virtual int QAbstractAnimationTimer::runningAnimationCount() = 0;
+ \internal
+
+ This pure virtual function returns the number of animations the timer is running.
+ This information is useful for profiling.
+*/
+
+/*!
+ \class QUnifiedTimer
+ \brief QUnifiedTimer provides a unified timing mechanism for animations in Qt C++ and QML.
+ \internal
+
+ QUnifiedTimer allows animations run by Qt to share a single timer. This keeps animations
+ visually in sync, as well as being more efficient than running numerous timers.
+
+ QUnifiedTimer drives animations indirectly, via QAbstractAnimationTimer.
+*/
+
#ifndef QT_NO_THREAD
Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
#endif
QUnifiedTimer::QUnifiedTimer() :
QObject(), defaultDriver(this), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
- currentAnimationIdx(0), insideTick(false), consistentTiming(false), slowMode(false),
- slowdownFactor(5.0f), isPauseTimerActive(false), runningLeafAnimations(0), profilerCallback(0)
+ currentAnimationIdx(0), insideTick(false), insideRestart(false), consistentTiming(false), slowMode(false),
+ startTimersPending(false), stopTimerPending(false),
+ slowdownFactor(5.0f), profilerCallback(0)
{
time.invalidate();
driver = &defaultDriver;
@@ -183,7 +234,7 @@ QUnifiedTimer *QUnifiedTimer::instance(bool create)
inst = new QUnifiedTimer;
unifiedTimer()->setLocalData(inst);
} else {
- inst = unifiedTimer()->localData();
+ inst = unifiedTimer() ? unifiedTimer()->localData() : 0;
}
#else
static QUnifiedTimer unifiedTimer;
@@ -197,23 +248,16 @@ QUnifiedTimer *QUnifiedTimer::instance()
return instance(true);
}
-void QUnifiedTimer::ensureTimerUpdate()
-{
- QUnifiedTimer *inst = QUnifiedTimer::instance(false);
- if (inst && inst->isPauseTimerActive)
- inst->updateAnimationsTime(-1);
-}
-
-void QUnifiedTimer::updateAnimationsTime(qint64 timeStep)
+void QUnifiedTimer::updateAnimationTimers(qint64 currentTick)
{
//setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
if(insideTick)
return;
- qint64 totalElapsed = timeStep >= 0 ? timeStep : time.elapsed();
+ qint64 totalElapsed = currentTick >= 0 ? currentTick : time.elapsed();
// ignore consistentTiming in case the pause timer is active
- int delta = (consistentTiming && !isPauseTimerActive) ?
+ qint64 delta = (consistentTiming && !pauseTimer.isActive()) ?
timingInterval : totalElapsed - lastTick;
if (slowMode) {
if (slowdownFactor > 0)
@@ -229,177 +273,195 @@ void QUnifiedTimer::updateAnimationsTime(qint64 timeStep)
//when the CPU load is high
if (delta) {
insideTick = true;
- for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) {
- QAbstractAnimation *animation = animations.at(currentAnimationIdx);
- int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime
- + (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
- animation->setCurrentTime(elapsed);
-
- if (profilerCallback)
- profilerCallback(delta);
+ if (profilerCallback)
+ profilerCallback(delta);
+ for (currentAnimationIdx = 0; currentAnimationIdx < animationTimers.count(); ++currentAnimationIdx) {
+ QAbstractAnimationTimer *animation = animationTimers.at(currentAnimationIdx);
+ animation->updateAnimationsTime(delta);
}
insideTick = false;
currentAnimationIdx = 0;
}
}
-void QUnifiedTimer::registerProfilerCallback(void (*cb)(qint64))
+int QUnifiedTimer::runningAnimationCount()
{
- profilerCallback = cb;
+ int count = 0;
+ for (int i = 0; i < animationTimers.count(); ++i)
+ count += animationTimers.at(i)->runningAnimationCount();
+ return count;
}
-void QUnifiedTimer::updateAnimationTimer()
+void QUnifiedTimer::registerProfilerCallback(void (*cb)(qint64))
{
- QUnifiedTimer *inst = QUnifiedTimer::instance(false);
- if (inst)
- inst->restartAnimationTimer();
+ profilerCallback = cb;
}
-void QUnifiedTimer::restartAnimationTimer()
+void QUnifiedTimer::localRestart()
{
- if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty()) {
- int closestTimeToFinish = closestPauseAnimationTimeToFinish();
- if (closestTimeToFinish < 0) {
- qDebug() << runningPauseAnimations;
- qDebug() << closestPauseAnimationTimeToFinish();
- }
+ if (insideRestart)
+ return;
+
+ if (!pausedAnimationTimers.isEmpty() && (animationTimers.count() + animationTimersToStart.count() == pausedAnimationTimers.count())) {
driver->stop();
- animationTimer.start(closestTimeToFinish, this);
- isPauseTimerActive = true;
- } else if (!driver->isRunning() || isPauseTimerActive) {
+ int closestTimeToFinish = closestPausedAnimationTimerTimeToFinish();
+ // use a precise timer if the pause will be short
+ Qt::TimerType timerType = closestTimeToFinish < PAUSE_TIMER_COARSE_THRESHOLD ? Qt::PreciseTimer : Qt::CoarseTimer;
+ pauseTimer.start(closestTimeToFinish, timerType, this);
+ } else if (!driver->isRunning()) {
+ if (pauseTimer.isActive())
+ pauseTimer.stop();
driver->start();
- isPauseTimerActive = false;
- } else if (runningLeafAnimations == 0)
- driver->stop();
+ }
+
+}
+
+void QUnifiedTimer::restart()
+{
+ insideRestart = true;
+ for (int i = 0; i < animationTimers.count(); ++i)
+ animationTimers.at(i)->restartAnimationTimer();
+ insideRestart = false;
+
+ localRestart();
}
void QUnifiedTimer::setTimingInterval(int interval)
{
timingInterval = interval;
- if (driver->isRunning() && !isPauseTimerActive) {
+ if (driver->isRunning() && !pauseTimer.isActive()) {
//we changed the timing interval
driver->stop();
driver->start();
}
}
+void QUnifiedTimer::startTimers()
+{
+ startTimersPending = false;
+ if (!animationTimers.isEmpty())
+ updateAnimationTimers(-1);
+
+ //we transfer the waiting animations into the "really running" state
+ animationTimers += animationTimersToStart;
+ animationTimersToStart.clear();
+ if (!animationTimers.isEmpty()) {
+ localRestart();
+ if (!time.isValid()) {
+ lastTick = 0;
+ time.start();
+ }
+ }
+}
+
+void QUnifiedTimer::stopTimer()
+{
+ stopTimerPending = false;
+ if (animationTimers.isEmpty()) {
+ driver->stop();
+ pauseTimer.stop();
+ // invalidate the start reference time
+ time.invalidate();
+ }
+}
void QUnifiedTimer::timerEvent(QTimerEvent *event)
{
- //in the case of consistent timing we make sure the orders in which events come is always the same
- //for that purpose we do as if the startstoptimer would always fire before the animation timer
- if ((consistentTiming && startStopAnimationTimer.isActive()) ||
- event->timerId() == startStopAnimationTimer.timerId()) {
- startStopAnimationTimer.stop();
-
- //we transfer the waiting animations into the "really running" state
- animations += animationsToStart;
- animationsToStart.clear();
- if (animations.isEmpty()) {
- animationTimer.stop();
- isPauseTimerActive = false;
- // invalidate the start reference time
- time.invalidate();
- } else {
- restartAnimationTimer();
- if (!time.isValid()) {
- lastTick = 0;
- time.start();
- }
- }
+ //in the case of consistent timing we make sure the order in which events come is always the same
+ //for that purpose we do as if the startstoptimer would always fire before the animation timer
+ if (consistentTiming) {
+ if (stopTimerPending)
+ stopTimer();
+ if (startTimersPending)
+ startTimers();
}
- if (event->timerId() == animationTimer.timerId()) {
- // update current time on all top level animations
- updateAnimationsTime(-1);
- restartAnimationTimer();
+ if (event->timerId() == pauseTimer.timerId()) {
+ // update current time on all timers
+ updateAnimationTimers(-1);
+ restart();
}
}
-void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation, bool isTopLevel)
+void QUnifiedTimer::startAnimationTimer(QAbstractAnimationTimer *timer)
{
+ if (timer->isRegistered)
+ return;
+ timer->isRegistered = true;
+
QUnifiedTimer *inst = instance(true); //we create the instance if needed
- inst->registerRunningAnimation(animation);
- if (isTopLevel) {
- Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer);
- QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true;
- inst->animationsToStart << animation;
- if (!inst->startStopAnimationTimer.isActive())
- inst->startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, inst);
+ inst->animationTimersToStart << timer;
+ if (!inst->startTimersPending) {
+ inst->startTimersPending = true;
+ QMetaObject::invokeMethod(inst, "startTimers", Qt::QueuedConnection);
}
}
-void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation)
+void QUnifiedTimer::stopAnimationTimer(QAbstractAnimationTimer *timer)
{
QUnifiedTimer *inst = QUnifiedTimer::instance(false);
if (inst) {
//at this point the unified timer should have been created
//but it might also have been already destroyed in case the application is shutting down
- inst->unregisterRunningAnimation(animation);
-
- if (!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer)
+ if (!timer->isRegistered)
return;
+ timer->isRegistered = false;
- int idx = inst->animations.indexOf(animation);
+ int idx = inst->animationTimers.indexOf(timer);
if (idx != -1) {
- inst->animations.removeAt(idx);
+ inst->animationTimers.removeAt(idx);
// this is needed if we unregister an animation while its running
if (idx <= inst->currentAnimationIdx)
--inst->currentAnimationIdx;
- if (inst->animations.isEmpty() && !inst->startStopAnimationTimer.isActive())
- inst->startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, inst);
+ if (inst->animationTimers.isEmpty() && !inst->stopTimerPending) {
+ inst->stopTimerPending = true;
+ QMetaObject::invokeMethod(inst, "stopTimer", Qt::QueuedConnection);
+ }
} else {
- inst->animationsToStart.removeOne(animation);
+ inst->animationTimersToStart.removeOne(timer);
}
}
- QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = false;
}
-void QUnifiedTimer::registerRunningAnimation(QAbstractAnimation *animation)
+void QUnifiedTimer::pauseAnimationTimer(QAbstractAnimationTimer *timer, int duration)
{
- if (QAbstractAnimationPrivate::get(animation)->isGroup)
- return;
-
- if (QAbstractAnimationPrivate::get(animation)->isPause) {
- runningPauseAnimations << animation;
- } else
- runningLeafAnimations++;
+ QUnifiedTimer *inst = QUnifiedTimer::instance();
+ if (!timer->isRegistered)
+ inst->startAnimationTimer(timer);
+
+ bool timerWasPaused = timer->isPaused;
+ timer->isPaused = true;
+ timer->pauseDuration = duration;
+ if (!timerWasPaused)
+ inst->pausedAnimationTimers << timer;
+ inst->localRestart();
}
-void QUnifiedTimer::unregisterRunningAnimation(QAbstractAnimation *animation)
+void QUnifiedTimer::resumeAnimationTimer(QAbstractAnimationTimer *timer)
{
- if (QAbstractAnimationPrivate::get(animation)->isGroup)
+ if (!timer->isPaused)
return;
- if (QAbstractAnimationPrivate::get(animation)->isPause)
- runningPauseAnimations.removeOne(animation);
- else
- runningLeafAnimations--;
- Q_ASSERT(runningLeafAnimations >= 0);
+ timer->isPaused = false;
+ QUnifiedTimer *inst = QUnifiedTimer::instance();
+ inst->pausedAnimationTimers.removeOne(timer);
+ inst->localRestart();
}
-int QUnifiedTimer::closestPauseAnimationTimeToFinish()
+int QUnifiedTimer::closestPausedAnimationTimerTimeToFinish()
{
int closestTimeToFinish = INT_MAX;
- for (int i = 0; i < runningPauseAnimations.size(); ++i) {
- QAbstractAnimation *animation = runningPauseAnimations.at(i);
- int timeToFinish;
-
- if (animation->direction() == QAbstractAnimation::Forward)
- timeToFinish = animation->duration() - animation->currentLoopTime();
- else
- timeToFinish = animation->currentLoopTime();
-
+ for (int i = 0; i < pausedAnimationTimers.size(); ++i) {
+ int timeToFinish = pausedAnimationTimers.at(i)->pauseDuration;
if (timeToFinish < closestTimeToFinish)
closestTimeToFinish = timeToFinish;
}
return closestTimeToFinish;
}
-
void QUnifiedTimer::installAnimationDriver(QAnimationDriver *d)
{
if (driver != &defaultDriver) {
@@ -416,7 +478,6 @@ void QUnifiedTimer::installAnimationDriver(QAnimationDriver *d)
}
-
void QUnifiedTimer::uninstallAnimationDriver(QAnimationDriver *d)
{
if (driver != d) {
@@ -441,6 +502,199 @@ bool QUnifiedTimer::canUninstallAnimationDriver(QAnimationDriver *d)
return d == driver && driver != &defaultDriver;
}
+#ifndef QT_NO_THREAD
+Q_GLOBAL_STATIC(QThreadStorage<QAnimationTimer *>, animationTimer)
+#endif
+
+QAnimationTimer::QAnimationTimer() :
+ QAbstractAnimationTimer(), lastTick(0),
+ currentAnimationIdx(0), insideTick(false),
+ startAnimationPending(false), stopTimerPending(false),
+ runningLeafAnimations(0)
+{
+}
+
+QAnimationTimer *QAnimationTimer::instance(bool create)
+{
+ QAnimationTimer *inst;
+#ifndef QT_NO_THREAD
+ if (create && !animationTimer()->hasLocalData()) {
+ inst = new QAnimationTimer;
+ animationTimer()->setLocalData(inst);
+ } else {
+ inst = animationTimer() ? animationTimer()->localData() : 0;
+ }
+#else
+ static QAnimationTimer animationTimer;
+ inst = &animationTimer;
+#endif
+ return inst;
+}
+
+QAnimationTimer *QAnimationTimer::instance()
+{
+ return instance(true);
+}
+
+void QAnimationTimer::ensureTimerUpdate()
+{
+ QAnimationTimer *inst = QAnimationTimer::instance(false);
+ QUnifiedTimer *instU = QUnifiedTimer::instance(false);
+ if (instU && inst && inst->isPaused)
+ instU->updateAnimationTimers(-1);
+}
+
+void QAnimationTimer::updateAnimationsTime(qint64 delta)
+{
+ //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
+ if (insideTick)
+ return;
+
+ lastTick += delta;
+
+ //we make sure we only call update time if the time has actually changed
+ //it might happen in some cases that the time doesn't change because events are delayed
+ //when the CPU load is high
+ if (delta) {
+ insideTick = true;
+ for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) {
+ QAbstractAnimation *animation = animations.at(currentAnimationIdx);
+ int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime
+ + (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
+ animation->setCurrentTime(elapsed);
+ }
+ insideTick = false;
+ currentAnimationIdx = 0;
+ }
+}
+
+void QAnimationTimer::updateAnimationTimer()
+{
+ QAnimationTimer *inst = QAnimationTimer::instance(false);
+ if (inst)
+ inst->restartAnimationTimer();
+}
+
+void QAnimationTimer::restartAnimationTimer()
+{
+ if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty())
+ QUnifiedTimer::pauseAnimationTimer(this, closestPauseAnimationTimeToFinish());
+ else if (isPaused)
+ QUnifiedTimer::resumeAnimationTimer(this);
+ else if (!isRegistered)
+ QUnifiedTimer::startAnimationTimer(this);
+}
+
+void QAnimationTimer::startAnimations()
+{
+ startAnimationPending = false;
+ //force timer to update, which prevents large deltas for our newly added animations
+ if (!animations.isEmpty())
+ QUnifiedTimer::instance()->updateAnimationTimers(-1);
+
+ //we transfer the waiting animations into the "really running" state
+ animations += animationsToStart;
+ animationsToStart.clear();
+ if (!animations.isEmpty())
+ restartAnimationTimer();
+}
+
+void QAnimationTimer::stopTimer()
+{
+ stopTimerPending = false;
+ if (animations.isEmpty()) {
+ QUnifiedTimer::resumeAnimationTimer(this);
+ QUnifiedTimer::stopAnimationTimer(this);
+ // invalidate the start reference time
+ lastTick = 0;
+ }
+}
+
+void QAnimationTimer::registerAnimation(QAbstractAnimation *animation, bool isTopLevel)
+{
+ QAnimationTimer *inst = instance(true); //we create the instance if needed
+ inst->registerRunningAnimation(animation);
+ if (isTopLevel) {
+ Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer);
+ QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true;
+ inst->animationsToStart << animation;
+ if (!inst->startAnimationPending) {
+ inst->startAnimationPending = true;
+ QMetaObject::invokeMethod(inst, "startAnimations", Qt::QueuedConnection);
+ }
+ }
+}
+
+void QAnimationTimer::unregisterAnimation(QAbstractAnimation *animation)
+{
+ QAnimationTimer *inst = QAnimationTimer::instance(false);
+ if (inst) {
+ //at this point the unified timer should have been created
+ //but it might also have been already destroyed in case the application is shutting down
+
+ inst->unregisterRunningAnimation(animation);
+
+ if (!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer)
+ return;
+
+ int idx = inst->animations.indexOf(animation);
+ if (idx != -1) {
+ inst->animations.removeAt(idx);
+ // this is needed if we unregister an animation while its running
+ if (idx <= inst->currentAnimationIdx)
+ --inst->currentAnimationIdx;
+
+ if (inst->animations.isEmpty() && !inst->stopTimerPending) {
+ inst->stopTimerPending = true;
+ QMetaObject::invokeMethod(inst, "stopTimer", Qt::QueuedConnection);
+ }
+ } else {
+ inst->animationsToStart.removeOne(animation);
+ }
+ }
+ QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = false;
+}
+
+void QAnimationTimer::registerRunningAnimation(QAbstractAnimation *animation)
+{
+ if (QAbstractAnimationPrivate::get(animation)->isGroup)
+ return;
+
+ if (QAbstractAnimationPrivate::get(animation)->isPause) {
+ runningPauseAnimations << animation;
+ } else
+ runningLeafAnimations++;
+}
+
+void QAnimationTimer::unregisterRunningAnimation(QAbstractAnimation *animation)
+{
+ if (QAbstractAnimationPrivate::get(animation)->isGroup)
+ return;
+
+ if (QAbstractAnimationPrivate::get(animation)->isPause)
+ runningPauseAnimations.removeOne(animation);
+ else
+ runningLeafAnimations--;
+ Q_ASSERT(runningLeafAnimations >= 0);
+}
+
+int QAnimationTimer::closestPauseAnimationTimeToFinish()
+{
+ int closestTimeToFinish = INT_MAX;
+ for (int i = 0; i < runningPauseAnimations.size(); ++i) {
+ QAbstractAnimation *animation = runningPauseAnimations.at(i);
+ int timeToFinish;
+
+ if (animation->direction() == QAbstractAnimation::Forward)
+ timeToFinish = animation->duration() - animation->currentLoopTime();
+ else
+ timeToFinish = animation->currentLoopTime();
+
+ if (timeToFinish < closestTimeToFinish)
+ closestTimeToFinish = timeToFinish;
+ }
+ return closestTimeToFinish;
+}
/*!
\class QAnimationDriver
@@ -486,8 +740,8 @@ void QAnimationDriver::advanceAnimation(qint64 timeStep)
QUnifiedTimer *instance = QUnifiedTimer::instance();
// update current time on all top level animations
- instance->updateAnimationsTime(timeStep);
- instance->restartAnimationTimer();
+ instance->updateAnimationTimers(timeStep);
+ instance->restart();
}
@@ -601,7 +855,8 @@ void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
void QDefaultAnimationDriver::startTimer()
{
- m_timer.start(m_unified_timer->timingInterval, this);
+ // always use a precise timer to drive animations
+ m_timer.start(m_unified_timer->timingInterval, Qt::PreciseTimer, this);
}
void QDefaultAnimationDriver::stopTimer()
@@ -643,11 +898,11 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
bool isTopLevel = !group || group->state() == QAbstractAnimation::Stopped;
if (oldState == QAbstractAnimation::Running) {
if (newState == QAbstractAnimation::Paused && hasRegisteredTimer)
- QUnifiedTimer::ensureTimerUpdate();
+ QAnimationTimer::ensureTimerUpdate();
//the animation, is not running any more
- QUnifiedTimer::unregisterAnimation(q);
+ QAnimationTimer::unregisterAnimation(q);
} else if (newState == QAbstractAnimation::Running) {
- QUnifiedTimer::registerAnimation(q, isTopLevel);
+ QAnimationTimer::registerAnimation(q, isTopLevel);
}
q->updateState(newState, oldState);
@@ -669,7 +924,7 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
if (oldState == QAbstractAnimation::Stopped) {
if (isTopLevel) {
// currentTime needs to be updated if pauseTimer is active
- QUnifiedTimer::ensureTimerUpdate();
+ QAnimationTimer::ensureTimerUpdate();
q->setCurrentTime(totalCurrentTime);
}
}
@@ -728,7 +983,7 @@ QAbstractAnimation::~QAbstractAnimation()
d->state = Stopped;
emit stateChanged(oldState, d->state);
if (oldState == QAbstractAnimation::Running)
- QUnifiedTimer::unregisterAnimation(this);
+ QAnimationTimer::unregisterAnimation(this);
}
}
@@ -827,14 +1082,14 @@ void QAbstractAnimation::setDirection(Direction direction)
// the commands order below is important: first we need to setCurrentTime with the old direction,
// then update the direction on this and all children and finally restart the pauseTimer if needed
if (d->hasRegisteredTimer)
- QUnifiedTimer::ensureTimerUpdate();
+ QAnimationTimer::ensureTimerUpdate();
d->direction = direction;
updateDirection(direction);
if (d->hasRegisteredTimer)
// needed to update the timer interval in case of a pause animation
- QUnifiedTimer::updateAnimationTimer();
+ QAnimationTimer::updateAnimationTimer();
emit directionChanged(direction);
}
diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h
index 456c017bba..4c20d25a53 100644
--- a/src/corelib/animation/qabstractanimation.h
+++ b/src/corelib/animation/qabstractanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 7e7571bc58..2b2d5b8872 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -140,20 +140,36 @@ public:
bool running;
};
-typedef QElapsedTimer ElapsedTimer;
+class Q_CORE_EXPORT QAbstractAnimationTimer : public QObject
+{
+ Q_OBJECT
+public:
+ QAbstractAnimationTimer() : isRegistered(false), isPaused(false), pauseDuration(0) {}
+
+ virtual void updateAnimationsTime(qint64 delta) = 0;
+ virtual void restartAnimationTimer() = 0;
+ virtual int runningAnimationCount() = 0;
+
+ bool isRegistered;
+ bool isPaused;
+ int pauseDuration;
+};
class Q_CORE_EXPORT QUnifiedTimer : public QObject
{
+ Q_OBJECT
private:
QUnifiedTimer();
public:
- //XXX this is needed by dui
static QUnifiedTimer *instance();
static QUnifiedTimer *instance(bool create);
- static void registerAnimation(QAbstractAnimation *animation, bool isTopLevel);
- static void unregisterAnimation(QAbstractAnimation *animation);
+ static void startAnimationTimer(QAbstractAnimationTimer *timer);
+ static void stopAnimationTimer(QAbstractAnimationTimer *timer);
+
+ static void pauseAnimationTimer(QAbstractAnimationTimer *timer, int duration);
+ static void resumeAnimationTimer(QAbstractAnimationTimer *timer);
//defines the timing interval. Default is DEFAULT_TIMER_INTERVAL
void setTimingInterval(int interval);
@@ -168,32 +184,24 @@ public:
void setSlowModeEnabled(bool enabled) { slowMode = enabled; }
void setSlowdownFactor(qreal factor) { slowdownFactor = factor; }
- /*
- this is used for updating the currentTime of all animations in case the pause
- timer is active or, otherwise, only of the animation passed as parameter.
- */
- static void ensureTimerUpdate();
-
- /*
- this will evaluate the need of restarting the pause timer in case there is still
- some pause animations running.
- */
- static void updateAnimationTimer();
-
void installAnimationDriver(QAnimationDriver *driver);
void uninstallAnimationDriver(QAnimationDriver *driver);
bool canUninstallAnimationDriver(QAnimationDriver *driver);
- void restartAnimationTimer();
- void updateAnimationsTime(qint64 timeStep);
+ void restart();
+ void updateAnimationTimers(qint64 currentTick);
//useful for profiling/debugging
- int runningAnimationCount() { return animations.count(); }
+ int runningAnimationCount();
void registerProfilerCallback(void (*cb)(qint64));
protected:
void timerEvent(QTimerEvent *);
+private Q_SLOTS:
+ void startTimers();
+ void stopTimer();
+
private:
friend class QDefaultAnimationDriver;
friend class QAnimationDriver;
@@ -201,26 +209,75 @@ private:
QAnimationDriver *driver;
QDefaultAnimationDriver defaultDriver;
- QBasicTimer animationTimer;
- // timer used to delay the check if we should start/stop the animation timer
- QBasicTimer startStopAnimationTimer;
+ QBasicTimer pauseTimer;
- ElapsedTimer time;
+ QElapsedTimer time;
qint64 lastTick;
int timingInterval;
int currentAnimationIdx;
bool insideTick;
+ bool insideRestart;
bool consistentTiming;
bool slowMode;
+ bool startTimersPending;
+ bool stopTimerPending;
// This factor will be used to divide the DEFAULT_TIMER_INTERVAL at each tick
// when slowMode is enabled. Setting it to 0 or higher than DEFAULT_TIMER_INTERVAL (16)
// stops all animations.
qreal slowdownFactor;
- // bool to indicate that only pause animations are active
- bool isPauseTimerActive;
+ QList<QAbstractAnimationTimer*> animationTimers, animationTimersToStart;
+ QList<QAbstractAnimationTimer*> pausedAnimationTimers;
+
+ void localRestart();
+ int closestPausedAnimationTimerTimeToFinish();
+
+ void (*profilerCallback)(qint64);
+};
+
+class QAnimationTimer : public QAbstractAnimationTimer
+{
+ Q_OBJECT
+private:
+ QAnimationTimer();
+
+public:
+ static QAnimationTimer *instance();
+ static QAnimationTimer *instance(bool create);
+
+ static void registerAnimation(QAbstractAnimation *animation, bool isTopLevel);
+ static void unregisterAnimation(QAbstractAnimation *animation);
+
+ /*
+ this is used for updating the currentTime of all animations in case the pause
+ timer is active or, otherwise, only of the animation passed as parameter.
+ */
+ static void ensureTimerUpdate();
+
+ /*
+ this will evaluate the need of restarting the pause timer in case there is still
+ some pause animations running.
+ */
+ static void updateAnimationTimer();
+
+ void restartAnimationTimer();
+ void updateAnimationsTime(qint64 delta);
+
+ //useful for profiling/debugging
+ int runningAnimationCount() { return animations.count(); }
+
+private Q_SLOTS:
+ void startAnimations();
+ void stopTimer();
+
+private:
+ qint64 lastTick;
+ int currentAnimationIdx;
+ bool insideTick;
+ bool startAnimationPending;
+ bool stopTimerPending;
QList<QAbstractAnimation*> animations, animationsToStart;
@@ -232,8 +289,6 @@ private:
void unregisterRunningAnimation(QAbstractAnimation *animation);
int closestPauseAnimationTimeToFinish();
-
- void (*profilerCallback)(qint64);
};
QT_END_NAMESPACE
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp
index 0d2eac2ebb..5993eda307 100644
--- a/src/corelib/animation/qanimationgroup.cpp
+++ b/src/corelib/animation/qanimationgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qanimationgroup.h b/src/corelib/animation/qanimationgroup.h
index 7569671374..69a2686b69 100644
--- a/src/corelib/animation/qanimationgroup.h
+++ b/src/corelib/animation/qanimationgroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qanimationgroup_p.h b/src/corelib/animation/qanimationgroup_p.h
index d2e2498a87..8415610bdc 100644
--- a/src/corelib/animation/qanimationgroup_p.h
+++ b/src/corelib/animation/qanimationgroup_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index 6e942e0257..6e21efbc7f 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qparallelanimationgroup.h b/src/corelib/animation/qparallelanimationgroup.h
index 74eb36f4cd..b03163cfbb 100644
--- a/src/corelib/animation/qparallelanimationgroup.h
+++ b/src/corelib/animation/qparallelanimationgroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qparallelanimationgroup_p.h b/src/corelib/animation/qparallelanimationgroup_p.h
index cb8b3ae190..73fed5541c 100644
--- a/src/corelib/animation/qparallelanimationgroup_p.h
+++ b/src/corelib/animation/qparallelanimationgroup_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index 0f1e07e1f1..fe5bafa3bd 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qpauseanimation.h b/src/corelib/animation/qpauseanimation.h
index 827f1694ad..7f8a2ddf26 100644
--- a/src/corelib/animation/qpauseanimation.h
+++ b/src/corelib/animation/qpauseanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 481b79d196..d34242739e 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qpropertyanimation.h b/src/corelib/animation/qpropertyanimation.h
index 28fc837f33..f41b96ce64 100644
--- a/src/corelib/animation/qpropertyanimation.h
+++ b/src/corelib/animation/qpropertyanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h
index c8c69720e9..83f7c3f0fa 100644
--- a/src/corelib/animation/qpropertyanimation_p.h
+++ b/src/corelib/animation/qpropertyanimation_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 8b32d6b76d..a991a38823 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qsequentialanimationgroup.h b/src/corelib/animation/qsequentialanimationgroup.h
index 40201a9a32..07b2e3b8fc 100644
--- a/src/corelib/animation/qsequentialanimationgroup.h
+++ b/src/corelib/animation/qsequentialanimationgroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qsequentialanimationgroup_p.h b/src/corelib/animation/qsequentialanimationgroup_p.h
index 33af063bc9..87cdc044b2 100644
--- a/src/corelib/animation/qsequentialanimationgroup_p.h
+++ b/src/corelib/animation/qsequentialanimationgroup_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index 7dfb4bddc1..8984abbe03 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index 3c92219b2a..4176b4f428 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h
index a8868d13ce..940cdbfe39 100644
--- a/src/corelib/animation/qvariantanimation_p.h
+++ b/src/corelib/animation/qvariantanimation_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/alpha/qatomic_alpha.s b/src/corelib/arch/alpha/qatomic_alpha.s
index 31f3925499..7dd09d4480 100644
--- a/src/corelib/arch/alpha/qatomic_alpha.s
+++ b/src/corelib/arch/alpha/qatomic_alpha.s
@@ -1,6 +1,6 @@
;/****************************************************************************
;**
-;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
;** All rights reserved.
;** Contact: Nokia Corporation (qt-info@nokia.com)
;**
diff --git a/src/corelib/arch/arm/qatomic_arm.cpp b/src/corelib/arch/arm/qatomic_arm.cpp
index 30612cef11..0eaeb5a15b 100644
--- a/src/corelib/arch/arm/qatomic_arm.cpp
+++ b/src/corelib/arch/arm/qatomic_arm.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/generic/qatomic_generic_unix.cpp b/src/corelib/arch/generic/qatomic_generic_unix.cpp
index e474a65642..78292e7e49 100644
--- a/src/corelib/arch/generic/qatomic_generic_unix.cpp
+++ b/src/corelib/arch/generic/qatomic_generic_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/generic/qatomic_generic_windows.cpp b/src/corelib/arch/generic/qatomic_generic_windows.cpp
index 7ce0eea076..94129cb106 100644
--- a/src/corelib/arch/generic/qatomic_generic_windows.cpp
+++ b/src/corelib/arch/generic/qatomic_generic_windows.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/ia64/qatomic_ia64.s b/src/corelib/arch/ia64/qatomic_ia64.s
index 26db10d994..f6b100c170 100644
--- a/src/corelib/arch/ia64/qatomic_ia64.s
+++ b/src/corelib/arch/ia64/qatomic_ia64.s
@@ -1,6 +1,6 @@
;/****************************************************************************
;**
-;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
;** All rights reserved.
;** Contact: Nokia Corporation (qt-info@nokia.com)
;**
diff --git a/src/corelib/arch/macosx/qatomic32_ppc.s b/src/corelib/arch/macosx/qatomic32_ppc.s
index edb80473e1..97d68cba70 100644
--- a/src/corelib/arch/macosx/qatomic32_ppc.s
+++ b/src/corelib/arch/macosx/qatomic32_ppc.s
@@ -1,6 +1,6 @@
;/****************************************************************************
;**
-;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
;** All rights reserved.
;** Contact: Nokia Corporation (qt-info@nokia.com)
;**
diff --git a/src/corelib/arch/mips/qatomic_mips32.s b/src/corelib/arch/mips/qatomic_mips32.s
index cd1585ecbc..b4013dfff5 100644
--- a/src/corelib/arch/mips/qatomic_mips32.s
+++ b/src/corelib/arch/mips/qatomic_mips32.s
@@ -1,6 +1,6 @@
;/****************************************************************************
;**
-;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
;** All rights reserved.
;** Contact: Nokia Corporation (qt-info@nokia.com)
;**
diff --git a/src/corelib/arch/mips/qatomic_mips64.s b/src/corelib/arch/mips/qatomic_mips64.s
index 60c9a83881..a66b785e30 100644
--- a/src/corelib/arch/mips/qatomic_mips64.s
+++ b/src/corelib/arch/mips/qatomic_mips64.s
@@ -1,6 +1,6 @@
;/****************************************************************************
;**
-;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
;** All rights reserved.
;** Contact: Nokia Corporation (qt-info@nokia.com)
;**
diff --git a/src/corelib/arch/parisc/q_ldcw.s b/src/corelib/arch/parisc/q_ldcw.s
index 86d50c79a5..0c1db6f394 100644
--- a/src/corelib/arch/parisc/q_ldcw.s
+++ b/src/corelib/arch/parisc/q_ldcw.s
@@ -1,6 +1,6 @@
;/****************************************************************************
;**
-;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
;** All rights reserved.
;** Contact: Nokia Corporation (qt-info@nokia.com)
;**
diff --git a/src/corelib/arch/parisc/qatomic_parisc.cpp b/src/corelib/arch/parisc/qatomic_parisc.cpp
index aa2189162c..da8d480a4f 100644
--- a/src/corelib/arch/parisc/qatomic_parisc.cpp
+++ b/src/corelib/arch/parisc/qatomic_parisc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/powerpc/qatomic32.s b/src/corelib/arch/powerpc/qatomic32.s
index 794a397b77..dfc0605cff 100644
--- a/src/corelib/arch/powerpc/qatomic32.s
+++ b/src/corelib/arch/powerpc/qatomic32.s
@@ -1,6 +1,6 @@
############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/src/corelib/arch/powerpc/qatomic64.s b/src/corelib/arch/powerpc/qatomic64.s
index 4a10b25012..9e81eb0bc0 100644
--- a/src/corelib/arch/powerpc/qatomic64.s
+++ b/src/corelib/arch/powerpc/qatomic64.s
@@ -1,6 +1,6 @@
############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/src/corelib/arch/qatomic_alpha.h b/src/corelib/arch/qatomic_alpha.h
index a99a84b32a..b44b9f23f5 100644
--- a/src/corelib/arch/qatomic_alpha.h
+++ b/src/corelib/arch/qatomic_alpha.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h
index 905ccd7d99..66e12cc95b 100644
--- a/src/corelib/arch/qatomic_arch.h
+++ b/src/corelib/arch/qatomic_arch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_arm.h b/src/corelib/arch/qatomic_arm.h
index 0f27009066..b5856102b2 100644
--- a/src/corelib/arch/qatomic_arm.h
+++ b/src/corelib/arch/qatomic_arm.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_armv5.h b/src/corelib/arch/qatomic_armv5.h
index 2a18042a26..d602e83e64 100644
--- a/src/corelib/arch/qatomic_armv5.h
+++ b/src/corelib/arch/qatomic_armv5.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h
index dd465db18b..260f48d563 100644
--- a/src/corelib/arch/qatomic_armv6.h
+++ b/src/corelib/arch/qatomic_armv6.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_armv7.h b/src/corelib/arch/qatomic_armv7.h
index 3554cd4301..814eefb376 100644
--- a/src/corelib/arch/qatomic_armv7.h
+++ b/src/corelib/arch/qatomic_armv7.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_avr32.h b/src/corelib/arch/qatomic_avr32.h
index 78d5fc7dd3..749cc0fd36 100644
--- a/src/corelib/arch/qatomic_avr32.h
+++ b/src/corelib/arch/qatomic_avr32.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_bfin.h b/src/corelib/arch/qatomic_bfin.h
index 21026ee440..4784b634fc 100644
--- a/src/corelib/arch/qatomic_bfin.h
+++ b/src/corelib/arch/qatomic_bfin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_bootstrap.h b/src/corelib/arch/qatomic_bootstrap.h
index 74dc6cfbb2..86376062a2 100644
--- a/src/corelib/arch/qatomic_bootstrap.h
+++ b/src/corelib/arch/qatomic_bootstrap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_generic.h b/src/corelib/arch/qatomic_generic.h
index 2565451a41..0abc29cdb0 100644
--- a/src/corelib/arch/qatomic_generic.h
+++ b/src/corelib/arch/qatomic_generic.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_i386.h b/src/corelib/arch/qatomic_i386.h
index 86230054b9..53a81864bf 100644
--- a/src/corelib/arch/qatomic_i386.h
+++ b/src/corelib/arch/qatomic_i386.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h
index e3cab66dc6..0782ab3f36 100644
--- a/src/corelib/arch/qatomic_ia64.h
+++ b/src/corelib/arch/qatomic_ia64.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_integrity.h b/src/corelib/arch/qatomic_integrity.h
index f957297769..e83124bf4e 100644
--- a/src/corelib/arch/qatomic_integrity.h
+++ b/src/corelib/arch/qatomic_integrity.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_macosx.h b/src/corelib/arch/qatomic_macosx.h
index e26cf65ecd..a973fe1b57 100644
--- a/src/corelib/arch/qatomic_macosx.h
+++ b/src/corelib/arch/qatomic_macosx.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index 8b025adfd5..97cef3c457 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_parisc.h b/src/corelib/arch/qatomic_parisc.h
index 8fbbb2e709..200ca14aee 100644
--- a/src/corelib/arch/qatomic_parisc.h
+++ b/src/corelib/arch/qatomic_parisc.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_powerpc.h b/src/corelib/arch/qatomic_powerpc.h
index c0f957b8ac..bb9afe38d7 100644
--- a/src/corelib/arch/qatomic_powerpc.h
+++ b/src/corelib/arch/qatomic_powerpc.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_s390.h b/src/corelib/arch/qatomic_s390.h
index 079dd2db16..e167c7c6e3 100644
--- a/src/corelib/arch/qatomic_s390.h
+++ b/src/corelib/arch/qatomic_s390.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_sh.h b/src/corelib/arch/qatomic_sh.h
index a764a31c71..ca50eb1bf0 100644
--- a/src/corelib/arch/qatomic_sh.h
+++ b/src/corelib/arch/qatomic_sh.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_sh4a.h b/src/corelib/arch/qatomic_sh4a.h
index 3ca1917863..14238a6f10 100644
--- a/src/corelib/arch/qatomic_sh4a.h
+++ b/src/corelib/arch/qatomic_sh4a.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_sparc.h b/src/corelib/arch/qatomic_sparc.h
index ab4386a675..feb172e68d 100644
--- a/src/corelib/arch/qatomic_sparc.h
+++ b/src/corelib/arch/qatomic_sparc.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_symbian.h b/src/corelib/arch/qatomic_symbian.h
index 0162ebccfd..6cb91f0788 100644
--- a/src/corelib/arch/qatomic_symbian.h
+++ b/src/corelib/arch/qatomic_symbian.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_vxworks.h b/src/corelib/arch/qatomic_vxworks.h
index 706dea6f4f..13d6764d36 100644
--- a/src/corelib/arch/qatomic_vxworks.h
+++ b/src/corelib/arch/qatomic_vxworks.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_windows.h b/src/corelib/arch/qatomic_windows.h
index 4807c69905..667e58124e 100644
--- a/src/corelib/arch/qatomic_windows.h
+++ b/src/corelib/arch/qatomic_windows.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_windowsce.h b/src/corelib/arch/qatomic_windowsce.h
index f58119ebdf..3681655285 100644
--- a/src/corelib/arch/qatomic_windowsce.h
+++ b/src/corelib/arch/qatomic_windowsce.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/qatomic_x86_64.h b/src/corelib/arch/qatomic_x86_64.h
index abbf0a932e..c2627c825f 100644
--- a/src/corelib/arch/qatomic_x86_64.h
+++ b/src/corelib/arch/qatomic_x86_64.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/sh/qatomic_sh.cpp b/src/corelib/arch/sh/qatomic_sh.cpp
index c1f0f332d6..b552392b64 100644
--- a/src/corelib/arch/sh/qatomic_sh.cpp
+++ b/src/corelib/arch/sh/qatomic_sh.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/arch/sparc/qatomic32.s b/src/corelib/arch/sparc/qatomic32.s
index 612093b81c..5f695a9093 100644
--- a/src/corelib/arch/sparc/qatomic32.s
+++ b/src/corelib/arch/sparc/qatomic32.s
@@ -1,6 +1,6 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
-!! Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+!! Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
!! All rights reserved.
!! Contact: Nokia Corporation (qt-info@nokia.com)
!!
diff --git a/src/corelib/arch/sparc/qatomic64.s b/src/corelib/arch/sparc/qatomic64.s
index d78b5b628e..448afbd34e 100644
--- a/src/corelib/arch/sparc/qatomic64.s
+++ b/src/corelib/arch/sparc/qatomic64.s
@@ -1,6 +1,6 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
-!! Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+!! Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
!! All rights reserved.
!! Contact: Nokia Corporation (qt-info@nokia.com)
!!
diff --git a/src/corelib/arch/sparc/qatomic_sparc.cpp b/src/corelib/arch/sparc/qatomic_sparc.cpp
index 71859aeaec..85848d04a0 100644
--- a/src/corelib/arch/sparc/qatomic_sparc.cpp
+++ b/src/corelib/arch/sparc/qatomic_sparc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/codecs.pri b/src/corelib/codecs/codecs.pri
index 46d7dd46da..96f4d7f111 100644
--- a/src/corelib/codecs/codecs.pri
+++ b/src/corelib/codecs/codecs.pri
@@ -35,7 +35,7 @@ unix {
HEADERS += codecs/qiconvcodec_p.h
SOURCES += codecs/qiconvcodec.cpp
DEFINES += GNU_LIBICONV
- } else:!symbian {
+ } else {
# no iconv, so we put all plugins in the library
HEADERS += \
../plugins/codecs/cn/qgb18030codec.h \
@@ -56,4 +56,3 @@ unix {
../plugins/codecs/jp/qfontjpcodec.cpp
}
}
-symbian:LIBS += -lcharconv
diff --git a/src/corelib/codecs/codecs.qdoc b/src/corelib/codecs/codecs.qdoc
index ff14e67c83..76c3f98b42 100644
--- a/src/corelib/codecs/codecs.qdoc
+++ b/src/corelib/codecs/codecs.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qfontlaocodec.cpp b/src/corelib/codecs/qfontlaocodec.cpp
index b852cf576c..ea21fa2898 100644
--- a/src/corelib/codecs/qfontlaocodec.cpp
+++ b/src/corelib/codecs/qfontlaocodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qfontlaocodec_p.h b/src/corelib/codecs/qfontlaocodec_p.h
index f81ac1d821..c61ac2181b 100644
--- a/src/corelib/codecs/qfontlaocodec_p.h
+++ b/src/corelib/codecs/qfontlaocodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
index fb27f6ddfd..428e7d4bbe 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qiconvcodec_p.h b/src/corelib/codecs/qiconvcodec_p.h
index 5a9742e192..fb2d89eeac 100644
--- a/src/corelib/codecs/qiconvcodec_p.h
+++ b/src/corelib/codecs/qiconvcodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qisciicodec.cpp b/src/corelib/codecs/qisciicodec.cpp
index e66f424e43..e17b21a507 100644
--- a/src/corelib/codecs/qisciicodec.cpp
+++ b/src/corelib/codecs/qisciicodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qisciicodec_p.h b/src/corelib/codecs/qisciicodec_p.h
index 9ae450b848..d529be1215 100644
--- a/src/corelib/codecs/qisciicodec_p.h
+++ b/src/corelib/codecs/qisciicodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qlatincodec.cpp b/src/corelib/codecs/qlatincodec.cpp
index 3c69ab0dd7..d95fcfc601 100644
--- a/src/corelib/codecs/qlatincodec.cpp
+++ b/src/corelib/codecs/qlatincodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qlatincodec_p.h b/src/corelib/codecs/qlatincodec_p.h
index f7930e72f6..71eded6d08 100644
--- a/src/corelib/codecs/qlatincodec_p.h
+++ b/src/corelib/codecs/qlatincodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index d24b4d4cfd..757351f196 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,7 +54,6 @@ static const struct {
int mib;
quint16 values[128];
} unicodevalues[QSimpleTextCodec::numSimpleCodecs] = {
-#ifndef Q_OS_SYMBIAN
// from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt
{ "KOI8-R", { "csKOI8R", 0 }, 2084,
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
@@ -289,7 +288,6 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF} },
-#endif
{ "ISO-8859-16", { "iso-ir-226", "latin10", 0 }, 112,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
@@ -311,7 +309,6 @@ static const struct {
// next bits generated again from tables on the Unicode 3.0 CD.
// $ for a in CP* ; do (awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a) | sort | sed -e 's/#UNDEF.*$/0xFFFD/' | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done
-#ifndef Q_OS_SYMBIAN
{ "IBM850", { "CP850", "csPC850Multilingual", 0 }, 2009,
{ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
@@ -346,7 +343,6 @@ static const struct {
0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
-#endif //Q_OS_SYMBIAN
{ "IBM866", { "CP866", "csIBM866", 0 }, 2086,
{ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
@@ -365,7 +361,6 @@ static const struct {
0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0} },
-#ifndef Q_OS_SYMBIAN
{ "windows-1250", { "CP1250", 0 }, 2250,
{ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
@@ -520,7 +515,6 @@ static const struct {
0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF} },
-#endif
{ "Apple Roman", { "macintosh", "MacRoman", 0 }, -168,
{ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
@@ -560,7 +554,6 @@ static const struct {
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} },
-#ifndef Q_OS_SYMBIAN
// this one is generated from the charmap file located in /usr/share/i18n/charmaps
// on most Linux distributions. The thai character set tis620 is byte by byte equivalent
// to iso8859-11, so we name it 8859-11 here, but recognise the name tis620 too.
@@ -584,7 +577,6 @@ static const struct {
0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD } },
-#endif
/*
Name: hp-roman8 [HP-PCL5,RFC1345,KXS2]
MIBenum: 2004
diff --git a/src/corelib/codecs/qsimplecodec_p.h b/src/corelib/codecs/qsimplecodec_p.h
index fc28c97c67..6d0ceb3c95 100644
--- a/src/corelib/codecs/qsimplecodec_p.h
+++ b/src/corelib/codecs/qsimplecodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -64,11 +64,7 @@ template <typename T> class QAtomicPointer;
class QSimpleTextCodec: public QTextCodec
{
public:
-#ifdef Q_OS_SYMBIAN
- enum { numSimpleCodecs = 5 };
-#else
enum { numSimpleCodecs = 30 };
-#endif
explicit QSimpleTextCodec(int);
~QSimpleTextCodec();
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 42fac98a71..465caea62f 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -64,7 +64,7 @@
#ifndef QT_NO_CODECS
# include "qtsciicodec_p.h"
# include "qisciicodec_p.h"
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY)
+#if !defined(Q_OS_INTEGRITY)
# if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
// no iconv(3) support, must build all codecs into the library
# include "../../plugins/codecs/cn/qgb18030codec.h"
@@ -78,7 +78,7 @@
# include "qfontlaocodec_p.h"
# include "../../plugins/codecs/jp/qfontjpcodec.h"
# endif
-#endif // QT_NO_SYMBIAN
+#endif // !Q_OS_INTEGRITY
#endif // QT_NO_CODECS
#include "qlocale.h"
#include "qmutex.h"
@@ -95,10 +95,6 @@
# define QT_NO_SETLOCALE
#endif
-#ifdef Q_OS_SYMBIAN
-#include "qtextcodec_symbian.cpp"
-#endif
-
// enabling this is not exception safe!
// #define Q_DEBUG_TEXTCODEC
@@ -231,14 +227,7 @@ Q_GLOBAL_STATIC(QTextCodecCleanup, createQTextCodecCleanup)
bool QTextCodec::validCodecs()
{
-#ifdef Q_OS_SYMBIAN
- // If we don't have a trap handler, we're outside of the main() function,
- // ie. in global constructors or destructors. Don't use codecs in this
- // case as it would lead to crashes because we don't have a cleanup stack on Symbian
- return (User::TrapHandler() != NULL);
-#else
return true;
-#endif
}
@@ -588,12 +577,6 @@ static QTextCodec *checkForCodec(const QByteArray &name) {
*/
static void setupLocaleMapper()
{
-#ifdef Q_OS_SYMBIAN
- localeMapper = QSymbianTextCodec::localeMapper;
- if (localeMapper)
- return;
-#endif
-
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
localeMapper = QTextCodec::codecForName("System");
#else
@@ -728,14 +711,6 @@ static void setup()
if (all)
return;
-#ifdef Q_OS_SYMBIAN
- // If we don't have a trap handler, we're outside of the main() function,
- // ie. in global constructors or destructors. Don't create codecs in this
- // case as it would lead to crashes because of a missing cleanup stack on Symbian
- if (User::TrapHandler() == NULL)
- return;
-#endif
-
#ifdef Q_DEBUG_TEXTCODEC
if (destroying_is_ok)
qWarning("QTextCodec: Creating new codec during codec cleanup");
@@ -752,10 +727,6 @@ static void setup()
for (int i = 0; i < QSimpleTextCodec::numSimpleCodecs; ++i)
(void)new QSimpleTextCodec(i);
-#ifdef Q_OS_SYMBIAN
- localeMapper = QSymbianTextCodec::init();
-#endif
-
# if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED)
// no font codecs when bootstrapping
(void)new QFontLaoCodec;
@@ -773,7 +744,7 @@ static void setup()
# endif // Q_OS_UNIX
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY)
+#if !defined(Q_OS_INTEGRITY)
# if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
// no asian codecs when bootstrapping, sorry
(void)new QGb18030Codec;
@@ -787,7 +758,7 @@ static void setup()
(void)new QBig5Codec;
(void)new QBig5hkscsCodec;
# endif // QT_NO_ICONV && !QT_BOOTSTRAPPED
-#endif //Q_OS_SYMBIAN
+#endif // !Q_OS_INTEGRITY
#endif // QT_NO_CODECS
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
@@ -800,13 +771,11 @@ static void setup()
(void)new QUtf32Codec;
(void)new QUtf32BECodec;
(void)new QUtf32LECodec;
-#ifndef Q_OS_SYMBIAN
(void)new QLatin15Codec;
-#endif
(void)new QLatin1Codec;
(void)new QUtf8Codec;
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY)
+#if !defined(Q_OS_INTEGRITY)
#if defined(Q_OS_UNIX) && !defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
// QIconvCodec depends on the UTF-16 codec, so it needs to be created last
(void) new QIconvCodec();
@@ -842,7 +811,7 @@ QTextCodec::ConverterState::~ConverterState()
if (flags & FreeFunction)
(QTextCodecUnalignedPointer::decode(state_data))(this);
else if (d)
- qFree(d);
+ free(d);
}
/*!
@@ -1315,17 +1284,6 @@ QList<QByteArray> QTextCodec::aliases() const
*/
/*!
- Creates a QTextDecoder which stores enough state to decode chunks
- of \c{char *} data to create chunks of Unicode data.
-
- The caller is responsible for deleting the returned object.
-*/
-QTextDecoder* QTextCodec::makeDecoder() const
-{
- return new QTextDecoder(this);
-}
-
-/*!
Creates a QTextDecoder with a specified \a flags to decode chunks
of \c{char *} data to create chunks of Unicode data.
@@ -1338,18 +1296,6 @@ QTextDecoder* QTextCodec::makeDecoder(QTextCodec::ConversionFlags flags) const
return new QTextDecoder(this, flags);
}
-
-/*!
- Creates a QTextEncoder which stores enough state to encode chunks
- of Unicode data as \c{char *} data.
-
- The caller is responsible for deleting the returned object.
-*/
-QTextEncoder* QTextCodec::makeEncoder() const
-{
- return new QTextEncoder(this);
-}
-
/*!
Creates a QTextEncoder with a specified \a flags to encode chunks
of Unicode data as \c{char *} data.
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h
index 015c0941f2..c4f1a09726 100644
--- a/src/corelib/codecs/qtextcodec.h
+++ b/src/corelib/codecs/qtextcodec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -117,11 +117,8 @@ public:
QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = 0) const
{ return convertFromUnicode(in, length, state); }
- // ### Qt 5: merge these functions.
- QTextDecoder* makeDecoder() const;
- QTextDecoder* makeDecoder(ConversionFlags flags) const;
- QTextEncoder* makeEncoder() const;
- QTextEncoder* makeEncoder(ConversionFlags flags) const;
+ QTextDecoder* makeDecoder(ConversionFlags flags = DefaultConversion) const;
+ QTextEncoder* makeEncoder(ConversionFlags flags = DefaultConversion) const;
virtual QByteArray name() const = 0;
virtual QList<QByteArray> aliases() const;
diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h
index ed09c4d1ac..03d9d3dfaf 100644
--- a/src/corelib/codecs/qtextcodec_p.h
+++ b/src/corelib/codecs/qtextcodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp
deleted file mode 100644
index c8a7357edc..0000000000
--- a/src/corelib/codecs/qtextcodec_symbian.cpp
+++ /dev/null
@@ -1,689 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qtextcodec_p.h"
-
-#include <private/qcore_symbian_p.h>
-#include <QThreadStorage>
-#include <QScopedPointer>
-
-#include <charconv.h>
-
-struct QSymbianCodecInitData {
- uint charsetId;
- int mib;
- const char *aliases;
-};
-
-/* This table contains the known Symbian codecs aliases.
- It is required because symbian does not provide aliases for codecs.
- It is also faster to have a name here than asking the system.
- It is ordered by charsetId to allow binary search lookup
- */
-static const QSymbianCodecInitData codecsData[] = {
- { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0SJIS\0" },
- { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instaead of 57
- { /*268439487*/ KCharacterSetIdentifierBig5, 2026, "Big5\0csBig5\0Big5-ETen\0CP950\0BIG-FIVE\0CN-BIG5\0" },
- { /*268440246*/ KCharacterSetIdentifierCodePage1252, 2252, "windows-1252\0Code Page 1252\0CP1252\0MS-ANSI\0" },
-// { /*268450576*/ KCharacterSetIdentifierIso88591, 4, "ISO-8859-1\0ISO_8859-1:1987\0iso-ir-100\0ISO_8859-1\0latin1\0l1\0IBM819\0CP819\0csISOLatin1\0ISO-IR-100\0ISO8859-1\0L1\0LATIN1\0CSISOLATIN1\0" },
- { /*268451531*/ KCharacterSetIdentifierGbk, 113, "GBK\0MS936\0windows-936\0CP936\0" },
- { /*268451866*/ KCharacterSetIdentifierGb12345, 0, "GB12345\0" },
- { /*268455110*/ KCharacterSetIdentifierAscii, 3, "US-ASCII\0ANSI_X3.4-1968\0iso-ir-6\0ANSI_X3.4-1986\0ISO_646.irv:1991\0ASCII\0ISO646-US\0us\0IBM367\0cp367\0csASCII\0ISO-IR-6\0ISO_646.IRV:1991\0"},
- { /*268456062*/ KCharacterSetIdentifierIso88592, 5, "ISO-8859-2\0ISO_8859-2:1987\0iso-ir-101\0latin2\0l2\0csISOLatin2\0" },
- { /*268456063*/ KCharacterSetIdentifierIso88594, 7, "ISO-8859-4\0ISO_8859-4:1988\0iso-ir-110\0latin4\0l4\0csISOLatin4\0" },
- { /*268456064*/ KCharacterSetIdentifierIso88595, 8, "ISO-8859-5\0ISO_8859-5:1988\0iso-ir-144\0cyrillic\0csISOLatinCyrillic\0" },
- { /*268456065*/ KCharacterSetIdentifierIso88597, 10, "ISO-8859-7\0ISO_8859-7:1987\0iso-ir-126\0ELOT_928\0ECMA-118\0greek\0greek8\0csISOLatinGreek\0" },
- { /*268456066*/ KCharacterSetIdentifierIso88599, 12, "ISO-8859-9\0ISO_8859-9:1989\0iso-ir-148\0latin5\0l5\0csISOLatin5\0" },
- { /*268456875*/ KCharacterSetIdentifierSms7Bit, 0, "SMS 7-bit\0" },
- { /*268458028*/ KCharacterSetIdentifierUtf7, 103, "UTF-7\0UNICODE-1-1-UTF-7\0CSUNICODE11UTF7\0" },
-// { /*268458029*/ KCharacterSetIdentifierUtf8, 106, "UTF-8\0" },
- { /*268458030*/ KCharacterSetIdentifierImapUtf7, 0, "IMAP UTF-7\0" },
- { /*268458031*/ KCharacterSetIdentifierJavaConformantUtf8, 0, "JAVA UTF-8\0" },
- { /*268458454*/ 268458454, 2250, "Windows-1250\0CP1250\0MS-EE\0" },
- { /*268458455*/ 268458455, 2251, "Windows-1251\0CP1251\0MS-CYRL\0" },
- { /*268458456*/ 268458456, 2253, "Windows-1253\0CP1253\0MS-GREEK\0" },
- { /*268458457*/ 268458457, 2254, "Windows-1254\0CP1254\0MS-TURK\0" },
- { /*268458458*/ 268458458, 2257, "Windows-1257\0CP1257\0WINBALTRIM\0" },
- { /*268460133*/ KCharacterSetIdentifierHz, 2085, "HZ-GB-2312\0HZ\0" },
- { /*268460134*/ KCharacterSetIdentifierJis, 16, "JIS_Encoding\0JIS\0" },
- { /*268460135*/ KCharacterSetIdentifierEucJpPacked, 18, "EUC-JP\0Extended_UNIX_Code_Packed_Format_for_Japanese\0csEUCPkdFmtJapanese\0EUCJP_PACKED\0" },
- { /*268461728*/ KCharacterSetIdentifierIso2022Jp, 39, "ISO-2022-JP\0csISO2022JP\0JIS7\0" },
- { /*268461731*/ KCharacterSetIdentifierIso2022Jp1, 0, "ISO2022JP1\0" },
- { /*268470824*/ KCharacterSetIdentifierIso88593, 6, "ISO-8859-3\0ISO_8859-3:1988\0iso-ir-109\0latin3\0l3\0csISOLatin3\0" },
- { /*268470825*/ KCharacterSetIdentifierIso88596, 9, "ISO-8859-6\0ISO_8859-6:1987\0iso-ir-127\0ECMA-114\0ASMO-708\0arabic\0ISO88596\0csISOLatinArabic\0ARABIC\0" },
- { /*268470826*/ KCharacterSetIdentifierIso88598, 11, "ISO-8859-8\0ISO_8859-8:1988\0iso-ir-138\0hebrew\0csISOLatinHebrew\0" },
- { /*268470827*/ KCharacterSetIdentifierIso885910, 13, "ISO-8859-10\0iso-ir-157\0l6\0ISO_8859-10:1992\0csISOLatin6\0latin6\0" },
- { /*268470828*/ KCharacterSetIdentifierIso885913, 109, "ISO-8859-13\0ISO885913\0ISO-IR-179\0ISO8859-13\0L7\0LATIN7\0CSISOLATIN7\0" },
- { /*268470829*/ KCharacterSetIdentifierIso885914, 110, "ISO-8859-14\0iso-ir-199\0ISO_8859-14:1998\0latin8\0iso-celtic\0l8\0" },
- { /*268470830*/ KCharacterSetIdentifierIso885915, 111, "ISO-8859-15\0latin-9\0ISO-IR-203\0" },
-// { /*270483374*/ KCharacterSetIdentifierUnicodeLittle, 1014, "UTF-16LE\0Little-Endian UNICODE\0" },
-// { /*270483538*/ KCharacterSetIdentifierUnicodeBig, 1013, "UTF-16BE\0Big-Endian UNICODE\0" },
- { /*270501191*/ 270501191, 2255, "Windows-1255\0CP1255\0MS-HEBR\0" },
- { /*270501192*/ 270501192, 2256, "Windows-1256\0CP1256\0MS-ARAB\0" },
- { /*270501193*/ 270501193, 2259, "TIS-620\0ISO-IR-166\0TIS620-0\0TIS620.2529-1\0TIS620.2533-0\0TIS620.2533-1\0" },
- { /*270501194*/ 270501194, 0, "windows-874\0CP874\0IBM874\0" },
- { /*270501325*/ 270501325, 0, "SmsStrict\0" },
- { /*270501521*/ 270501521, 0, "ShiftJisDirectmap\0" },
- { /*270501542*/ 270501542, 0, "EucJpDirectmap\0" },
- /* 270501691 (duplicate) Windows-1252 | windows-1252 |Windows-1252 |Code Page 1252 |CP1252 |MS-ANSI |WINDOWS-1252 |2252 */
- { /*270501729*/ 270501729, 2088, "KOI8-U\0" },
- { /*270501752*/ 270501752, 2084, "KOI8-R\0csKOI8R\0" },
- { /*270529682*/ 270529682, 1000, "ISO-10646-UCS-2\0UCS-2\0CSUNICODE\0" },
- { /*270562232*/ 270562232, 2258, "Windows-1258\0CP1258\0WINDOWS-1258\0" },
- { /*270586888*/ 270586888, 0, "J5\0" },
- { /*271011982*/ 271011982, 0, "ISCII\0" },
- { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instead of 2009
- { /*271082493*/ 271082493, 0, "EXTENDED_SMS_7BIT\0" },
- { /*271082494*/ 271082494, 0, "gsm7_turkish_single\0" },
- { /*271082495*/ 271082495, 0, "turkish_locking_gsm7ext\0" },
- { /*271082496*/ 271082496, 0, "turkish_locking_single\0" },
- { /*271082503*/ 271082503, 0, "portuguese_gsm7_single\0" },
- { /*271082504*/ 271082504, 0, "portuguese_locking_gsm7ext\0" },
- { /*271082505*/ 271082505, 0, "portuguese_locking_single\0" },
- { /*271082506*/ 271082506, 0, "spanish_gsm7_single\0" },
- { /*271085624*/ 271085624, 114, "GB18030\0" },
- { /*536929574*/ 536929574, 38, "EUC-KR\0" },
- { /*536936703*/ 536936703, 0, "CP949\0" },
- { /*536936705*/ 536936705, 37, "ISO-2022-KR\0csISO2022KR\0" },
- { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0iso-ir-149\0KS_C_5601-1989\0KSC_5601\0Korean\0csKSC56011987\0" }
- };
-
-
-class QSymbianTextCodec : public QTextCodec
-{
-public:
- QString convertToUnicode(const char*, int, ConverterState*) const;
- QByteArray convertFromUnicode(const QChar*, int, ConverterState*) const;
- QList<QByteArray> aliases() const;
- QByteArray name() const;
- int mibEnum() const;
-
- explicit QSymbianTextCodec(uint charsetId, int staticIndex = -1) : m_charsetId(charsetId), m_staticIndex(staticIndex) { }
-
- static QSymbianTextCodec *init();
- static QSymbianTextCodec *localeMapper;
-private:
- static CCnvCharacterSetConverter *converter();
- static uint getLanguageDependentCharacterSet();
- uint m_charsetId;
- int m_staticIndex;
-};
-
-QSymbianTextCodec *QSymbianTextCodec::localeMapper = 0;
-
-class QSymbianTextCodecWithName : public QSymbianTextCodec
-{
-public:
- QSymbianTextCodecWithName(uint charsetId, const QByteArray &name)
- : QSymbianTextCodec(charsetId) , m_name(name) { }
- QByteArray name() const { return m_name; }
- QList<QByteArray> aliases() const { return QList<QByteArray>(); }
-private:
- QByteArray m_name;
-};
-
-Q_GLOBAL_STATIC(QThreadStorage<CCnvCharacterSetConverter *>,gs_converterStore);
-
-CCnvCharacterSetConverter *QSymbianTextCodec::converter()
-{
- CCnvCharacterSetConverter *&conv = gs_converterStore()->localData();
- if (!conv)
- QT_TRAP_THROWING(conv = CCnvCharacterSetConverter::NewL())
- return conv;
-}
-
-
-QByteArray QSymbianTextCodec::name() const
-{
- if (m_staticIndex >= 0)
- return QByteArray(codecsData[m_staticIndex].aliases);
- QScopedPointer<HBufC8> buf;
- QT_TRAP_THROWING(buf.reset(converter()->ConvertCharacterSetIdentifierToStandardNameL(m_charsetId, qt_s60GetRFs())))
- if (buf)
- return QByteArray(reinterpret_cast<const char *>(buf->Ptr()), buf->Length());
- return QByteArray();
-}
-
-int QSymbianTextCodec::mibEnum() const
-{
- if (m_staticIndex >= 0)
- return codecsData[m_staticIndex].mib;
- int mib;
- QT_TRAP_THROWING(mib = converter()->ConvertCharacterSetIdentifierToMibEnumL(m_charsetId, qt_s60GetRFs()))
- return mib;
-}
-
-QList<QByteArray> QSymbianTextCodec::aliases() const
-{
- QList<QByteArray> result;
- if (m_staticIndex >= 0) {
- const char *aliases = codecsData[m_staticIndex].aliases;
- aliases += strlen(aliases) + 1;
- while (*aliases) {
- int len = strlen(aliases);
- result += QByteArray(aliases, len);
- aliases += len + 1;
- }
- }
- return result;
-}
-
-
-QString QSymbianTextCodec::convertToUnicode(const char *str, int len, ConverterState *state) const
-{
- uint charsetId = m_charsetId;
-
- // no support for utf7 with state
- if (state && (charsetId == KCharacterSetIdentifierUtf7 ||
- charsetId == KCharacterSetIdentifierImapUtf7)) {
- return QString();
- }
- CCnvCharacterSetConverter *converter = QSymbianTextCodec::converter();
- if (!str) {
- return QString();
- }
-
- //Search the character set array containing all of the character sets for which conversion is available
- CCnvCharacterSetConverter::TAvailability av;
- QT_TRAP_THROWING(av = converter->PrepareToConvertToOrFromL(charsetId, qt_s60GetRFs()))
- if (av == CCnvCharacterSetConverter::ENotAvailable) {
- return QString();
- }
-
- char *str2;
- int len2;
- QByteArray helperBA;
- if (state && (state->remainingChars > 0)) {
- // we should prepare the input string ourselves
- // the real size
- len2 = len + state->remainingChars;
- helperBA.resize(len2);
- str2 = helperBA.data();
- if (state->remainingChars > 3) { // doesn't happen usually
- memcpy(str2, state->d, state->remainingChars);
- qFree(state->d);
- state->d = 0;
- } else {
- char charTbl[3];
- charTbl[0] = state->state_data[0];
- charTbl[1] = state->state_data[1];
- charTbl[2] = state->state_data[2];
- memcpy(str2, charTbl, state->remainingChars);
- }
- memcpy(str2+state->remainingChars, str, len);
- }
- else {
- len2 = len;
- str2 = const_cast<char*>(str);
- }
-
- QString UnicodeText(len2, Qt::Uninitialized);
- TPtrC8 remainderOfForeignText;
- remainderOfForeignText.Set(reinterpret_cast<const unsigned char *>(str2), len2);
-
- int numberOfUnconvertibleCharacters = 0;
- int indexOfFirstUnconvertibleCharacter;
-
- // Use null character as replacement, if it is asked
- bool convertToNull = (state && (state->flags & QTextCodec::ConvertInvalidToNull));
- if (convertToNull) {
- _LIT8(KReplacement, "\x00");
- QT_TRAP_THROWING(converter->SetReplacementForUnconvertibleUnicodeCharactersL(KReplacement))
- }
- // use state->invalidChars for keeping symbian state
- int sState = CCnvCharacterSetConverter::KStateDefault;
- if (state && (state->invalidChars != CCnvCharacterSetConverter::KStateDefault)) {
- sState = state->invalidChars;
- }
- //Convert text encoded in a non-Unicode character set into the Unicode character set (UCS-2).
- int remainingChars = -1;
- int initial_size=0;
- while (1) {
- TPtr16 UnicodePtr(reinterpret_cast<unsigned short *>(UnicodeText.data()+initial_size), UnicodeText.size());
- QT_TRAP_THROWING(remainingChars = converter->ConvertToUnicode(UnicodePtr,
- remainderOfForeignText,
- sState,
- numberOfUnconvertibleCharacters,
- indexOfFirstUnconvertibleCharacter))
-
- initial_size += UnicodePtr.Length();
- // replace 0xFFFD with 0x0000 and only if state set to convert to it
- if (numberOfUnconvertibleCharacters>0 && convertToNull) {
- int len2 = UnicodePtr.Length();
- for (int i = indexOfFirstUnconvertibleCharacter; i < len2; i++) {
- UnicodePtr[i] = 0x0000;
- }
- }
- // success
- if (remainingChars==KErrNone) {
- break;
- }
- // if ConvertToUnicode could not consume the foreign text at all
- // UTF-8: EErrorIllFormedInput = KErrCorrupt
- // UCS-2: KErrNotFound
- if (remainingChars == CCnvCharacterSetConverter::EErrorIllFormedInput ||
- remainingChars == KErrNotFound) {
- remainingChars = remainderOfForeignText.Size();
- break;
- }
- else {
- if (remainingChars < 0) {
- return QString();
- }
- }
- //
- UnicodeText.resize(UnicodeText.size() + remainingChars*2);
- remainderOfForeignText.Set(reinterpret_cast<const unsigned char *>(str2+len2-remainingChars), remainingChars);
- }
- // save symbian state
- if (state) {
- state->invalidChars = sState;
- }
-
- if (remainingChars > 0) {
- if (!state) {
- // No way to signal, if there is still remaining chars, for ex. UTF-8 still can have
- // some characters hanging around.
- return QString();
- }
- const unsigned char *charPtr = remainderOfForeignText.Right(remainingChars).Ptr();
- if (remainingChars > 3) { // doesn't happen usually
- state->d = (void*)qMalloc(remainingChars);
- if (!state->d)
- return QString();
- // copy characters there
- memcpy(state->d, charPtr, remainingChars);
- }
- else {
- // fallthru is correct
- switch (remainingChars) {
- case 3:
- state->state_data[2] = charPtr[2];
- case 2:
- state->state_data[1] = charPtr[1];
- case 1:
- state->state_data[0] = charPtr[0];
- }
- }
- state->remainingChars = remainingChars;
- }
- else {
- if (state) {
- // If we continued from an earlier iteration
- state->remainingChars = 0;
- }
- }
- // check if any ORIGINAL headers should be left
- if (initial_size > 0) {
- if (!state || (state && !(state->flags & QTextCodec::IgnoreHeader))) {
- // always skip headers on following state loops
- if (state) {
- state->flags |= QTextCodec::IgnoreHeader;
- }
- const TUint16 *ptr = reinterpret_cast<const TUint16 *>(UnicodeText.data());
- if (ptr[0] == QChar::ByteOrderMark || ptr[0] == QChar::ByteOrderSwapped) {
- return UnicodeText.mid(1, initial_size - 1);
- }
- }
- }
- if (initial_size >= 0) {
- UnicodeText.resize(initial_size);
- return UnicodeText;
- }
- else {
- return QString();
- }
-}
-
-
-QByteArray QSymbianTextCodec::convertFromUnicode(const QChar *str, int len, ConverterState *state) const
-{
- uint charsetId = m_charsetId;
- CCnvCharacterSetConverter *converter = QSymbianTextCodec::converter();
- if (!str)
- return QByteArray();
-
- if (len == 0)
- return QByteArray();
-
- // no support for utf7 with state
- if (state && (charsetId == KCharacterSetIdentifierUtf7 ||
- charsetId == KCharacterSetIdentifierImapUtf7))
- return QByteArray();
-
- //Get reference file session from backend
- RFs &fileSession = qt_s60GetRFs();
-
- //Search the character set array containing all of the character sets for which conversion is available
- CCnvCharacterSetConverter::TAvailability av = CCnvCharacterSetConverter::ENotAvailable;
- QT_TRAP_THROWING(av = converter->PrepareToConvertToOrFromL(charsetId, fileSession))
- if (av == CCnvCharacterSetConverter::ENotAvailable)
- return QByteArray();
-
- // Use null character as replacement, if it is asked
- if (state && (state->flags & QTextCodec::ConvertInvalidToNull)) {
- _LIT8(KReplacement, "\x00");
- QT_TRAP_THROWING(converter->SetReplacementForUnconvertibleUnicodeCharactersL(KReplacement))
- }
- else {
- _LIT8(KReplacement, "?");
- QT_TRAP_THROWING(converter->SetReplacementForUnconvertibleUnicodeCharactersL(KReplacement))
- }
- QByteArray outputBuffer;
-
- // add header if no state (one run), or if no ignoreheader (from first state)
- int bomofs = 0;
- if (!state || (state && !(state->flags & QTextCodec::IgnoreHeader))) {
-
- QChar bom(QChar::ByteOrderMark);
-
- if (state)
- state->flags |= QTextCodec::IgnoreHeader; // bom handling only on first state
-
- switch (charsetId) {
- case KCharacterSetIdentifierUcs2:
- outputBuffer.append(bom.row());
- outputBuffer.append(bom.cell());
- bomofs = 2;
- break;
-
- case KCharacterSetIdentifierUtf8: // we don't add bom for UTF-8
- case KCharacterSetIdentifierJavaConformantUtf8:
- /*outputBuffer.append("\xef\xbb\xbf");
- bomofs = 3;
- */
- break;
-
- case KCharacterSetIdentifierUnicodeLittle:
- outputBuffer.append(bom.cell());
- outputBuffer.append(bom.row());
- bomofs = 2;
- break;
-
- case KCharacterSetIdentifierUnicodeBig:
- outputBuffer.append(bom.row());
- outputBuffer.append(bom.cell());
- bomofs = 2;
- break;
-
- default:
- break;
- }
- }
-
- // len is 16bit chars, reserve 3 8bit chars for each input char
- // jsz - it could be differentiated, to allocate less
- outputBuffer.resize(len * 3 + bomofs);
-
- // loop for too short output buffer
- int unconverted;
- int numberOfUnconvertibleCharacters = len;
- int indexOfFirstUnconvertibleCharacter;
- int convertedSize;
- int lastUnconverted = 0;
- int initial_size=0;
- int remainderToConvert = len;
- while (1) {
- TPtr8 outputPtr(reinterpret_cast<unsigned char *>(outputBuffer.data() + bomofs + initial_size), outputBuffer.size() - bomofs);
-
- TPtrC16 UnicodeText(reinterpret_cast<const unsigned short *>(str+len-remainderToConvert), remainderToConvert);
-
- //Convert text encoded in the Unicode character set (UCS-2) into other character sets
- unconverted = -1;
- QT_TRAP_THROWING( unconverted = converter->ConvertFromUnicode(outputPtr,
- UnicodeText,
- numberOfUnconvertibleCharacters,
- indexOfFirstUnconvertibleCharacter))
- initial_size += outputPtr.Length();
- if (unconverted < 0) {
- return QByteArray();
- }
-
-
- if (unconverted == 0 ) {
- convertedSize = initial_size;
- break;
- }
-
- // check what means unconverted > 0
- if (indexOfFirstUnconvertibleCharacter<0) {
- // 8859-6 and 8859-8 break with certain input (string of \xc0 - \xd9 converted to unicode and back)
- if (unconverted == lastUnconverted) {
- return QByteArray();
- }
- lastUnconverted = unconverted;
- }
- else {
- // were some character not possible to convert
-
- }
- remainderToConvert = unconverted; // len - indexOfFirstUnconvertibleCharacter;
- // resize output buffer, use =op for the null check
- outputBuffer.resize(outputBuffer.size() + remainderToConvert * 3 + bomofs);
- };
-
- // shorten output
- outputBuffer.resize(convertedSize + bomofs);
-
- if (state) {
- state->invalidChars = numberOfUnconvertibleCharacters;
-
- // check if any Symbian CONVERTED headers should be removed
- if (state->flags & QTextCodec::IgnoreHeader && state->state_data[0] == 0) {
-
- state->state_data[0] = 0xff; // bom handling only on first state
-
- if (charsetId == KCharacterSetIdentifierUcs2 && outputBuffer.size() > 1) {
-
- QChar bom(QChar::ByteOrderMark);
- if (outputBuffer.at(0) == bom.row() && outputBuffer.at(1) == bom.cell()) {
- outputBuffer.remove(0, 2);
- } else if (outputBuffer.at(0) == bom.cell() && outputBuffer.at(1) == bom.row()) {
- outputBuffer.remove(0, 2);
- }
-
- } else if ((charsetId == KCharacterSetIdentifierUtf8 ||
- charsetId == KCharacterSetIdentifierJavaConformantUtf8) &&
- outputBuffer.size() > 2) {
- if (outputBuffer.at(0) == 0xef && outputBuffer.at(1) == 0xbb && outputBuffer.at(2) == 0xbf) {
- outputBuffer.remove(0, 3);
- }
-
- } else if (charsetId == KCharacterSetIdentifierUnicodeLittle &&
- outputBuffer.size() > 1) {
-
- QChar bom(QChar::ByteOrderMark);
- if (outputBuffer.at(0) == bom.row() && outputBuffer.at(1) == bom.cell()) {
- outputBuffer.remove(0, 2);
- }
-
- } else if (charsetId == KCharacterSetIdentifierUnicodeBig &&
- outputBuffer.size() > 1) {
-
- QChar bom(QChar::ByteOrderSwapped);
- if (outputBuffer.at(0) == bom.row() && outputBuffer.at(1) == bom.cell()) {
- outputBuffer.remove(0, 2);
- }
- }
-
- }
- }
-
- return outputBuffer;
-}
-
-
-uint QSymbianTextCodec::getLanguageDependentCharacterSet()
-{
- TLanguage lang = User::Language();
-
- uint langIndex = 0;
-
- switch (lang) {
- case 14: //ELangTurkish
- langIndex = KCharacterSetIdentifierIso88599; break;
- case 16: //ELangRussian
- langIndex = KCharacterSetIdentifierIso88595; break;
- case 17: //ELangHungarian
- langIndex = KCharacterSetIdentifierIso88592; break;
- case 25: //ELangCzec
- case 26: //ELangSlovak
- case 27: //ELangPolish
- case 28: //ELangSlovenian
- langIndex = KCharacterSetIdentifierIso88592; break;
- case 29: //ELangTaiwanChinese
- case 30: //ELangHongKongChinese
- langIndex = KCharacterSetIdentifierBig5; break;
- case 31: //ELangPrcChinese
- langIndex = KCharacterSetIdentifierGbk; break;
- case 32: //ELangJapanese
- langIndex = KCharacterSetIdentifierShiftJis; break;
- case 33: //ELangThai
- langIndex = 270501193 /*KCharacterSetIdentifierTis620*/; break;
- case 37: //ELangArabic
- langIndex = KCharacterSetIdentifierIso88596; break;
- case 40: //ELangBelarussian
- case 42: //ELangBulgarian
- langIndex = KCharacterSetIdentifierIso88595; break;
- case 45: //ELangCroatian
- langIndex = KCharacterSetIdentifierIso88592; break;
- case 49: //ELangEstonian
- langIndex = KCharacterSetIdentifierIso88594; break;
- case 54: //ELangGreek
- case 55: //ELangCyprusGreek
- langIndex = KCharacterSetIdentifierIso88597; break;
- case 57: //ELangHebrew
- langIndex = KCharacterSetIdentifierIso88598; break;
- case 58: //ELangHindi
- langIndex = 271011982/*KCharacterSetIdentifierIscii*/; break;
- case 67: //ELangLatvian
- case 68: //ELangLithuanian
- langIndex = KCharacterSetIdentifierIso88594; break;
- case 69: //ELangMacedonian
- langIndex = KCharacterSetIdentifierIso88595; break;
- case 78: //ELangRomanian
- langIndex = KCharacterSetIdentifierIso88592; break;
- case 79: //ELangSerbian
- langIndex = KCharacterSetIdentifierIso88592; break;
- case 91: //ELangCyprusTurkish
- langIndex = KCharacterSetIdentifierIso88599; break;
- case 93: //ELangUkrainian
- langIndex = KCharacterSetIdentifierIso88595; break;
- case 94: //ELangUrdu
- langIndex = KCharacterSetIdentifierIso88596; break;
- case 157: //ELangEnglish_Taiwan
- case 158: //ELangEnglish_HongKong
- langIndex = KCharacterSetIdentifierBig5; break;
- case 159: //ELangEnglish_Prc
- langIndex = KCharacterSetIdentifierGbk; break;
- case 160:
- langIndex = KCharacterSetIdentifierShiftJis; break;
- case 161: //ELangEnglish_Thailand
- langIndex = 270501193/*KCharacterSetIdentifierTis620*/; break;
- }
-
- if (langIndex > 0) {
- return langIndex;
- }
- return KCharacterSetIdentifierCodePage1252;
-}
-
-/* Create the codecs that have aliases and return the locale mapper*/
-QSymbianTextCodec *QSymbianTextCodec::init()
-{
- const uint localeMapperId = getLanguageDependentCharacterSet();
- QScopedPointer<CArrayFix<CCnvCharacterSetConverter::SCharacterSet> > array;
- QT_TRAP_THROWING(array.reset(CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL(qt_s60GetRFs())))
- CCnvCharacterSetConverter *converter = QSymbianTextCodec::converter();
- int count = array->Count();
- for (int i = 0; i < count; i++) {
- int charsetId = array->At(i).Identifier();
-
- // skip builtin Qt codecs
- if (charsetId == KCharacterSetIdentifierUtf8 || charsetId == KCharacterSetIdentifierUnicodeLittle
- || charsetId == KCharacterSetIdentifierUnicodeLittle || charsetId == KCharacterSetIdentifierUnicodeBig
- || charsetId == KCharacterSetIdentifierIso88591
- || charsetId == 270501691 /* skip Windows-1252 duplicate*/) {
- continue;
- }
-
- int begin = 0;
- int n = sizeof(codecsData) / sizeof(codecsData[0]);
- int half;
-
- while (n > 0) {
- half = n >> 1;
- int middle = begin + half;
- if (codecsData[middle].charsetId < charsetId) {
- begin = middle + 1;
- n -= half + 1;
- } else {
- n = half;
- }
- }
- if (codecsData[begin].charsetId == charsetId) {
- QSymbianTextCodec *c = new QSymbianTextCodec(charsetId, begin);
- if (charsetId == localeMapperId)
- localeMapper = c;
- } else {
- // We did not find the charsetId in our codecsData[], therefore we ask
- // the OS for the codec name. We first try to get a "standard name" and fall
- // back to array->At(i).Name(), if really needed. array->At(i).Name() is not
- // guaranteed to be a correct name for QTextCodec::codecFromName().
- QScopedPointer<HBufC8> buf;
- QT_TRAP_THROWING(buf.reset(converter->ConvertCharacterSetIdentifierToStandardNameL(charsetId, qt_s60GetRFs())))
- QByteArray name;
- if (buf && buf->Length()) {
- name = QByteArray(reinterpret_cast<const char *>(buf->Ptr()), buf->Length());
- } else {
- TPtrC charSetName = array->At(i).NameIsFileName() ? TParsePtrC(array->At(i).Name()).Name() : array->At(i).Name();
- int len = charSetName.Length();
- QString str;
- str.setUnicode(reinterpret_cast<const QChar*>(charSetName.Ptr()), len);
- name = str.toLatin1();
- }
- if (!name.isEmpty())
- new QSymbianTextCodecWithName(charsetId, name);
- }
-
- }
- return localeMapper;
-}
diff --git a/src/corelib/codecs/qtextcodecplugin.cpp b/src/corelib/codecs/qtextcodecplugin.cpp
index 91b172d591..4eb075c5f2 100644
--- a/src/corelib/codecs/qtextcodecplugin.cpp
+++ b/src/corelib/codecs/qtextcodecplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qtextcodecplugin.h b/src/corelib/codecs/qtextcodecplugin.h
index d80b173c8c..9a00bbc9fa 100644
--- a/src/corelib/codecs/qtextcodecplugin.h
+++ b/src/corelib/codecs/qtextcodecplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qtsciicodec.cpp b/src/corelib/codecs/qtsciicodec.cpp
index 868136605e..c158ad2dc5 100644
--- a/src/corelib/codecs/qtsciicodec.cpp
+++ b/src/corelib/codecs/qtsciicodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qtsciicodec_p.h b/src/corelib/codecs/qtsciicodec_p.h
index b55d8bf288..b74b38c429 100644
--- a/src/corelib/codecs/qtsciicodec_p.h
+++ b/src/corelib/codecs/qtsciicodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index 34e4695a26..d279f8591c 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/codecs/qutfcodec_p.h b/src/corelib/codecs/qutfcodec_p.h
index 982a3d198a..737697f5d6 100644
--- a/src/corelib/codecs/qutfcodec_p.h
+++ b/src/corelib/codecs/qutfcodec_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuture.cpp b/src/corelib/concurrent/qfuture.cpp
index 5bffd66fc3..81655502e9 100644
--- a/src/corelib/concurrent/qfuture.cpp
+++ b/src/corelib/concurrent/qfuture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuture.h b/src/corelib/concurrent/qfuture.h
index 911fb7ecc5..6407fc39e7 100644
--- a/src/corelib/concurrent/qfuture.h
+++ b/src/corelib/concurrent/qfuture.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfutureinterface.cpp b/src/corelib/concurrent/qfutureinterface.cpp
index f54b335403..63033080a1 100644
--- a/src/corelib/concurrent/qfutureinterface.cpp
+++ b/src/corelib/concurrent/qfutureinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfutureinterface.h b/src/corelib/concurrent/qfutureinterface.h
index b92a47a33d..2acd1f46fd 100644
--- a/src/corelib/concurrent/qfutureinterface.h
+++ b/src/corelib/concurrent/qfutureinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfutureinterface_p.h b/src/corelib/concurrent/qfutureinterface_p.h
index 7b5275f5f8..96567c35eb 100644
--- a/src/corelib/concurrent/qfutureinterface_p.h
+++ b/src/corelib/concurrent/qfutureinterface_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuturesynchronizer.cpp b/src/corelib/concurrent/qfuturesynchronizer.cpp
index 18990ae2f0..d46aa3e7e7 100644
--- a/src/corelib/concurrent/qfuturesynchronizer.cpp
+++ b/src/corelib/concurrent/qfuturesynchronizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuturesynchronizer.h b/src/corelib/concurrent/qfuturesynchronizer.h
index ba838a8b66..4fc1987f65 100644
--- a/src/corelib/concurrent/qfuturesynchronizer.h
+++ b/src/corelib/concurrent/qfuturesynchronizer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp
index e405896f0b..e0f197c7e7 100644
--- a/src/corelib/concurrent/qfuturewatcher.cpp
+++ b/src/corelib/concurrent/qfuturewatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuturewatcher.h b/src/corelib/concurrent/qfuturewatcher.h
index a5f723c100..efd7d94101 100644
--- a/src/corelib/concurrent/qfuturewatcher.h
+++ b/src/corelib/concurrent/qfuturewatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qfuturewatcher_p.h b/src/corelib/concurrent/qfuturewatcher_p.h
index e90bff1e9b..4898779c33 100644
--- a/src/corelib/concurrent/qfuturewatcher_p.h
+++ b/src/corelib/concurrent/qfuturewatcher_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qrunnable.cpp b/src/corelib/concurrent/qrunnable.cpp
index 9ac335bc83..e5f7dc0efb 100644
--- a/src/corelib/concurrent/qrunnable.cpp
+++ b/src/corelib/concurrent/qrunnable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qrunnable.h b/src/corelib/concurrent/qrunnable.h
index 34ef16bc10..d4b3bda956 100644
--- a/src/corelib/concurrent/qrunnable.h
+++ b/src/corelib/concurrent/qrunnable.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentcompilertest.h b/src/corelib/concurrent/qtconcurrentcompilertest.h
index c139c7a8b2..b6385b5a8f 100644
--- a/src/corelib/concurrent/qtconcurrentcompilertest.h
+++ b/src/corelib/concurrent/qtconcurrentcompilertest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentexception.cpp b/src/corelib/concurrent/qtconcurrentexception.cpp
index 237152c0d3..3bc4c05684 100644
--- a/src/corelib/concurrent/qtconcurrentexception.cpp
+++ b/src/corelib/concurrent/qtconcurrentexception.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentexception.h b/src/corelib/concurrent/qtconcurrentexception.h
index 1c100a5206..c926d9ffe7 100644
--- a/src/corelib/concurrent/qtconcurrentexception.h
+++ b/src/corelib/concurrent/qtconcurrentexception.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentfilter.cpp b/src/corelib/concurrent/qtconcurrentfilter.cpp
index dff5e2e5ed..0b3ddd829d 100644
--- a/src/corelib/concurrent/qtconcurrentfilter.cpp
+++ b/src/corelib/concurrent/qtconcurrentfilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentfilter.h b/src/corelib/concurrent/qtconcurrentfilter.h
index d8c5f43a48..c9ed9bbdfa 100644
--- a/src/corelib/concurrent/qtconcurrentfilter.h
+++ b/src/corelib/concurrent/qtconcurrentfilter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentfilterkernel.h b/src/corelib/concurrent/qtconcurrentfilterkernel.h
index 95dc5b70be..61d13423a3 100644
--- a/src/corelib/concurrent/qtconcurrentfilterkernel.h
+++ b/src/corelib/concurrent/qtconcurrentfilterkernel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentfunctionwrappers.h b/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
index 1e09221cee..1468b4e4e6 100644
--- a/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
+++ b/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
index c9ea79bd34..9b3b177ce8 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.h b/src/corelib/concurrent/qtconcurrentiteratekernel.h
index 49c053caf7..6adb05574b 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.h
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentmap.cpp b/src/corelib/concurrent/qtconcurrentmap.cpp
index ebd0ccdcd8..f078a0646a 100644
--- a/src/corelib/concurrent/qtconcurrentmap.cpp
+++ b/src/corelib/concurrent/qtconcurrentmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentmap.h b/src/corelib/concurrent/qtconcurrentmap.h
index 166d5c8527..d735045173 100644
--- a/src/corelib/concurrent/qtconcurrentmap.h
+++ b/src/corelib/concurrent/qtconcurrentmap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentmapkernel.h b/src/corelib/concurrent/qtconcurrentmapkernel.h
index 48f5b60de1..ed8a1543ce 100644
--- a/src/corelib/concurrent/qtconcurrentmapkernel.h
+++ b/src/corelib/concurrent/qtconcurrentmapkernel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentmedian.h b/src/corelib/concurrent/qtconcurrentmedian.h
index e563b3bd3a..13983fd2a4 100644
--- a/src/corelib/concurrent/qtconcurrentmedian.h
+++ b/src/corelib/concurrent/qtconcurrentmedian.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentreducekernel.h b/src/corelib/concurrent/qtconcurrentreducekernel.h
index ebc37e7936..1a30d2e3e3 100644
--- a/src/corelib/concurrent/qtconcurrentreducekernel.h
+++ b/src/corelib/concurrent/qtconcurrentreducekernel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentresultstore.cpp b/src/corelib/concurrent/qtconcurrentresultstore.cpp
index 89f561c2ac..e9d76448a7 100644
--- a/src/corelib/concurrent/qtconcurrentresultstore.cpp
+++ b/src/corelib/concurrent/qtconcurrentresultstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentresultstore.h b/src/corelib/concurrent/qtconcurrentresultstore.h
index 627aca27bd..c2a9f0a3e2 100644
--- a/src/corelib/concurrent/qtconcurrentresultstore.h
+++ b/src/corelib/concurrent/qtconcurrentresultstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentrun.cpp b/src/corelib/concurrent/qtconcurrentrun.cpp
index 87952da882..676a542471 100644
--- a/src/corelib/concurrent/qtconcurrentrun.cpp
+++ b/src/corelib/concurrent/qtconcurrentrun.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentrun.h b/src/corelib/concurrent/qtconcurrentrun.h
index ef51b2adcb..06da380430 100644
--- a/src/corelib/concurrent/qtconcurrentrun.h
+++ b/src/corelib/concurrent/qtconcurrentrun.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentrunbase.h b/src/corelib/concurrent/qtconcurrentrunbase.h
index c1270e953b..51390028b0 100644
--- a/src/corelib/concurrent/qtconcurrentrunbase.h
+++ b/src/corelib/concurrent/qtconcurrentrunbase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentstoredfunctioncall.h b/src/corelib/concurrent/qtconcurrentstoredfunctioncall.h
index 9beb0b9c35..8a02497ddd 100644
--- a/src/corelib/concurrent/qtconcurrentstoredfunctioncall.h
+++ b/src/corelib/concurrent/qtconcurrentstoredfunctioncall.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentthreadengine.cpp b/src/corelib/concurrent/qtconcurrentthreadengine.cpp
index 71a47164d2..559e7bb490 100644
--- a/src/corelib/concurrent/qtconcurrentthreadengine.cpp
+++ b/src/corelib/concurrent/qtconcurrentthreadengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qtconcurrentthreadengine.h b/src/corelib/concurrent/qtconcurrentthreadengine.h
index 38d01ee11a..98edd2d9ec 100644
--- a/src/corelib/concurrent/qtconcurrentthreadengine.h
+++ b/src/corelib/concurrent/qtconcurrentthreadengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qthreadpool.cpp b/src/corelib/concurrent/qthreadpool.cpp
index 91e77d9eff..2cc31b9943 100644
--- a/src/corelib/concurrent/qthreadpool.cpp
+++ b/src/corelib/concurrent/qthreadpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qthreadpool.h b/src/corelib/concurrent/qthreadpool.h
index d857073b42..1b5677b9fa 100644
--- a/src/corelib/concurrent/qthreadpool.h
+++ b/src/corelib/concurrent/qthreadpool.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/concurrent/qthreadpool_p.h b/src/corelib/concurrent/qthreadpool_p.h
index db50ec92c6..009dfcdee2 100644
--- a/src/corelib/concurrent/qthreadpool_p.h
+++ b/src/corelib/concurrent/qthreadpool_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index edb5ecb849..17c15d42b1 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -23,6 +23,7 @@ include(global/global.pri)
include(thread/thread.pri)
include(tools/tools.pri)
include(io/io.pri)
+include(itemmodels/itemmodels.pri)
include(plugin/plugin.pri)
include(kernel/kernel.pri)
include(codecs/codecs.pri)
diff --git a/src/corelib/global/qconfig-dist.h b/src/corelib/global/qconfig-dist.h
index bc3ab9a024..727eea0018 100644
--- a/src/corelib/global/qconfig-dist.h
+++ b/src/corelib/global/qconfig-dist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qconfig-large.h b/src/corelib/global/qconfig-large.h
index 65367e9be1..8a2553a6a6 100644
--- a/src/corelib/global/qconfig-large.h
+++ b/src/corelib/global/qconfig-large.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qconfig-medium.h b/src/corelib/global/qconfig-medium.h
index f9ecf92388..96207d1cd8 100644
--- a/src/corelib/global/qconfig-medium.h
+++ b/src/corelib/global/qconfig-medium.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qconfig-minimal.h b/src/corelib/global/qconfig-minimal.h
index ace1eea508..30440243de 100644
--- a/src/corelib/global/qconfig-minimal.h
+++ b/src/corelib/global/qconfig-minimal.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -104,9 +104,6 @@
#ifndef QT_NO_TEMPORARYFILE
# define QT_NO_TEMPORARYFILE
#endif
-#ifndef QT_NO_TEXTSTREAM
-# define QT_NO_TEXTSTREAM
-#endif
#ifndef QT_NO_SETTINGS
# define QT_NO_SETTINGS
#endif
diff --git a/src/corelib/global/qconfig-nacl.h b/src/corelib/global/qconfig-nacl.h
index 18ae261809..6b943ab422 100644
--- a/src/corelib/global/qconfig-nacl.h
+++ b/src/corelib/global/qconfig-nacl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qconfig-small.h b/src/corelib/global/qconfig-small.h
index 4f34169d75..84a5ec59d9 100644
--- a/src/corelib/global/qconfig-small.h
+++ b/src/corelib/global/qconfig-small.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -77,9 +77,6 @@
#endif
/* File I/O */
-#ifndef QT_NO_TEXTSTREAM
-# define QT_NO_TEXTSTREAM
-#endif
#ifndef QT_NO_SETTINGS
# define QT_NO_SETTINGS
#endif
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 8a17af55f2..66d66cb78f 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qendian.qdoc b/src/corelib/global/qendian.qdoc
index 307db59426..3133d3c252 100644
--- a/src/corelib/global/qendian.qdoc
+++ b/src/corelib/global/qendian.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index e0b8a8fb6d..5055414834 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -289,9 +289,6 @@
// HtmlParser
//#define QT_NO_TEXTHTMLPARSER
-// QTextStream
-//#define QT_NO_TEXTSTREAM
-
// QToolTip
//#define QT_NO_TOOLTIP
@@ -351,16 +348,6 @@
#define QT_NO_FILESYSTEMMODEL
#endif
-// QHostInfo
-#if !defined(QT_NO_HOSTINFO) && (defined(QT_NO_TEXTSTREAM))
-#define QT_NO_HOSTINFO
-#endif
-
-// XPM Image Format
-#if !defined(QT_NO_IMAGEFORMAT_XPM) && (defined(QT_NO_TEXTSTREAM))
-#define QT_NO_IMAGEFORMAT_XPM
-#endif
-
// QLibrary
#if !defined(QT_NO_LIBRARY) && (defined(QT_NO_SETTINGS))
#define QT_NO_LIBRARY
@@ -597,7 +584,7 @@
#endif
// QPrinter
-#if !defined(QT_NO_PRINTER) && (defined(QT_NO_TEXTSTREAM) || defined(QT_NO_PICTURE) || defined(QT_NO_TEMPORARYFILE))
+#if !defined(QT_NO_PRINTER) && (defined(QT_NO_PICTURE) || defined(QT_NO_TEMPORARYFILE))
#define QT_NO_PRINTER
#endif
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 6b861d4d17..4eae2f50ec 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -192,13 +192,6 @@ Requires:
Name: QProcess
SeeAlso: ???
-Feature: TEXTSTREAM
-Description: Supports reading and writing of text.
-Section: File I/O
-Requires:
-Name: QTextStream
-SeeAlso: ???
-
Feature: TEMPORARYFILE
Description: Provides an I/O device that operates on temporary files.
Section: File I/O
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 615598b378..f8fc49ddbf 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -78,17 +78,6 @@
#include <CoreServices/CoreServices.h>
#endif
-#if defined(Q_OS_SYMBIAN)
-#include <e32def.h>
-#include <e32debug.h>
-#include <f32file.h>
-#include <e32math.h>
-# include "private/qcore_symbian_p.h"
-
-_LIT(qt_S60Filter, "Series60v?.*.sis");
-_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
-#endif
-
QT_BEGIN_NAMESPACE
@@ -970,22 +959,6 @@ bool qSharedBuild()
*/
/*!
- \fn QSysInfo::SymbianVersion QSysInfo::symbianVersion()
- \since 4.6
-
- Returns the version of the Symbian operating system on which the
- application is run (Symbian only).
-*/
-
-/*!
- \fn QSysInfo::S60Version QSysInfo::s60Version()
- \since 4.6
-
- Returns the version of the S60 SDK system on which the
- application is run (S60 only).
-*/
-
-/*!
\enum QSysInfo::Endian
\value BigEndian Big-endian byte order (also called Network byte order)
@@ -1041,7 +1014,7 @@ bool qSharedBuild()
\value WV_NT_based NT-based version of Windows
\value WV_CE_based CE-based version of Windows
- \sa MacVersion, SymbianVersion
+ \sa MacVersion
*/
/*!
@@ -1072,50 +1045,7 @@ bool qSharedBuild()
\value MV_SNOWLEOPARD Apple codename for MV_10_6
\value MV_LION Apple codename for MV_10_7
- \sa WinVersion, SymbianVersion
-*/
-
-/*!
- \enum QSysInfo::SymbianVersion
-
- This enum provides symbolic names for the various versions of the
- Symbian operating system. On Symbian, the
- QSysInfo::symbianVersion() function gives the version of the
- system on which the application is run.
-
- \value SV_9_2 Symbian OS v9.2
- \value SV_9_3 Symbian OS v9.3
- \value SV_9_4 Symbian OS v9.4
- \value SV_SF_1 S60 5th Edition (Symbian^1)
- \value SV_SF_2 Symbian^2
- \value SV_SF_3 Symbian^3 or Symbian Anna
- \value SV_SF_4 \e{This enum value is deprecated.}
- \value SV_API_5_3 Symbian/S60 API version 5.3 release
- \value SV_API_5_4 Symbian/S60 API version 5.4 release
- \value SV_Unknown An unknown and currently unsupported platform
-
- \sa S60Version, WinVersion, MacVersion
-*/
-
-/*!
- \enum QSysInfo::S60Version
-
- This enum provides symbolic names for the various versions of the
- S60 SDK. On S60, the
- QSysInfo::s60Version() function gives the version of the
- SDK on which the application is run.
-
- \value SV_S60_3_1 S60 3rd Edition Feature Pack 1
- \value SV_S60_3_2 S60 3rd Edition Feature Pack 2
- \value SV_S60_5_0 S60 5th Edition
- \value SV_S60_5_1 \e{This enum value is deprecated.}
- \value SV_S60_5_2 Symbian^3 and Symbian Anna
- \value SV_S60_5_3 Symbian/S60 API version 5.3 release
- \value SV_S60_5_4 Symbian/S60 API version 5.4 release
- \value SV_S60_Unknown An unknown and currently unsupported platform
- \omitvalue SV_S60_None
-
- \sa SymbianVersion, WinVersion, MacVersion
+ \sa WinVersion
*/
/*!
@@ -1625,108 +1555,6 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#endif
-#ifdef Q_OS_SYMBIAN
-static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
-static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
-
-static void symbianInitVersions()
-{
- // Use pure Symbian code, because if done using QDir, there will be a call back
- // to this method, resulting doing this expensive operation twice before the cache kicks in.
- // Pure Symbian code also makes this method ~10x faster, speeding up the application launch.
- RFs rfs = qt_s60GetRFs();
- TFindFile fileFinder(rfs);
- CDir* contents;
-
- // Check for platform version
- TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
- if (err == KErrNone) {
- QScopedPointer<CDir> contentsDeleter(contents);
- err = contents->Sort(EDescending|ESortByName);
- if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) {
- TInt major = (*contents)[0].iName[9] - '0';
- TInt minor = (*contents)[0].iName[11] - '0';
- if (major == 3) {
- if (minor == 1) {
- cachedS60Version = QSysInfo::SV_S60_3_1;
- cachedSymbianVersion = QSysInfo::SV_9_2;
- } else if (minor == 2) {
- cachedS60Version = QSysInfo::SV_S60_3_2;
- cachedSymbianVersion = QSysInfo::SV_9_3;
- }
- } else if (major == 5) {
- if (minor == 0) {
- cachedS60Version = QSysInfo::SV_S60_5_0;
- cachedSymbianVersion = QSysInfo::SV_9_4;
- } else if (minor == 1) {
- cachedS60Version = QSysInfo::SV_S60_5_1;
- cachedSymbianVersion = QSysInfo::SV_SF_2;
- } else if (minor == 2) {
- cachedS60Version = QSysInfo::SV_S60_5_2;
- cachedSymbianVersion = QSysInfo::SV_SF_3;
- } else if (minor == 3) {
- cachedS60Version = QSysInfo::SV_S60_5_3;
- cachedSymbianVersion = QSysInfo::SV_API_5_3;
- } else if (minor >= 4) {
- cachedS60Version = QSysInfo::SV_S60_5_4;
- cachedSymbianVersion = QSysInfo::SV_API_5_4;
- }
- }
- }
- }
-
-# ifdef Q_CC_NOKIAX86
- if (cachedS60Version == -1) {
- // Some emulator environments may not contain the version specific .sis files, so
- // simply hardcode the version on those environments. Note that can't use
- // S60_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
- // right anyway in case .sis files are not found.
-# if defined(__SERIES60_31__)
- cachedS60Version = QSysInfo::SV_S60_3_1;
- cachedSymbianVersion = QSysInfo::SV_9_2;
-# elif defined(__S60_32__)
- cachedS60Version = QSysInfo::SV_S60_3_2;
- cachedSymbianVersion = QSysInfo::SV_9_3;
-# elif defined(__S60_50__)
- cachedS60Version = QSysInfo::SV_S60_5_0;
- cachedSymbianVersion = QSysInfo::SV_9_4;
-# elif defined(S60_VERSION_5_2)
- cachedS60Version = QSysInfo::SV_S60_5_2;
- cachedSymbianVersion = QSysInfo::SV_SF_3;
-# elif defined(S60_VERSION_5_3)
- cachedS60Version = QSysInfo::SV_S60_5_3;
- cachedSymbianVersion = QSysInfo::SV_API_5_3;
-# elif defined(S60_VERSION_5_4)
- cachedS60Version = QSysInfo::SV_S60_5_4;
- cachedSymbianVersion = QSysInfo::SV_API_5_4;
-# endif
- }
-# endif
-
- if (cachedS60Version == -1) {
- //If reaching here, it was not possible to determine the version
- cachedS60Version = QSysInfo::SV_S60_Unknown;
- cachedSymbianVersion = QSysInfo::SV_Unknown;
- }
-}
-
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
-{
- if (cachedSymbianVersion == -1)
- symbianInitVersions();
-
- return cachedSymbianVersion;
-}
-
-QSysInfo::S60Version QSysInfo::s60Version()
-{
- if (cachedS60Version == -1)
- symbianInitVersions();
-
- return cachedS60Version;
-}
-#endif // ifdef Q_OS_SYMBIAN
-
/*!
\macro void Q_ASSERT(bool test)
\relates <QtGlobal>
@@ -2037,18 +1865,6 @@ static void qDefaultMsgHandler(QtMsgType, const char *buf)
QString fstr = QString::fromLatin1(buf);
fstr += QLatin1Char('\n');
OutputDebugString(reinterpret_cast<const wchar_t *> (fstr.utf16()));
-#elif defined(Q_OS_SYMBIAN)
- // RDebug::Print has a cap of 256 characters so break it up
- _LIT(format, "[Qt Message] %S");
- const int maxBlockSize = 256 - ((const TDesC &)format).Length();
- const TPtrC8 ptr(reinterpret_cast<const TUint8*>(buf));
- HBufC* hbuffer = HBufC::New(qMin(maxBlockSize, ptr.Length()));
- Q_CHECK_PTR(hbuffer);
- for (int i = 0; i < ptr.Length(); i += hbuffer->Length()) {
- hbuffer->Des().Copy(ptr.Mid(i, qMin(maxBlockSize, ptr.Length()-i)));
- RDebug::Print(format, hbuffer);
- }
- delete hbuffer;
#else
fprintf(stderr, "%s\n", buf);
fflush(stderr);
@@ -2099,15 +1915,7 @@ void qt_message_output(QtMsgType msgType, const char *buf)
_CrtDbgBreak();
#endif
-#if defined(Q_OS_SYMBIAN)
- __DEBUGGER(); // on the emulator, get the debugger to kick in if there's one around
- TBuf<256> tmp;
- TPtrC8 ptr(reinterpret_cast<const TUint8*>(buf));
- TInt len = Min(tmp.MaxLength(), ptr.Length());
- tmp.Copy(ptr.Left(len));
- // Panic the current thread. We don't use real panic codes, so 0 has no special meaning.
- User::Panic(tmp, 0);
-#elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
+#if (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
abort(); // trap; generates core dump
#else
exit(1); // goodbye cruel world
@@ -2400,7 +2208,7 @@ bool qputenv(const char *varName, const QByteArray& value)
#endif
}
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
# if defined(Q_OS_INTEGRITY) && defined(__GHS_VERSION_NUMBER) && (__GHS_VERSION_NUMBER < 500)
// older versions of INTEGRITY used a long instead of a uint for the seed.
@@ -2431,7 +2239,7 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value
*/
void qsrand(uint seed)
{
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
SeedStorage *seedStorage = randTLS();
if (seedStorage) {
SeedStorageType *pseed = seedStorage->localData();
@@ -2446,7 +2254,7 @@ void qsrand(uint seed)
srand(seed);
}
#else
- // On Windows and Symbian srand() and rand() already use Thread-Local-Storage
+ // On Windows srand() and rand() already use Thread-Local-Storage
// to store the seed between calls
// this is also valid for QT_NO_THREAD
srand(seed);
@@ -2470,7 +2278,7 @@ void qsrand(uint seed)
*/
int qrand()
{
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
SeedStorage *seedStorage = randTLS();
if (seedStorage) {
SeedStorageType *pseed = seedStorage->localData();
@@ -2487,7 +2295,7 @@ int qrand()
return rand();
}
#else
- // On Windows and Symbian srand() and rand() already use Thread-Local-Storage
+ // On Windows srand() and rand() already use Thread-Local-Storage
// to store the seed between calls
// this is also valid for QT_NO_THREAD
return rand();
@@ -3160,185 +2968,15 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
\sa Q_DECL_EXPORT
*/
-#if defined(Q_OS_SYMBIAN)
-
-#include <typeinfo>
-
-/*! \macro QT_TRAP_THROWING(function)
- \relates <QtGlobal>
- \ingroup qts60
-
- TRAP leaves from Symbian \a function and throws an appropriate
- standard C++ exception instead.
- This must be used when calling Symbian OS leaving functions
- from inside Qt or standard C++ code, so that the code can respond
- correctly to the exception.
-
- \warning This macro is only available on Symbian.
-
- Example:
-
- \code
- // A Symbian leaving function is being called within a Qt function.
- // Any leave must be converted to an exception
- CAknTitlePane* titlePane = S60->titlePane();
- if (titlePane) {
- TPtrC captionPtr(qt_QString2TPtrC(caption));
- QT_TRAP_THROWING(titlePane->SetTextL(captionPtr));
- }
- \endcode
-
- \sa QT_TRYCATCH_ERROR(), QT_TRYCATCH_LEAVING()
-*/
-
-/*! \macro QT_TRYCATCH_ERROR(error, function)
- \relates <QtGlobal>
- \ingroup qts60
-
- Catch standard C++ exceptions from a \a function and convert them to a Symbian OS
- \a error code, or \c KErrNone if there is no exception.
- This must be used inside Qt or standard C++ code when using exception throwing
- code (practically anything) and returning an error code to Symbian OS.
-
- \warning This macro is only available on Symbian.
-
- Example:
-
- \code
- // An exception might be thrown in this Symbian TInt error returning function.
- // It is caught and translated to an error code
- TInt QServerApp::Connect(const QString &serverName)
- {
- TPtrC name;
- TInt err;
- QT_TRYCATCH_ERROR(err, name.Set(qt_QString2TPtrC(serverName)));
- if (err != KErrNone)
- return err;
- return iServer.Connect(name);
- }
- \endcode
-}
-
- \sa QT_TRYCATCH_LEAVING(), QT_TRAP_THROWING()
-*/
-
-/*! \macro QT_TRYCATCH_LEAVING(function)
+/*!
+ \macro Q_DECL_CONSTEXPR
\relates <QtGlobal>
- \ingroup qts60
-
- Catch standard C++ exceptions from \a function and convert them to Symbian OS
- leaves. This must be used inside Qt or standard C++ code when using exception
- throwing code (practically anything) and returning to Symbian OS from a leaving function.
- For example inside a Symbian active object's \c RunL function implemented with Qt code.
-
- \warning This macro is only available on Symbian.
-
- Example:
-
- \code
- // This active object signals Qt code
- // Exceptions from the Qt code must be converted to Symbian OS leaves for the active scheduler
- void QWakeUpActiveObject::RunL()
- {
- iStatus = KRequestPending;
- SetActive();
- QT_TRYCATCH_LEAVING(m_dispatcher->wakeUpWasCalled());
- }
- \endcode
-
- \sa QT_TRAP_THROWING(), QT_TRYCATCH_ERROR()
-*/
-#include <stdexcept>
+ This macro can be used to declare variable that should be constructed at compile-time,
+ or an inline function that can be computed at compile-time.
-class QSymbianLeaveException : public std::exception
-{
-public:
- inline QSymbianLeaveException(int err) : error(err) {}
- inline const char* what() const throw() { return "Symbian leave exception"; }
-
-public:
- int error;
-};
-
-/*! \relates <QtGlobal>
- \ingroup qts60
-
- Throws an exception if the \a error parameter is a symbian error code.
- This is the exception throwing equivalent of Symbian's User::LeaveIfError.
-
- \warning This function is only available on Symbian.
-
- \sa qt_symbian_exception2LeaveL(), qt_symbian_exception2Error()
+ It expands to "constexpr" if your compiler supports that C++11 keyword, or to nothing
+ otherwise.
*/
-void qt_symbian_throwIfError(int error)
-{
- if (error >= KErrNone)
- return; // do nothing - not an exception
- switch (error) {
- case KErrNoMemory:
- throw std::bad_alloc();
- case KErrArgument:
- throw std::invalid_argument("from Symbian error");
- case KErrOverflow:
- throw std::overflow_error("from Symbian error");
- case KErrUnderflow:
- throw std::underflow_error("from Symbian error");
- default:
- throw QSymbianLeaveException(error);
- }
-}
-
-/*! \relates <QtGlobal>
- \ingroup qts60
-
- Convert a caught standard C++ exception \a aThrow to a Symbian leave
-
- \warning This function is only available on Symbian.
-
- \sa qt_symbian_throwIfError(), qt_symbian_exception2Error()
-*/
-void qt_symbian_exception2LeaveL(const std::exception& aThrow)
-{
- User::Leave(qt_symbian_exception2Error(aThrow));
-}
-
-/*! \relates <QtGlobal>
- \ingroup qts60
-
- Convert a caught standard C++ exception \a aThrow to a Symbian error code
-
- \warning This function is only available on Symbian.
-
- \sa qt_symbian_throwIfError(), qt_symbian_exception2LeaveL()
-*/
-int qt_symbian_exception2Error(const std::exception& aThrow)
-{
- const std::type_info& atype = typeid(aThrow);
- int err = KErrGeneral;
-
- if(atype == typeid (std::bad_alloc))
- err = KErrNoMemory;
- else if(atype == typeid(QSymbianLeaveException))
- err = static_cast<const QSymbianLeaveException&>(aThrow).error;
- else {
- if(atype == typeid(std::invalid_argument))
- err = KErrArgument;
- else if(atype == typeid(std::out_of_range))
- // std::out_of_range is of type logic_error which by definition means that it is
- // "presumably detectable before the program executes".
- // std::out_of_range is used to report an argument is not within the expected range.
- // The description of KErrArgument says an argument is out of range. Hence the mapping.
- err = KErrArgument;
- else if(atype == typeid(std::overflow_error))
- err = KErrOverflow;
- else if(atype == typeid(std::underflow_error))
- err = KErrUnderflow;
- qWarning("translation from std exception \"%s\" to %d", aThrow.what(), err);
- }
-
- return err;
-}
-#endif
QT_END_NAMESPACE
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index e22d66628e..fd5c5d6315 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,8 +76,12 @@
# define QT_END_NAMESPACE
# define QT_BEGIN_INCLUDE_NAMESPACE
# define QT_END_INCLUDE_NAMESPACE
+#ifndef QT_BEGIN_MOC_NAMESPACE
# define QT_BEGIN_MOC_NAMESPACE
+#endif
+#ifndef QT_END_MOC_NAMESPACE
# define QT_END_MOC_NAMESPACE
+#endif
# define QT_FORWARD_DECLARE_CLASS(name) class name;
# define QT_FORWARD_DECLARE_STRUCT(name) struct name;
# define QT_MANGLE_NAMESPACE(name) name
@@ -90,8 +94,12 @@
# define QT_END_NAMESPACE }
# define QT_BEGIN_INCLUDE_NAMESPACE }
# define QT_END_INCLUDE_NAMESPACE namespace QT_NAMESPACE {
+#ifndef QT_BEGIN_MOC_NAMESPACE
# define QT_BEGIN_MOC_NAMESPACE QT_USE_NAMESPACE
+#endif
+#ifndef QT_END_MOC_NAMESPACE
# define QT_END_MOC_NAMESPACE
+#endif
# define QT_FORWARD_DECLARE_CLASS(name) \
QT_BEGIN_NAMESPACE class name; QT_END_NAMESPACE \
using QT_PREPEND_NAMESPACE(name);
@@ -450,7 +458,6 @@ namespace QT_NAMESPACE {}
/* GCC 2.95 knows "using" but does not support it correctly */
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
# define Q_NO_USING_KEYWORD
-# define QT_NO_STL_WCHAR
# endif
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
# define Q_ALIGNOF(type) __alignof__(type)
@@ -480,9 +487,13 @@ namespace QT_NAMESPACE {}
# define QT_NO_ARM_EABI
# endif
# endif
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
+# define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
+# endif
+# if defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__clang__) /* clang C++11 enablers are found below, don't do them here */
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
/* C++0x features supported in GCC 4.3: */
+# define Q_COMPILER_VARIADIC_MACROS
# define Q_COMPILER_RVALUE_REFS
# define Q_COMPILER_DECLTYPE
# define Q_COMPILER_STATIC_ASSERT
@@ -509,6 +520,11 @@ namespace QT_NAMESPACE {}
# define Q_COMPILER_UNRESTRICTED_UNIONS
# define Q_COMPILER_RANGE_FOR
# endif
+# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407
+ /* C++0x features supported in GCC 4.7: */
+# define Q_COMPILER_EXPLICIT_OVERRIDES
+# define Q_COMPILER_FINAL
+# endif
# endif
@@ -541,7 +557,6 @@ namespace QT_NAMESPACE {}
# define Q_NO_BOOL_TYPE
# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
-# define Q_TYPENAME
# define Q_OUTOFLINE_TEMPLATE inline
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
# define Q_CANNOT_DELETE_CONSTANT
@@ -575,7 +590,6 @@ namespace QT_NAMESPACE {}
/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
DEC C++ V5.5-004. */
# if __DECCXX_VER < 60060000
-# define Q_TYPENAME
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
# define Q_CANNOT_DELETE_CONSTANT
# endif
@@ -773,6 +787,45 @@ namespace QT_NAMESPACE {}
# endif
#endif
+#ifdef Q_CC_CLANG
+/* General C++ features */
+# if !__has_feature(cxx_exceptions)
+# define QT_NO_EXCEPTIONS
+# endif
+# if !__has_feature(cxx_rtti)
+# define QT_NO_RTTI
+# endif
+/* C++11 features, see http://clang.llvm.org/cxx_status.html */
+# if __cplusplus >= 201103L || __GXX_EXPERIMENTAL_CXX0X__
+# if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */
+# define Q_COMPILER_AUTO_TYPE
+# define Q_COMPILER_DECLTYPE
+# define Q_COMPILER_EXTERN_TEMPLATES
+# define Q_COMPILER_RVALUE_REFS
+# define Q_COMPILER_STATIC_ASSERT
+# define Q_COMPILER_VARIADIC_MACROS
+# define Q_COMPILER_VARIADIC_TEMPLATES
+# endif
+# if ((__clang_major__ * 100) + __clang_minor__) >= 300 /* since clang 3.0 */
+# define Q_COMPILER_CLASS_ENUM
+ /* defaulted members in 3.0, deleted members in 2.9 */
+# define Q_COMPILER_DEFAULT_DELETE_MEMBERS
+# define Q_COMPILER_EXPLICIT_OVERRIDES
+# define Q_COMPILER_NULLPTR
+# define Q_COMPILER_RANGE_FOR
+# define Q_COMPILER_UNICODE_STRINGS
+# endif
+# if 0 /*) not implemented in clang */
+# define Q_COMPILER_ATOMICS
+# define Q_COMPILER_CONSTEXPR
+# define Q_COMPILER_FINAL
+# define Q_COMPILER_INITIALIZER_LISTS
+# define Q_COMPILER_LAMBDA
+# define Q_COMPILER_UNRESTRICTED_UNIONS
+# endif
+# endif
+#endif
+
#ifndef Q_PACKED
# define Q_PACKED
# undef Q_NO_PACKED_REFERENCE
@@ -785,6 +838,10 @@ namespace QT_NAMESPACE {}
# define Q_UNLIKELY(x) (x)
#endif
+#ifndef Q_ALLOC_SIZE
+# define Q_ALLOC_SIZE(x)
+#endif
+
#ifndef Q_CONSTRUCTOR_FUNCTION
# define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
namespace { \
@@ -885,6 +942,7 @@ template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qin
template <class T> struct QIntegerForSizeof: QIntegerForSize<sizeof(T)> { };
typedef QIntegerForSizeof<void*>::Unsigned quintptr;
typedef QIntegerForSizeof<void*>::Signed qptrdiff;
+typedef qptrdiff qintptr;
/*
Useful type definitions for Qt
@@ -907,14 +965,6 @@ QT_END_INCLUDE_NAMESPACE
*/
#ifndef QT_LINUXBASE /* the LSB defines TRUE and FALSE for us */
-/* Symbian OS defines TRUE = 1 and FALSE = 0,
-redefine to built-in booleans to make autotests work properly */
-#ifdef Q_OS_SYMBIAN
- #include <e32def.h> /* Symbian OS defines */
-
- #undef TRUE
- #undef FALSE
-#endif
# ifndef TRUE
# define TRUE true
# define FALSE false
@@ -1057,12 +1107,30 @@ redefine to built-in booleans to make autotests work properly */
# define Q_NULLPTR 0
#endif
+#ifdef Q_COMPILER_DEFAULT_DELETE_MEMBERS
+# define Q_DECL_EQ_DELETE = delete
+#else
+# define Q_DECL_EQ_DELETE
+#endif
+
#ifdef Q_COMPILER_CONSTEXPR
# define Q_DECL_CONSTEXPR constexpr
#else
# define Q_DECL_CONSTEXPR
#endif
+#ifdef Q_COMPILER_EXPLICIT_OVERRIDES
+# define Q_DECL_OVERRIDE override
+#else
+# define Q_DECL_OVERRIDE
+#endif
+
+#ifdef Q_COMPILER_FINAL
+# define Q_DECL_FINAL final
+#else
+# define Q_DECL_FINAL
+#endif
+
//defines the type for the WNDPROC on windows
//the alignment needs to be forced for sse2 to not crash with mingw
#if defined(Q_OS_WIN)
@@ -1079,7 +1147,7 @@ typedef int QNoImplicitBoolCast;
// This logic must match the one in qmetatype.h
#if defined(QT_COORD_TYPE)
typedef QT_COORD_TYPE qreal;
-#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
+#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
typedef float qreal;
#else
typedef double qreal;
@@ -1175,10 +1243,10 @@ class QDataStream;
/*
- Create Qt DLL if QT_DLL is defined (Windows and Symbian only)
+ Create Qt DLL if QT_DLL is defined (Windows only)
*/
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
# if defined(QT_NODLL)
# undef QT_MAKEDLL
# undef QT_DLL
@@ -1421,11 +1489,11 @@ class QDataStream;
for Qt's internal unit tests. If you want slower loading times and more
symbols that can vanish from version to version, feel free to define QT_BUILD_INTERNAL.
*/
-#if defined(QT_BUILD_INTERNAL) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_MAKEDLL)
+#if defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && defined(QT_MAKEDLL)
# define Q_AUTOTEST_EXPORT Q_DECL_EXPORT
-#elif defined(QT_BUILD_INTERNAL) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_DLL)
+#elif defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && defined(QT_DLL)
# define Q_AUTOTEST_EXPORT Q_DECL_IMPORT
-#elif defined(QT_BUILD_INTERNAL) && !(defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_SHARED)
+#elif defined(QT_BUILD_INTERNAL) && !defined(Q_OS_WIN) && defined(QT_SHARED)
# define Q_AUTOTEST_EXPORT Q_DECL_EXPORT
#else
# define Q_AUTOTEST_EXPORT
@@ -1558,35 +1626,6 @@ public:
};
static const MacVersion MacintoshVersion;
#endif
-#ifdef Q_OS_SYMBIAN
- enum SymbianVersion {
- SV_Unknown = 1000000, // Assume unknown is something newer than what is supported
- //These are the Symbian Ltd versions 9.2-9.4
- SV_9_2 = 10,
- SV_9_3 = 20,
- SV_9_4 = 30,
- //Following values are the symbian foundation versions, i.e. Symbian^1 == SV_SF_1
- SV_SF_1 = SV_9_4,
- SV_SF_2 = 40,
- SV_SF_3 = 50,
- SV_SF_4 = 60, // Deprecated
- SV_API_5_3 = 70,
- SV_API_5_4 = 80
- };
- static SymbianVersion symbianVersion();
- enum S60Version {
- SV_S60_None = 0,
- SV_S60_Unknown = SV_Unknown,
- SV_S60_3_1 = SV_9_2,
- SV_S60_3_2 = SV_9_3,
- SV_S60_5_0 = SV_9_4,
- SV_S60_5_1 = SV_SF_2, // Deprecated
- SV_S60_5_2 = SV_SF_3,
- SV_S60_5_3 = SV_API_5_3,
- SV_S60_5_4 = SV_API_5_4
- };
- static S60Version s60Version();
-#endif
};
Q_CORE_EXPORT const char *qVersion();
@@ -1603,10 +1642,6 @@ inline int qMacVersion() { return QSysInfo::MacintoshVersion; }
# define Q_INLINE_TEMPLATE inline
#endif
-#ifndef Q_TYPENAME
-# define Q_TYPENAME typename
-#endif
-
/*
Avoid "unused parameter" warnings
*/
@@ -1623,15 +1658,6 @@ inline void qUnused(T &x) { (void)x; }
Debugging and error handling
*/
-/*
- On Symbian we do not know beforehand whether we are compiling in
- release or debug mode, so check the Symbian build define here,
- and set the QT_NO_DEBUG define appropriately.
-*/
-#if defined(Q_OS_SYMBIAN) && defined(NDEBUG) && !defined(QT_NO_DEBUG)
-# define QT_NO_DEBUG
-#endif
-
#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
# define QT_DEBUG
#endif
@@ -1668,10 +1694,6 @@ Q_CORE_EXPORT void qFatal(const char *, ...) /* print fatal message and exit */
Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...);
Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...);
-#if (defined(QT_NO_DEBUG_OUTPUT) || defined(QT_NO_TEXTSTREAM)) && !defined(QT_NO_DEBUG_STREAM)
-#define QT_NO_DEBUG_STREAM
-#endif
-
/*
Forward declarations only.
@@ -1679,13 +1701,19 @@ Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...);
*/
class QDebug;
class QNoDebug;
-#ifndef QT_NO_DEBUG_STREAM
+#if !defined(QT_NO_DEBUG_OUTPUT) && !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT_INLINE QDebug qDebug();
-Q_CORE_EXPORT_INLINE QDebug qWarning();
-Q_CORE_EXPORT_INLINE QDebug qCritical();
#else
inline QNoDebug qDebug();
#endif
+#if !defined(QT_NO_WARNING_OUTPUT) && !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT_INLINE QDebug qWarning();
+#else
+inline QNoDebug qWarning();
+#endif
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT_INLINE QDebug qCritical();
+#endif
#define QT_NO_QDEBUG_MACRO while (false) qDebug
#ifdef QT_NO_DEBUG_OUTPUT
@@ -1714,10 +1742,10 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line);
Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line);
#if !defined(Q_ASSERT_X)
-# ifndef QT_NO_DEBUG
-# define Q_ASSERT_X(cond, where, what) ((!(cond)) ? qt_assert_x(where, what,__FILE__,__LINE__) : qt_noop())
-# else
+# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
# define Q_ASSERT_X(cond, where, what) qt_noop()
+# else
+# define Q_ASSERT_X(cond, where, what) ((!(cond)) ? qt_assert_x(where, what,__FILE__,__LINE__) : qt_noop())
# endif
#endif
@@ -1733,7 +1761,7 @@ template <> class QStaticAssertFailure<true> {};
#define Q_STATIC_ASSERT_PRIVATE_JOIN(A, B) Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL(A, B)
#define Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL(A, B) A ## B
#define Q_STATIC_ASSERT(Condition) \
- enum {Q_STATIC_ASSERT_PRIVATE_JOIN(q_static_assert_result, __LINE__) = sizeof(QStaticAssertFailure<(bool)(Condition)>)}
+ enum {Q_STATIC_ASSERT_PRIVATE_JOIN(q_static_assert_result, __LINE__) = sizeof(QStaticAssertFailure<(Condition)>)}
#define Q_STATIC_ASSERT_X(Condition, Message) Q_STATIC_ASSERT(Condition)
#endif
@@ -1758,7 +1786,7 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; }
#elif defined(_MSC_VER)
# define Q_FUNC_INFO __FUNCSIG__
#else
-# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN)
+# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC)
# define Q_FUNC_INFO __FILE__ "(line number unavailable)"
# else
/* These two macros makes it possible to turn the builtin line expander into a
@@ -2027,6 +2055,19 @@ public:
};
};
+template<>
+class QTypeInfo<void>
+{
+public:
+ enum {
+ isPointer = false,
+ isComplex = false,
+ isStatic = false,
+ isLarge = false,
+ isDummy = false
+ };
+};
+
template <typename T>
class QTypeInfo<T*>
{
@@ -2140,11 +2181,11 @@ Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE);
These functions make it possible to use standard C++ functions with
a similar name from Qt header files (especially template classes).
*/
-Q_CORE_EXPORT void *qMalloc(size_t size);
+Q_CORE_EXPORT void *qMalloc(size_t size) Q_ALLOC_SIZE(1);
Q_CORE_EXPORT void qFree(void *ptr);
-Q_CORE_EXPORT void *qRealloc(void *ptr, size_t size);
-Q_CORE_EXPORT void *qMallocAligned(size_t size, size_t alignment);
-Q_CORE_EXPORT void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment);
+Q_CORE_EXPORT void *qRealloc(void *ptr, size_t size) Q_ALLOC_SIZE(2);
+Q_CORE_EXPORT void *qMallocAligned(size_t size, size_t alignment) Q_ALLOC_SIZE(1);
+Q_CORE_EXPORT void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment) Q_ALLOC_SIZE(2);
Q_CORE_EXPORT void qFreeAligned(void *ptr);
Q_CORE_EXPORT void *qMemCopy(void *dest, const void *src, size_t n);
Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
@@ -2418,15 +2459,9 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1);
classes contains a private copy constructor and assignment
operator to disable copying (the compiler gives an error message).
*/
-#ifdef Q_COMPILER_DEFAULT_DELETE_MEMBERS
#define Q_DISABLE_COPY(Class) \
- Class(const Class &) = delete;\
- Class &operator=(const Class &) = delete;
-#else
-#define Q_DISABLE_COPY(Class) \
- Class(const Class &); \
- Class &operator=(const Class &);
-#endif
+ Class(const Class &) Q_DECL_EQ_DELETE;\
+ Class &operator=(const Class &) Q_DECL_EQ_DELETE;
class QByteArray;
Q_CORE_EXPORT QByteArray qgetenv(const char *varName);
@@ -2441,77 +2476,6 @@ inline int qIntCast(float f) { return int(f); }
Q_CORE_EXPORT void qsrand(uint seed);
Q_CORE_EXPORT int qrand();
-#if defined(Q_OS_SYMBIAN)
-
-#ifdef SYMBIAN_BUILD_GCE
-#define Q_SYMBIAN_SUPPORTS_SURFACES
-//RWsPointerCursor is fixed, so don't use low performance sprites
-#define Q_SYMBIAN_FIXED_POINTER_CURSORS
-#define Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
-#define Q_SYMBIAN_WINDOW_SIZE_CACHE
-#define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
-
-//enabling new graphics resources
-#ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
-# define QT_SYMBIAN_SUPPORTS_SGIMAGE
-#endif
-
-#ifdef SYMBIAN_GRAPHICS_SET_SURFACE_TRANSPARENCY_AVAILABLE
-# define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
-#endif
-
-#ifdef SYMBIAN_GRAPHICS_TRANSITION_EFFECTS_SIGNALING_AVAILABLE
-# define Q_SYMBIAN_TRANSITION_EFFECTS
-#endif
-#endif
-
-#ifdef SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS
-#define Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS
-#endif
-
-#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
-#define Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION
-#endif
-
-//Symbian does not support data imports from a DLL
-#define Q_NO_DATA_RELOCATION
-
-QT_END_NAMESPACE
-// forward declare std::exception
-#ifdef __cplusplus
-namespace std { class exception; }
-#endif
-QT_BEGIN_NAMESPACE
-Q_CORE_EXPORT void qt_symbian_throwIfError(int error);
-Q_CORE_EXPORT void qt_symbian_exception2LeaveL(const std::exception& ex);
-Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex);
-
-#define QT_TRAP_THROWING(_f) \
- { \
- TInt ____error; \
- TRAP(____error, _f); \
- qt_symbian_throwIfError(____error); \
- }
-
-#define QT_TRYCATCH_ERROR(_err, _f) \
- { \
- _err = KErrNone; \
- try { \
- _f; \
- } catch (const std::exception &____ex) { \
- _err = qt_symbian_exception2Error(____ex); \
- } \
- }
-
-#define QT_TRYCATCH_LEAVING(_f) \
- { \
- TInt ____err; \
- QT_TRYCATCH_ERROR(____err, _f) \
- User::LeaveIfError(____err); \
- }
-#endif
-
-
/*
This gives us the possibility to check which modules the user can
use. These are purely compile time checks and will generate no code.
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 7868d3db59..375349c18d 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -498,7 +498,7 @@ extern "C" void qt_core_boilerplate();
void qt_core_boilerplate()
{
printf("This is the QtCore library version " QT_VERSION_STR "\n"
- "Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).\n"
"Contact: Nokia Corporation (qt-info@nokia.com)\n"
"\n"
"Build date: %s\n"
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 8d1607d045..21fcdeb62c 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qmalloc.cpp b/src/corelib/global/qmalloc.cpp
index 466f70614d..2ec6938f98 100644
--- a/src/corelib/global/qmalloc.cpp
+++ b/src/corelib/global/qmalloc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -78,7 +78,7 @@ void *qReallocAligned(void *oldptr, size_t newsize, size_t oldsize, size_t align
void *actualptr = oldptr ? static_cast<void **>(oldptr)[-1] : 0;
if (alignment <= sizeof(void*)) {
// special, fast case
- void **newptr = static_cast<void **>(qRealloc(actualptr, newsize + sizeof(void*)));
+ void **newptr = static_cast<void **>(realloc(actualptr, newsize + sizeof(void*)));
if (!newptr)
return 0;
if (newptr == actualptr) {
@@ -90,7 +90,7 @@ void *qReallocAligned(void *oldptr, size_t newsize, size_t oldsize, size_t align
return newptr + 1;
}
- // qMalloc returns pointers aligned at least at sizeof(size_t) boundaries
+ // malloc returns pointers aligned at least at sizeof(size_t) boundaries
// but usually more (8- or 16-byte boundaries).
// So we overallocate by alignment-sizeof(size_t) bytes, so we're guaranteed to find a
// somewhere within the first alignment-sizeof(size_t) that is properly aligned.
@@ -98,7 +98,7 @@ void *qReallocAligned(void *oldptr, size_t newsize, size_t oldsize, size_t align
// However, we need to store the actual pointer, so we need to allocate actually size +
// alignment anyway.
- void *real = qRealloc(actualptr, newsize + alignment);
+ void *real = realloc(actualptr, newsize + alignment);
if (!real)
return 0;
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index b6e2384ea0..ee4000498f 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -61,7 +61,7 @@ Qt {
Q_OBJECT
#endif
-#if (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
+#if defined(Q_MOC_RUN)
// NOTE: Generally, do not add Q_ENUMS if a corresponding Q_FLAGS exists.
Q_ENUMS(ScrollBarPolicy FocusPolicy ContextMenuPolicy)
Q_ENUMS(ArrowType ToolButtonStyle PenStyle PenCapStyle PenJoinStyle BrushStyle)
@@ -97,7 +97,8 @@ Qt {
Q_ENUMS(GestureType)
#endif
Q_ENUMS(CursorMoveStyle)
-#endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
+ Q_ENUMS(TimerType)
+#endif // defined(Q_MOC_RUN)
#if defined(Q_MOC_RUN)
public:
@@ -461,25 +462,8 @@ public:
WA_MergeSoftkeys = 124,
WA_MergeSoftkeysRecursively = 125,
-#if 0 // these values are reserved for Maemo5 - do not re-use them
- WA_Maemo5NonComposited = 126,
- WA_Maemo5StackedWindow = 127,
-#endif
-
- WA_LockPortraitOrientation = 128,
- WA_LockLandscapeOrientation = 129,
- WA_AutoOrientation = 130,
-
-#if 0 // these values are reserved for Maemo5 - do not re-use them
- WA_Maemo5PortraitOrientation = WA_LockPortraitOrientation,
- WA_Maemo5LandscapeOrientation = WA_LockLandscapeOrientation,
- WA_Maemo5AutoOrientation = WA_AutoOrientation,
- WA_Maemo5ShowProgressIndicator = 131,
-#endif
-
- WA_X11DoNotAcceptFocus = 132,
- WA_SymbianNoSystemRotation = 133,
- WA_MacNoShadow = 134,
+ WA_X11DoNotAcceptFocus = 126,
+ WA_MacNoShadow = 127,
// Add new attributes before this line
WA_AttributeCount
@@ -495,9 +479,10 @@ public:
AA_MacPluginApplication = 5,
AA_DontUseNativeMenuBar = 6,
AA_MacDontSwapCtrlAndMeta = 7,
- AA_S60DontConstructApplicationPanes = 8,
- AA_S60DisablePartialScreenInputMode = 9,
+ AA_Use96Dpi = 8,
AA_X11InitThreads = 10,
+ AA_SynthesizeTouchForUnhandledMouseEvents = 11,
+ AA_SynthesizeMouseForUnhandledTouchEvents = 12,
// Add new attributes before this line
AA_AttributeCount
@@ -1313,7 +1298,8 @@ public:
ImhDate = 0x80,
ImhTime = 0x100,
- ImhMultiLine = 0x200,
+
+ ImhPreferLatin = 0x200,
ImhDigitsOnly = 0x10000,
ImhFormattedNumbersOnly = 0x20000,
@@ -1322,6 +1308,7 @@ public:
ImhDialableCharactersOnly = 0x100000,
ImhEmailCharactersOnly = 0x200000,
ImhUrlCharactersOnly = 0x400000,
+ ImhLatinOnly = 0x800000,
ImhExclusiveInputMask = 0xffff0000
};
@@ -1400,7 +1387,7 @@ public:
StatusTipPropertyRole = 30,
WhatsThisPropertyRole = 31,
// Reserved
- UserRole = 32
+ UserRole = 0x0100
};
enum ItemFlag {
@@ -1495,10 +1482,7 @@ public:
TouchPointPressed = 0x01,
TouchPointMoved = 0x02,
TouchPointStationary = 0x04,
- TouchPointReleased = 0x08,
- TouchPointStateMask = 0x0f,
-
- TouchPointPrimary = 0x10
+ TouchPointReleased = 0x08
};
Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
@@ -1547,6 +1531,12 @@ public:
LogicalMoveStyle,
VisualMoveStyle
};
+
+ enum TimerType {
+ PreciseTimer,
+ CoarseTimer,
+ VeryCoarseTimer
+ };
}
#ifdef Q_MOC_RUN
;
@@ -1566,6 +1556,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DropActions)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodQueries)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodHints)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TouchPointStates)
#ifndef QT_NO_GESTURES
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 63ac4a95be..3add1a48c7 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -167,6 +167,15 @@
construction in order to make Xlib calls thread-safe. This
attribute must be set before QApplication is constructed.
+ \value AA_SynthesizeTouchForUnhandledMouseEvents All mouse events
+ that are not accepted by the application will be translated
+ to touch events instead.
+
+ \value AA_SynthesizeMouseForUnhandledTouchEvents All touch events
+ that are not accepted by the application will be translated
+ to left button mouse events instead. This attribute is enabled
+ by default.
+
\omitvalue AA_AttributeCount
*/
@@ -1158,13 +1167,6 @@
to this top level window. This attribute has no effect on non-X11
platforms.
- \value WA_LockPortraitOrientation Locks the widget to a portrait orientation,
- ignoring changes to the display's orientation with respect to the user.
- \value WA_LockLandscapeOrientation Locks the widget to a landscape orientation,
- ignoring changes to the display's orientation with respect to the user.
- \value WA_AutoOrientation Causes the widget to change orientation whenever the
- display changes orientation with respect to the user.
-
\value WA_MacNoShadow Since Qt 4.8, this attribute disables drop shadows
for this top level window. Only affects Cocoa builds of Qt for Mac OS X.
@@ -1198,7 +1200,6 @@
\omitvalue WA_SetWindowModality
\omitvalue WA_WState_WindowOpacitySet
\omitvalue WA_WState_AcceptedTouchBeginEvent
- \omitvalue WA_SymbianNoSystemRotation
*/
/*! \typedef Qt::HANDLE
@@ -2437,7 +2438,7 @@
\value ImhDate The text editor functions as a date field.
\value ImhTime The text editor functions as a time field.
- \value ImhMultiLine The text editor accepts multi-line content.
+ \value ImhPreferLatin Latin characters are preferred (but not required).
Flags that restrict input (exclusive flags):
@@ -2448,6 +2449,7 @@
\value ImhDialableCharactersOnly Only characters suitable for phone dialing are allowed.
\value ImhEmailCharactersOnly Only characters suitable for email addresses are allowed.
\value ImhUrlCharactersOnly Only characters suitable for URLs are allowed.
+ \value ImhLatinOnly Only latin based input is allowed.
Masks:
@@ -2873,3 +2875,27 @@
\sa QApplication::setNavigationMode()
\sa QApplication::navigationMode()
*/
+
+/*!
+ \enum Qt::TimerType
+
+ The timer type indicates how accurate a timer can be.
+
+ \value PreciseTimer Precise timers try to keep millisecond accuracy
+ \value CoarseTimer Coarse timers try to keep accuracy within 5% of the desired interval
+ \value VeryCoarseTimer Very coarse timers only keep full second accuracy
+
+ On UNIX (including Linux and Mac OS X), Qt will keep millisecond accuracy
+ for Qt::PreciseTimer. For Qt::CoarseTimer, the interval will be adjusted up
+ to 5% to align the timer with other timers that are expected to fire at or
+ around the same time. The objective is to make most timers wake up at the
+ same time, thereby reducing CPU wakeups and power consumption.
+
+ On Windows, Qt will use Windows's Multimedia timer facility (if available)
+ for Qt::PreciseTimer and normal Windows timers for Qt::CoarseTimer and
+ Qt::VeryCoarseTimer.
+
+ On all platforms, the interval for Qt::VeryCoarseTimer is rounded to the
+ nearest full second (e.g. an interval of 23500ms will be rounded to
+ 24000ms, and 20300ms to 20000ms).
+*/
diff --git a/src/corelib/global/qnumeric.cpp b/src/corelib/global/qnumeric.cpp
index 621b9885b0..7677d86db0 100644
--- a/src/corelib/global/qnumeric.cpp
+++ b/src/corelib/global/qnumeric.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qnumeric.h b/src/corelib/global/qnumeric.h
index bd8c2a4237..9f5ce691b1 100644
--- a/src/corelib/global/qnumeric.h
+++ b/src/corelib/global/qnumeric.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index 336b348f3f..94d64409b3 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h
index 0926e02af1..a16e6be567 100644
--- a/src/corelib/global/qt_pch.h
+++ b/src/corelib/global/qt_pch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index ba4041e765..3081645b6b 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index ef11621679..1d31e5d794 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -35,6 +35,7 @@ HEADERS += \
io/qfsfileengine_iterator_p.h \
io/qfilesystemwatcher.h \
io/qfilesystemwatcher_p.h \
+ io/qfilesystemwatcher_polling_p.h \
io/qfilesystementry_p.h \
io/qfilesystemengine_p.h \
io/qfilesystemmetadata_p.h \
@@ -65,36 +66,39 @@ SOURCES += \
io/qfsfileengine.cpp \
io/qfsfileengine_iterator.cpp \
io/qfilesystemwatcher.cpp \
+ io/qfilesystemwatcher_polling.cpp \
io/qfilesystementry.cpp \
io/qfilesystemengine.cpp
win32 {
SOURCES += io/qsettings_win.cpp
- SOURCES += io/qprocess_win.cpp
SOURCES += io/qfsfileengine_win.cpp
SOURCES += io/qfilesystemwatcher_win.cpp
HEADERS += io/qfilesystemwatcher_win_p.h
+ HEADERS += io/qwindowspipereader_p.h
+ SOURCES += io/qwindowspipereader.cpp
HEADERS += io/qwindowspipewriter_p.h
SOURCES += io/qwindowspipewriter.cpp
SOURCES += io/qfilesystemengine_win.cpp
SOURCES += io/qfilesystemiterator_win.cpp
SOURCES += io/qstandardpaths_win.cpp
-} else:unix {
- SOURCES += io/qfsfileengine_unix.cpp
- symbian {
- SOURCES += io/qfilesystemengine_symbian.cpp
- SOURCES += io/qprocess_symbian.cpp
- SOURCES += io/qfilesystemiterator_symbian.cpp
- } else {
- SOURCES += io/qfilesystemengine_unix.cpp
- SOURCES += io/qprocess_unix.cpp
- SOURCES += io/qfilesystemiterator_unix.cpp
- }
+
+ wince* {
+ SOURCES += io/qprocess_wince.cpp
+ } else {
+ SOURCES += io/qprocess_win.cpp
+ }
+} else:unix|integrity {
+ SOURCES += \
+ io/qfsfileengine_unix.cpp \
+ io/qfilesystemengine_unix.cpp \
+ io/qprocess_unix.cpp \
+ io/qfilesystemiterator_unix.cpp \
+
!nacl:macx-*: {
- HEADERS += io/qfilesystemwatcher_fsevents_p.h
SOURCES += io/qfilesystemengine_mac.cpp
- SOURCES += io/qsettings_mac.cpp io/qfilesystemwatcher_fsevents.cpp
+ SOURCES += io/qsettings_mac.cpp
}
macx-*: {
SOURCES += io/qstandardpaths_mac.cpp
@@ -102,14 +106,9 @@ win32 {
SOURCES += io/qstandardpaths_unix.cpp
}
- linux-*:!symbian {
- SOURCES += \
- io/qfilesystemwatcher_inotify.cpp \
- io/qfilesystemwatcher_dnotify.cpp
-
- HEADERS += \
- io/qfilesystemwatcher_inotify_p.h \
- io/qfilesystemwatcher_dnotify_p.h
+ linux-* {
+ SOURCES += io/qfilesystemwatcher_inotify.cpp
+ HEADERS += io/qfilesystemwatcher_inotify_p.h
}
!nacl {
@@ -118,17 +117,5 @@ win32 {
HEADERS += io/qfilesystemwatcher_kqueue_p.h
}
}
-
- symbian {
- SOURCES += io/qfilesystemwatcher_symbian.cpp
- HEADERS += io/qfilesystemwatcher_symbian_p.h
- INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
- LIBS += -lplatformenv -lesock
- }
-}
-integrity {
- SOURCES += io/qfsfileengine_unix.cpp \
- io/qfsfileengine_iterator.cpp \
- io/qfilesystemengine_unix.cpp \
- io/qfilesystemiterator_unix.cpp
}
+
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index d2b250d336..c315d33606 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qabstractfileengine.h b/src/corelib/io/qabstractfileengine.h
index cc167a2aa6..c9bab7d435 100644
--- a/src/corelib/io/qabstractfileengine.h
+++ b/src/corelib/io/qabstractfileengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h
index dd9a707316..72b8339e39 100644
--- a/src/corelib/io/qabstractfileengine_p.h
+++ b/src/corelib/io/qabstractfileengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index 35e7b6809c..a5e605b9d5 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -143,12 +143,8 @@ QByteArray QBufferPrivate::peek(qint64 maxSize)
QBuffer emits readyRead() when new data has arrived in the
buffer. By connecting to this signal, you can use QBuffer to
- store temporary data before processing it. For example, you can
- pass the buffer to QFtp when downloading a file from an FTP
- server. Whenever a new payload of data has been downloaded,
- readyRead() is emitted, and you can process the data that just
- arrived. QBuffer also emits bytesWritten() every time new data
- has been written to the buffer.
+ store temporary data before processing it. QBuffer also emits
+ bytesWritten() every time new data has been written to the buffer.
\sa QFile, QDataStream, QTextStream, QByteArray
*/
diff --git a/src/corelib/io/qbuffer.h b/src/corelib/io/qbuffer.h
index 9227a2f3dc..b222c7d6ca 100644
--- a/src/corelib/io/qbuffer.h
+++ b/src/corelib/io/qbuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 0e0a47267a..fb2528e45f 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index 1ae0573f6c..30cf8417ad 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdatastream_p.h b/src/corelib/io/qdatastream_p.h
index d372d54e36..2501e98d1d 100644
--- a/src/corelib/io/qdatastream_p.h
+++ b/src/corelib/io/qdatastream_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp
index ed8abdd839..7e856ad647 100644
--- a/src/corelib/io/qdataurl.cpp
+++ b/src/corelib/io/qdataurl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,51 +51,49 @@ QT_BEGIN_NAMESPACE
Decode a data: URL into its mimetype and payload. Returns a null string if
the URL could not be decoded.
*/
-Q_CORE_EXPORT QPair<QString, QByteArray> qDecodeDataUrl(const QUrl &uri)
+Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &uri, QString &mimeType, QByteArray &payload)
{
- QString mimeType;
- QByteArray payload;
+ if (uri.scheme() != QLatin1String("data") || !uri.host().isEmpty())
+ return false;
- if (uri.scheme() == QLatin1String("data") && uri.host().isEmpty()) {
- mimeType = QLatin1String("text/plain;charset=US-ASCII");
+ mimeType = QLatin1String("text/plain;charset=US-ASCII");
- // the following would have been the correct thing, but
- // reality often differs from the specification. People have
- // data: URIs with ? and #
- //QByteArray data = QByteArray::fromPercentEncoding(uri.encodedPath());
- QByteArray data = QByteArray::fromPercentEncoding(uri.toEncoded());
+ // the following would have been the correct thing, but
+ // reality often differs from the specification. People have
+ // data: URIs with ? and #
+ //QByteArray data = QByteArray::fromPercentEncoding(uri.encodedPath());
+ QByteArray data = QByteArray::fromPercentEncoding(uri.toEncoded());
- // remove the data: scheme
- data.remove(0, 5);
+ // remove the data: scheme
+ data.remove(0, 5);
- // parse it:
- int pos = data.indexOf(',');
- if (pos != -1) {
- payload = data.mid(pos + 1);
- data.truncate(pos);
- data = data.trimmed();
+ // parse it:
+ int pos = data.indexOf(',');
+ if (pos != -1) {
+ payload = data.mid(pos + 1);
+ data.truncate(pos);
+ data = data.trimmed();
- // find out if the payload is encoded in Base64
- if (data.endsWith(";base64")) {
- payload = QByteArray::fromBase64(payload);
- data.chop(7);
- }
+ // find out if the payload is encoded in Base64
+ if (data.endsWith(";base64")) {
+ payload = QByteArray::fromBase64(payload);
+ data.chop(7);
+ }
- if (data.toLower().startsWith("charset")) {
- int i = 7; // strlen("charset")
- while (data.at(i) == ' ')
- ++i;
- if (data.at(i) == '=')
- data.prepend("text/plain;");
- }
+ if (data.toLower().startsWith("charset")) {
+ int i = 7; // strlen("charset")
+ while (data.at(i) == ' ')
+ ++i;
+ if (data.at(i) == '=')
+ data.prepend("text/plain;");
+ }
- if (!data.isEmpty())
- mimeType = QLatin1String(data.trimmed());
+ if (!data.isEmpty())
+ mimeType = QLatin1String(data.trimmed());
- }
}
- return QPair<QString,QByteArray>(mimeType,payload);
+ return true;
}
QT_END_NAMESPACE
diff --git a/src/corelib/io/qdataurl_p.h b/src/corelib/io/qdataurl_p.h
index d666d9e52a..b92f363e1d 100644
--- a/src/corelib/io/qdataurl_p.h
+++ b/src/corelib/io/qdataurl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
-Q_CORE_EXPORT QPair<QString, QByteArray> qDecodeDataUrl(const QUrl &url);
+Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &url, QString &mimeType, QByteArray &payload);
QT_END_NAMESPACE
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index a27716b8dc..8ca15b19ca 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 67221c7ce2..54663d5d65 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -129,10 +129,8 @@ public:
inline QNoDebug(){}
inline QNoDebug(const QDebug &){}
inline ~QNoDebug(){}
-#if !defined( QT_NO_TEXTSTREAM )
inline QNoDebug &operator<<(QTextStreamFunction) { return *this; }
inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; }
-#endif
inline QNoDebug &space() { return *this; }
inline QNoDebug &nospace() { return *this; }
inline QNoDebug &maybeSpace() { return *this; }
@@ -141,8 +139,6 @@ public:
inline QNoDebug &operator<<(const T &) { return *this; }
};
-Q_CORE_EXPORT_INLINE QDebug qCritical() { return QDebug(QtCriticalMsg); }
-
inline QDebug &QDebug::operator=(const QDebug &other)
{
if (this != &other) {
@@ -161,7 +157,7 @@ inline QDebug operator<<(QDebug debug, const QList<T> &list)
#endif
{
debug.nospace() << '(';
- for (Q_TYPENAME QList<T>::size_type i = 0; i < list.count(); ++i) {
+ for (typename QList<T>::size_type i = 0; i < list.count(); ++i) {
if (i)
debug << ", ";
debug << list.at(i);
@@ -275,17 +271,15 @@ inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
return debug.space();
}
-#if !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG_OUTPUT) && !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT_INLINE QDebug qDebug() { return QDebug(QtDebugMsg); }
-
-#else // QT_NO_DEBUG_STREAM
+#else
#undef qDebug
inline QNoDebug qDebug() { return QNoDebug(); }
#define qDebug QT_NO_QDEBUG_MACRO
-
#endif
-#if !defined(QT_NO_WARNING_OUTPUT)
+#if !defined(QT_NO_WARNING_OUTPUT) && !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT_INLINE QDebug qWarning() { return QDebug(QtWarningMsg); }
#else
#undef qWarning
@@ -293,6 +287,11 @@ inline QNoDebug qWarning() { return QNoDebug(); }
#define qWarning QT_NO_QWARNING_MACRO
#endif
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT_INLINE QDebug qCritical() { return QDebug(QtCriticalMsg); }
+#endif
+
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 44992fcd14..d6979bad57 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1502,7 +1502,7 @@ bool QDir::removeRecursively()
di.next();
const QFileInfo& fi = di.fileInfo();
bool ok;
- if (fi.isDir())
+ if (fi.isDir() && !fi.isSymLink())
ok = QDir(di.filePath()).removeRecursively(); // recursive
else
ok = QFile::remove(di.filePath());
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h
index e246f2f1aa..5b058272e7 100644
--- a/src/corelib/io/qdir.h
+++ b/src/corelib/io/qdir.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdir_p.h b/src/corelib/io/qdir_p.h
index a34427a716..7865c1d5a3 100644
--- a/src/corelib/io/qdir_p.h
+++ b/src/corelib/io/qdir_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index 0b02adb4b6..28aa4a0f59 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qdiriterator.h b/src/corelib/io/qdiriterator.h
index 5ad8acb496..be03415372 100644
--- a/src/corelib/io/qdiriterator.h
+++ b/src/corelib/io/qdiriterator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index d5118525cf..95d842da42 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h
index 554b2954e1..903ba13963 100644
--- a/src/corelib/io/qfile.h
+++ b/src/corelib/io/qfile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfile_p.h b/src/corelib/io/qfile_p.h
index 3072f5bc9e..24013c3c3d 100644
--- a/src/corelib/io/qfile_p.h
+++ b/src/corelib/io/qfile_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 1ea6c8d50a..226b5d3560 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h
index ef4573132c..6d6da3527a 100644
--- a/src/corelib/io/qfileinfo.h
+++ b/src/corelib/io/qfileinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h
index 23ea0225f5..64e644f29f 100644
--- a/src/corelib/io/qfileinfo_p.h
+++ b/src/corelib/io/qfileinfo_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp
index 72900ec033..ab10f30585 100644
--- a/src/corelib/io/qfilesystemengine.cpp
+++ b/src/corelib/io/qfilesystemengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemengine_mac.cpp b/src/corelib/io/qfilesystemengine_mac.cpp
index 0d1556522a..f5e61ff29f 100644
--- a/src/corelib/io/qfilesystemengine_mac.cpp
+++ b/src/corelib/io/qfilesystemengine_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index bbd4c4c020..af32a1c575 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp
deleted file mode 100644
index c8c1dfdc84..0000000000
--- a/src/corelib/io/qfilesystemengine_symbian.cpp
+++ /dev/null
@@ -1,406 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qfilesystemengine_p.h"
-#include "qfsfileengine.h"
-#include <QtCore/private/qcore_symbian_p.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <f32file.h>
-#include <pathinfo.h>
-#include <wchar.h>
-
-QT_BEGIN_NAMESPACE
-
-bool QFileSystemEngine::isCaseSensitive()
-{
- return false;
-}
-
-//TODO: resolve this with QDir::cleanPath, without breaking the behaviour of that
-//function which is documented only by autotest
-//input: a dirty absolute path, e.g. c:/../../foo/./
-//output: a clean absolute path, e.g. c:/foo/
-static QString symbianCleanAbsolutePath(const QString& path)
-{
- bool isDir = path.endsWith(QLatin1Char('/'));
- //using SkipEmptyParts flag to eliminate duplicated slashes
- QStringList components = path.split(QLatin1Char('/'), QString::SkipEmptyParts);
- int cdups = 0;
- for(int i=components.count() - 1; i>=0; --i) {
- if(components.at(i) == QLatin1String("..")) {
- components.removeAt(i);
- cdups++;
- }
- else if(components.at(i) == QLatin1String(".")) {
- components.removeAt(i);
- }
- else if(cdups && i > 0) {
- --cdups;
- components.removeAt(i);
- }
- }
- QString result = components.join(QLatin1String("/"));
- if ((isDir&& !result.endsWith(QLatin1Char('/')))
- || (result.length() == 2 && result.at(1).unicode() == ':'))
- result.append(QLatin1Char('/'));
- return result;
-}
-
-//static
-QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data)
-{
- Q_UNUSED(data);
- return link;
-}
-
-//static
-QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data)
-{
- if (entry.isEmpty() || entry.isRoot())
- return entry;
-
- QFileSystemEntry result = absoluteName(entry);
- if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute))
- fillMetaData(result, data, QFileSystemMetaData::ExistsAttribute);
- if (!data.exists()) {
- // file doesn't exist
- return QFileSystemEntry();
- } else {
- return result;
- }
-}
-
-//static
-QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
-{
- QString orig = entry.filePath();
- const bool isAbsolute = entry.isAbsolute();
- const bool isDirty = !entry.isClean();
- if (isAbsolute && !isDirty)
- return entry;
-
- const bool isRelative = entry.isRelative();
- const bool needsDrive = (!orig.isEmpty() && orig.at(0).unicode() == '/');
- const bool isDriveLetter = !needsDrive && !isAbsolute && !isRelative && orig.length() == 2;
- const bool isDriveRelative = !needsDrive && !isAbsolute && !isRelative && orig.length() > 2;
-
- QString result;
- if (needsDrive || isDriveLetter || isDriveRelative || !isAbsolute || orig.isEmpty()) {
- QFileSystemEntry cur(currentPath());
- if(needsDrive)
- result = cur.filePath().left(2);
- else if(isDriveRelative && cur.filePath().at(0) != orig.at(0))
- result = orig.left(2); // for BC, see tst_QFileInfo::absolutePath(<not current drive>:my.dll)
- else
- result = cur.filePath();
- if(isDriveLetter) {
- result[0] = orig.at(0); //copy drive letter
- orig.clear();
- }
- if(isDriveRelative) {
- orig = orig.mid(2); //discard the drive specifier from orig
- }
- }
- if (!orig.isEmpty() && !(orig.length() == 1 && orig.at(0).unicode() == '.')) {
- if (!result.isEmpty() && !result.endsWith(QLatin1Char('/')))
- result.append(QLatin1Char('/'));
- result.append(orig);
- }
-
- return QFileSystemEntry(symbianCleanAbsolutePath(result), QFileSystemEntry::FromInternalPath());
-}
-
-void QFileSystemMetaData::fillFromTEntry(const TEntry& entry)
-{
- entryFlags &= ~(QFileSystemMetaData::SymbianTEntryFlags);
- knownFlagsMask |= QFileSystemMetaData::SymbianTEntryFlags;
- //Symbian doesn't have unix type file permissions
- entryFlags |= QFileSystemMetaData::ReadPermissions;
- if(!entry.IsReadOnly()) {
- entryFlags |= QFileSystemMetaData::WritePermissions;
- }
- //set the type
- if(entry.IsDir())
- entryFlags |= (QFileSystemMetaData::DirectoryType | QFileSystemMetaData::ExecutePermissions);
- else
- entryFlags |= QFileSystemMetaData::FileType;
-
- //set the attributes
- entryFlags |= QFileSystemMetaData::ExistsAttribute;
- if(entry.IsHidden())
- entryFlags |= QFileSystemMetaData::HiddenAttribute;
-
-#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
- size_ = entry.FileSize();
-#else
- size_ = (TUint)(entry.iSize);
-#endif
-
- modificationTime_ = entry.iModified;
-}
-
-void QFileSystemMetaData::fillFromVolumeInfo(const TVolumeInfo& info)
-{
- entryFlags &= ~(QFileSystemMetaData::SymbianTEntryFlags);
- knownFlagsMask |= QFileSystemMetaData::SymbianTEntryFlags;
- entryFlags |= QFileSystemMetaData::ExistsAttribute;
- entryFlags |= QFileSystemMetaData::Permissions;
- if(info.iDrive.iDriveAtt & KDriveAttRom) {
- entryFlags &= ~(QFileSystemMetaData::WritePermissions);
- }
- entryFlags |= QFileSystemMetaData::DirectoryType;
- size_ = info.iSize;
- modificationTime_ = qt_symbian_time_t_To_TTime(0);
-}
-
-//static
-bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data, QFileSystemMetaData::MetaDataFlags what)
-{
- if (what & QFileSystemMetaData::SymbianTEntryFlags) {
- RFs& fs(qt_s60GetRFs());
- TInt err;
- QFileSystemEntry absentry(absoluteName(entry));
- if (entry.isEmpty()) {
- err = KErrNotFound;
- } else if (absentry.isRoot()) {
- //Root directories don't have an entry, and Entry() returns KErrBadName.
- //Therefore get information about the volume instead.
- TInt drive;
- err = RFs::CharToDrive(TChar(absentry.nativeFilePath().at(0).unicode()), drive);
- if (!err) {
- TVolumeInfo info;
- err = fs.Volume(info, drive);
- if (!err)
- data.fillFromVolumeInfo(info);
- }
- } else {
- TEntry ent;
- err = fs.Entry(qt_QString2TPtrC(absentry.nativeFilePath()), ent);
- if (!err)
- data.fillFromTEntry(ent);
- }
- if (err) {
- data.size_ = 0;
- data.modificationTime_ = TTime(0);
- data.entryFlags &= ~(QFileSystemMetaData::SymbianTEntryFlags);
- }
- //files in /sys/bin on any drive are executable, even though we don't normally have permission to check whether they exist or not
- if(absentry.filePath().midRef(1,10).compare(QLatin1String(":/sys/bin/"), Qt::CaseInsensitive) == 0)
- data.entryFlags |= QFileSystemMetaData::ExecutePermissions;
- }
- return data.hasFlags(what);
-}
-
-//static
-bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)
-{
- QString abspath = absoluteName(entry).nativeFilePath();
- if (!abspath.endsWith(QLatin1Char('\\')))
- abspath.append(QLatin1Char('\\'));
- TInt r;
- if (createParents)
- r = qt_s60GetRFs().MkDirAll(qt_QString2TPtrC(abspath));
- else
- r = qt_s60GetRFs().MkDir(qt_QString2TPtrC(abspath));
- if (createParents && r == KErrAlreadyExists)
- return true; //# Qt5 - QDir::mkdir returns false for existing dir, QDir::mkpath returns true (should be made consistent in Qt 5)
- return (r == KErrNone);
-}
-
-//static
-bool QFileSystemEngine::removeDirectory(const QFileSystemEntry &entry, bool removeEmptyParents)
-{
- QString abspath = absoluteName(entry).nativeFilePath();
- if (!abspath.endsWith(QLatin1Char('\\')))
- abspath.append(QLatin1Char('\\'));
- TPtrC dir(qt_QString2TPtrC(abspath));
- RFs& fs = qt_s60GetRFs();
- bool ok = false;
- //behaviour of FS file engine:
- //returns true if the directory could be removed
- //success/failure of removing parent directories does not matter
- while (KErrNone == fs.RmDir(dir)) {
- ok = true;
- if (!removeEmptyParents)
- break;
- //RFs::RmDir treats "c:\foo\bar" and "c:\foo\" the same, so it is sufficient to remove the last \ to the end
- dir.Set(dir.Left(dir.LocateReverse(TChar('\\'))));
- }
- return ok;
-}
-
-//static
-bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)
-{
- Q_UNUSED(source)
- Q_UNUSED(target)
- error = QSystemError(KErrNotSupported, QSystemError::NativeError);
- return false;
-}
-
-//static
-bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)
-{
- //CFileMan is allocated each time because it is not thread-safe
- CFileMan *fm = 0;
- TRAPD(err, fm = CFileMan::NewL(qt_s60GetRFs()));
- if (err == KErrNone) {
- err = fm->Copy(qt_QString2TPtrC(absoluteName(source).nativeFilePath()), qt_QString2TPtrC(absoluteName(target).nativeFilePath()), 0);
- delete fm;
- }
- if (err == KErrNone)
- return true;
- error = QSystemError(err, QSystemError::NativeError);
- return false;
-}
-
-//static
-bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)
-{
- QString sourcepath = absoluteName(source).nativeFilePath();
- QString targetpath = absoluteName(target).nativeFilePath();
- RFs& fs(qt_s60GetRFs());
- TInt err = fs.Rename(qt_QString2TPtrC(sourcepath), qt_QString2TPtrC(targetpath));
- if (err == KErrNone)
- return true;
- error = QSystemError(err, QSystemError::NativeError);
- return false;
-}
-
-//static
-bool QFileSystemEngine::removeFile(const QFileSystemEntry &entry, QSystemError &error)
-{
- QString targetpath = absoluteName(entry).nativeFilePath();
- RFs& fs(qt_s60GetRFs());
- TInt err = fs.Delete(qt_QString2TPtrC(targetpath));
- if (err == KErrNone)
- return true;
- error = QSystemError(err, QSystemError::NativeError);
- return false;
-}
-
-//static
-bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error, QFileSystemMetaData *data)
-{
- QString targetpath = absoluteName(entry).nativeFilePath();
- TUint setmask = 0;
- TUint clearmask = 0;
- RFs& fs(qt_s60GetRFs());
- if (permissions & (QFile::WriteOwner | QFile::WriteUser | QFile::WriteGroup | QFile::WriteOther))
- clearmask = KEntryAttReadOnly; //if anyone can write, it's not read-only
- else
- setmask = KEntryAttReadOnly;
- TInt err = fs.SetAtt(qt_QString2TPtrC(targetpath), setmask, clearmask);
- if (data && !err) {
- data->entryFlags &= ~QFileSystemMetaData::Permissions;
- data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions));
- data->knownFlagsMask |= QFileSystemMetaData::Permissions;
- }
- if (err == KErrNone)
- return true;
- error = QSystemError(err, QSystemError::NativeError);
- return false;
-}
-
-QString QFileSystemEngine::homePath()
-{
- QString home = QDir::fromNativeSeparators(qt_TDesC2QString(PathInfo::PhoneMemoryRootPath()));
- if(home.endsWith(QLatin1Char('/')))
- home.chop(1);
- return home;
-}
-
-QString QFileSystemEngine::rootPath()
-{
- TChar drive;
- TInt err = RFs::DriveToChar(RFs::GetSystemDrive(), drive); //RFs::GetSystemDriveChar not supported on S60 3.1
- Q_ASSERT(err == KErrNone); //RFs::GetSystemDrive() shall always return a convertible drive number on a valid OS configuration
- return QString(QChar(drive)).append(QLatin1String(":/"));
-}
-
-QString QFileSystemEngine::tempPath()
-{
- return rootPath().append(QLatin1String("system/temp"));
-}
-
-//static
-bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &entry)
-{
- QFileSystemMetaData meta;
- QFileSystemEntry absname = absoluteName(entry);
- fillMetaData(absname, meta, QFileSystemMetaData::ExistsAttribute | QFileSystemMetaData::DirectoryType);
- if(!(meta.exists() && meta.isDirectory()))
- return false;
-
- RFs& fs = qt_s60GetRFs();
- QString abspath = absname.nativeFilePath();
- if(!abspath.endsWith(QLatin1Char('\\')))
- abspath.append(QLatin1Char('\\'));
- TInt r = fs.SetSessionPath(qt_QString2TPtrC(abspath));
- //SetSessionPath succeeds for non existent directory, which is why it's checked above
- if (r == KErrNone) {
- __ASSERT_COMPILE(sizeof(wchar_t) == sizeof(unsigned short));
- //attempt to set open C to the same path
- r = ::wchdir(reinterpret_cast<const wchar_t *>(absname.filePath().utf16()));
- if (r < 0)
- qWarning("failed to sync path to open C");
- return true;
- }
- return false;
-}
-
-//static
-QFileSystemEntry QFileSystemEngine::currentPath()
-{
- TFileName fn;
- QFileSystemEntry ret;
- TInt r = qt_s60GetRFs().SessionPath(fn);
- if(r == KErrNone) {
- //remove terminating slash from non root paths (session path is clean, absolute and always ends in a \)
- if(fn.Length() > 3 && fn[fn.Length() - 1] == '\\')
- fn.SetLength(fn.Length() - 1);
- ret = QFileSystemEntry(qt_TDesC2QString(fn), QFileSystemEntry::FromNativePath());
- }
- return ret;
-}
-
-QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 9778b526ac..901aaf8f91 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 10ba95e97f..d724429f6b 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -160,6 +160,31 @@ typedef DWORD (WINAPI *PtrGetEffectiveRightsFromAclW)(PACL, PTRUSTEE_W, OUT PACC
static PtrGetEffectiveRightsFromAclW ptrGetEffectiveRightsFromAclW = 0;
static TRUSTEE_W currentUserTrusteeW;
static TRUSTEE_W worldTrusteeW;
+static PSID currentUserSID = 0;
+static PSID worldSID = 0;
+
+/*
+ Deletes the allocated SIDs during global static cleanup
+*/
+class SidCleanup
+{
+public:
+ ~SidCleanup();
+};
+
+SidCleanup::~SidCleanup()
+{
+ qFree(currentUserSID);
+ currentUserSID = 0;
+
+ // worldSID was allocated with AllocateAndInitializeSid so it needs to be freed with FreeSid
+ if (worldSID) {
+ ::FreeSid(worldSID);
+ worldSID = 0;
+ }
+}
+
+Q_GLOBAL_STATIC(SidCleanup, initSidCleanup)
typedef BOOL (WINAPI *PtrGetUserProfileDirectoryW)(HANDLE, LPWSTR, LPDWORD);
static PtrGetUserProfileDirectoryW ptrGetUserProfileDirectoryW = 0;
@@ -199,25 +224,35 @@ static void resolveLibs()
// Create TRUSTEE for current user
HANDLE hnd = ::GetCurrentProcess();
HANDLE token = 0;
+ initSidCleanup();
if (::OpenProcessToken(hnd, TOKEN_QUERY, &token)) {
- TOKEN_USER tu;
- DWORD retsize;
- if (::GetTokenInformation(token, TokenUser, &tu, sizeof(tu), &retsize))
- ptrBuildTrusteeWithSidW(&currentUserTrusteeW, tu.User.Sid);
+ DWORD retsize = 0;
+ // GetTokenInformation requires a buffer big enough for the TOKEN_USER struct and
+ // the SID struct. Since the SID struct can have variable number of subauthorities
+ // tacked at the end, its size is variable. Obtain the required size by first
+ // doing a dummy GetTokenInformation call.
+ ::GetTokenInformation(token, TokenUser, 0, 0, &retsize);
+ if (retsize) {
+ void *tokenBuffer = qMalloc(retsize);
+ if (::GetTokenInformation(token, TokenUser, tokenBuffer, retsize, &retsize)) {
+ PSID tokenSid = reinterpret_cast<PTOKEN_USER>(tokenBuffer)->User.Sid;
+ DWORD sidLen = ::GetLengthSid(tokenSid);
+ currentUserSID = reinterpret_cast<PSID>(qMalloc(sidLen));
+ if (::CopySid(sidLen, currentUserSID, tokenSid))
+ ptrBuildTrusteeWithSidW(&currentUserTrusteeW, currentUserSID);
+ }
+ qFree(tokenBuffer);
+ }
::CloseHandle(token);
}
typedef BOOL (WINAPI *PtrAllocateAndInitializeSid)(PSID_IDENTIFIER_AUTHORITY, BYTE, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, PSID*);
PtrAllocateAndInitializeSid ptrAllocateAndInitializeSid = (PtrAllocateAndInitializeSid)GetProcAddress(advapiHnd, "AllocateAndInitializeSid");
- typedef PVOID (WINAPI *PtrFreeSid)(PSID);
- PtrFreeSid ptrFreeSid = (PtrFreeSid)GetProcAddress(advapiHnd, "FreeSid");
- if (ptrAllocateAndInitializeSid && ptrFreeSid) {
+ if (ptrAllocateAndInitializeSid) {
// Create TRUSTEE for Everyone (World)
SID_IDENTIFIER_AUTHORITY worldAuth = { SECURITY_WORLD_SID_AUTHORITY };
- PSID pWorld = 0;
- if (ptrAllocateAndInitializeSid(&worldAuth, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &pWorld))
- ptrBuildTrusteeWithSidW(&worldTrusteeW, pWorld);
- ptrFreeSid(pWorld);
+ if (ptrAllocateAndInitializeSid(&worldAuth, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &worldSID))
+ ptrBuildTrusteeWithSidW(&worldTrusteeW, worldSID);
}
}
HINSTANCE userenvHnd = QSystemLibrary::load(L"userenv");
@@ -278,7 +313,7 @@ static QString readSymLink(const QFileSystemEntry &link)
0);
if (handle != INVALID_HANDLE_VALUE) {
DWORD bufsize = MAXIMUM_REPARSE_DATA_BUFFER_SIZE;
- REPARSE_DATA_BUFFER *rdb = (REPARSE_DATA_BUFFER*)qMalloc(bufsize);
+ REPARSE_DATA_BUFFER *rdb = (REPARSE_DATA_BUFFER*)malloc(bufsize);
DWORD retsize = 0;
if (::DeviceIoControl(handle, FSCTL_GET_REPARSE_POINT, 0, 0, rdb, bufsize, &retsize, 0)) {
if (rdb->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
@@ -296,7 +331,7 @@ static QString readSymLink(const QFileSystemEntry &link)
if (result.size() > 4 && result.at(0) == QLatin1Char('\\') && result.at(2) == QLatin1Char('?') && result.at(3) == QLatin1Char('\\'))
result = result.mid(4);
}
- qFree(rdb);
+ free(rdb);
CloseHandle(handle);
#if !defined(QT_NO_LIBRARY)
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index 2f37542f66..11b73dd745 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystementry_p.h b/src/corelib/io/qfilesystementry_p.h
index 8d524c087e..61902f77d0 100644
--- a/src/corelib/io/qfilesystementry_p.h
+++ b/src/corelib/io/qfilesystementry_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemiterator_p.h b/src/corelib/io/qfilesystemiterator_p.h
index 6f2d1e1c6e..7df5988459 100644
--- a/src/corelib/io/qfilesystemiterator_p.h
+++ b/src/corelib/io/qfilesystemiterator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemiterator_symbian.cpp b/src/corelib/io/qfilesystemiterator_symbian.cpp
deleted file mode 100644
index 4347f6acba..0000000000
--- a/src/corelib/io/qfilesystemiterator_symbian.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qfilesystemiterator_p.h"
-#include "qfilesystemengine_p.h"
-#include <QtCore/private/qcore_symbian_p.h>
-
-QT_BEGIN_NAMESPACE
-
-QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &path, QDir::Filters filters,
- const QStringList &nameFilters, QDirIterator::IteratorFlags iteratorFlags)
- : lastError(KErrNone), entryIndex(-1)
-{
- RFs& fs = qt_s60GetRFs();
-
- nativePath = path.nativeFilePath();
- if (!nativePath.endsWith(QLatin1Char('\\')))
- nativePath.append(QLatin1Char('\\'));
-
- QString absPath = QFileSystemEngine::absoluteName(path).nativeFilePath();
-
- if (!absPath.endsWith(QLatin1Char('\\')))
- absPath.append(QLatin1Char('\\'));
-
- int pathLen = absPath.length();
- if (pathLen > KMaxFileName) {
- lastError = KErrBadName;
- return;
- }
-
- //set up server side filtering to reduce IPCs
- //RDir won't accept all valid name filters e.g. "*. bar"
- if (nameFilters.count() == 1 && !(filters & QDir::AllDirs) && iteratorFlags
- == QDirIterator::NoIteratorFlags && pathLen + nameFilters[0].length()
- <= KMaxFileName) {
- //server side supports one mask - skip this for recursive mode or if only files should be filtered
- absPath.append(nameFilters[0]);
- }
-
- TUint symbianMask = 0;
- if ((filters & QDir::Dirs) || (filters & QDir::AllDirs) || (iteratorFlags
- & QDirIterator::Subdirectories))
- symbianMask |= KEntryAttDir; //include directories
- if (filters & QDir::Hidden)
- symbianMask |= KEntryAttHidden;
- if (filters & QDir::System)
- symbianMask |= KEntryAttSystem;
- if (((filters & QDir::Files) == 0) && symbianMask == KEntryAttDir)
- symbianMask |= KEntryAttMatchExclusive; //exclude non-directories
- else if (symbianMask == 0) {
- if ((filters & QDir::PermissionMask) == QDir::Writable)
- symbianMask = KEntryAttMatchExclude | KEntryAttReadOnly;
- }
-
- lastError = dirHandle.Open(fs, qt_QString2TPtrC(absPath), symbianMask);
-}
-
-QFileSystemIterator::~QFileSystemIterator()
-{
- dirHandle.Close();
-}
-
-bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData)
-{
- //1st time, lastError is result of dirHandle.Open(), entries.Count() is 0 and entryIndex is -1 so initial read is triggered
- //subsequent times, read is triggered each time we reach the end of the entry list
- //final time, lastError is KErrEof so we don't need to read anymore.
- ++entryIndex;
- if (lastError == KErrNone && entryIndex >= entries.Count()) {
- lastError = dirHandle.Read(entries);
- entryIndex = 0;
- }
-
- //each call to advance() gets the next entry from the entry list.
- //from the final (or only) read call, KErrEof is returned together with a full buffer so we still need to go through the list
- if ((lastError == KErrNone || lastError == KErrEof) && entryIndex < entries.Count()) {
- Q_ASSERT(entryIndex >= 0);
- const TEntry &entry(entries[entryIndex]);
- fileEntry = QFileSystemEntry(nativePath + qt_TDesC2QString(entry.iName), QFileSystemEntry::FromNativePath());
- metaData.fillFromTEntry(entry);
- return true;
- }
-
- //TODO: error reporting, to allow user to distinguish empty directory from error condition.
-
- return false;
-}
-
-QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemiterator_unix.cpp b/src/corelib/io/qfilesystemiterator_unix.cpp
index 6987660ea3..d0eb04a145 100644
--- a/src/corelib/io/qfilesystemiterator_unix.cpp
+++ b/src/corelib/io/qfilesystemiterator_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemiterator_win.cpp b/src/corelib/io/qfilesystemiterator_win.cpp
index 5fff4f82c6..1f5cf356a0 100644
--- a/src/corelib/io/qfilesystemiterator_win.cpp
+++ b/src/corelib/io/qfilesystemiterator_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index 64749e3889..6ed5cec954 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 9739067c06..4abb4f3cc1 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,234 +48,45 @@
#include <qdebug.h>
#include <qdir.h>
#include <qfileinfo.h>
-#include <qmutex.h>
#include <qset.h>
#include <qtimer.h>
+
+#include "qfilesystemwatcher_polling_p.h"
#if defined(Q_OS_WIN)
# include "qfilesystemwatcher_win_p.h"
#elif defined(Q_OS_LINUX)
# include "qfilesystemwatcher_inotify_p.h"
-# include "qfilesystemwatcher_dnotify_p.h"
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
-# if (defined Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
-# include "qfilesystemwatcher_fsevents_p.h"
-# endif //MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
# include "qfilesystemwatcher_kqueue_p.h"
-#elif defined(Q_OS_SYMBIAN)
-# include "qfilesystemwatcher_symbian_p.h"
#endif
QT_BEGIN_NAMESPACE
-enum { PollingInterval = 1000 };
-
-class QPollingFileSystemWatcherEngine : public QFileSystemWatcherEngine
-{
- Q_OBJECT
-
- class FileInfo
- {
- uint ownerId;
- uint groupId;
- QFile::Permissions permissions;
- QDateTime lastModified;
- QStringList entries;
-
- public:
- FileInfo(const QFileInfo &fileInfo)
- : ownerId(fileInfo.ownerId()),
- groupId(fileInfo.groupId()),
- permissions(fileInfo.permissions()),
- lastModified(fileInfo.lastModified())
- {
- if (fileInfo.isDir()) {
- entries = fileInfo.absoluteDir().entryList(QDir::AllEntries);
- }
- }
- FileInfo &operator=(const QFileInfo &fileInfo)
- {
- *this = FileInfo(fileInfo);
- return *this;
- }
-
- bool operator!=(const QFileInfo &fileInfo) const
- {
- if (fileInfo.isDir() && entries != fileInfo.absoluteDir().entryList(QDir::AllEntries))
- return true;
- return (ownerId != fileInfo.ownerId()
- || groupId != fileInfo.groupId()
- || permissions != fileInfo.permissions()
- || lastModified != fileInfo.lastModified());
- }
- };
-
- mutable QMutex mutex;
- QHash<QString, FileInfo> files, directories;
-
-public:
- QPollingFileSystemWatcherEngine();
-
- void run();
-
- QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
- QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
-
- void stop();
-
-private Q_SLOTS:
- void timeout();
-};
-
-QPollingFileSystemWatcherEngine::QPollingFileSystemWatcherEngine()
-{
-#ifndef QT_NO_THREAD
- moveToThread(this);
-#endif
-}
-
-void QPollingFileSystemWatcherEngine::run()
-{
- QTimer timer;
- connect(&timer, SIGNAL(timeout()), SLOT(timeout()));
- timer.start(PollingInterval);
- (void) exec();
-}
-
-QStringList QPollingFileSystemWatcherEngine::addPaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
- QMutexLocker locker(&mutex);
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- QFileInfo fi(path);
- if (!fi.exists())
- continue;
- if (fi.isDir()) {
- if (!directories->contains(path))
- directories->append(path);
- if (!path.endsWith(QLatin1Char('/')))
- fi = QFileInfo(path + QLatin1Char('/'));
- this->directories.insert(path, fi);
- } else {
- if (!files->contains(path))
- files->append(path);
- this->files.insert(path, fi);
- }
- it.remove();
- }
- start();
- return p;
-}
-
-QStringList QPollingFileSystemWatcherEngine::removePaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
- QMutexLocker locker(&mutex);
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- if (this->directories.remove(path)) {
- directories->removeAll(path);
- it.remove();
- } else if (this->files.remove(path)) {
- files->removeAll(path);
- it.remove();
- }
- }
- if (this->files.isEmpty() && this->directories.isEmpty()) {
- locker.unlock();
- stop();
- wait();
- }
- return p;
-}
-
-void QPollingFileSystemWatcherEngine::stop()
-{
- quit();
-}
-
-void QPollingFileSystemWatcherEngine::timeout()
-{
- QMutexLocker locker(&mutex);
- QMutableHashIterator<QString, FileInfo> fit(files);
- while (fit.hasNext()) {
- QHash<QString, FileInfo>::iterator x = fit.next();
- QString path = x.key();
- QFileInfo fi(path);
- if (!fi.exists()) {
- fit.remove();
- emit fileChanged(path, true);
- } else if (x.value() != fi) {
- x.value() = fi;
- emit fileChanged(path, false);
- }
- }
- QMutableHashIterator<QString, FileInfo> dit(directories);
- while (dit.hasNext()) {
- QHash<QString, FileInfo>::iterator x = dit.next();
- QString path = x.key();
- QFileInfo fi(path);
- if (!path.endsWith(QLatin1Char('/')))
- fi = QFileInfo(path + QLatin1Char('/'));
- if (!fi.exists()) {
- dit.remove();
- emit directoryChanged(path, true);
- } else if (x.value() != fi) {
- fi.refresh();
- if (!fi.exists()) {
- dit.remove();
- emit directoryChanged(path, true);
- } else {
- x.value() = fi;
- emit directoryChanged(path, false);
- }
- }
-
- }
-}
-
-
-
-
-QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine()
+QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine(QObject *parent)
{
#if defined(Q_OS_WIN)
- return new QWindowsFileSystemWatcherEngine;
+ return new QWindowsFileSystemWatcherEngine(parent);
#elif defined(Q_OS_LINUX)
- QFileSystemWatcherEngine *eng = QInotifyFileSystemWatcherEngine::create();
- if(!eng)
- eng = QDnotifyFileSystemWatcherEngine::create();
- return eng;
+ // there is a chance that inotify may fail on Linux pre-2.6.13 (August
+ // 2005), so we can't just new inotify directly.
+ return QInotifyFileSystemWatcherEngine::create(parent);
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
-# if 0 && defined(Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
- return QFSEventsFileSystemWatcherEngine::create();
- else
-# endif
- return QKqueueFileSystemWatcherEngine::create();
-#elif defined(Q_OS_SYMBIAN)
- return new QSymbianFileSystemWatcherEngine;
+ return QKqueueFileSystemWatcherEngine::create(parent);
#else
return 0;
#endif
}
QFileSystemWatcherPrivate::QFileSystemWatcherPrivate()
- : native(0), poller(0), forced(0)
+ : native(0), poller(0)
{
}
void QFileSystemWatcherPrivate::init()
{
Q_Q(QFileSystemWatcher);
- native = createNativeEngine();
+ native = createNativeEngine(q);
if (native) {
QObject::connect(native,
SIGNAL(fileChanged(QString,bool)),
@@ -288,42 +99,13 @@ void QFileSystemWatcherPrivate::init()
}
}
-void QFileSystemWatcherPrivate::initForcedEngine(const QString &forceName)
-{
- if(forced)
- return;
-
- Q_Q(QFileSystemWatcher);
-
-#if defined(Q_OS_LINUX)
- if(forceName == QLatin1String("inotify")) {
- forced = QInotifyFileSystemWatcherEngine::create();
- } else if(forceName == QLatin1String("dnotify")) {
- forced = QDnotifyFileSystemWatcherEngine::create();
- }
-#else
- Q_UNUSED(forceName);
-#endif
-
- if(forced) {
- QObject::connect(forced,
- SIGNAL(fileChanged(QString,bool)),
- q,
- SLOT(_q_fileChanged(QString,bool)));
- QObject::connect(forced,
- SIGNAL(directoryChanged(QString,bool)),
- q,
- SLOT(_q_directoryChanged(QString,bool)));
- }
-}
-
void QFileSystemWatcherPrivate::initPollerEngine()
{
if(poller)
return;
Q_Q(QFileSystemWatcher);
- poller = new QPollingFileSystemWatcherEngine; // that was a mouthful
+ poller = new QPollingFileSystemWatcherEngine(q); // that was a mouthful
QObject::connect(poller,
SIGNAL(fileChanged(QString,bool)),
q,
@@ -434,27 +216,7 @@ QFileSystemWatcher::QFileSystemWatcher(const QStringList &paths, QObject *parent
Destroys the file system watcher.
*/
QFileSystemWatcher::~QFileSystemWatcher()
-{
- Q_D(QFileSystemWatcher);
- if (d->native) {
- d->native->stop();
- d->native->wait();
- delete d->native;
- d->native = 0;
- }
- if (d->poller) {
- d->poller->stop();
- d->poller->wait();
- delete d->poller;
- d->poller = 0;
- }
- if (d->forced) {
- d->forced->stop();
- d->forced->wait();
- delete d->forced;
- d->forced = 0;
- }
-}
+{ }
/*!
Adds \a path to the file system watcher if \a path exists. The
@@ -466,20 +228,28 @@ QFileSystemWatcher::~QFileSystemWatcher()
otherwise the fileChanged() signal is emitted when \a path is
modified, renamed or removed.
- \note There is a system dependent limit to the number of files and
- directories that can be monitored simultaneously. If this limit
- has been reached, \a path will not be added to the file system
- watcher, and a warning message will be printed to \e{stderr}.
+ If the watch was successful, true is returned.
+
+ Reasons for a watch failure are generally system-dependent, but
+ may include the resource not existing, access failures, or the
+ total watch count limit, if the platform has one.
+
+ \note There may be a system dependent limit to the number of
+ files and directories that can be monitored simultaneously.
+ If this limit is been reached, \a path will not be monitored,
+ and false is returned.
\sa addPaths(), removePath()
*/
-void QFileSystemWatcher::addPath(const QString &path)
+bool QFileSystemWatcher::addPath(const QString &path)
{
if (path.isEmpty()) {
qWarning("QFileSystemWatcher::addPath: path is empty");
- return;
+ return true;
}
- addPaths(QStringList(path));
+
+ QStringList paths = addPaths(QStringList(path));
+ return paths.isEmpty();
}
/*!
@@ -492,23 +262,37 @@ void QFileSystemWatcher::addPath(const QString &path)
otherwise the fileChanged() signal is emitted when the path is
modified, renamed, or removed.
- \note There is a system dependent limit to the number of files and
- directories that can be monitored simultaneously. If this limit
- has been reached, the excess \a paths will not be added to the
- file system watcher, and a warning message will be printed to
- \e{stderr} for each path that could not be added.
+ The return value is a list of paths that could not be watched.
+
+ Reasons for a watch failure are generally system-dependent, but
+ may include the resource not existing, access failures, or the
+ total watch count limit, if the platform has one.
+
+ \note There may be a system dependent limit to the number of
+ files and directories that can be monitored simultaneously.
+ If this limit has been reached, the excess \a paths will not
+ be monitored, and they will be added to the returned QStringList.
\sa addPath(), removePaths()
*/
-void QFileSystemWatcher::addPaths(const QStringList &paths)
+QStringList QFileSystemWatcher::addPaths(const QStringList &paths)
{
Q_D(QFileSystemWatcher);
- if (paths.isEmpty()) {
+
+ QStringList p = paths;
+ QMutableListIterator<QString> it(p);
+
+ while (it.hasNext()) {
+ const QString &path = it.next();
+ if (path.isEmpty())
+ it.remove();
+ }
+
+ if (p.isEmpty()) {
qWarning("QFileSystemWatcher::addPaths: list is empty");
- return;
+ return QStringList();
}
- QStringList p = paths;
QFileSystemWatcherEngine *engine = 0;
if(!objectName().startsWith(QLatin1String("_qt_autotest_force_engine_"))) {
@@ -530,54 +314,71 @@ void QFileSystemWatcher::addPaths(const QStringList &paths)
} else if(forceName == QLatin1String("native")) {
qDebug() << "QFileSystemWatcher: skipping polling engine, using only native engine";
engine = d->native;
- } else {
- qDebug() << "QFileSystemWatcher: skipping polling and native engine, using only explicit" << forceName << "engine";
- d_func()->initForcedEngine(forceName);
- engine = d->forced;
}
}
if(engine)
p = engine->addPaths(p, &d->files, &d->directories);
- if (!p.isEmpty())
- qWarning("QFileSystemWatcher: failed to add paths: %s",
- qPrintable(p.join(QLatin1String(", "))));
+ return p;
}
/*!
Removes the specified \a path from the file system watcher.
+ If the watch is successfully removed, true is returned.
+
+ Reasons for watch removal failing are generally system-dependent,
+ but may be due to the path having already been deleted, for example.
+
\sa removePaths(), addPath()
*/
-void QFileSystemWatcher::removePath(const QString &path)
+bool QFileSystemWatcher::removePath(const QString &path)
{
if (path.isEmpty()) {
qWarning("QFileSystemWatcher::removePath: path is empty");
- return;
+ return true;
}
- removePaths(QStringList(path));
+
+ QStringList paths = removePaths(QStringList(path));
+ return paths.isEmpty();
}
/*!
Removes the specified \a paths from the file system watcher.
+ The return value is a list of paths which were not able to be
+ unwatched successfully.
+
+ Reasons for watch removal failing are generally system-dependent,
+ but may be due to the path having already been deleted, for example.
+
\sa removePath(), addPaths()
*/
-void QFileSystemWatcher::removePaths(const QStringList &paths)
+QStringList QFileSystemWatcher::removePaths(const QStringList &paths)
{
- if (paths.isEmpty()) {
- qWarning("QFileSystemWatcher::removePaths: list is empty");
- return;
- }
Q_D(QFileSystemWatcher);
+
QStringList p = paths;
+ QMutableListIterator<QString> it(p);
+
+ while (it.hasNext()) {
+ const QString &path = it.next();
+ if (path.isEmpty())
+ it.remove();
+ }
+
+ if (p.isEmpty()) {
+ qWarning("QFileSystemWatcher::removePaths: list is empty");
+ return QStringList();
+ }
+
if (d->native)
p = d->native->removePaths(p, &d->files, &d->directories);
if (d->poller)
p = d->poller->removePaths(p, &d->files, &d->directories);
- if (d->forced)
- p = d->forced->removePaths(p, &d->files, &d->directories);
+
+ return p;
}
/*!
@@ -634,7 +435,5 @@ QT_END_NAMESPACE
#include "moc_qfilesystemwatcher.cpp"
-#include "qfilesystemwatcher.moc"
-
#endif // QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qfilesystemwatcher.h b/src/corelib/io/qfilesystemwatcher.h
index 763c8de0d6..7b7dbe98c5 100644
--- a/src/corelib/io/qfilesystemwatcher.h
+++ b/src/corelib/io/qfilesystemwatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -64,10 +64,10 @@ public:
QFileSystemWatcher(const QStringList &paths, QObject *parent = 0);
~QFileSystemWatcher();
- void addPath(const QString &file);
- void addPaths(const QStringList &files);
- void removePath(const QString &file);
- void removePaths(const QStringList &files);
+ bool addPath(const QString &file);
+ QStringList addPaths(const QStringList &files);
+ bool removePath(const QString &file);
+ QStringList removePaths(const QStringList &files);
QStringList files() const;
QStringList directories() const;
diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp
deleted file mode 100644
index 46c3b46467..0000000000
--- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp
+++ /dev/null
@@ -1,461 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qplatformdefs.h"
-#include "qfilesystemwatcher.h"
-#include "qfilesystemwatcher_dnotify_p.h"
-
-#ifndef QT_NO_FILESYSTEMWATCHER
-
-#include <qsocketnotifier.h>
-#include <qcoreapplication.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
-#include <qwaitcondition.h>
-#include <qmutex.h>
-#include <dirent.h>
-#include <qdir.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-
-#include "private/qcore_unix_p.h"
-
-#ifdef QT_LINUXBASE
-
-/* LSB doesn't standardize these */
-#define F_NOTIFY 1026
-#define DN_ACCESS 0x00000001
-#define DN_MODIFY 0x00000002
-#define DN_CREATE 0x00000004
-#define DN_DELETE 0x00000008
-#define DN_RENAME 0x00000010
-#define DN_ATTRIB 0x00000020
-#define DN_MULTISHOT 0x80000000
-
-#endif
-
-QT_BEGIN_NAMESPACE
-
-static int qfswd_fileChanged_pipe[2];
-static void (*qfswd_old_sigio_handler)(int) = 0;
-static void (*qfswd_old_sigio_action)(int, siginfo_t *, void *) = 0;
-static void qfswd_sigio_monitor(int signum, siginfo_t *i, void *v)
-{
- qt_safe_write(qfswd_fileChanged_pipe[1], reinterpret_cast<char*>(&i->si_fd), sizeof(int));
-
- if (qfswd_old_sigio_handler && qfswd_old_sigio_handler != SIG_IGN)
- qfswd_old_sigio_handler(signum);
- if (qfswd_old_sigio_action)
- qfswd_old_sigio_action(signum, i, v);
-}
-
-class QDnotifySignalThread : public QThread
-{
-Q_OBJECT
-public:
- QDnotifySignalThread();
- virtual ~QDnotifySignalThread();
-
- void startNotify();
-
- virtual void run();
-
-signals:
- void fdChanged(int);
-
-protected:
- virtual bool event(QEvent *);
-
-private slots:
- void readFromDnotify();
-
-private:
- QMutex mutex;
- QWaitCondition wait;
- bool isExecing;
-};
-
-Q_GLOBAL_STATIC(QDnotifySignalThread, dnotifySignal)
-
-QDnotifySignalThread::QDnotifySignalThread()
-: isExecing(false)
-{
- moveToThread(this);
-
- qt_safe_pipe(qfswd_fileChanged_pipe, O_NONBLOCK);
-
- struct sigaction oldAction;
- struct sigaction action;
- memset(&action, 0, sizeof(action));
- action.sa_sigaction = qfswd_sigio_monitor;
- action.sa_flags = SA_SIGINFO;
- ::sigaction(SIGIO, &action, &oldAction);
- if (!(oldAction.sa_flags & SA_SIGINFO))
- qfswd_old_sigio_handler = oldAction.sa_handler;
- else
- qfswd_old_sigio_action = oldAction.sa_sigaction;
-}
-
-QDnotifySignalThread::~QDnotifySignalThread()
-{
- if(isRunning()) {
- quit();
- QThread::wait();
- }
-}
-
-bool QDnotifySignalThread::event(QEvent *e)
-{
- if(e->type() == QEvent::User) {
- QMutexLocker locker(&mutex);
- isExecing = true;
- wait.wakeAll();
- return true;
- } else {
- return QThread::event(e);
- }
-}
-
-void QDnotifySignalThread::startNotify()
-{
- // Note: All this fancy waiting for the thread to enter its event
- // loop is to avoid nasty messages at app shutdown when the
- // QDnotifySignalThread singleton is deleted
- start();
- mutex.lock();
- while(!isExecing)
- wait.wait(&mutex);
- mutex.unlock();
-}
-
-void QDnotifySignalThread::run()
-{
- QSocketNotifier sn(qfswd_fileChanged_pipe[0], QSocketNotifier::Read, this);
- connect(&sn, SIGNAL(activated(int)), SLOT(readFromDnotify()));
-
- QCoreApplication::instance()->postEvent(this, new QEvent(QEvent::User));
- (void) exec();
-}
-
-void QDnotifySignalThread::readFromDnotify()
-{
- int fd;
- int readrv = qt_safe_read(qfswd_fileChanged_pipe[0], reinterpret_cast<char*>(&fd), sizeof(int));
- // Only expect EAGAIN or EINTR. Other errors are assumed to be impossible.
- if(readrv != -1) {
- Q_ASSERT(readrv == sizeof(int));
- Q_UNUSED(readrv);
-
- if(0 == fd)
- quit();
- else
- emit fdChanged(fd);
- }
-}
-
-QDnotifyFileSystemWatcherEngine::QDnotifyFileSystemWatcherEngine()
-{
- QObject::connect(dnotifySignal(), SIGNAL(fdChanged(int)),
- this, SLOT(refresh(int)), Qt::DirectConnection);
-}
-
-QDnotifyFileSystemWatcherEngine::~QDnotifyFileSystemWatcherEngine()
-{
- QMutexLocker locker(&mutex);
-
- for(QHash<int, Directory>::ConstIterator iter = fdToDirectory.constBegin();
- iter != fdToDirectory.constEnd();
- ++iter) {
- qt_safe_close(iter->fd);
- if(iter->parentFd)
- qt_safe_close(iter->parentFd);
- }
-}
-
-QDnotifyFileSystemWatcherEngine *QDnotifyFileSystemWatcherEngine::create()
-{
- return new QDnotifyFileSystemWatcherEngine();
-}
-
-void QDnotifyFileSystemWatcherEngine::run()
-{
- qFatal("QDnotifyFileSystemWatcherEngine thread should not be run");
-}
-
-QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, QStringList *files, QStringList *directories)
-{
- QMutexLocker locker(&mutex);
-
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
-
- while (it.hasNext()) {
- QString path = it.next();
-
- QFileInfo fi(path);
-
- if(!fi.exists()) {
- continue;
- }
-
- bool isDir = fi.isDir();
-
- if (isDir && directories->contains(path)) {
- continue; // Skip monitored directories
- } else if(!isDir && files->contains(path)) {
- continue; // Skip monitored files
- }
-
- if(!isDir)
- path = fi.canonicalPath();
-
- // Locate the directory entry (creating if needed)
- int fd = pathToFD[path];
-
- if(fd == 0) {
-
- QT_DIR *d = QT_OPENDIR(path.toUtf8().constData());
- if(!d) continue; // Could not open directory
- QT_DIR *parent = 0;
-
- QDir parentDir(path);
- if(!parentDir.isRoot()) {
- parentDir.cdUp();
- parent = QT_OPENDIR(parentDir.path().toUtf8().constData());
- if(!parent) {
- QT_CLOSEDIR(d);
- continue;
- }
- }
-
- fd = qt_safe_dup(::dirfd(d));
- int parentFd = parent ? qt_safe_dup(::dirfd(parent)) : 0;
-
- QT_CLOSEDIR(d);
- if(parent) QT_CLOSEDIR(parent);
-
- Q_ASSERT(fd);
- if(::fcntl(fd, F_SETSIG, SIGIO) ||
- ::fcntl(fd, F_NOTIFY, DN_MODIFY | DN_CREATE | DN_DELETE |
- DN_RENAME | DN_ATTRIB | DN_MULTISHOT) ||
- (parent && ::fcntl(parentFd, F_SETSIG, SIGIO)) ||
- (parent && ::fcntl(parentFd, F_NOTIFY, DN_DELETE | DN_RENAME |
- DN_MULTISHOT))) {
- continue; // Could not set appropriate flags
- }
-
- Directory dir;
- dir.path = path;
- dir.fd = fd;
- dir.parentFd = parentFd;
-
- fdToDirectory.insert(fd, dir);
- pathToFD.insert(path, fd);
- if(parentFd)
- parentToFD.insert(parentFd, fd);
- }
-
- Directory &directory = fdToDirectory[fd];
-
- if(isDir) {
- directory.isMonitored = true;
- } else {
- Directory::File file;
- file.path = fi.filePath();
- file.lastWrite = fi.lastModified();
- directory.files.append(file);
- pathToFD.insert(fi.filePath(), fd);
- }
-
- it.remove();
-
- if(isDir) {
- directories->append(path);
- } else {
- files->append(fi.filePath());
- }
- }
-
- dnotifySignal()->startNotify();
-
- return p;
-}
-
-QStringList QDnotifyFileSystemWatcherEngine::removePaths(const QStringList &paths, QStringList *files, QStringList *directories)
-{
- QMutexLocker locker(&mutex);
-
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
-
- QString path = it.next();
- int fd = pathToFD.take(path);
-
- if(!fd)
- continue;
-
- Directory &directory = fdToDirectory[fd];
- bool isDir = false;
- if(directory.path == path) {
- isDir = true;
- directory.isMonitored = false;
- } else {
- for(int ii = 0; ii < directory.files.count(); ++ii) {
- if(directory.files.at(ii).path == path) {
- directory.files.removeAt(ii);
- break;
- }
- }
- }
-
- if(!directory.isMonitored && directory.files.isEmpty()) {
- // No longer needed
- qt_safe_close(directory.fd);
- pathToFD.remove(directory.path);
- fdToDirectory.remove(fd);
- }
-
- if(isDir) {
- directories->removeAll(path);
- } else {
- files->removeAll(path);
- }
-
- it.remove();
- }
-
- return p;
-}
-
-void QDnotifyFileSystemWatcherEngine::refresh(int fd)
-{
- QMutexLocker locker(&mutex);
-
- bool wasParent = false;
- QHash<int, Directory>::Iterator iter = fdToDirectory.find(fd);
- if(iter == fdToDirectory.end()) {
- QHash<int, int>::Iterator pIter = parentToFD.find(fd);
- if(pIter == parentToFD.end())
- return;
-
- iter = fdToDirectory.find(*pIter);
- if (iter == fdToDirectory.end())
- return;
- wasParent = true;
- }
-
- Directory &directory = *iter;
-
- if(!wasParent) {
- for(int ii = 0; ii < directory.files.count(); ++ii) {
- Directory::File &file = directory.files[ii];
- if(file.updateInfo()) {
- // Emit signal
- QString filePath = file.path;
- bool removed = !QFileInfo(filePath).exists();
-
- if(removed) {
- directory.files.removeAt(ii);
- --ii;
- }
-
- emit fileChanged(filePath, removed);
- }
- }
- }
-
- if(directory.isMonitored) {
- // Emit signal
- bool removed = !QFileInfo(directory.path).exists();
- QString path = directory.path;
-
- if(removed)
- directory.isMonitored = false;
-
- emit directoryChanged(path, removed);
- }
-
- if(!directory.isMonitored && directory.files.isEmpty()) {
- qt_safe_close(directory.fd);
- if(directory.parentFd) {
- qt_safe_close(directory.parentFd);
- parentToFD.remove(directory.parentFd);
- }
- fdToDirectory.erase(iter);
- }
-}
-
-void QDnotifyFileSystemWatcherEngine::stop()
-{
-}
-
-bool QDnotifyFileSystemWatcherEngine::Directory::File::updateInfo()
-{
- QFileInfo fi(path);
- QDateTime nLastWrite = fi.lastModified();
- uint nOwnerId = fi.ownerId();
- uint nGroupId = fi.groupId();
- QFile::Permissions nPermissions = fi.permissions();
-
- if(nLastWrite != lastWrite ||
- nOwnerId != ownerId ||
- nGroupId != groupId ||
- nPermissions != permissions) {
- ownerId = nOwnerId;
- groupId = nGroupId;
- permissions = nPermissions;
- lastWrite = nLastWrite;
- return true;
- } else {
- return false;
- }
-}
-
-QT_END_NAMESPACE
-
-#include "qfilesystemwatcher_dnotify.moc"
-
-#endif // QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
deleted file mode 100644
index 95da897974..0000000000
--- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp
+++ /dev/null
@@ -1,492 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#define _DARWIN_USE_64_BIT_INODE
-#include <qplatformdefs.h>
-
-#include "qfilesystemwatcher.h"
-#include "qfilesystemwatcher_fsevents_p.h"
-
-#ifndef QT_NO_FILESYSTEMWATCHER
-
-#include <qdebug.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qvarlengtharray.h>
-
-#include <mach/mach.h>
-#include <sys/types.h>
-#include <CoreFoundation/CFRunLoop.h>
-#include <CoreFoundation/CFUUID.h>
-#include <CoreServices/CoreServices.h>
-#include <AvailabilityMacros.h>
-#include <private/qcore_mac_p.h>
-
-QT_BEGIN_NAMESPACE
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-// Static operator overloading so for the sake of some convieniece.
-// They only live in this compilation unit to avoid polluting Qt in general.
-static bool operator==(const struct ::timespec &left, const struct ::timespec &right)
-{
- return left.tv_sec == right.tv_sec
- && left.tv_nsec == right.tv_nsec;
-}
-
-static bool operator==(const struct ::stat &left, const struct ::stat &right)
-{
- return left.st_dev == right.st_dev
- && left.st_mode == right.st_mode
- && left.st_size == right.st_size
- && left.st_ino == right.st_ino
- && left.st_uid == right.st_uid
- && left.st_gid == right.st_gid
- && left.st_mtimespec == right.st_mtimespec
- && left.st_ctimespec == right.st_ctimespec
- && left.st_flags == right.st_flags;
-}
-
-static bool operator!=(const struct ::stat &left, const struct ::stat &right)
-{
- return !(operator==(left, right));
-}
-
-
-static void addPathToHash(PathHash &pathHash, const QString &key, const QFileInfo &fileInfo,
- const QString &path)
-{
- PathInfoList &list = pathHash[key];
- list.push_back(PathInfo(path,
- fileInfo.canonicalFilePath().normalized(QString::NormalizationForm_D).toUtf8()));
- pathHash.insert(key, list);
-}
-
-static void removePathFromHash(PathHash &pathHash, const QString &key, const QString &path)
-{
- PathInfoList &list = pathHash[key];
- // We make the assumption that the list contains unique paths
- PathInfoList::iterator End = list.end();
- PathInfoList::iterator it = list.begin();
- while (it != End) {
- if (it->originalPath == path) {
- list.erase(it);
- break;
- }
- ++it;
- }
- if (list.isEmpty())
- pathHash.remove(key);
-}
-
-static void stopFSStream(FSEventStreamRef stream)
-{
- if (stream) {
- FSEventStreamStop(stream);
- FSEventStreamInvalidate(stream);
- }
-}
-
-static QString createFSStreamPath(const QString &absolutePath)
-{
- // The path returned has a trailing slash, so ensure that here.
- QString string = absolutePath;
- string.reserve(string.size() + 1);
- string.append(QLatin1Char('/'));
- return string;
-}
-
-static void cleanupFSStream(FSEventStreamRef stream)
-{
- if (stream)
- FSEventStreamRelease(stream);
-}
-
-const FSEventStreamCreateFlags QtFSEventFlags = (kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagNoDefer /* | kFSEventStreamCreateFlagWatchRoot*/);
-
-const CFTimeInterval Latency = 0.033; // This will do updates 30 times a second which is probably more than you need.
-#endif
-
-QFSEventsFileSystemWatcherEngine::QFSEventsFileSystemWatcherEngine()
- : fsStream(0), pathsToWatch(0), threadsRunLoop(0)
-{
-}
-
-QFSEventsFileSystemWatcherEngine::~QFSEventsFileSystemWatcherEngine()
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- // I assume that at this point, QFileSystemWatcher has already called stop
- // on me, so I don't need to invalidate or stop my stream, simply
- // release it.
- cleanupFSStream(fsStream);
- if (pathsToWatch)
- CFRelease(pathsToWatch);
-#endif
-}
-
-QFSEventsFileSystemWatcherEngine *QFSEventsFileSystemWatcherEngine::create()
-{
- return new QFSEventsFileSystemWatcherEngine();
-}
-
-QStringList QFSEventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- stop();
- wait();
- QMutexLocker locker(&mutex);
- QStringList failedToAdd;
- // if we have a running FSStreamEvent, we have to kill it, we'll re-add the stream soon.
- FSEventStreamEventId idToCheck;
- if (fsStream) {
- idToCheck = FSEventStreamGetLatestEventId(fsStream);
- cleanupFSStream(fsStream);
- } else {
- idToCheck = kFSEventStreamEventIdSinceNow;
- }
-
- // Brain-dead approach, but works. FSEvents actually can already read sub-trees, but since it's
- // work to figure out if we are doing a double register, we just register it twice as FSEvents
- // seems smart enough to only deliver one event. We also duplicate directory entries in here
- // (e.g., if you watch five files in the same directory, you get that directory included in the
- // array 5 times). This stupidity also makes remove work correctly though. I'll freely admit
- // that we could make this a bit smarter. If you do, check the auto-tests, they should catch at
- // least a couple of the issues.
- QCFType<CFMutableArrayRef> tmpArray = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
- for (int i = 0; i < paths.size(); ++i) {
- const QString &path = paths.at(i);
-
- QFileInfo fileInfo(path);
- if (!fileInfo.exists()) {
- failedToAdd.append(path);
- continue;
- }
-
- if (fileInfo.isDir()) {
- if (directories->contains(path)) {
- failedToAdd.append(path);
- continue;
- } else {
- directories->append(path);
- // Full file path for dirs.
- QCFString cfpath(createFSStreamPath(fileInfo.canonicalFilePath()));
- addPathToHash(dirPathInfoHash, cfpath, fileInfo, path);
- CFArrayAppendValue(tmpArray, cfpath);
- }
- } else {
- if (files->contains(path)) {
- failedToAdd.append(path);
- continue;
- } else {
- // Just the absolute path (minus it's filename) for files.
- QCFString cfpath(createFSStreamPath(fileInfo.canonicalPath()));
- files->append(path);
- addPathToHash(filePathInfoHash, cfpath, fileInfo, path);
- CFArrayAppendValue(tmpArray, cfpath);
- }
- }
- }
-
- if (!pathsToWatch && failedToAdd.size() == paths.size()) {
- return failedToAdd;
- }
-
- if (CFArrayGetCount(tmpArray) > 0) {
- if (pathsToWatch) {
- CFArrayAppendArray(tmpArray, pathsToWatch, CFRangeMake(0, CFArrayGetCount(pathsToWatch)));
- CFRelease(pathsToWatch);
- }
- pathsToWatch = CFArrayCreateCopy(kCFAllocatorDefault, tmpArray);
- }
-
- FSEventStreamContext context = { 0, this, 0, 0, 0 };
- fsStream = FSEventStreamCreate(kCFAllocatorDefault,
- QFSEventsFileSystemWatcherEngine::fseventsCallback,
- &context, pathsToWatch,
- idToCheck, Latency, QtFSEventFlags);
- warmUpFSEvents();
-
- return failedToAdd;
-#else
- Q_UNUSED(paths);
- Q_UNUSED(files);
- Q_UNUSED(directories);
- return QStringList();
-#endif
-}
-
-void QFSEventsFileSystemWatcherEngine::warmUpFSEvents()
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- // This function assumes that the mutex has already been grabbed before calling it.
- // It exits with the mutex still locked (Q_ASSERT(mutex.isLocked()) ;-).
- start();
- waitCondition.wait(&mutex);
-#endif
-}
-
-QStringList QFSEventsFileSystemWatcherEngine::removePaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- stop();
- wait();
- QMutexLocker locker(&mutex);
- // short circuit for smarties that call remove before add and we have nothing.
- if (pathsToWatch == 0)
- return paths;
- QStringList failedToRemove;
- // if we have a running FSStreamEvent, we have to stop it, we'll re-add the stream soon.
- FSEventStreamEventId idToCheck;
- if (fsStream) {
- idToCheck = FSEventStreamGetLatestEventId(fsStream);
- cleanupFSStream(fsStream);
- fsStream = 0;
- } else {
- idToCheck = kFSEventStreamEventIdSinceNow;
- }
-
- CFIndex itemCount = CFArrayGetCount(pathsToWatch);
- QCFType<CFMutableArrayRef> tmpArray = CFArrayCreateMutableCopy(kCFAllocatorDefault, itemCount,
- pathsToWatch);
- CFRelease(pathsToWatch);
- pathsToWatch = 0;
- for (int i = 0; i < paths.size(); ++i) {
- // Get the itemCount at the beginning to avoid any overruns during the iteration.
- itemCount = CFArrayGetCount(tmpArray);
- const QString &path = paths.at(i);
- QFileInfo fi(path);
- QCFString cfpath(createFSStreamPath(fi.canonicalPath()));
-
- CFIndex index = CFArrayGetFirstIndexOfValue(tmpArray, CFRangeMake(0, itemCount), cfpath);
- if (index != -1) {
- CFArrayRemoveValueAtIndex(tmpArray, index);
- files->removeAll(path);
- removePathFromHash(filePathInfoHash, cfpath, path);
- } else {
- // Could be a directory we are watching instead.
- QCFString cfdirpath(createFSStreamPath(fi.canonicalFilePath()));
- index = CFArrayGetFirstIndexOfValue(tmpArray, CFRangeMake(0, itemCount), cfdirpath);
- if (index != -1) {
- CFArrayRemoveValueAtIndex(tmpArray, index);
- directories->removeAll(path);
- removePathFromHash(dirPathInfoHash, cfpath, path);
- } else {
- failedToRemove.append(path);
- }
- }
- }
- itemCount = CFArrayGetCount(tmpArray);
- if (itemCount != 0) {
- pathsToWatch = CFArrayCreateCopy(kCFAllocatorDefault, tmpArray);
-
- FSEventStreamContext context = { 0, this, 0, 0, 0 };
- fsStream = FSEventStreamCreate(kCFAllocatorDefault,
- QFSEventsFileSystemWatcherEngine::fseventsCallback,
- &context, pathsToWatch, idToCheck, Latency, QtFSEventFlags);
- warmUpFSEvents();
- }
- return failedToRemove;
-#else
- Q_UNUSED(paths);
- Q_UNUSED(files);
- Q_UNUSED(directories);
- return QStringList();
-#endif
-}
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-void QFSEventsFileSystemWatcherEngine::updateList(PathInfoList &list, bool directory, bool emitSignals)
-{
- PathInfoList::iterator End = list.end();
- PathInfoList::iterator it = list.begin();
- while (it != End) {
- struct ::stat newInfo;
- if (::stat(it->absolutePath, &newInfo) == 0) {
- if (emitSignals) {
- if (newInfo != it->savedInfo) {
- it->savedInfo = newInfo;
- if (directory)
- emit directoryChanged(it->originalPath, false);
- else
- emit fileChanged(it->originalPath, false);
- }
- } else {
- it->savedInfo = newInfo;
- }
- } else {
- if (errno == ENOENT) {
- if (emitSignals) {
- if (directory)
- emit directoryChanged(it->originalPath, true);
- else
- emit fileChanged(it->originalPath, true);
- }
- it = list.erase(it);
- continue;
- } else {
- qWarning("%s:%d:QFSEventsFileSystemWatcherEngine: stat error on %s:%s",
- __FILE__, __LINE__, qPrintable(it->originalPath), strerror(errno));
-
- }
- }
- ++it;
- }
-}
-
-void QFSEventsFileSystemWatcherEngine::updateHash(PathHash &pathHash)
-{
- PathHash::iterator HashEnd = pathHash.end();
- PathHash::iterator it = pathHash.begin();
- const bool IsDirectory = (&pathHash == &dirPathInfoHash);
- while (it != HashEnd) {
- updateList(it.value(), IsDirectory, false);
- if (it.value().isEmpty())
- it = pathHash.erase(it);
- else
- ++it;
- }
-}
-#endif
-
-void QFSEventsFileSystemWatcherEngine::fseventsCallback(ConstFSEventStreamRef ,
- void *clientCallBackInfo, size_t numEvents,
- void *eventPaths,
- const FSEventStreamEventFlags eventFlags[],
- const FSEventStreamEventId [])
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- QFSEventsFileSystemWatcherEngine *watcher = static_cast<QFSEventsFileSystemWatcherEngine *>(clientCallBackInfo);
- QMutexLocker locker(&watcher->mutex);
- CFArrayRef paths = static_cast<CFArrayRef>(eventPaths);
- for (size_t i = 0; i < numEvents; ++i) {
- const QString path = QCFString::toQString(
- static_cast<CFStringRef>(CFArrayGetValueAtIndex(paths, i)));
- const FSEventStreamEventFlags pathFlags = eventFlags[i];
- // There are several flags that may be passed, but we really don't care about them ATM.
- // Here they are and why we don't care.
- // kFSEventStreamEventFlagHistoryDone--(very unlikely to be gotten, but even then, not much changes).
- // kFSEventStreamEventFlagMustScanSubDirs--Likely means the data is very much out of date, we
- // aren't coalescing our directories, so again not so much of an issue
- // kFSEventStreamEventFlagRootChanged | kFSEventStreamEventFlagMount | kFSEventStreamEventFlagUnmount--
- // These three flags indicate something has changed, but the stat will likely show this, so
- // there's not really much to worry about.
- // (btw, FSEvents is not the correct way of checking for mounts/unmounts,
- // there are real CarbonCore events for that.)
- Q_UNUSED(pathFlags);
- if (watcher->filePathInfoHash.contains(path))
- watcher->updateList(watcher->filePathInfoHash[path], false, true);
-
- if (watcher->dirPathInfoHash.contains(path))
- watcher->updateList(watcher->dirPathInfoHash[path], true, true);
- }
-#else
- Q_UNUSED(clientCallBackInfo);
- Q_UNUSED(numEvents);
- Q_UNUSED(eventPaths);
- Q_UNUSED(eventFlags);
-#endif
-}
-
-void QFSEventsFileSystemWatcherEngine::stop()
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- QMutexLocker locker(&mutex);
- stopFSStream(fsStream);
- if (threadsRunLoop) {
- CFRunLoopStop(threadsRunLoop);
- waitForStop.wait(&mutex);
- }
-#endif
-}
-
-void QFSEventsFileSystemWatcherEngine::updateFiles()
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- QMutexLocker locker(&mutex);
- updateHash(filePathInfoHash);
- updateHash(dirPathInfoHash);
- if (filePathInfoHash.isEmpty() && dirPathInfoHash.isEmpty()) {
- // Everything disappeared before we got to start, don't bother.
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- // Code duplicated from stop(), with the exception that we
- // don't wait on waitForStop here. Doing this will lead to
- // a deadlock since this function is called from the worker
- // thread. (waitForStop.wakeAll() is only called from the
- // end of run()).
- stopFSStream(fsStream);
- if (threadsRunLoop)
- CFRunLoopStop(threadsRunLoop);
-#endif
- cleanupFSStream(fsStream);
- }
- waitCondition.wakeAll();
-#endif
-}
-
-void QFSEventsFileSystemWatcherEngine::run()
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- threadsRunLoop = CFRunLoopGetCurrent();
- FSEventStreamScheduleWithRunLoop(fsStream, threadsRunLoop, kCFRunLoopDefaultMode);
- bool startedOK = FSEventStreamStart(fsStream);
- // It's recommended by Apple that you only update the files after you've started
- // the stream, because otherwise you might miss an update in between starting it.
- updateFiles();
-#ifdef QT_NO_DEBUG
- Q_UNUSED(startedOK);
-#else
- Q_ASSERT(startedOK);
-#endif
- // If for some reason we called stop up above (and invalidated our stream), this call will return
- // immediately.
- CFRunLoopRun();
- threadsRunLoop = 0;
- QMutexLocker locker(&mutex);
- waitForStop.wakeAll();
-#endif
-}
-
-QT_END_NAMESPACE
-#endif //QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
deleted file mode 100644
index 3830002c0a..0000000000
--- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef FILEWATCHER_FSEVENTS_P_H
-#define FILEWATCHER_FSEVENTS_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of the QLibrary class. This header file may change from
-// version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qfilesystemwatcher_p.h"
-
-#ifndef QT_NO_FILESYSTEMWATCHER
-
-#include <QtCore/qmutex.h>
-#include <QtCore/qwaitcondition.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qhash.h>
-#include <QtCore/qlinkedlist.h>
-#include <private/qcore_mac_p.h>
-#include <sys/stat.h>
-
-typedef struct __FSEventStream *FSEventStreamRef;
-typedef const struct __FSEventStream *ConstFSEventStreamRef;
-typedef const struct __CFArray *CFArrayRef;
-typedef UInt32 FSEventStreamEventFlags;
-typedef uint64_t FSEventStreamEventId;
-
-QT_BEGIN_NAMESPACE
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-// Yes, I use a stat element here. QFileInfo requires too much knowledge about implementation
-// details to be used as a long-standing record. Since I'm going to have to store this information, I can
-// do the stat myself too.
-struct PathInfo {
- PathInfo(const QString &path, const QByteArray &absPath)
- : originalPath(path), absolutePath(absPath) {}
- QString originalPath; // The path we need to emit
- QByteArray absolutePath; // The path we need to stat.
- struct ::stat savedInfo; // All the info for the path so we can compare it.
-};
-typedef QLinkedList<PathInfo> PathInfoList;
-typedef QHash<QString, PathInfoList> PathHash;
-#endif
-
-class QFSEventsFileSystemWatcherEngine : public QFileSystemWatcherEngine
-{
- Q_OBJECT
-public:
- ~QFSEventsFileSystemWatcherEngine();
-
- static QFSEventsFileSystemWatcherEngine *create();
-
- QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
- QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
-
- void stop();
-
-private:
- QFSEventsFileSystemWatcherEngine();
- void warmUpFSEvents();
- void updateFiles();
-
- static void fseventsCallback(ConstFSEventStreamRef streamRef, void *clientCallBackInfo, size_t numEvents,
- void *eventPaths, const FSEventStreamEventFlags eventFlags[],
- const FSEventStreamEventId eventIds[]);
- void run();
- FSEventStreamRef fsStream;
- CFArrayRef pathsToWatch;
- CFRunLoopRef threadsRunLoop;
- QMutex mutex;
- QWaitCondition waitCondition;
- QWaitCondition waitForStop;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- PathHash filePathInfoHash;
- PathHash dirPathInfoHash;
- void updateHash(PathHash &pathHash);
- void updateList(PathInfoList &list, bool directory, bool emitSignals);
-#endif
-};
-
-#endif //QT_NO_FILESYSTEMWATCHER
-
-#endif
-
-QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index ef302243da..ff732bc70e 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -210,7 +210,7 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
-QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create()
+QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create(QObject *parent)
{
register int fd = -1;
#ifdef IN_CLOEXEC
@@ -220,40 +220,32 @@ QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create()
fd = inotify_init();
if (fd == -1)
return 0;
- ::fcntl(fd, F_SETFD, FD_CLOEXEC);
}
- return new QInotifyFileSystemWatcherEngine(fd);
+ return new QInotifyFileSystemWatcherEngine(fd, parent);
}
-QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd)
- : inotifyFd(fd)
+QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd, QObject *parent)
+ : QFileSystemWatcherEngine(parent),
+ inotifyFd(fd),
+ notifier(fd, QSocketNotifier::Read, this)
{
fcntl(inotifyFd, F_SETFD, FD_CLOEXEC);
-
- moveToThread(this);
+ connect(&notifier, SIGNAL(activated(int)), SLOT(readFromInotify()));
}
QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine()
{
+ notifier.setEnabled(false);
foreach (int id, pathToID)
inotify_rm_watch(inotifyFd, id < 0 ? -id : id);
::close(inotifyFd);
}
-void QInotifyFileSystemWatcherEngine::run()
-{
- QSocketNotifier sn(inotifyFd, QSocketNotifier::Read, this);
- connect(&sn, SIGNAL(activated(int)), SLOT(readFromInotify()));
- (void) exec();
-}
-
QStringList QInotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
QStringList *files,
QStringList *directories)
{
- QMutexLocker locker(&mutex);
-
QStringList p = paths;
QMutableListIterator<QString> it(p);
while (it.hasNext()) {
@@ -303,8 +295,6 @@ QStringList QInotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
idToPath.insert(id, path);
}
- start();
-
return p;
}
@@ -312,8 +302,6 @@ QStringList QInotifyFileSystemWatcherEngine::removePaths(const QStringList &path
QStringList *files,
QStringList *directories)
{
- QMutexLocker locker(&mutex);
-
QStringList p = paths;
QMutableListIterator<QString> it(p);
while (it.hasNext()) {
@@ -338,15 +326,8 @@ QStringList QInotifyFileSystemWatcherEngine::removePaths(const QStringList &path
return p;
}
-void QInotifyFileSystemWatcherEngine::stop()
-{
- quit();
-}
-
void QInotifyFileSystemWatcherEngine::readFromInotify()
{
- QMutexLocker locker(&mutex);
-
// qDebug() << "QInotifyFileSystemWatcherEngine::readFromInotify";
int buffSize = 0;
diff --git a/src/corelib/io/qfilesystemwatcher_inotify_p.h b/src/corelib/io/qfilesystemwatcher_inotify_p.h
index 0abd205237..8b3ce62c46 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify_p.h
+++ b/src/corelib/io/qfilesystemwatcher_inotify_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,8 +57,9 @@
#ifndef QT_NO_FILESYSTEMWATCHER
-#include <qhash.h>
-#include <qmutex.h>
+#include <QtCore/qhash.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qsocketnotifier.h>
QT_BEGIN_NAMESPACE
@@ -69,24 +70,20 @@ class QInotifyFileSystemWatcherEngine : public QFileSystemWatcherEngine
public:
~QInotifyFileSystemWatcherEngine();
- static QInotifyFileSystemWatcherEngine *create();
-
- void run();
+ static QInotifyFileSystemWatcherEngine *create(QObject *parent);
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
- void stop();
-
private Q_SLOTS:
void readFromInotify();
private:
- QInotifyFileSystemWatcherEngine(int fd);
+ QInotifyFileSystemWatcherEngine(int fd, QObject *parent);
int inotifyFd;
- QMutex mutex;
QHash<QString, int> pathToID;
QHash<int, QString> idToPath;
+ QSocketNotifier notifier;
};
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index 387a7f7c4b..fd7bfa2b27 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,49 +67,28 @@ QT_BEGIN_NAMESPACE
# define DEBUG if(false)qDebug
#endif
-QKqueueFileSystemWatcherEngine *QKqueueFileSystemWatcherEngine::create()
+QKqueueFileSystemWatcherEngine *QKqueueFileSystemWatcherEngine::create(QObject *parent)
{
int kqfd = kqueue();
if (kqfd == -1)
return 0;
- return new QKqueueFileSystemWatcherEngine(kqfd);
+ return new QKqueueFileSystemWatcherEngine(kqfd, parent);
}
-QKqueueFileSystemWatcherEngine::QKqueueFileSystemWatcherEngine(int kqfd)
- : kqfd(kqfd)
+QKqueueFileSystemWatcherEngine::QKqueueFileSystemWatcherEngine(int kqfd, QObject *parent)
+ : QFileSystemWatcherEngine(parent),
+ kqfd(kqfd),
+ notifier(kqfd, QSocketNotifier::Read, this)
{
- fcntl(kqfd, F_SETFD, FD_CLOEXEC);
+ connect(&notifier, SIGNAL(activated(int)), SLOT(readFromKqueue()));
- if (pipe(kqpipe) == -1) {
- perror("QKqueueFileSystemWatcherEngine: cannot create pipe");
- kqpipe[0] = kqpipe[1] = -1;
- return;
- }
- fcntl(kqpipe[0], F_SETFD, FD_CLOEXEC);
- fcntl(kqpipe[1], F_SETFD, FD_CLOEXEC);
-
- struct kevent kev;
- EV_SET(&kev,
- kqpipe[0],
- EVFILT_READ,
- EV_ADD | EV_ENABLE,
- 0,
- 0,
- 0);
- if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
- perror("QKqueueFileSystemWatcherEngine: cannot watch pipe, kevent returned");
- return;
- }
+ fcntl(kqfd, F_SETFD, FD_CLOEXEC);
}
QKqueueFileSystemWatcherEngine::~QKqueueFileSystemWatcherEngine()
{
- stop();
- wait();
-
+ notifier.setEnabled(false);
close(kqfd);
- close(kqpipe[0]);
- close(kqpipe[1]);
foreach (int id, pathToID)
::close(id < 0 ? -id : id);
@@ -120,82 +99,73 @@ QStringList QKqueueFileSystemWatcherEngine::addPaths(const QStringList &paths,
QStringList *directories)
{
QStringList p = paths;
- {
- QMutexLocker locker(&mutex);
-
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- int fd;
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ int fd;
#if defined(O_EVTONLY)
- fd = qt_safe_open(QFile::encodeName(path), O_EVTONLY);
+ fd = qt_safe_open(QFile::encodeName(path), O_EVTONLY);
#else
- fd = qt_safe_open(QFile::encodeName(path), O_RDONLY);
+ fd = qt_safe_open(QFile::encodeName(path), O_RDONLY);
#endif
- if (fd == -1) {
- perror("QKqueueFileSystemWatcherEngine::addPaths: open");
- continue;
- }
- if (fd >= (int)FD_SETSIZE / 2 && fd < (int)FD_SETSIZE) {
- int fddup = fcntl(fd, F_DUPFD, FD_SETSIZE);
- if (fddup != -1) {
- ::close(fd);
- fd = fddup;
- }
+ if (fd == -1) {
+ perror("QKqueueFileSystemWatcherEngine::addPaths: open");
+ continue;
+ }
+ if (fd >= (int)FD_SETSIZE / 2 && fd < (int)FD_SETSIZE) {
+ int fddup = fcntl(fd, F_DUPFD, FD_SETSIZE);
+ if (fddup != -1) {
+ ::close(fd);
+ fd = fddup;
}
- fcntl(fd, F_SETFD, FD_CLOEXEC);
+ }
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
- QT_STATBUF st;
- if (QT_FSTAT(fd, &st) == -1) {
- perror("QKqueueFileSystemWatcherEngine::addPaths: fstat");
+ QT_STATBUF st;
+ if (QT_FSTAT(fd, &st) == -1) {
+ perror("QKqueueFileSystemWatcherEngine::addPaths: fstat");
+ ::close(fd);
+ continue;
+ }
+ int id = (S_ISDIR(st.st_mode)) ? -fd : fd;
+ if (id < 0) {
+ if (directories->contains(path)) {
::close(fd);
continue;
}
- int id = (S_ISDIR(st.st_mode)) ? -fd : fd;
- if (id < 0) {
- if (directories->contains(path)) {
- ::close(fd);
- continue;
- }
- } else {
- if (files->contains(path)) {
- ::close(fd);
- continue;
- }
- }
-
- struct kevent kev;
- EV_SET(&kev,
- fd,
- EVFILT_VNODE,
- EV_ADD | EV_ENABLE | EV_CLEAR,
- NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE,
- 0,
- 0);
- if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
- perror("QKqueueFileSystemWatcherEngine::addPaths: kevent");
+ } else {
+ if (files->contains(path)) {
::close(fd);
continue;
}
+ }
- it.remove();
- if (id < 0) {
- DEBUG() << "QKqueueFileSystemWatcherEngine: added directory path" << path;
- directories->append(path);
- } else {
- DEBUG() << "QKqueueFileSystemWatcherEngine: added file path" << path;
- files->append(path);
- }
+ struct kevent kev;
+ EV_SET(&kev,
+ fd,
+ EVFILT_VNODE,
+ EV_ADD | EV_ENABLE | EV_CLEAR,
+ NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE,
+ 0,
+ 0);
+ if (kevent(kqfd, &kev, 1, 0, 0, 0) == -1) {
+ perror("QKqueueFileSystemWatcherEngine::addPaths: kevent");
+ ::close(fd);
+ continue;
+ }
- pathToID.insert(path, id);
- idToPath.insert(id, path);
+ it.remove();
+ if (id < 0) {
+ DEBUG() << "QKqueueFileSystemWatcherEngine: added directory path" << path;
+ directories->append(path);
+ } else {
+ DEBUG() << "QKqueueFileSystemWatcherEngine: added file path" << path;
+ files->append(path);
}
- }
- if (!isRunning())
- start();
- else
- write(kqpipe[1], "@", 1);
+ pathToID.insert(path, id);
+ idToPath.insert(id, path);
+ }
return p;
}
@@ -206,126 +176,86 @@ QStringList QKqueueFileSystemWatcherEngine::removePaths(const QStringList &paths
{
bool isEmpty;
QStringList p = paths;
- {
- QMutexLocker locker(&mutex);
- if (pathToID.isEmpty())
- return p;
-
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- int id = pathToID.take(path);
- QString x = idToPath.take(id);
- if (x.isEmpty() || x != path)
- continue;
+ if (pathToID.isEmpty())
+ return p;
- ::close(id < 0 ? -id : id);
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ int id = pathToID.take(path);
+ QString x = idToPath.take(id);
+ if (x.isEmpty() || x != path)
+ continue;
- it.remove();
- if (id < 0)
- directories->removeAll(path);
- else
- files->removeAll(path);
- }
- isEmpty = pathToID.isEmpty();
- }
+ ::close(id < 0 ? -id : id);
- if (isEmpty) {
- stop();
- wait();
- } else {
- write(kqpipe[1], "@", 1);
+ it.remove();
+ if (id < 0)
+ directories->removeAll(path);
+ else
+ files->removeAll(path);
}
+ isEmpty = pathToID.isEmpty();
return p;
}
-void QKqueueFileSystemWatcherEngine::stop()
-{
- write(kqpipe[1], "q", 1);
-}
-
-void QKqueueFileSystemWatcherEngine::run()
+void QKqueueFileSystemWatcherEngine::readFromKqueue()
{
forever {
+ DEBUG() << "QKqueueFileSystemWatcherEngine: polling for changes";
int r;
struct kevent kev;
- DEBUG() << "QKqueueFileSystemWatcherEngine: waiting for kevents...";
- EINTR_LOOP(r, kevent(kqfd, 0, 0, &kev, 1, 0));
+ struct timespec ts = { 0, 0 }; // 0 ts, because we want to poll
+ EINTR_LOOP(r, kevent(kqfd, 0, 0, &kev, 1, &ts));
if (r < 0) {
perror("QKqueueFileSystemWatcherEngine: error during kevent wait");
return;
+ } else if (r == 0) {
+ // polling returned no events, so stop
+ break;
} else {
int fd = kev.ident;
DEBUG() << "QKqueueFileSystemWatcherEngine: processing kevent" << kev.ident << kev.filter;
- if (fd == kqpipe[0]) {
- // read all pending data from the pipe
- QByteArray ba;
- ba.resize(kev.data);
- if (read(kqpipe[0], ba.data(), ba.size()) != ba.size()) {
- perror("QKqueueFileSystemWatcherEngine: error reading from pipe");
- return;
- }
- // read the command from the buffer (but break and return on 'q')
- char cmd = 0;
- for (int i = 0; i < ba.size(); ++i) {
- cmd = ba.constData()[i];
- if (cmd == 'q')
- break;
- }
- // handle the command
- switch (cmd) {
- case 'q':
- DEBUG() << "QKqueueFileSystemWatcherEngine: thread received 'q', exiting...";
- return;
- case '@':
- DEBUG() << "QKqueueFileSystemWatcherEngine: thread received '@', continuing...";
- break;
- default:
- DEBUG() << "QKqueueFileSystemWatcherEngine: thread received unknow message" << cmd;
- break;
- }
- } else {
- QMutexLocker locker(&mutex);
- int id = fd;
- QString path = idToPath.value(id);
+ int id = fd;
+ QString path = idToPath.value(id);
+ if (path.isEmpty()) {
+ // perhaps a directory?
+ id = -id;
+ path = idToPath.value(id);
if (path.isEmpty()) {
- // perhaps a directory?
- id = -id;
- path = idToPath.value(id);
- if (path.isEmpty()) {
- DEBUG() << "QKqueueFileSystemWatcherEngine: received a kevent for a file we're not watching";
- continue;
- }
- }
- if (kev.filter != EVFILT_VNODE) {
- DEBUG() << "QKqueueFileSystemWatcherEngine: received a kevent with the wrong filter";
+ DEBUG() << "QKqueueFileSystemWatcherEngine: received a kevent for a file we're not watching";
continue;
}
+ }
+ if (kev.filter != EVFILT_VNODE) {
+ DEBUG() << "QKqueueFileSystemWatcherEngine: received a kevent with the wrong filter";
+ continue;
+ }
- if ((kev.fflags & (NOTE_DELETE | NOTE_REVOKE | NOTE_RENAME)) != 0) {
- DEBUG() << path << "removed, removing watch also";
+ if ((kev.fflags & (NOTE_DELETE | NOTE_REVOKE | NOTE_RENAME)) != 0) {
+ DEBUG() << path << "removed, removing watch also";
- pathToID.remove(path);
- idToPath.remove(id);
- ::close(fd);
+ pathToID.remove(path);
+ idToPath.remove(id);
+ ::close(fd);
- if (id < 0)
- emit directoryChanged(path, true);
- else
- emit fileChanged(path, true);
- } else {
- DEBUG() << path << "changed";
+ if (id < 0)
+ emit directoryChanged(path, true);
+ else
+ emit fileChanged(path, true);
+ } else {
+ DEBUG() << path << "changed";
- if (id < 0)
- emit directoryChanged(path, false);
- else
- emit fileChanged(path, false);
- }
+ if (id < 0)
+ emit directoryChanged(path, false);
+ else
+ emit fileChanged(path, false);
}
}
+
}
}
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue_p.h b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
index fd9d820e7d..9bd9378c0c 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue_p.h
+++ b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,6 +59,7 @@
#include <QtCore/qmutex.h>
#include <QtCore/qthread.h>
#include <QtCore/qvector.h>
+#include <QtCore/qsocketnotifier.h>
#ifndef QT_NO_FILESYSTEMWATCHER
struct kevent;
@@ -71,24 +72,22 @@ class QKqueueFileSystemWatcherEngine : public QFileSystemWatcherEngine
public:
~QKqueueFileSystemWatcherEngine();
- static QKqueueFileSystemWatcherEngine *create();
+ static QKqueueFileSystemWatcherEngine *create(QObject *parent);
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
- void stop();
+private Q_SLOTS:
+ void readFromKqueue();
private:
- QKqueueFileSystemWatcherEngine(int kqfd);
-
- void run();
+ QKqueueFileSystemWatcherEngine(int kqfd, QObject *parent);
int kqfd;
- int kqpipe[2];
- QMutex mutex;
QHash<QString, int> pathToID;
QHash<int, QString> idToPath;
+ QSocketNotifier notifier;
};
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_p.h b/src/corelib/io/qfilesystemwatcher_p.h
index e136273b36..9f403b308f 100644
--- a/src/corelib/io/qfilesystemwatcher_p.h
+++ b/src/corelib/io/qfilesystemwatcher_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,19 +60,17 @@
#include <private/qobject_p.h>
#include <QtCore/qstringlist.h>
-#include <QtCore/qthread.h>
QT_BEGIN_NAMESPACE
-class QFileSystemWatcherEngine : public QThread
+class QFileSystemWatcherEngine : public QObject
{
Q_OBJECT
protected:
- inline QFileSystemWatcherEngine(bool move = true)
+ inline QFileSystemWatcherEngine(QObject *parent)
+ : QObject(parent)
{
- if (move)
- moveToThread(this);
}
public:
@@ -88,8 +86,6 @@ public:
QStringList *files,
QStringList *directories) = 0;
- virtual void stop() = 0;
-
Q_SIGNALS:
void fileChanged(const QString &path, bool removed);
void directoryChanged(const QString &path, bool removed);
@@ -99,15 +95,14 @@ class QFileSystemWatcherPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QFileSystemWatcher)
- static QFileSystemWatcherEngine *createNativeEngine();
+ static QFileSystemWatcherEngine *createNativeEngine(QObject *parent);
public:
QFileSystemWatcherPrivate();
void init();
void initPollerEngine();
- void initForcedEngine(const QString &);
- QFileSystemWatcherEngine *native, *poller, *forced;
+ QFileSystemWatcherEngine *native, *poller;
QStringList files, directories;
// private slots
diff --git a/src/corelib/io/qfilesystemwatcher_polling.cpp b/src/corelib/io/qfilesystemwatcher_polling.cpp
new file mode 100644
index 0000000000..23dca140d6
--- /dev/null
+++ b/src/corelib/io/qfilesystemwatcher_polling.cpp
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfilesystemwatcher_polling_p.h"
+#include <QtCore/qtimer.h>
+
+QT_BEGIN_NAMESPACE
+
+QPollingFileSystemWatcherEngine::QPollingFileSystemWatcherEngine(QObject *parent)
+ : QFileSystemWatcherEngine(parent),
+ timer(this)
+{
+ connect(&timer, SIGNAL(timeout()), SLOT(timeout()));
+}
+
+QStringList QPollingFileSystemWatcherEngine::addPaths(const QStringList &paths,
+ QStringList *files,
+ QStringList *directories)
+{
+ QStringList p = paths;
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ QFileInfo fi(path);
+ if (!fi.exists())
+ continue;
+ if (fi.isDir()) {
+ if (!directories->contains(path))
+ directories->append(path);
+ if (!path.endsWith(QLatin1Char('/')))
+ fi = QFileInfo(path + QLatin1Char('/'));
+ this->directories.insert(path, fi);
+ } else {
+ if (!files->contains(path))
+ files->append(path);
+ this->files.insert(path, fi);
+ }
+ it.remove();
+ }
+
+ if ((!this->files.isEmpty() ||
+ !this->directories.isEmpty()) &&
+ !timer.isActive()) {
+ timer.start(PollingInterval);
+ }
+
+ return p;
+}
+
+QStringList QPollingFileSystemWatcherEngine::removePaths(const QStringList &paths,
+ QStringList *files,
+ QStringList *directories)
+{
+ QStringList p = paths;
+ QMutableListIterator<QString> it(p);
+ while (it.hasNext()) {
+ QString path = it.next();
+ if (this->directories.remove(path)) {
+ directories->removeAll(path);
+ it.remove();
+ } else if (this->files.remove(path)) {
+ files->removeAll(path);
+ it.remove();
+ }
+ }
+
+ if (this->files.isEmpty() &&
+ this->directories.isEmpty()) {
+ timer.stop();
+ }
+
+ return p;
+}
+
+void QPollingFileSystemWatcherEngine::timeout()
+{
+ QMutableHashIterator<QString, FileInfo> fit(files);
+ while (fit.hasNext()) {
+ QHash<QString, FileInfo>::iterator x = fit.next();
+ QString path = x.key();
+ QFileInfo fi(path);
+ if (!fi.exists()) {
+ fit.remove();
+ emit fileChanged(path, true);
+ } else if (x.value() != fi) {
+ x.value() = fi;
+ emit fileChanged(path, false);
+ }
+ }
+ QMutableHashIterator<QString, FileInfo> dit(directories);
+ while (dit.hasNext()) {
+ QHash<QString, FileInfo>::iterator x = dit.next();
+ QString path = x.key();
+ QFileInfo fi(path);
+ if (!path.endsWith(QLatin1Char('/')))
+ fi = QFileInfo(path + QLatin1Char('/'));
+ if (!fi.exists()) {
+ dit.remove();
+ emit directoryChanged(path, true);
+ } else if (x.value() != fi) {
+ fi.refresh();
+ if (!fi.exists()) {
+ dit.remove();
+ emit directoryChanged(path, true);
+ } else {
+ x.value() = fi;
+ emit directoryChanged(path, false);
+ }
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_dnotify_p.h b/src/corelib/io/qfilesystemwatcher_polling_p.h
index f759e87d89..3b3272a890 100644
--- a/src/corelib/io/qfilesystemwatcher_dnotify_p.h
+++ b/src/corelib/io/qfilesystemwatcher_polling_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFILESYSTEMWATCHER_DNOTIFY_P_H
-#define QFILESYSTEMWATCHER_DNOTIFY_P_H
+#ifndef QFILESYSTEMWATCHER_POLLING_P_H
+#define QFILESYSTEMWATCHER_POLLING_P_H
//
// W A R N I N G
@@ -53,79 +53,74 @@
// We mean it.
//
-#include "qfilesystemwatcher_p.h"
-
-#ifndef QT_NO_FILESYSTEMWATCHER
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qtimer.h>
-#include <qmutex.h>
-#include <qhash.h>
-#include <qdatetime.h>
-#include <qfile.h>
+#include "qfilesystemwatcher_p.h"
QT_BEGIN_NAMESPACE
-class QDnotifyFileSystemWatcherEngine : public QFileSystemWatcherEngine
+enum { PollingInterval = 1000 };
+
+class QPollingFileSystemWatcherEngine : public QFileSystemWatcherEngine
{
Q_OBJECT
-public:
- virtual ~QDnotifyFileSystemWatcherEngine();
+ class FileInfo
+ {
+ uint ownerId;
+ uint groupId;
+ QFile::Permissions permissions;
+ QDateTime lastModified;
+ QStringList entries;
+
+ public:
+ FileInfo(const QFileInfo &fileInfo)
+ : ownerId(fileInfo.ownerId()),
+ groupId(fileInfo.groupId()),
+ permissions(fileInfo.permissions()),
+ lastModified(fileInfo.lastModified())
+ {
+ if (fileInfo.isDir()) {
+ entries = fileInfo.absoluteDir().entryList(QDir::AllEntries);
+ }
+ }
+ FileInfo &operator=(const QFileInfo &fileInfo)
+ {
+ *this = FileInfo(fileInfo);
+ return *this;
+ }
+
+ bool operator!=(const QFileInfo &fileInfo) const
+ {
+ if (fileInfo.isDir() && entries != fileInfo.absoluteDir().entryList(QDir::AllEntries))
+ return true;
+ return (ownerId != fileInfo.ownerId()
+ || groupId != fileInfo.groupId()
+ || permissions != fileInfo.permissions()
+ || lastModified != fileInfo.lastModified());
+ }
+ };
- static QDnotifyFileSystemWatcherEngine *create();
+ QHash<QString, FileInfo> files, directories;
- void run();
+public:
+ QPollingFileSystemWatcherEngine(QObject *parent);
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
- void stop();
-
private Q_SLOTS:
- void refresh(int);
+ void timeout();
private:
- struct Directory {
- Directory() : fd(0), parentFd(0), isMonitored(false) {}
- Directory(const Directory &o) : path(o.path),
- fd(o.fd),
- parentFd(o.parentFd),
- isMonitored(o.isMonitored),
- files(o.files) {}
- QString path;
- int fd;
- int parentFd;
- bool isMonitored;
-
- struct File {
- File() : ownerId(0u), groupId(0u), permissions(0u) { }
- File(const File &o) : path(o.path),
- ownerId(o.ownerId),
- groupId(o.groupId),
- permissions(o.permissions),
- lastWrite(o.lastWrite) {}
- QString path;
-
- bool updateInfo();
-
- uint ownerId;
- uint groupId;
- QFile::Permissions permissions;
- QDateTime lastWrite;
- };
-
- QList<File> files;
- };
-
- QDnotifyFileSystemWatcherEngine();
-
- QMutex mutex;
- QHash<QString, int> pathToFD;
- QHash<int, Directory> fdToDirectory;
- QHash<int, int> parentToFD;
+ QTimer timer;
};
+QT_END_NAMESPACE
+#endif // QFILESYSTEMWATCHER_POLLING_P_H
-QT_END_NAMESPACE
-#endif // QT_NO_FILESYSTEMWATCHER
-#endif // QFILESYSTEMWATCHER_DNOTIFY_P_H
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp
deleted file mode 100644
index 6e5e91114c..0000000000
--- a/src/corelib/io/qfilesystemwatcher_symbian.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qfilesystemwatcher.h"
-#include "qfilesystemwatcher_symbian_p.h"
-#include "qfileinfo.h"
-#include "qdebug.h"
-#include "private/qcore_symbian_p.h"
-#include <QDir>
-
-#ifndef QT_NO_FILESYSTEMWATCHER
-
-
-QT_BEGIN_NAMESPACE
-
-QNotifyChangeEvent::QNotifyChangeEvent(RFs &fs, const TDesC &file,
- QSymbianFileSystemWatcherEngine *e, bool aIsDir,
- TInt aPriority) :
- CActive(aPriority),
- isDir(aIsDir),
- fsSession(fs),
- watchedPath(file),
- engine(e),
- failureCount(0)
-{
- if (isDir) {
- fsSession.NotifyChange(ENotifyEntry, iStatus, file);
- } else {
- fsSession.NotifyChange(ENotifyAll, iStatus, file);
- }
- CActiveScheduler::Add(this);
- SetActive();
-}
-
-QNotifyChangeEvent::~QNotifyChangeEvent()
-{
- Cancel();
-}
-
-void QNotifyChangeEvent::RunL()
-{
- if(iStatus.Int() == KErrNone) {
- failureCount = 0;
- } else {
- qWarning("QNotifyChangeEvent::RunL() - Failed to order change notifications: %d", iStatus.Int());
- failureCount++;
- }
-
- // Re-request failed notification once, but if it won't start working,
- // we can't do much besides just not request any more notifications.
- if (failureCount < 2) {
- if (isDir) {
- fsSession.NotifyChange(ENotifyEntry, iStatus, watchedPath);
- } else {
- fsSession.NotifyChange(ENotifyAll, iStatus, watchedPath);
- }
- SetActive();
-
- if (!failureCount) {
- int err;
- QT_TRYCATCH_ERROR(err, engine->emitPathChanged(this));
- if (err != KErrNone)
- qWarning("QNotifyChangeEvent::RunL() - emitPathChanged threw exception (Converted error code: %d)", err);
- }
- }
-}
-
-void QNotifyChangeEvent::DoCancel()
-{
- fsSession.NotifyChangeCancel(iStatus);
-}
-
-QSymbianFileSystemWatcherEngine::QSymbianFileSystemWatcherEngine() :
- watcherStarted(false)
-{
- moveToThread(this);
-}
-
-QSymbianFileSystemWatcherEngine::~QSymbianFileSystemWatcherEngine()
-{
- stop();
-}
-
-QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, QStringList *files,
- QStringList *directories)
-{
- QMutexLocker locker(&mutex);
- QStringList p = paths;
-
- startWatcher();
-
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
- QFileInfo fi(path);
- if (!fi.exists())
- continue;
-
- bool isDir = fi.isDir();
- if (isDir) {
- if (directories->contains(path))
- continue;
- } else {
- if (files->contains(path))
- continue;
- }
-
- // Use absolute filepath as relative paths seem to have some issues.
- QString filePath = fi.absoluteFilePath();
- if (isDir && filePath.at(filePath.size() - 1) != QChar(L'/')) {
- filePath += QChar(L'/');
- }
-
- currentAddEvent = NULL;
- QMetaObject::invokeMethod(this,
- "addNativeListener",
- Qt::QueuedConnection,
- Q_ARG(QString, filePath));
-
- syncCondition.wait(&mutex);
- if (currentAddEvent) {
- currentAddEvent->isDir = isDir;
-
- activeObjectToPath.insert(currentAddEvent, path);
- it.remove();
-
- if (isDir)
- directories->append(path);
- else
- files->append(path);
- }
- }
-
- return p;
-}
-
-QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &paths,
- QStringList *files,
- QStringList *directories)
-{
- QMutexLocker locker(&mutex);
-
- QStringList p = paths;
- QMutableListIterator<QString> it(p);
- while (it.hasNext()) {
- QString path = it.next();
-
- currentRemoveEvent = activeObjectToPath.key(path);
- if (!currentRemoveEvent)
- continue;
- activeObjectToPath.remove(currentRemoveEvent);
-
- QMetaObject::invokeMethod(this,
- "removeNativeListener",
- Qt::QueuedConnection);
-
- syncCondition.wait(&mutex);
-
- it.remove();
-
- files->removeAll(path);
- directories->removeAll(path);
- }
-
- return p;
-}
-
-void QSymbianFileSystemWatcherEngine::emitPathChanged(QNotifyChangeEvent *e)
-{
- QMutexLocker locker(&mutex);
-
- QString path = activeObjectToPath.value(e);
- QFileInfo fi(path);
-
- if (e->isDir)
- emit directoryChanged(path, !fi.exists());
- else
- emit fileChanged(path, !fi.exists());
-}
-
-void QSymbianFileSystemWatcherEngine::stop()
-{
- quit();
- wait();
-}
-
-// This method must be called inside mutex
-void QSymbianFileSystemWatcherEngine::startWatcher()
-{
- if (!watcherStarted) {
- setStackSize(0x5000);
- start();
- syncCondition.wait(&mutex);
- watcherStarted = true;
- }
-}
-
-
-void QSymbianFileSystemWatcherEngine::run()
-{
- mutex.lock();
- syncCondition.wakeOne();
- mutex.unlock();
-
- exec();
-
- foreach(QNotifyChangeEvent *e, activeObjectToPath.keys()) {
- e->Cancel();
- delete e;
- }
-
- activeObjectToPath.clear();
-}
-
-void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directoryPath)
-{
- QMutexLocker locker(&mutex);
- QString nativeDir(QDir::toNativeSeparators(directoryPath));
- TPtrC ptr(qt_QString2TPtrC(nativeDir));
- currentAddEvent = new QNotifyChangeEvent(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive));
- syncCondition.wakeOne();
-}
-
-void QSymbianFileSystemWatcherEngine::removeNativeListener()
-{
- QMutexLocker locker(&mutex);
- currentRemoveEvent->Cancel();
- delete currentRemoveEvent;
- currentRemoveEvent = NULL;
- syncCondition.wakeOne();
-}
-
-
-QT_END_NAMESPACE
-#endif // QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 4e94623844..e82a9a5b56 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,25 +50,12 @@
#include <qset.h>
#include <qdatetime.h>
#include <qdir.h>
+#include <qtextstream.h>
QT_BEGIN_NAMESPACE
-void QWindowsFileSystemWatcherEngine::stop()
-{
- foreach(QWindowsFileSystemWatcherEngineThread *thread, threads)
- thread->stop();
-}
-
-QWindowsFileSystemWatcherEngine::QWindowsFileSystemWatcherEngine()
- : QFileSystemWatcherEngine(false)
-{
-}
-
QWindowsFileSystemWatcherEngine::~QWindowsFileSystemWatcherEngine()
{
- if (threads.isEmpty())
- return;
-
foreach(QWindowsFileSystemWatcherEngineThread *thread, threads) {
thread->stop();
thread->wait();
@@ -310,7 +297,6 @@ QWindowsFileSystemWatcherEngineThread::QWindowsFileSystemWatcherEngineThread()
handles.reserve(MAXIMUM_WAIT_OBJECTS);
handles.append(h);
}
- moveToThread(this);
}
@@ -326,6 +312,17 @@ QWindowsFileSystemWatcherEngineThread::~QWindowsFileSystemWatcherEngineThread()
}
}
+static inline QString msgFindNextFailed(const QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> &pathInfos)
+{
+ QString result;
+ QTextStream str(&result);
+ str << "QFileSystemWatcher: FindNextChangeNotification failed for";
+ foreach (const QWindowsFileSystemWatcherEngine::PathInfo &pathInfo, pathInfos)
+ str << " \"" << QDir::toNativeSeparators(pathInfo.absolutePath) << '"';
+ str << ' ';
+ return result;
+}
+
void QWindowsFileSystemWatcherEngineThread::run()
{
QMutexLocker locker(&mutex);
@@ -356,11 +353,11 @@ void QWindowsFileSystemWatcherEngineThread::run()
// for some reason, so we must check if the handle exist in the handles vector
if (handles.contains(handle)) {
// qDebug()<<"thread"<<this<<"Acknowledged handle:"<<at<<handle;
+ QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> &h = pathInfoForHandle[handle];
if (!FindNextChangeNotification(handle)) {
- qErrnoWarning("QFileSystemWatcher: FindNextChangeNotification failed!!");
+ const DWORD error = GetLastError();
+ qErrnoWarning(error, "%s", qPrintable(msgFindNextFailed(h)));
}
-
- QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> &h = pathInfoForHandle[handle];
QMutableHashIterator<QString, QWindowsFileSystemWatcherEngine::PathInfo> it(h);
while (it.hasNext()) {
QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo>::iterator x = it.next();
diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h
index 3e9938a490..8e6b779b93 100644
--- a/src/corelib/io/qfilesystemwatcher_win_p.h
+++ b/src/corelib/io/qfilesystemwatcher_win_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,6 +60,7 @@
#include <qt_windows.h>
#include <QtCore/qdatetime.h>
+#include <QtCore/qthread.h>
#include <QtCore/qfile.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qhash.h>
@@ -78,15 +79,14 @@ class QWindowsFileSystemWatcherEngine : public QFileSystemWatcherEngine
{
Q_OBJECT
public:
- QWindowsFileSystemWatcherEngine();
+ inline QWindowsFileSystemWatcherEngine(QObject *parent)
+ : QFileSystemWatcherEngine(parent)
+ { }
~QWindowsFileSystemWatcherEngine();
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
- void stop();
-
-
class Handle
{
public:
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index 0d23a27909..a49ea84603 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfsfileengine.h b/src/corelib/io/qfsfileengine.h
index 2e0b1eb923..0ed883a4a7 100644
--- a/src/corelib/io/qfsfileengine.h
+++ b/src/corelib/io/qfsfileengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfsfileengine_iterator.cpp b/src/corelib/io/qfsfileengine_iterator.cpp
index 323ab58335..2d162f6a7d 100644
--- a/src/corelib/io/qfsfileengine_iterator.cpp
+++ b/src/corelib/io/qfsfileengine_iterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfsfileengine_iterator_p.h b/src/corelib/io/qfsfileengine_iterator_p.h
index deccb01bfb..782930a52c 100644
--- a/src/corelib/io/qfsfileengine_iterator_p.h
+++ b/src/corelib/io/qfsfileengine_iterator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 89c08aeca7..158c6f3a23 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 681e55dff7..b09518865e 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index f2b3e5f534..5dc96ea8a2 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -550,7 +550,7 @@ QString QFSFileEngine::currentPath(const QString &fileName)
return ret;
#else
Q_UNUSED(fileName);
- return QFileSystemEngine::currentPath();
+ return QFileSystemEngine::currentPath().filePath();
#endif
}
@@ -661,6 +661,7 @@ bool QFSFileEngine::link(const QString &newName)
#endif // QT_NO_LIBRARY
#else
QString linkName = newName;
+ linkName.replace(QLatin1Char('/'), QLatin1Char('\\'));
if (!linkName.endsWith(QLatin1String(".lnk")))
linkName += QLatin1String(".lnk");
QString orgName = fileName(AbsoluteName).replace(QLatin1Char('/'), QLatin1Char('\\'));
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 8e1b2d5d0c..ef530f379f 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qiodevice.h b/src/corelib/io/qiodevice.h
index 7d4afca850..4b34ad4f69 100644
--- a/src/corelib/io/qiodevice.h
+++ b/src/corelib/io/qiodevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 3ccad6254a..2515fe5705 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
index 113ba4b4bb..ba711493c6 100644
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h
index c7c94243b9..ded605681e 100644
--- a/src/corelib/io/qnoncontiguousbytedevice_p.h
+++ b/src/corelib/io/qnoncontiguousbytedevice_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index d2aee16c45..8f76e0e4b9 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -471,7 +471,7 @@ void QProcessPrivate::Channel::clear()
read the standard output by calling read(), readLine(), and
getChar(). Because it inherits QIODevice, QProcess can also be
used as an input source for QXmlReader, or for generating data to
- be uploaded using QFtp.
+ be uploaded using QNetworkAccessManager.
\note On Windows CE and Symbian, reading and writing to a process
is not supported.
@@ -617,6 +617,14 @@ void QProcessPrivate::Channel::clear()
writes to its standard output and standard error will be written
to the standard output and standard error of the main process.
+ \note Windows intentionally suppresses output from GUI-only
+ applications to inherited consoles.
+ This does \e not apply to output redirected to files or pipes.
+ To forward the output of GUI-only applications on the console
+ nonetheless, you must use SeparateChannels and do the forwarding
+ yourself by reading the output and writing it to the appropriate
+ output channels.
+
\sa setProcessChannelMode()
*/
@@ -2271,7 +2279,7 @@ QT_END_INCLUDE_NAMESPACE
However, note that repeated calls to this function will recreate the
list of environment variables, which is a non-trivial operation.
- \note For new code, it is recommended to use QProcessEvironment::systemEnvironment()
+ \note For new code, it is recommended to use QProcessEnvironment::systemEnvironment()
\sa QProcessEnvironment::systemEnvironment(), environment(), setEnvironment()
*/
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index b2a5a4cbff..96a1edefd8 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index 5bebff089e..7e0fecc320 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
deleted file mode 100644
index 9fd0c3aa65..0000000000
--- a/src/corelib/io/qprocess_symbian.cpp
+++ /dev/null
@@ -1,1072 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//#define QPROCESS_DEBUG
-
-#ifdef QPROCESS_DEBUG
-#include "qdebug.h"
-#define QPROCESS_DEBUG_PRINT(args...) qDebug(args);
-#else
-#define QPROCESS_DEBUG_PRINT(args...)
-#endif
-
-#ifndef QT_NO_PROCESS
-
-#define QPROCESS_ASSERT(check, panicReason, args...) \
- if (!(check)) { \
- qWarning(args); \
- User::Panic(KQProcessPanic, panicReason); \
- }
-
-#include <exception>
-#include <e32base.h>
-#include <e32std.h>
-#include <stdio.h>
-#include "qplatformdefs.h"
-
-#include "qdir.h"
-#include "qstring.h"
-#include "qprocess.h"
-#include "qprocess_p.h"
-#include "private/qeventdispatcher_symbian_p.h"
-
-#include <private/qthread_p.h>
-#include <qmutex.h>
-#include <qmap.h>
-#include <qsocketnotifier.h>
-
-#include <errno.h>
-
-
-QT_BEGIN_NAMESPACE
-
-_LIT(KQProcessManagerThreadName, "QProcManThread");
-_LIT(KQProcessPanic, "QPROCESS");
-enum TQProcessPanic {
- EProcessManagerMediatorRunError = 1,
- EProcessManagerMediatorInactive = 2,
- EProcessManagerMediatorNotPending = 3,
- EProcessManagerMediatorInvalidCmd = 4,
- EProcessManagerMediatorCreationFailed = 5,
- EProcessManagerMediatorThreadOpenFailed = 6,
- EProcessManagerMediatorNullObserver = 7,
- EProcessActiveRunError = 10,
- EProcessActiveNullParameter = 11,
- EProcessManagerMutexCreationFail = 20,
- EProcessManagerThreadCreationFail = 21,
- EProcessManagerSchedulerCreationFail = 22,
- EProcessManagerNullParam = 23
-};
-
-// Forward declarations
-class QProcessManager;
-
-
-// Active object to listen for child process death
-class QProcessActive : public CActive
-{
-public:
- static QProcessActive *construct(QProcess *process,
- RProcess **proc,
- int serial,
- int deathPipe);
-
- virtual ~QProcessActive();
-
- void start();
- void stop();
-
- bool error();
-
-protected:
-
- // Inherited from CActive
- void RunL();
- TInt RunError(TInt aError);
- void DoCancel();
-
- QProcessActive();
-
-private:
-
- QProcess *process;
- RProcess **pproc;
- int serial;
- int deathPipe;
- bool errorValue;
-};
-
-// Active object to communicate synchronously with process manager thread
-class QProcessManagerMediator : public CActive
-{
-public:
- static QProcessManagerMediator *construct();
-
- virtual ~QProcessManagerMediator();
-
- bool add(QProcessActive *processObserver);
- void remove(QProcessActive *processObserver);
- void terminate();
-
-protected:
-
- enum Commands {
- ENoCommand,
- EAdd,
- ERemove,
- ETerminate
- };
-
- // Inherited from CActive
- void RunL();
- TInt RunError(TInt aError);
- void DoCancel();
-
- QProcessManagerMediator();
-
- bool notify(QProcessActive *processObserver, Commands command);
-
-private:
- QProcessActive *currentObserver;
- Commands currentCommand;
-
- RThread processManagerThread;
-};
-
-// Process manager manages child process death listeners.
-//
-// Note: Because QProcess can be used outside event loop, we cannot be guaranteed
-// an active scheduler exists for us to add our process death listener objects.
-// We can't just install active scheduler on the calling thread, as that would block it
-// if we want to actually use it, so a separate manager thread is required.
-class QProcessManager
-{
-public:
- QProcessManager();
- ~QProcessManager();
-
- void startThread();
-
- TInt run(void *param);
- bool add(QProcess *process);
- void remove(QProcess *process);
-
- inline void setMediator(QProcessManagerMediator *newMediator) {
- mediator = newMediator;
- };
-
-private:
- inline void lock() {
- managerMutex.Wait();
- };
- inline void unlock() {
- managerMutex.Signal();
- };
-
- QMap<int, QProcessActive *> children;
- QProcessManagerMediator *mediator;
- RMutex managerMutex;
- bool threadStarted;
- RThread managerThread;
-};
-
-static bool qt_rprocess_running(RProcess *proc)
-{
- if (proc && proc->Handle()) {
- TExitType et = proc->ExitType();
- if (et == EExitPending)
- return true;
- }
-
- return false;
-}
-
-static void qt_create_symbian_commandline(
- const QStringList &arguments, const QString &nativeArguments, QString &commandLine)
-{
- for (int i = 0; i < arguments.size(); ++i) {
- QString tmp = arguments.at(i);
- // in the case of \" already being in the string the \ must also be escaped
- tmp.replace(QLatin1String("\\\""), QLatin1String("\\\\\""));
- // escape a single " because the arguments will be parsed
- tmp.replace(QLatin1String("\""), QLatin1String("\\\""));
- if (tmp.isEmpty() || tmp.contains(QLatin1Char(' ')) || tmp.contains(QLatin1Char('\t'))) {
- // The argument must not end with a \ since this would be interpreted
- // as escaping the quote -- rather put the \ behind the quote: e.g.
- // rather use "foo"\ than "foo\"
- QString endQuote(QLatin1String("\""));
- int i = tmp.length();
- while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\')) {
- --i;
- endQuote += QLatin1String("\\");
- }
- commandLine += QLatin1String("\"") + tmp.left(i) + endQuote + QLatin1Char(' ');
- } else {
- commandLine += tmp + QLatin1Char(' ');
- }
- }
-
- if (!nativeArguments.isEmpty())
- commandLine += nativeArguments;
- else if (!commandLine.isEmpty()) // Chop the extra trailing space if any arguments were appended
- commandLine.chop(1);
-}
-
-static TInt qt_create_symbian_process(RProcess **proc,
- const QString &programName, const QStringList &arguments, const QString &nativeArguments)
-{
- RProcess *newProc = NULL;
- newProc = new RProcess();
-
- if (!newProc)
- return KErrNoMemory;
-
- QString commandLine;
- qt_create_symbian_commandline(arguments, nativeArguments, commandLine);
-
- TPtrC program_ptr(reinterpret_cast<const TText*>(programName.constData()));
- TPtrC cmdline_ptr(reinterpret_cast<const TText*>(commandLine.constData()));
-
- TInt err = newProc->Create(program_ptr, cmdline_ptr);
-
- if (err == KErrNotFound) {
- // Strip path from program name and try again (i.e. try from default location "\sys\bin")
- int index = programName.lastIndexOf(QDir::separator());
- int index2 = programName.lastIndexOf(QChar(QLatin1Char('/')));
- index = qMax(index, index2);
-
- if (index != -1 && programName.length() >= index) {
- QString strippedName;
- strippedName = programName.mid(index + 1);
- QPROCESS_DEBUG_PRINT("qt_create_symbian_process() Executable '%s' not found, trying stripped version '%s'",
- qPrintable(programName), qPrintable(strippedName));
-
- TPtrC stripped_ptr(reinterpret_cast<const TText*>(strippedName.constData()));
- err = newProc->Create(stripped_ptr, cmdline_ptr);
-
- if (err != KErrNone) {
- QPROCESS_DEBUG_PRINT("qt_create_symbian_process() Unable to create process '%s': %d",
- qPrintable(strippedName), err);
- }
- }
- }
-
- if (err == KErrNone)
- *proc = newProc;
- else
- delete newProc;
-
- return err;
-}
-
-static qint64 qt_native_read(int fd, char *data, qint64 maxlen)
-{
- qint64 ret = 0;
- do {
- ret = ::read(fd, data, maxlen);
- } while (ret == -1 && errno == EINTR);
-
- QPROCESS_DEBUG_PRINT("qt_native_read(): fd: %d, result: %d, errno = %d", fd, (int)ret, errno);
-
- return ret;
-}
-
-static qint64 qt_native_write(int fd, const char *data, qint64 len)
-{
- qint64 ret = 0;
- do {
- ret = ::write(fd, data, len);
- } while (ret == -1 && errno == EINTR);
-
- QPROCESS_DEBUG_PRINT("qt_native_write(): fd: %d, result: %d, errno = %d", fd, (int)ret, errno);
-
- return ret;
-}
-
-static void qt_native_close(int fd)
-{
- int ret;
- do {
- ret = ::close(fd);
- } while (ret == -1 && errno == EINTR);
-}
-
-static void qt_create_pipe(int *pipe)
-{
- if (pipe[0] != -1)
- qt_native_close(pipe[0]);
- if (pipe[1] != -1)
- qt_native_close(pipe[1]);
- if (::pipe(pipe) != 0) {
- qWarning("QProcessPrivate::createPipe: Cannot create pipe %p: %s",
- pipe, qPrintable(qt_error_string(errno)));
- } else {
- QPROCESS_DEBUG_PRINT("qt_create_pipe(): Created pipe %d - %d", pipe[0], pipe[1]);
- }
-}
-
-// Called from ProcessManagerThread
-QProcessActive *QProcessActive::construct(QProcess *process,
- RProcess **proc,
- int serial,
- int deathPipe)
-{
- QPROCESS_ASSERT((process || proc || *proc),
- EProcessActiveNullParameter,
- "QProcessActive::construct(): process (0x%x), proc (0x%x) or *proc == NULL, not creating an instance", process, proc)
-
- QProcessActive *newInstance = new QProcessActive();
-
- if (!newInstance) {
- QPROCESS_DEBUG_PRINT("QProcessActive::construct(): Failed to create new instance");
- } else {
- newInstance->process = process;
- newInstance->pproc = proc;
- newInstance->serial = serial;
- newInstance->deathPipe = deathPipe;
- newInstance->errorValue = false;
- }
-
- return newInstance;
-}
-
-// Called from ProcessManagerThread
-QProcessActive::QProcessActive()
- : CActive(CActive::EPriorityStandard)
-{
- // Nothing to do
-}
-
-// Called from main thread
-QProcessActive::~QProcessActive()
-{
- process = NULL;
- pproc = NULL;
-}
-
-// Called from ProcessManagerThread
-void QProcessActive::start()
-{
- if (qt_rprocess_running(*pproc)) {
- CActiveScheduler::Add(this);
- (*pproc)->Logon(iStatus);
- SetActive();
- QPROCESS_DEBUG_PRINT("QProcessActive::start(): Started monitoring for process exit.");
- } else {
- QPROCESS_DEBUG_PRINT("QProcessActive::start(): Process doesn't exist or is already dead");
- // Assume process has already died
- qt_native_write(deathPipe, "", 1);
- errorValue = true;
- }
-}
-
-// Called from ProcessManagerThread
-void QProcessActive::stop()
-{
- QPROCESS_DEBUG_PRINT("QProcessActive::stop()");
-
- // Remove this from scheduler (also cancels the request)
- Deque();
-}
-
-bool QProcessActive::error()
-{
- return errorValue;
-}
-
-// Called from ProcessManagerThread
-void QProcessActive::RunL()
-{
- // If this method gets executed, the monitored process has died
-
- // Notify main thread
- qt_native_write(deathPipe, "", 1);
- QPROCESS_DEBUG_PRINT("QProcessActive::RunL() sending death notice to %d", deathPipe);
-}
-
-// Called from ProcessManagerThread
-TInt QProcessActive::RunError(TInt aError)
-{
- Q_UNUSED(aError);
- // Handle RunL leave (should never happen)
- QPROCESS_ASSERT(0, EProcessActiveRunError, "QProcessActive::RunError(): Should never get here!")
- return 0;
-}
-
-// Called from ProcessManagerThread
-void QProcessActive::DoCancel()
-{
- QPROCESS_DEBUG_PRINT("QProcessActive::DoCancel()");
-
- if (qt_rprocess_running(*pproc)) {
- (*pproc)->LogonCancel(iStatus);
- QPROCESS_DEBUG_PRINT("QProcessActive::DoCancel(): Stopped monitoring for process exit.");
- } else {
- QPROCESS_DEBUG_PRINT("QProcessActive::DoCancel(): Process doesn't exist");
- }
-}
-
-
-// Called from ProcessManagerThread
-QProcessManagerMediator *QProcessManagerMediator::construct()
-{
- QProcessManagerMediator *newInstance = new QProcessManagerMediator;
- TInt err(KErrNone);
-
- newInstance->currentCommand = ENoCommand;
- newInstance->currentObserver = NULL;
-
- if (newInstance) {
- err = newInstance->processManagerThread.Open(newInstance->processManagerThread.Id());
- QPROCESS_ASSERT((err == KErrNone),
- EProcessManagerMediatorThreadOpenFailed,
- "QProcessManagerMediator::construct(): Failed to open processManagerThread (err:%d)", err)
- } else {
- QPROCESS_ASSERT(0,
- EProcessManagerMediatorCreationFailed,
- "QProcessManagerMediator::construct(): Failed to open construct mediator")
- }
-
- // Activate mediator
- CActiveScheduler::Add(newInstance);
- newInstance->iStatus = KRequestPending;
- newInstance->SetActive();
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::construct(): new instance successfully created and activated");
-
- return newInstance;
-}
-
-// Called from ProcessManagerThread
-QProcessManagerMediator::QProcessManagerMediator()
- : CActive(CActive::EPriorityStandard)
-{
- // Nothing to do
-}
-
-// Called from main thread
-QProcessManagerMediator::~QProcessManagerMediator()
-{
- processManagerThread.Close();
- currentCommand = ENoCommand;
- currentObserver = NULL;
-}
-
-// Called from main thread
-bool QProcessManagerMediator::add(QProcessActive *processObserver)
-{
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::add()");
- return notify(processObserver, EAdd);
-}
-
-// Called from main thread
-void QProcessManagerMediator::remove(QProcessActive *processObserver)
-{
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::remove()");
- notify(processObserver, ERemove);
-}
-
-// Called from main thread
-void QProcessManagerMediator::terminate()
-{
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::terminate()");
- notify(NULL, ETerminate);
-}
-
-// Called from main thread
-bool QProcessManagerMediator::notify(QProcessActive *processObserver, Commands command)
-{
- bool success(true);
-
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): Command: %d, processObserver: 0x%x", command, processObserver);
-
- QPROCESS_ASSERT((command == ETerminate || processObserver),
- EProcessManagerMediatorNullObserver,
- "QProcessManagerMediator::Notify(): NULL processObserver not allowed for command: %d", command)
-
- QPROCESS_ASSERT(IsActive(),
- EProcessManagerMediatorInactive,
- "QProcessManagerMediator::Notify(): Mediator is not active!")
-
- QPROCESS_ASSERT(iStatus == KRequestPending,
- EProcessManagerMediatorNotPending,
- "QProcessManagerMediator::Notify(): Mediator request not pending!")
-
- currentObserver = processObserver;
- currentCommand = command;
-
- // Sync with process manager thread
- TRequestStatus pmStatus;
- processManagerThread.Rendezvous(pmStatus);
-
- // Complete request -> RunL will run in the process manager thread
- TRequestStatus *status = &iStatus;
- processManagerThread.RequestComplete(status, command);
-
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): Waiting process manager to complete...");
- User::WaitForRequest(pmStatus);
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): Wait over");
-
- if (currentObserver) {
- success = !(currentObserver->error());
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): success = %d", success);
- }
-
- currentObserver = NULL;
- currentCommand = ENoCommand;
-
- return success;
-}
-
-// Called from ProcessManagerThread
-void QProcessManagerMediator::RunL()
-{
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::RunL(): currentCommand: %d, iStatus: %d", currentCommand, iStatus.Int());
- switch (currentCommand) {
- case EAdd:
- currentObserver->start();
- break;
- case ERemove:
- currentObserver->stop();
- break;
- case ETerminate:
- Deque();
- CActiveScheduler::Stop();
- return;
- default:
- QPROCESS_ASSERT(0,
- EProcessManagerMediatorInvalidCmd,
- "QProcessManagerMediator::RunL(): Invalid command!")
- break;
- }
-
- iStatus = KRequestPending;
- SetActive();
-
- // Notify main thread that we are done
- RThread::Rendezvous(KErrNone);
-}
-
-// Called from ProcessManagerThread
-TInt QProcessManagerMediator::RunError(TInt aError)
-{
- Q_UNUSED(aError);
- // Handle RunL leave (should never happen)
- QPROCESS_ASSERT(0,
- EProcessManagerMediatorRunError,
- "QProcessManagerMediator::RunError(): Should never get here!")
- return 0;
-}
-
-// Called from ProcessManagerThread
-void QProcessManagerMediator::DoCancel()
-{
- QPROCESS_DEBUG_PRINT("QProcessManagerMediator::DoCancel()");
- TRequestStatus *status = &iStatus;
- processManagerThread.RequestComplete(status, KErrCancel);
-}
-
-Q_GLOBAL_STATIC(QProcessManager, processManager)
-
-TInt processManagerThreadFunction(TAny *param)
-{
- QPROCESS_ASSERT(param,
- EProcessManagerNullParam,
- "processManagerThreadFunction(): NULL param")
-
- QProcessManager *manager = reinterpret_cast<QProcessManager*>(param);
-
- CActiveScheduler *scheduler = new CQtActiveScheduler();
-
- QPROCESS_ASSERT(scheduler,
- EProcessManagerSchedulerCreationFail,
- "processManagerThreadFunction(): Scheduler creation failed")
-
- CActiveScheduler::Install(scheduler);
-
- //Creating mediator also adds it to scheduler and activates it. Failure will panic.
- manager->setMediator(QProcessManagerMediator::construct());
- RThread::Rendezvous(KErrNone);
-
- CActiveScheduler::Start();
-
- CActiveScheduler::Install(NULL);
- delete scheduler;
-
- return KErrNone;
-}
-
-QProcessManager::QProcessManager()
- : mediator(NULL), threadStarted(false)
-{
- TInt err = managerMutex.CreateLocal();
-
- QPROCESS_ASSERT(err == KErrNone,
- EProcessManagerMutexCreationFail,
- "QProcessManager::QProcessManager(): Failed to create new managerMutex (err: %d)", err)
-}
-
-QProcessManager::~QProcessManager()
-{
- QPROCESS_DEBUG_PRINT("QProcessManager::~QProcessManager()");
-
- // Check if manager thread is still alive. If this destructor is ran as part of global
- // static cleanup, manager thread will most likely be terminated by kernel at this point,
- // so trying to delete QProcessActives and QProcessMediators will panic as they
- // will still be active. They can also no longer be canceled as the thread is already gone.
- // In case manager thread has already died, we simply do nothing and let the deletion of
- // the main heap at process exit take care of stray objects.
-
- if (managerThread.Handle() && managerThread.ExitType() == EExitPending) {
- // Cancel death listening for all child processes
- if (mediator) {
- QMap<int, QProcessActive *>::Iterator it = children.begin();
- while (it != children.end()) {
- // Remove all monitors
- QProcessActive *active = it.value();
- mediator->remove(active);
-
- QPROCESS_DEBUG_PRINT("QProcessManager::~QProcessManager() removed listening for a process");
- ++it;
- }
-
- // Terminate process manager thread.
- mediator->terminate();
- delete mediator;
- }
-
- qDeleteAll(children.values());
- children.clear();
- }
-
- managerThread.Close();
- managerMutex.Close();
-}
-
-void QProcessManager::startThread()
-{
- lock();
-
- if (!threadStarted) {
- TInt err = managerThread.Create(KQProcessManagerThreadName,
- processManagerThreadFunction,
- 0x5000,
- (RAllocator*)NULL,
- (TAny*)this,
- EOwnerProcess);
-
- QPROCESS_ASSERT(err == KErrNone,
- EProcessManagerThreadCreationFail,
- "QProcessManager::startThread(): Failed to create new managerThread (err:%d)", err)
-
- threadStarted = true;
-
- // Manager thread must start running before we continue, so sync with rendezvous
- TRequestStatus status;
- managerThread.Rendezvous(status);
- managerThread.Resume();
- User::WaitForRequest(status);
- }
-
- unlock();
-}
-
-static QBasicAtomicInt idCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
-
-bool QProcessManager::add(QProcess *process)
-{
- QPROCESS_ASSERT(process,
- EProcessManagerNullParam,
- "QProcessManager::add(): Failed to add QProcessActive to ProcessManager - NULL process")
-
- lock();
-
- int serial = idCounter.fetchAndAddRelaxed(1);
- process->d_func()->serial = serial;
-
- QPROCESS_DEBUG_PRINT("QProcessManager::add(): serial: %d, deathPipe: %d - %d, symbianProcess: 0x%x", serial, process->d_func()->deathPipe[0], process->d_func()->deathPipe[1], process->d_func()->symbianProcess);
-
- QProcessActive *newActive =
- QProcessActive::construct(process,
- &(process->d_func()->symbianProcess),
- serial,
- process->d_func()->deathPipe[1]);
-
- if (newActive) {
- if (mediator->add(newActive)) {
- children.insert(serial, newActive);
- unlock();
- return true;
- } else {
- QPROCESS_DEBUG_PRINT("QProcessManager::add(): Failed to add QProcessActive to ProcessManager");
- delete newActive;
- }
- }
-
- unlock();
-
- return false;
-}
-
-void QProcessManager::remove(QProcess *process)
-{
- QPROCESS_ASSERT(process,
- EProcessManagerNullParam,
- "QProcessManager::remove(): Failed to remove QProcessActive from ProcessManager - NULL process")
-
- lock();
-
- int serial = process->d_func()->serial;
- QProcessActive *active = children.value(serial);
- if (!active) {
- unlock();
- return;
- }
-
- mediator->remove(active);
-
- children.remove(serial);
- delete active;
-
- unlock();
-}
-
-void QProcessPrivate::destroyPipe(int *pipe)
-{
- if (pipe[1] != -1) {
- qt_native_close(pipe[1]);
- pipe[1] = -1;
- }
- if (pipe[0] != -1) {
- qt_native_close(pipe[0]);
- pipe[0] = -1;
- }
-}
-
-bool QProcessPrivate::createChannel(Channel &channel)
-{
- Q_UNUSED(channel);
- // No channels used
- return false;
-}
-
-void QProcessPrivate::startProcess()
-{
- Q_Q(QProcess);
-
- QPROCESS_DEBUG_PRINT("QProcessPrivate::startProcess()");
-
- // Start the process (platform dependent)
- q->setProcessState(QProcess::Starting);
-
- processManager()->startThread();
-
- qt_create_pipe(deathPipe);
- if (threadData->eventDispatcher) {
- deathNotifier = new QSocketNotifier(deathPipe[0],
- QSocketNotifier::Read, q);
- QObject::connect(deathNotifier, SIGNAL(activated(int)),
- q, SLOT(_q_processDied()));
- }
-
- TInt err = qt_create_symbian_process(&symbianProcess, program, arguments, nativeArguments);
-
- if (err == KErrNone) {
- pid = symbianProcess->Id().Id();
-
- ::fcntl(deathPipe[0], F_SETFL, ::fcntl(deathPipe[0], F_GETFL) | O_NONBLOCK);
-
- if (!processManager()->add(q)) {
- qWarning("QProcessPrivate::startProcess(): Failed to start monitoring for process death.");
- err = KErrNoMemory;
- }
- }
-
- if (err != KErrNone) {
- // Cleanup, report error and return
- QPROCESS_DEBUG_PRINT("QProcessPrivate::startProcess() Process open failed, err: %d, '%s'", err, qPrintable(program));
- q->setProcessState(QProcess::NotRunning);
- processError = QProcess::FailedToStart;
- q->setErrorString(QLatin1String(QT_TRANSLATE_NOOP(QProcess, "Resource error (qt_create_symbian_process failure)")));
- emit q->error(processError);
- cleanup();
- return;
- }
-
- processLaunched = true;
-
- symbianProcess->Resume();
-
- QPROCESS_DEBUG_PRINT("QProcessPrivate::startProcess(): this: 0x%x, pid: %ld", this, pid);
-
- // Notify child start
- _q_startupNotification();
-
-}
-
-bool QProcessPrivate::processStarted()
-{
- QPROCESS_DEBUG_PRINT("QProcessPrivate::processStarted() == %s", processLaunched ? "true" : "false");
-
- // Since we cannot get information whether process has actually been launched
- // or not in Symbian, we need to fake it. Assume process is started if launch was
- // successful.
-
- return processLaunched;
-}
-
-qint64 QProcessPrivate::bytesAvailableFromStdout() const
-{
- // In Symbian, stdout is not supported
- return 0;
-}
-
-qint64 QProcessPrivate::bytesAvailableFromStderr() const
-{
- // In Symbian, stderr is not supported
- return 0;
-}
-
-qint64 QProcessPrivate::readFromStdout(char *data, qint64 maxlen)
-{
- Q_UNUSED(data);
- Q_UNUSED(maxlen);
- // In Symbian, stdout is not supported
- return 0;
-}
-
-qint64 QProcessPrivate::readFromStderr(char *data, qint64 maxlen)
-{
- Q_UNUSED(data);
- Q_UNUSED(maxlen);
- // In Symbian, stderr is not supported
- return 0;
-}
-
-qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
-{
- Q_UNUSED(data);
- Q_UNUSED(maxlen);
- // In Symbian, stdin is not supported
- return 0;
-}
-
-void QProcessPrivate::terminateProcess()
-{
- // Needs PowerMgmt capability if process has been started; will panic kern-exec 46 otherwise.
- // Always works if process is not yet started.
- if (qt_rprocess_running(symbianProcess)) {
- symbianProcess->Terminate(0);
- } else {
- QPROCESS_DEBUG_PRINT("QProcessPrivate::terminateProcess(), Process not running");
- }
-}
-
-void QProcessPrivate::killProcess()
-{
- // Needs PowerMgmt capability if process has been started; will panic kern-exec 46 otherwise.
- // Always works if process is not yet started.
- if (qt_rprocess_running(symbianProcess)) {
- symbianProcess->Kill(0);
- } else {
- QPROCESS_DEBUG_PRINT("QProcessPrivate::killProcess(), Process not running");
- }
-}
-
-bool QProcessPrivate::waitForStarted(int msecs)
-{
- Q_UNUSED(msecs);
- // Since we can get no actual feedback from process beyond its death,
- // assume that started has already been emitted if process has been launched
- return processLaunched;
-}
-
-bool QProcessPrivate::waitForReadyRead(int msecs)
-{
- // Functionality not supported in Symbian
- Q_UNUSED(msecs);
- return false;
-}
-
-bool QProcessPrivate::waitForBytesWritten(int msecs)
-{
- // Functionality not supported in Symbian
- Q_UNUSED(msecs);
- return false;
-}
-
-bool QProcessPrivate::waitForFinished(int msecs)
-{
- Q_Q(QProcess);
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(%d)", msecs);
-
- TRequestStatus timerStatus = KErrNone;
- TRequestStatus logonStatus = KErrNone;
- bool timeoutOccurred = false;
-
- // Logon to process to observe its death
- if (qt_rprocess_running(symbianProcess)) {
- symbianProcess->Logon(logonStatus);
-
- if (msecs < 0) {
- // If timeout is negative, there is no timeout
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting (just logon)...");
- User::WaitForRequest(logonStatus);
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed");
- } else {
- // Create timer
- RTimer timer;
- timer.CreateLocal();
- TTimeIntervalMicroSeconds32 interval(msecs*1000);
- timer.After(timerStatus, interval);
-
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Waiting (logon + timer)...");
- User::WaitForRequest(logonStatus, timerStatus);
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed");
-
- if (logonStatus != KRequestPending) {
- timer.Cancel();
- User::WaitForRequest(timerStatus);
- } else {
- timeoutOccurred = true;
- symbianProcess->LogonCancel(logonStatus);
- User::WaitForRequest(logonStatus);
- }
- timer.Close();
- }
- } else {
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(), qt_rprocess_running returned false");
- }
-
- if (timeoutOccurred) {
- processError = QProcess::Timedout;
- q->setErrorString(QLatin1String(QT_TRANSLATE_NOOP(QProcess, "Process operation timed out")));
- return false;
- }
-
- _q_processDied();
-
- return true;
-}
-
-bool QProcessPrivate::waitForWrite(int msecs)
-{
- // Functionality not supported in Symbian
- Q_UNUSED(msecs);
- return false;
-}
-
-// Deceptively named function. Exit code is actually got in waitForDeadChild().
-void QProcessPrivate::findExitCode()
-{
- Q_Q(QProcess);
- processManager()->remove(q);
-}
-
-bool QProcessPrivate::waitForDeadChild()
-{
- Q_Q(QProcess);
-
- // read a byte from the death pipe
- char c;
- qt_native_read(deathPipe[0], &c, 1);
-
- if (symbianProcess && symbianProcess->Handle()) {
- TExitType et = symbianProcess->ExitType();
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForDeadChild() symbianProcess->ExitType: %d", et);
- if (et != EExitPending) {
- processManager()->remove(q);
- exitCode = symbianProcess->ExitReason();
- crashed = (et == EExitPanic);
-#if defined QPROCESS_DEBUG
- TExitCategoryName catName = symbianProcess->ExitCategory();
- qDebug() << "QProcessPrivate::waitForDeadChild() dead with exitCode"
- << exitCode << ", crashed:" << crashed
- << ", category:" << QString((const QChar *)catName.Ptr());
-#endif
- } else {
- QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForDeadChild() not dead!");
- }
- }
-
- return true;
-}
-
-void QProcessPrivate::_q_notified()
-{
- // Nothing to do in Symbian
-}
-
-bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
-{
- QPROCESS_DEBUG_PRINT("QProcessPrivate::startDetached()");
- Q_UNUSED(workingDirectory);
-
- RProcess *newProc = NULL;
-
- TInt err = qt_create_symbian_process(&newProc, program, arguments, QString());
-
- if (err == KErrNone) {
- if (pid)
- *pid = newProc->Id().Id();
-
- newProc->Resume();
- newProc->Close();
- delete newProc;
- return true;
- }
-
- return false;
-}
-
-
-void QProcessPrivate::initializeProcessManager()
-{
- (void) processManager();
-}
-
-QProcessEnvironment QProcessEnvironment::systemEnvironment()
-{
- return QProcessEnvironment();
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_PROCESS
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 5fc69ed2cd..f01df3c078 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index d47e55dee4..8c6444d173 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,7 +72,6 @@ static void qt_create_pipe(Q_PIPE *pipe, bool in)
// read handles to avoid non-closable handles (this is done by the
// DuplicateHandle() call).
-#if !defined(Q_OS_WINCE)
SECURITY_ATTRIBUTES secAtt = { sizeof( SECURITY_ATTRIBUTES ), NULL, TRUE };
HANDLE tmpHandle;
@@ -91,10 +90,15 @@ static void qt_create_pipe(Q_PIPE *pipe, bool in)
}
CloseHandle(tmpHandle);
-#else
- Q_UNUSED(pipe);
- Q_UNUSED(in);
-#endif
+}
+
+static void duplicateStdWriteChannel(Q_PIPE *pipe, DWORD nStdHandle)
+{
+ pipe[0] = INVALID_Q_PIPE;
+ HANDLE hStdWriteChannel = GetStdHandle(nStdHandle);
+ HANDLE hCurrentProcess = GetCurrentProcess();
+ DuplicateHandle(hCurrentProcess, hStdWriteChannel, hCurrentProcess,
+ &pipe[1], 0, TRUE, DUPLICATE_SAME_ACCESS);
}
/*
@@ -113,8 +117,11 @@ bool QProcessPrivate::createChannel(Channel &channel)
if (channel.type == Channel::Normal) {
// we're piping this channel to our own process
- qt_create_pipe(channel.pipe, &channel == &stdinChannel);
-
+ const bool isStdInChannel = (&channel == &stdinChannel);
+ if (isStdInChannel || processChannelMode != QProcess::ForwardedChannels)
+ qt_create_pipe(channel.pipe, isStdInChannel);
+ else
+ duplicateStdWriteChannel(channel.pipe, (&channel == &stdoutChannel) ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE);
return true;
} else if (channel.type == Channel::Redirect) {
// we're redirecting the channel to/from a file
@@ -277,7 +284,6 @@ static QString qt_create_commandline(const QString &program, const QStringList &
QProcessEnvironment QProcessEnvironment::systemEnvironment()
{
QProcessEnvironment env;
-#if !defined(Q_OS_WINCE)
// Calls to setenv() affect the low-level environment as well.
// This is not the case the other way round.
if (wchar_t *envStrings = GetEnvironmentStringsW()) {
@@ -293,11 +299,9 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
}
FreeEnvironmentStringsW(envStrings);
}
-#endif
return env;
}
-#if !defined(Q_OS_WINCE)
static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &environment)
{
QByteArray envlist;
@@ -357,7 +361,6 @@ static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &
}
return envlist;
}
-#endif
void QProcessPrivate::startProcess()
{
@@ -381,14 +384,10 @@ void QProcessPrivate::startProcess()
!createChannel(stderrChannel))
return;
-#if defined(Q_OS_WINCE)
- QString args = qt_create_commandline(QString(), arguments);
-#else
QString args = qt_create_commandline(program, arguments);
QByteArray envlist;
if (environment.d.constData())
envlist = qt_create_environment(environment.d.constData()->hash);
-#endif
if (!nativeArguments.isEmpty()) {
if (!args.isEmpty())
args += QLatin1Char(' ');
@@ -402,15 +401,6 @@ void QProcessPrivate::startProcess()
qDebug(" pass environment : %s", environment.isEmpty() ? "no" : "yes");
#endif
-#if defined(Q_OS_WINCE)
- QString fullPathProgram = program;
- if (!QDir::isAbsolutePath(fullPathProgram))
- fullPathProgram = QFileInfo(fullPathProgram).absoluteFilePath();
- fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\'));
- success = CreateProcess((wchar_t*)fullPathProgram.utf16(),
- (wchar_t*)args.utf16(),
- 0, 0, false, 0, 0, 0, 0, pid);
-#else
DWORD dwCreationFlags = CREATE_NO_WINDOW;
dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
@@ -443,7 +433,6 @@ void QProcessPrivate::startProcess()
CloseHandle(stderrChannel.pipe[1]);
stderrChannel.pipe[1] = INVALID_Q_PIPE;
}
-#endif // Q_OS_WINCE
if (!success) {
cleanup();
@@ -484,24 +473,10 @@ qint64 QProcessPrivate::bytesAvailableFromStdout() const
return 0;
DWORD bytesAvail = 0;
-#if !defined(Q_OS_WINCE)
PeekNamedPipe(stdoutChannel.pipe[0], 0, 0, 0, &bytesAvail, 0);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::bytesAvailableFromStdout() == %d", bytesAvail);
#endif
- if (processChannelMode == QProcess::ForwardedChannels && bytesAvail > 0) {
- QByteArray buf(bytesAvail, 0);
- DWORD bytesRead = 0;
- if (ReadFile(stdoutChannel.pipe[0], buf.data(), buf.size(), &bytesRead, 0) && bytesRead > 0) {
- HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
- if (hStdout) {
- DWORD bytesWritten = 0;
- WriteFile(hStdout, buf.data(), bytesRead, &bytesWritten, 0);
- }
- }
- bytesAvail = 0;
- }
-#endif
return bytesAvail;
}
@@ -511,24 +486,10 @@ qint64 QProcessPrivate::bytesAvailableFromStderr() const
return 0;
DWORD bytesAvail = 0;
-#if !defined(Q_OS_WINCE)
PeekNamedPipe(stderrChannel.pipe[0], 0, 0, 0, &bytesAvail, 0);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::bytesAvailableFromStderr() == %d", bytesAvail);
#endif
- if (processChannelMode == QProcess::ForwardedChannels && bytesAvail > 0) {
- QByteArray buf(bytesAvail, 0);
- DWORD bytesRead = 0;
- if (ReadFile(stderrChannel.pipe[0], buf.data(), buf.size(), &bytesRead, 0) && bytesRead > 0) {
- HANDLE hStderr = GetStdHandle(STD_ERROR_HANDLE);
- if (hStderr) {
- DWORD bytesWritten = 0;
- WriteFile(hStderr, buf.data(), bytesRead, &bytesWritten, 0);
- }
- }
- bytesAvail = 0;
- }
-#endif
return bytesAvail;
}
@@ -596,13 +557,6 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
{
Q_Q(QProcess);
-#if defined(Q_OS_WINCE)
- processError = QProcess::ReadError;
- q->setErrorString(QProcess::tr("Error reading from process"));
- emit q->error(processError);
- return false;
-#endif
-
QIncrementalSleepTimer timer(msecs);
forever {
@@ -646,13 +600,6 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
{
Q_Q(QProcess);
-#if defined(Q_OS_WINCE)
- processError = QProcess::ReadError;
- q->setErrorString(QProcess::tr("Error reading from process"));
- emit q->error(processError);
- return false;
-#endif
-
QIncrementalSleepTimer timer(msecs);
forever {
@@ -786,13 +733,6 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
{
Q_Q(QProcess);
-#if defined(Q_OS_WINCE)
- processError = QProcess::WriteError;
- q->setErrorString(QProcess::tr("Error writing to process"));
- emit q->error(processError);
- return -1;
-#endif
-
if (!pipeWriter) {
pipeWriter = new QWindowsPipeWriter(stdinChannel.pipe[1], q);
pipeWriter->start();
@@ -832,36 +772,19 @@ void QProcessPrivate::_q_notified()
bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDir, qint64 *pid)
{
-#if defined(Q_OS_WINCE)
- Q_UNUSED(workingDir);
- QString args = qt_create_commandline(QString(), arguments);
-#else
QString args = qt_create_commandline(program, arguments);
-#endif
-
bool success = false;
-
PROCESS_INFORMATION pinfo;
-#if defined(Q_OS_WINCE)
- QString fullPathProgram = program;
- if (!QDir::isAbsolutePath(fullPathProgram))
- fullPathProgram.prepend(QDir::currentPath().append(QLatin1Char('/')));
- fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\'));
- success = CreateProcess((wchar_t*)fullPathProgram.utf16(),
- (wchar_t*)args.utf16(),
- 0, 0, false, CREATE_NEW_CONSOLE, 0, 0, 0, &pinfo);
-#else
- STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
- success = CreateProcess(0, (wchar_t*)args.utf16(),
- 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
- workingDir.isEmpty() ? 0 : (wchar_t*)workingDir.utf16(),
- &startupInfo, &pinfo);
-#endif // Q_OS_WINCE
+ STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
+ (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
+ (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ success = CreateProcess(0, (wchar_t*)args.utf16(),
+ 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
+ workingDir.isEmpty() ? 0 : (wchar_t*)workingDir.utf16(),
+ &startupInfo, &pinfo);
if (success) {
CloseHandle(pinfo.hThread);
diff --git a/src/corelib/io/qprocess_wince.cpp b/src/corelib/io/qprocess_wince.cpp
new file mode 100644
index 0000000000..16a34469e7
--- /dev/null
+++ b/src/corelib/io/qprocess_wince.cpp
@@ -0,0 +1,330 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qprocess.h"
+#include "qprocess_p.h"
+
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qregexp.h>
+#include <qtimer.h>
+#include <qwineventnotifier.h>
+#include <qdebug.h>
+
+#ifndef QT_NO_PROCESS
+
+QT_BEGIN_NAMESPACE
+
+//#define QPROCESS_DEBUG
+
+void QProcessPrivate::destroyPipe(Q_PIPE pipe[2])
+{
+ Q_UNUSED(pipe);
+}
+
+static QString qt_create_commandline(const QString &program, const QStringList &arguments)
+{
+ QString args;
+ if (!program.isEmpty()) {
+ QString programName = program;
+ if (!programName.startsWith(QLatin1Char('\"')) && !programName.endsWith(QLatin1Char('\"')) && programName.contains(QLatin1Char(' ')))
+ programName = QLatin1Char('\"') + programName + QLatin1Char('\"');
+ programName.replace(QLatin1Char('/'), QLatin1Char('\\'));
+
+ // add the prgram as the first arg ... it works better
+ args = programName + QLatin1Char(' ');
+ }
+
+ for (int i=0; i<arguments.size(); ++i) {
+ QString tmp = arguments.at(i);
+ // Quotes are escaped and their preceding backslashes are doubled.
+ tmp.replace(QRegExp(QLatin1String("(\\\\*)\"")), QLatin1String("\\1\\1\\\""));
+ if (tmp.isEmpty() || tmp.contains(QLatin1Char(' ')) || tmp.contains(QLatin1Char('\t'))) {
+ // The argument must not end with a \ since this would be interpreted
+ // as escaping the quote -- rather put the \ behind the quote: e.g.
+ // rather use "foo"\ than "foo\"
+ int i = tmp.length();
+ while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\'))
+ --i;
+ tmp.insert(i, QLatin1Char('"'));
+ tmp.prepend(QLatin1Char('"'));
+ }
+ args += QLatin1Char(' ') + tmp;
+ }
+ return args;
+}
+
+QProcessEnvironment QProcessEnvironment::systemEnvironment()
+{
+ QProcessEnvironment env;
+ return env;
+}
+
+void QProcessPrivate::startProcess()
+{
+ Q_Q(QProcess);
+
+ bool success = false;
+
+ if (pid) {
+ CloseHandle(pid->hThread);
+ CloseHandle(pid->hProcess);
+ delete pid;
+ pid = 0;
+ }
+ pid = new PROCESS_INFORMATION;
+ memset(pid, 0, sizeof(PROCESS_INFORMATION));
+
+ q->setProcessState(QProcess::Starting);
+
+ QString args = qt_create_commandline(QString(), arguments);
+ if (!nativeArguments.isEmpty()) {
+ if (!args.isEmpty())
+ args += QLatin1Char(' ');
+ args += nativeArguments;
+ }
+
+#if defined QPROCESS_DEBUG
+ qDebug("Creating process");
+ qDebug(" program : [%s]", program.toLatin1().constData());
+ qDebug(" args : %s", args.toLatin1().constData());
+ qDebug(" pass environment : %s", environment.isEmpty() ? "no" : "yes");
+#endif
+
+ QString fullPathProgram = program;
+ if (!QDir::isAbsolutePath(fullPathProgram))
+ fullPathProgram = QFileInfo(fullPathProgram).absoluteFilePath();
+ fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\'));
+ success = CreateProcess((wchar_t*)fullPathProgram.utf16(),
+ (wchar_t*)args.utf16(),
+ 0, 0, false, 0, 0, 0, 0, pid);
+
+ if (!success) {
+ cleanup();
+ processError = QProcess::FailedToStart;
+ emit q->error(processError);
+ q->setProcessState(QProcess::NotRunning);
+ return;
+ }
+
+ q->setProcessState(QProcess::Running);
+ // User can call kill()/terminate() from the stateChanged() slot
+ // so check before proceeding
+ if (!pid)
+ return;
+
+ if (threadData->eventDispatcher) {
+ processFinishedNotifier = new QWinEventNotifier(pid->hProcess, q);
+ QObject::connect(processFinishedNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_processDied()));
+ processFinishedNotifier->setEnabled(true);
+ }
+
+ // give the process a chance to start ...
+ Sleep(SLEEPMIN * 2);
+ _q_startupNotification();
+}
+
+bool QProcessPrivate::processStarted()
+{
+ return processState == QProcess::Running;
+}
+
+qint64 QProcessPrivate::bytesAvailableFromStdout() const
+{
+ return 0;
+}
+
+qint64 QProcessPrivate::bytesAvailableFromStderr() const
+{
+ return 0;
+}
+
+qint64 QProcessPrivate::readFromStdout(char *data, qint64 maxlen)
+{
+ return -1;
+}
+
+qint64 QProcessPrivate::readFromStderr(char *data, qint64 maxlen)
+{
+ return -1;
+}
+
+static BOOL QT_WIN_CALLBACK qt_terminateApp(HWND hwnd, LPARAM procId)
+{
+ DWORD currentProcId = 0;
+ GetWindowThreadProcessId(hwnd, &currentProcId);
+ if (currentProcId == (DWORD)procId)
+ PostMessage(hwnd, WM_CLOSE, 0, 0);
+
+ return TRUE;
+}
+
+void QProcessPrivate::terminateProcess()
+{
+ if (pid) {
+ EnumWindows(qt_terminateApp, (LPARAM)pid->dwProcessId);
+ PostThreadMessage(pid->dwThreadId, WM_CLOSE, 0, 0);
+ }
+}
+
+void QProcessPrivate::killProcess()
+{
+ if (pid)
+ TerminateProcess(pid->hProcess, 0xf291);
+}
+
+bool QProcessPrivate::waitForStarted(int)
+{
+ Q_Q(QProcess);
+
+ if (processStarted())
+ return true;
+
+ if (processError == QProcess::FailedToStart)
+ return false;
+
+ processError = QProcess::Timedout;
+ q->setErrorString(QProcess::tr("Process operation timed out"));
+ return false;
+}
+
+bool QProcessPrivate::waitForReadyRead(int msecs)
+{
+ return false;
+}
+
+bool QProcessPrivate::waitForBytesWritten(int msecs)
+{
+ return false;
+}
+
+bool QProcessPrivate::waitForFinished(int msecs)
+{
+ Q_Q(QProcess);
+#if defined QPROCESS_DEBUG
+ qDebug("QProcessPrivate::waitForFinished(%d)", msecs);
+#endif
+
+ QIncrementalSleepTimer timer(msecs);
+
+ forever {
+ if (!pid)
+ return true;
+
+ if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
+ _q_processDied();
+ return true;
+ }
+
+ if (timer.hasTimedOut())
+ break;
+ }
+ processError = QProcess::Timedout;
+ q->setErrorString(QProcess::tr("Process operation timed out"));
+ return false;
+}
+
+void QProcessPrivate::findExitCode()
+{
+ DWORD theExitCode;
+ if (GetExitCodeProcess(pid->hProcess, &theExitCode)) {
+ exitCode = theExitCode;
+ //### for now we assume a crash if exit code is less than -1 or the magic number
+ crashed = (exitCode == 0xf291 || (int)exitCode < 0);
+ }
+}
+
+void QProcessPrivate::flushPipeWriter()
+{
+}
+
+qint64 QProcessPrivate::pipeWriterBytesToWrite() const
+{
+ return 0;
+}
+
+qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(maxlen);
+ return -1;
+}
+
+bool QProcessPrivate::waitForWrite(int msecs)
+{
+ Q_UNUSED(msecs);
+ return false;
+}
+
+void QProcessPrivate::_q_notified()
+{
+}
+
+bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDir, qint64 *pid)
+{
+ Q_UNUSED(workingDir);
+ QString args = qt_create_commandline(QString(), arguments);
+
+ bool success = false;
+
+ PROCESS_INFORMATION pinfo;
+
+ QString fullPathProgram = program;
+ if (!QDir::isAbsolutePath(fullPathProgram))
+ fullPathProgram.prepend(QDir::currentPath().append(QLatin1Char('/')));
+ fullPathProgram.replace(QLatin1Char('/'), QLatin1Char('\\'));
+ success = CreateProcess((wchar_t*)fullPathProgram.utf16(),
+ (wchar_t*)args.utf16(),
+ 0, 0, false, CREATE_NEW_CONSOLE, 0, 0, 0, &pinfo);
+
+ if (success) {
+ CloseHandle(pinfo.hThread);
+ CloseHandle(pinfo.hProcess);
+ if (pid)
+ *pid = pinfo.dwProcessId;
+ }
+
+ return success;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_PROCESS
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 6ad15788b0..0ae3f9e647 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1491,6 +1491,4 @@ bool QResourceFileEnginePrivate::unmap(uchar *ptr)
return true;
}
-Q_CORE_EXPORT void qInitResourceIO() { } // ### Qt 5: remove
-
QT_END_NAMESPACE
diff --git a/src/corelib/io/qresource.h b/src/corelib/io/qresource.h
index 1edc7a4f13..452e141e41 100644
--- a/src/corelib/io/qresource.h
+++ b/src/corelib/io/qresource.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qresource_iterator.cpp b/src/corelib/io/qresource_iterator.cpp
index e19bad1e03..3317ef5fff 100644
--- a/src/corelib/io/qresource_iterator.cpp
+++ b/src/corelib/io/qresource_iterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qresource_iterator_p.h b/src/corelib/io/qresource_iterator_p.h
index 519f46199c..3603c64819 100644
--- a/src/corelib/io/qresource_iterator_p.h
+++ b/src/corelib/io/qresource_iterator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qresource_p.h b/src/corelib/io/qresource_p.h
index 4beda142ed..f558319dc2 100644
--- a/src/corelib/io/qresource_p.h
+++ b/src/corelib/io/qresource_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 37bd8c460d..81dc5bb078 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h
index b144a9af4c..65aeb89523 100644
--- a/src/corelib/io/qsettings.h
+++ b/src/corelib/io/qsettings.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qsettings_mac.cpp b/src/corelib/io/qsettings_mac.cpp
index 11e0c3c103..6bb815c561 100644
--- a/src/corelib/io/qsettings_mac.cpp
+++ b/src/corelib/io/qsettings_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h
index 5d62c839a6..cf348122dc 100644
--- a/src/corelib/io/qsettings_p.h
+++ b/src/corelib/io/qsettings_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qsettings_win.cpp b/src/corelib/io/qsettings_win.cpp
index bbc7dd1677..2cac379ec6 100644
--- a/src/corelib/io/qsettings_win.cpp
+++ b/src/corelib/io/qsettings_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp
index 43ae5c07ab..5accb61cc5 100644
--- a/src/corelib/io/qstandardpaths.cpp
+++ b/src/corelib/io/qstandardpaths.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -83,6 +83,8 @@ QT_BEGIN_NAMESPACE
returned for GenericDataLocation.
\value CacheLocation Returns a directory location where user-specific
non-essential (cached) data should be written.
+ \value GenericCacheLocation Returns a directory location where user-specific
+ non-essential (cached) data, shared across applications, should be written.
\value GenericDataLocation Returns a directory location where persistent
data shared across applications can be stored.
\value RuntimeLocation Returns a directory location where runtime communication
diff --git a/src/corelib/io/qstandardpaths.h b/src/corelib/io/qstandardpaths.h
index d91da9de2f..bae7b3f7b5 100644
--- a/src/corelib/io/qstandardpaths.h
+++ b/src/corelib/io/qstandardpaths.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,7 +73,8 @@ public:
GenericDataLocation,
RuntimeLocation,
ConfigLocation,
- DownloadLocation
+ DownloadLocation,
+ GenericCacheLocation
};
static QString writableLocation(StandardLocation type);
diff --git a/src/corelib/io/qstandardpaths_mac.cpp b/src/corelib/io/qstandardpaths_mac.cpp
index 84fc81494c..f37c21ed39 100644
--- a/src/corelib/io/qstandardpaths_mac.cpp
+++ b/src/corelib/io/qstandardpaths_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -82,6 +82,7 @@ OSType translateLocation(QStandardPaths::StandardLocation type)
case QStandardPaths::RuntimeLocation:
case QStandardPaths::DataLocation:
return kApplicationSupportFolderType;
+ case QStandardPaths::GenericCacheLocation:
case QStandardPaths::CacheLocation:
return kCachedDataFolderType;
default:
@@ -128,6 +129,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
return QDir::tempPath();
case GenericDataLocation:
case DataLocation:
+ case GenericCacheLocation:
case CacheLocation:
case RuntimeLocation:
return macLocation(type, kUserDomain);
@@ -140,7 +142,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
{
QStringList dirs;
- if (type == GenericDataLocation || type == DataLocation || type == CacheLocation) {
+ if (type == GenericDataLocation || type == DataLocation || type == GenericCacheLocation || type == CacheLocation) {
const QString path = macLocation(type, kOnAppropriateDisk);
if (!path.isEmpty())
dirs.append(path);
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp
index b1c5869f71..5aef52eaba 100644
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -62,15 +62,18 @@ QString QStandardPaths::writableLocation(StandardLocation type)
case TempLocation:
return QDir::tempPath();
case CacheLocation:
+ case GenericCacheLocation:
{
// http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
QString xdgCacheHome = QFile::decodeName(qgetenv("XDG_CACHE_HOME"));
if (xdgCacheHome.isEmpty())
xdgCacheHome = QDir::homePath() + QLatin1String("/.cache");
- if (!QCoreApplication::organizationName().isEmpty())
- xdgCacheHome += QLatin1Char('/') + QCoreApplication::organizationName();
- if (!QCoreApplication::applicationName().isEmpty())
- xdgCacheHome += QLatin1Char('/') + QCoreApplication::applicationName();
+ if (type == QStandardPaths::CacheLocation) {
+ if (!QCoreApplication::organizationName().isEmpty())
+ xdgCacheHome += QLatin1Char('/') + QCoreApplication::organizationName();
+ if (!QCoreApplication::applicationName().isEmpty())
+ xdgCacheHome += QLatin1Char('/') + QCoreApplication::applicationName();
+ }
return xdgCacheHome;
}
case DataLocation:
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp
index e9093649f3..e3f86b7134 100644
--- a/src/corelib/io/qstandardpaths_win.cpp
+++ b/src/corelib/io/qstandardpaths_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -160,6 +160,9 @@ QString QStandardPaths::writableLocation(StandardLocation type)
// cache directory located in their AppData directory
return writableLocation(DataLocation) + QLatin1String("\\cache");
+ case GenericCacheLocation:
+ return writableLocation(GenericDataLocation) + QLatin1String("\\cache");
+
case RuntimeLocation:
case HomeLocation:
result = QDir::homePath();
diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp
index 78ec1774eb..15d3258a9a 100644
--- a/src/corelib/io/qtemporarydir.cpp
+++ b/src/corelib/io/qtemporarydir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtemporarydir.h b/src/corelib/io/qtemporarydir.h
index da0d1214c4..22c0a271e4 100644
--- a/src/corelib/io/qtemporarydir.h
+++ b/src/corelib/io/qtemporarydir.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 677be45f65..eb645fabe8 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtemporaryfile.h b/src/corelib/io/qtemporaryfile.h
index 282b897813..20956d2cf0 100644
--- a/src/corelib/io/qtemporaryfile.h
+++ b/src/corelib/io/qtemporaryfile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 177f73def3..8c7f57fddf 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtextstream.h b/src/corelib/io/qtextstream.h
index db038855a8..0531d4017d 100644
--- a/src/corelib/io/qtextstream.h
+++ b/src/corelib/io/qtextstream.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtldurl.cpp b/src/corelib/io/qtldurl.cpp
index 7d06ca4b17..2c725f17fd 100644
--- a/src/corelib/io/qtldurl.cpp
+++ b/src/corelib/io/qtldurl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qtldurl_p.h b/src/corelib/io/qtldurl_p.h
index 77c0a15823..0a94f3015b 100644
--- a/src/corelib/io/qtldurl_p.h
+++ b/src/corelib/io/qtldurl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index c921a89b30..53b4df4729 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index e62cd0a85b..75a88e8048 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp
new file mode 100644
index 0000000000..8da786ebd9
--- /dev/null
+++ b/src/corelib/io/qwindowspipereader.cpp
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwindowspipereader_p.h"
+#include <qdebug.h>
+#include <qelapsedtimer.h>
+#include <qeventloop.h>
+#include <qtimer.h>
+#include <qwineventnotifier.h>
+
+QT_BEGIN_NAMESPACE
+
+QWindowsPipeReader::QWindowsPipeReader(QObject *parent)
+ : QObject(parent),
+ handle(INVALID_HANDLE_VALUE),
+ readBufferMaxSize(0),
+ actualReadBufferSize(0),
+ emitReadyReadTimer(new QTimer(this)),
+ pipeBroken(false)
+{
+ emitReadyReadTimer->setSingleShot(true);
+ connect(emitReadyReadTimer, SIGNAL(timeout()), SIGNAL(readyRead()));
+
+ ZeroMemory(&overlapped, sizeof(overlapped));
+ overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ dataReadNotifier = new QWinEventNotifier(overlapped.hEvent, this);
+ connect(dataReadNotifier, SIGNAL(activated(HANDLE)), SLOT(readEventSignalled()));
+}
+
+QWindowsPipeReader::~QWindowsPipeReader()
+{
+ CloseHandle(overlapped.hEvent);
+}
+
+/*!
+ Sets the handle to read from. The handle must be valid.
+ */
+void QWindowsPipeReader::setHandle(HANDLE hPipeReadEnd)
+{
+ readBuffer.clear();
+ actualReadBufferSize = 0;
+ handle = hPipeReadEnd;
+ pipeBroken = false;
+ dataReadNotifier->setEnabled(true);
+}
+
+/*!
+ Stops the asynchronous read sequence.
+ This function assumes that the file already has been closed.
+ It does not cancel any I/O operation.
+ */
+void QWindowsPipeReader::stop()
+{
+ dataReadNotifier->setEnabled(false);
+ readSequenceStarted = false;
+ handle = INVALID_HANDLE_VALUE;
+ ResetEvent(overlapped.hEvent);
+}
+
+/*!
+ Returns the number of bytes we've read so far.
+ */
+qint64 QWindowsPipeReader::bytesAvailable() const
+{
+ return actualReadBufferSize;
+}
+
+/*!
+ Stops the asynchronous read sequence.
+ */
+qint64 QWindowsPipeReader::read(char *data, qint64 maxlen)
+{
+ if (pipeBroken && actualReadBufferSize == 0)
+ return -1; // signal EOF
+
+ qint64 readSoFar;
+ // If startAsyncRead() has read data, copy it to its destination.
+ if (maxlen == 1 && actualReadBufferSize > 0) {
+ *data = readBuffer.getChar();
+ actualReadBufferSize--;
+ readSoFar = 1;
+ } else {
+ qint64 bytesToRead = qMin(qint64(actualReadBufferSize), maxlen);
+ readSoFar = 0;
+ while (readSoFar < bytesToRead) {
+ const char *ptr = readBuffer.readPointer();
+ int bytesToReadFromThisBlock = qMin(bytesToRead - readSoFar,
+ qint64(readBuffer.nextDataBlockSize()));
+ memcpy(data + readSoFar, ptr, bytesToReadFromThisBlock);
+ readSoFar += bytesToReadFromThisBlock;
+ readBuffer.free(bytesToReadFromThisBlock);
+ actualReadBufferSize -= bytesToReadFromThisBlock;
+ }
+ }
+
+ if (!pipeBroken) {
+ if (!actualReadBufferSize)
+ emitReadyReadTimer->stop();
+ if (!readSequenceStarted)
+ startAsyncRead();
+ }
+
+ return readSoFar;
+}
+
+bool QWindowsPipeReader::canReadLine() const
+{
+ return readBuffer.indexOf('\n', actualReadBufferSize) >= 0;
+}
+
+/*!
+ \internal
+ Will be called whenever the read operation completes.
+ Returns true, if readyRead() has been emitted.
+ */
+bool QWindowsPipeReader::readEventSignalled()
+{
+ if (!completeAsyncRead()) {
+ pipeBroken = true;
+ emit pipeClosed();
+ return false;
+ }
+ startAsyncRead();
+ emitReadyReadTimer->stop();
+ emit readyRead();
+ return true;
+}
+
+/*!
+ \internal
+ Reads data from the socket into the readbuffer
+ */
+void QWindowsPipeReader::startAsyncRead()
+{
+ do {
+ DWORD bytesToRead = checkPipeState();
+ if (pipeBroken)
+ return;
+
+ if (bytesToRead == 0) {
+ // There are no bytes in the pipe but we need to
+ // start the overlapped read with some buffer size.
+ bytesToRead = initialReadBufferSize;
+ }
+
+ if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - readBuffer.size())) {
+ bytesToRead = readBufferMaxSize - readBuffer.size();
+ if (bytesToRead == 0) {
+ // Buffer is full. User must read data from the buffer
+ // before we can read more from the pipe.
+ return;
+ }
+ }
+
+ char *ptr = readBuffer.reserve(bytesToRead);
+
+ readSequenceStarted = true;
+ if (ReadFile(handle, ptr, bytesToRead, NULL, &overlapped)) {
+ completeAsyncRead();
+ } else {
+ switch (GetLastError()) {
+ case ERROR_IO_PENDING:
+ // This is not an error. We're getting notified, when data arrives.
+ return;
+ case ERROR_MORE_DATA:
+ // This is not an error. The synchronous read succeeded.
+ // We're connected to a message mode pipe and the message
+ // didn't fit into the pipe's system buffer.
+ completeAsyncRead();
+ break;
+ case ERROR_PIPE_NOT_CONNECTED:
+ {
+ // It may happen, that the other side closes the connection directly
+ // after writing data. Then we must set the appropriate socket state.
+ pipeBroken = true;
+ emit pipeClosed();
+ return;
+ }
+ default:
+ emit winError(GetLastError(), QLatin1String("QWindowsPipeReader::startAsyncRead"));
+ return;
+ }
+ }
+ } while (!readSequenceStarted);
+}
+
+/*!
+ \internal
+ Sets the correct size of the read buffer after a read operation.
+ Returns false, if an error occurred or the connection dropped.
+ */
+bool QWindowsPipeReader::completeAsyncRead()
+{
+ ResetEvent(overlapped.hEvent);
+ readSequenceStarted = false;
+
+ DWORD bytesRead;
+ if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) {
+ switch (GetLastError()) {
+ case ERROR_MORE_DATA:
+ // This is not an error. We're connected to a message mode
+ // pipe and the message didn't fit into the pipe's system
+ // buffer. We will read the remaining data in the next call.
+ break;
+ case ERROR_BROKEN_PIPE:
+ case ERROR_PIPE_NOT_CONNECTED:
+ return false;
+ default:
+ emit winError(GetLastError(), QLatin1String("QWindowsPipeReader::completeAsyncRead"));
+ return false;
+ }
+ }
+
+ actualReadBufferSize += bytesRead;
+ readBuffer.truncate(actualReadBufferSize);
+ if (!emitReadyReadTimer->isActive())
+ emitReadyReadTimer->start();
+ return true;
+}
+
+/*!
+ \internal
+ Returns the number of available bytes in the pipe.
+ Sets QWindowsPipeReader::pipeBroken to true if the connection is broken.
+ */
+DWORD QWindowsPipeReader::checkPipeState()
+{
+ DWORD bytes;
+ if (PeekNamedPipe(handle, NULL, 0, NULL, &bytes, NULL)) {
+ return bytes;
+ } else {
+ if (!pipeBroken) {
+ pipeBroken = true;
+ emit pipeClosed();
+ }
+ }
+ return 0;
+}
+
+/*!
+ Waits for the completion of the asynchronous read operation.
+ Returns true, if we've emitted the readyRead signal.
+ */
+bool QWindowsPipeReader::waitForReadyRead(int msecs)
+{
+ Q_ASSERT(readSequenceStarted);
+ DWORD result = WaitForSingleObject(overlapped.hEvent, msecs == -1 ? INFINITE : msecs);
+ switch (result) {
+ case WAIT_OBJECT_0:
+ return readEventSignalled();
+ case WAIT_TIMEOUT:
+ return false;
+ }
+
+ qWarning("QWindowsPipeReader::waitForReadyRead WaitForSingleObject failed with error code %d.", int(GetLastError()));
+ return false;
+}
+
+/*!
+ Waits until the pipe is closed.
+ */
+bool QWindowsPipeReader::waitForPipeClosed(int msecs)
+{
+ const int sleepTime = 10;
+ QElapsedTimer stopWatch;
+ stopWatch.start();
+ forever {
+ checkPipeState();
+ if (pipeBroken)
+ return true;
+ if (stopWatch.hasExpired(msecs - sleepTime))
+ return false;
+ Sleep(sleepTime);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_symbian_p.h b/src/corelib/io/qwindowspipereader_p.h
index 0b317a062f..e78d6b29ad 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian_p.h
+++ b/src/corelib/io/qwindowspipereader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFILESYSTEMWATCHER_SYMBIAN_P_H
-#define QFILESYSTEMWATCHER_SYMBIAN_P_H
+#ifndef QWINDOWSPIPEREADER_P_H
+#define QWINDOWSPIPEREADER_P_H
//
// W A R N I N G
@@ -53,78 +53,70 @@
// We mean it.
//
-#include "qfilesystemwatcher_p.h"
+#include <qbytearray.h>
+#include <qobject.h>
+#include <qtimer.h>
+#include <qt_windows.h>
-#ifndef QT_NO_FILESYSTEMWATCHER
+#include <private/qringbuffer_p.h>
-#include "qhash.h"
-#include "qmutex.h"
-#include "qwaitcondition.h"
-
-#include <e32base.h>
-#include <f32file.h>
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QSymbianFileSystemWatcherEngine;
-
-class QNotifyChangeEvent : public CActive
-{
-public:
- QNotifyChangeEvent(RFs &fsSession, const TDesC &file, QSymbianFileSystemWatcherEngine *engine,
- bool aIsDir, TInt aPriority = EPriorityStandard);
- ~QNotifyChangeEvent();
-
- bool isDir;
+QT_MODULE(Core)
-private:
- void RunL();
- void DoCancel();
-
- RFs &fsSession;
- TPath watchedPath;
- QSymbianFileSystemWatcherEngine *engine;
-
- int failureCount;
-};
+class QWinEventNotifier;
-class QSymbianFileSystemWatcherEngine : public QFileSystemWatcherEngine
+class Q_CORE_EXPORT QWindowsPipeReader : public QObject
{
Q_OBJECT
-
public:
- QSymbianFileSystemWatcherEngine();
- ~QSymbianFileSystemWatcherEngine();
-
- QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
- QStringList removePaths(const QStringList &paths, QStringList *files,
- QStringList *directories);
+ explicit QWindowsPipeReader(QObject *parent = 0);
+ ~QWindowsPipeReader();
+ void setHandle(HANDLE hPipeReadEnd);
void stop();
-protected:
- void run();
+ void setMaxReadBufferSize(qint64 size) { readBufferMaxSize = size; }
+ qint64 maxReadBufferSize() const { return readBufferMaxSize; }
-public Q_SLOTS:
- void addNativeListener(const QString &directoryPath);
- void removeNativeListener();
+ bool isPipeClosed() const { return pipeBroken; }
+ qint64 bytesAvailable() const;
+ qint64 read(char *data, qint64 maxlen);
+ bool canReadLine() const;
+ bool waitForReadyRead(int msecs);
+ bool waitForPipeClosed(int msecs);
-private:
- friend class QNotifyChangeEvent;
- void emitPathChanged(QNotifyChangeEvent *e);
+ void startAsyncRead();
+ bool completeAsyncRead();
- void startWatcher();
+Q_SIGNALS:
+ void winError(ulong, const QString &);
+ void readyRead();
+ void pipeClosed();
- QHash<QNotifyChangeEvent*, QString> activeObjectToPath;
- QMutex mutex;
- QWaitCondition syncCondition;
- bool watcherStarted;
- QNotifyChangeEvent *currentAddEvent;
- QNotifyChangeEvent *currentRemoveEvent;
-};
+private Q_SLOTS:
+ bool readEventSignalled();
-#endif // QT_NO_FILESYSTEMWATCHER
+private:
+ DWORD checkPipeState();
+
+private:
+ HANDLE handle;
+ OVERLAPPED overlapped;
+ QWinEventNotifier *dataReadNotifier;
+ qint64 readBufferMaxSize;
+ QRingBuffer readBuffer;
+ int actualReadBufferSize;
+ bool readSequenceStarted;
+ QTimer *emitReadyReadTimer;
+ bool pipeBroken;
+ static const qint64 initialReadBufferSize = 4096;
+};
QT_END_NAMESPACE
-#endif // QFILESYSTEMWATCHER_WIN_P_H
+QT_END_HEADER
+
+#endif // QWINDOWSPIPEREADER_P_H
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp
index cb802f1d91..a1765b4178 100644
--- a/src/corelib/io/qwindowspipewriter.cpp
+++ b/src/corelib/io/qwindowspipewriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/io/qwindowspipewriter_p.h b/src/corelib/io/qwindowspipewriter_p.h
index dfcb77e17c..44a1d04b4e 100644
--- a/src/corelib/io/qwindowspipewriter_p.h
+++ b/src/corelib/io/qwindowspipewriter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/itemmodels/itemmodels.pri b/src/corelib/itemmodels/itemmodels.pri
new file mode 100644
index 0000000000..83ec4c5dbf
--- /dev/null
+++ b/src/corelib/itemmodels/itemmodels.pri
@@ -0,0 +1,20 @@
+# Qt itemmodels core module
+
+HEADERS += \
+ itemmodels/qabstractitemmodel.h \
+ itemmodels/qabstractitemmodel_p.h \
+ itemmodels/qabstractproxymodel.h \
+ itemmodels/qabstractproxymodel_p.h \
+ itemmodels/qitemselectionmodel.h \
+ itemmodels/qitemselectionmodel_p.h \
+ itemmodels/qidentityproxymodel.h \
+ itemmodels/qsortfilterproxymodel.h \
+ itemmodels/qstringlistmodel.h
+
+SOURCES += \
+ itemmodels/qabstractitemmodel.cpp \
+ itemmodels/qabstractproxymodel.cpp \
+ itemmodels/qitemselectionmodel.cpp \
+ itemmodels/qidentityproxymodel.cpp \
+ itemmodels/qsortfilterproxymodel.cpp \
+ itemmodels/qstringlistmodel.cpp
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index 99455371ae..dec1fe4cef 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1759,18 +1759,19 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const
Returns true if the data and action can be handled by the model; otherwise
returns false.
- Although the specified \a row, \a column and \a parent indicate the
- location of an item in the model where the operation ended, it is the
- responsibility of the view to provide a suitable location for where the
- data should be inserted.
+ The specified \a row, \a column and \a parent indicate the location of an
+ item in the model where the operation ended. It is the responsibility of
+ the model to complete the action at the correct location.
For instance, a drop action on an item in a QTreeView can result in new
items either being inserted as children of the item specified by \a row,
\a column, and \a parent, or as siblings of the item.
- When row and column are -1 it means that it is up to the model to decide
- where to place the data. This can occur in a tree when data is dropped on
- a parent. Models will usually append the data to the parent in this case.
+ When \a row and \a column are -1 it means that the dropped data should be
+ considered as dropped directly on \a parent. Usually this will mean
+ appending the data as child items of \a parent. If \a row and column are
+ greater than or equal zero, it means that the drop occurred just before the
+ specified \a row and \a column in the specified \a parent.
\sa supportedDropActions(), {Using drag and drop with item views}
*/
@@ -1830,7 +1831,6 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
*/
Qt::DropActions QAbstractItemModel::supportedDragActions() const
{
- // ### Qt 5: make this virtual or these properties
Q_D(const QAbstractItemModel);
if (d->supportedDragActions != -1)
return d->supportedDragActions;
@@ -1838,17 +1838,22 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const
}
/*!
+ \internal
+ */
+void QAbstractItemModel::doSetSupportedDragActions(Qt::DropActions actions)
+{
+ Q_D(QAbstractItemModel);
+ d->supportedDragActions = actions;
+}
+
+/*!
\since 4.2
+ \obsolete
Sets the supported drag \a actions for the items in the model.
\sa supportedDragActions(), {Using drag and drop with item views}
*/
-void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
-{
- Q_D(QAbstractItemModel);
- d->supportedDragActions = actions;
-}
/*!
\note The base class implementation of this function does nothing and
@@ -2131,6 +2136,7 @@ QSize QAbstractItemModel::span(const QModelIndex &) const
/*!
\since 4.6
+ \obsolete
Sets the model's role names to \a roleNames.
@@ -2141,7 +2147,11 @@ QSize QAbstractItemModel::span(const QModelIndex &) const
\sa roleNames()
*/
-void QAbstractItemModel::setRoleNames(const QHash<int,QByteArray> &roleNames)
+
+/*!
+ \internal
+ */
+void QAbstractItemModel::doSetRoleNames(const QHash<int,QByteArray> &roleNames)
{
Q_D(QAbstractItemModel);
d->roleNames = roleNames;
@@ -2154,7 +2164,7 @@ void QAbstractItemModel::setRoleNames(const QHash<int,QByteArray> &roleNames)
\sa setRoleNames()
*/
-const QHash<int,QByteArray> &QAbstractItemModel::roleNames() const
+QHash<int,QByteArray> QAbstractItemModel::roleNames() const
{
Q_D(const QAbstractItemModel);
return d->roleNames;
diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 0aa8144602..46dd7880ce 100644
--- a/src/corelib/kernel/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -198,8 +198,13 @@ public:
int row, int column, const QModelIndex &parent);
virtual Qt::DropActions supportedDropActions() const;
- Qt::DropActions supportedDragActions() const;
- void setSupportedDragActions(Qt::DropActions);
+ virtual Qt::DropActions supportedDragActions() const;
+#if QT_DEPRECATED_SINCE(5, 0)
+ void setSupportedDragActions(Qt::DropActions actions)
+ {
+ doSetSupportedDragActions(actions);
+ }
+#endif
virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
virtual bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex());
@@ -222,7 +227,7 @@ public:
Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const;
virtual QSize span(const QModelIndex &index) const;
- const QHash<int,QByteArray> &roleNames() const;
+ virtual QHash<int,QByteArray> roleNames() const;
#ifdef Q_NO_USING_KEYWORD
inline QObject *parent() const { return QObject::parent(); }
@@ -302,9 +307,17 @@ protected:
void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to);
QModelIndexList persistentIndexList() const;
- void setRoleNames(const QHash<int,QByteArray> &roleNames);
+#if QT_DEPRECATED_SINCE(5,0)
+ QT_DEPRECATED void setRoleNames(const QHash<int,QByteArray> &theRoleNames)
+ {
+ doSetRoleNames(theRoleNames);
+ }
+#endif
private:
+ void doSetRoleNames(const QHash<int,QByteArray> &roleNames);
+ void doSetSupportedDragActions(Qt::DropActions actions);
+
Q_DECLARE_PRIVATE(QAbstractItemModel)
Q_DISABLE_COPY(QAbstractItemModel)
};
diff --git a/src/corelib/kernel/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
index 86680dd0bc..3c5d8e5d20 100644
--- a/src/corelib/kernel/qabstractitemmodel_p.h
+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qabstractproxymodel.cpp b/src/corelib/itemmodels/qabstractproxymodel.cpp
index 47810d6cc7..46678403db 100644
--- a/src/widgets/itemviews/qabstractproxymodel.cpp
+++ b/src/corelib/itemmodels/qabstractproxymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
\brief The QAbstractProxyModel class provides a base class for proxy item
models that can do sorting, filtering or other data processing tasks.
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
This class defines the standard interface that proxy models must use to be
able to interoperate correctly with other model/view components. It is not
diff --git a/src/widgets/itemviews/qabstractproxymodel.h b/src/corelib/itemmodels/qabstractproxymodel.h
index a24755b556..000fc8d0ce 100644
--- a/src/widgets/itemviews/qabstractproxymodel.h
+++ b/src/corelib/itemmodels/qabstractproxymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,14 +48,14 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
+QT_MODULE(Core)
#ifndef QT_NO_PROXYMODEL
class QAbstractProxyModelPrivate;
class QItemSelection;
-class Q_WIDGETS_EXPORT QAbstractProxyModel : public QAbstractItemModel
+class Q_CORE_EXPORT QAbstractProxyModel : public QAbstractItemModel
{
Q_OBJECT
diff --git a/src/widgets/itemviews/qabstractproxymodel_p.h b/src/corelib/itemmodels/qabstractproxymodel_p.h
index 9bd38d1cdc..7d6e49a235 100644
--- a/src/widgets/itemviews/qabstractproxymodel_p.h
+++ b/src/corelib/itemmodels/qabstractproxymodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
-class QAbstractProxyModelPrivate : public QAbstractItemModelPrivate
+class Q_CORE_EXPORT QAbstractProxyModelPrivate : public QAbstractItemModelPrivate
{
Q_DECLARE_PUBLIC(QAbstractProxyModel)
public:
diff --git a/src/widgets/itemviews/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp
index c891565794..6edb5df0fb 100644
--- a/src/widgets/itemviews/qidentityproxymodel.cpp
+++ b/src/corelib/itemmodels/qidentityproxymodel.cpp
@@ -90,7 +90,7 @@ class QIdentityProxyModelPrivate : public QAbstractProxyModelPrivate
\brief The QIdentityProxyModel class proxies its source model unmodified
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
QIdentityProxyModel can be used to forward the structure of a source model exactly, with no sorting, filtering or other transformation.
This is similar in concept to an identity matrix where A.I = A.
diff --git a/src/widgets/itemviews/qidentityproxymodel.h b/src/corelib/itemmodels/qidentityproxymodel.h
index 8a8422244f..9d3c085829 100644
--- a/src/widgets/itemviews/qidentityproxymodel.h
+++ b/src/corelib/itemmodels/qidentityproxymodel.h
@@ -43,7 +43,7 @@
#ifndef QIDENTITYPROXYMODEL_H
#define QIDENTITYPROXYMODEL_H
-#include <QtWidgets/qabstractproxymodel.h>
+#include <QtCore/qabstractproxymodel.h>
#ifndef QT_NO_IDENTITYPROXYMODEL
@@ -51,11 +51,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
+QT_MODULE(Core)
class QIdentityProxyModelPrivate;
-class Q_WIDGETS_EXPORT QIdentityProxyModel : public QAbstractProxyModel
+class Q_CORE_EXPORT QIdentityProxyModel : public QAbstractProxyModel
{
Q_OBJECT
public:
diff --git a/src/widgets/itemviews/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index 08470a4300..3321735498 100644
--- a/src/widgets/itemviews/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
range of selected items in a model.
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
A QItemSelectionRange contains information about a range of
selected items in a model. A range of items is a contiguous array
@@ -331,7 +331,7 @@ QModelIndexList QItemSelectionRange::indexes() const
\brief The QItemSelection class manages information about selected items in a model.
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
A QItemSelection describes the items in a model that have been
selected by the user. A QItemSelection is basically a list of
@@ -921,7 +921,7 @@ void QItemSelectionModelPrivate::_q_layoutChanged()
\brief The QItemSelectionModel class keeps track of a view's selected items.
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
A QItemSelectionModel keeps track of the selected items in a view, or
in several views onto the same model. It also keeps track of the
diff --git a/src/widgets/itemviews/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index ea0528a590..3b3fa8d1e8 100644
--- a/src/widgets/itemviews/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,11 +51,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
+QT_MODULE(Core)
#ifndef QT_NO_ITEMVIEWS
-class Q_WIDGETS_EXPORT QItemSelectionRange
+class Q_CORE_EXPORT QItemSelectionRange
{
public:
@@ -148,7 +148,7 @@ inline QItemSelectionRange::QItemSelectionRange(const QModelIndex &atopLeft,
class QItemSelection;
class QItemSelectionModelPrivate;
-class Q_WIDGETS_EXPORT QItemSelectionModel : public QObject
+class Q_CORE_EXPORT QItemSelectionModel : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QItemSelectionModel)
@@ -229,7 +229,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags)
// dummy implentation of qHash() necessary for instantiating QList<QItemSelectionRange>::toSet() with MSVC
inline uint qHash(const QItemSelectionRange &) { return 0; }
-class Q_WIDGETS_EXPORT QItemSelection : public QList<QItemSelectionRange>
+class Q_CORE_EXPORT QItemSelection : public QList<QItemSelectionRange>
{
public:
QItemSelection() {}
@@ -244,7 +244,7 @@ public:
};
#ifndef QT_NO_DEBUG_STREAM
-Q_WIDGETS_EXPORT QDebug operator<<(QDebug, const QItemSelectionRange &);
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QItemSelectionRange &);
#endif
#endif // QT_NO_ITEMVIEWS
diff --git a/src/widgets/itemviews/qitemselectionmodel_p.h b/src/corelib/itemmodels/qitemselectionmodel_p.h
index 5eb9ecccda..919c4fab05 100644
--- a/src/widgets/itemviews/qitemselectionmodel_p.h
+++ b/src/corelib/itemmodels/qitemselectionmodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index f29ad7bc57..3a63c923d3 100644
--- a/src/widgets/itemviews/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1345,7 +1345,7 @@ void QSortFilterProxyModelPrivate::_q_sourceRowsRemoved(
}
void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeMoved(
- const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
+ const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
{
Q_Q(QSortFilterProxyModel);
// Because rows which are contiguous in the source model might not be contiguous
@@ -1367,7 +1367,7 @@ void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeMoved(
}
void QSortFilterProxyModelPrivate::_q_sourceRowsMoved(
- const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
+ const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
{
Q_Q(QSortFilterProxyModel);
@@ -1449,7 +1449,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved(
}
void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeMoved(
- const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
+ const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
{
Q_Q(QSortFilterProxyModel);
@@ -1467,7 +1467,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeMoved(
}
void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
- const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
+ const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
{
Q_Q(QSortFilterProxyModel);
@@ -1496,7 +1496,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
filtering data passed between another model and a view.
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
QSortFilterProxyModel can be used for sorting items, filtering out items,
or both. The model transforms the structure of a source model by mapping
@@ -1528,7 +1528,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
or vice versa, use mapToSource(), mapFromSource(), mapSelectionToSource(),
and mapSelectionFromSource().
- \note By default, the model does not dynamically re-sort and re-filter data
+ \note By default, the model dynamically re-sorts and re-filters data
whenever the original model changes. This behavior can be changed by
setting the \l{QSortFilterProxyModel::dynamicSortFilter}{dynamicSortFilter}
property.
@@ -1657,7 +1657,7 @@ QSortFilterProxyModel::QSortFilterProxyModel(QObject *parent)
d->sort_localeaware = false;
d->filter_column = 0;
d->filter_role = Qt::DisplayRole;
- d->dynamic_sortfilter = false;
+ d->dynamic_sortfilter = true;
connect(this, SIGNAL(modelReset()), this, SLOT(_q_clearMapping()));
}
@@ -2402,7 +2402,7 @@ void QSortFilterProxyModel::setFilterFixedString(const QString &pattern)
call \l{QSortFilterProxyModel::}{sort()} after adding items to the
QComboBox.
- The default value is false.
+ The default value is true.
*/
bool QSortFilterProxyModel::dynamicSortFilter() const
{
diff --git a/src/widgets/itemviews/qsortfilterproxymodel.h b/src/corelib/itemmodels/qsortfilterproxymodel.h
index bbeec1470c..c8cd581420 100644
--- a/src/widgets/itemviews/qsortfilterproxymodel.h
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,7 @@
#ifndef QSORTFILTERPROXYMODEL_H
#define QSORTFILTERPROXYMODEL_H
-#include <QtWidgets/qabstractproxymodel.h>
+#include <QtCore/qabstractproxymodel.h>
#ifndef QT_NO_SORTFILTERPROXYMODEL
@@ -52,13 +52,13 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
+QT_MODULE(Core)
class QSortFilterProxyModelPrivate;
class QSortFilterProxyModelLessThan;
class QSortFilterProxyModelGreaterThan;
-class Q_WIDGETS_EXPORT QSortFilterProxyModel : public QAbstractProxyModel
+class Q_CORE_EXPORT QSortFilterProxyModel : public QAbstractProxyModel
{
friend class QSortFilterProxyModelLessThan;
friend class QSortFilterProxyModelGreaterThan;
diff --git a/src/widgets/itemviews/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp
index 9faaca0dd4..5e72977d20 100644
--- a/src/widgets/itemviews/qstringlistmodel.cpp
+++ b/src/corelib/itemmodels/qstringlistmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,6 +45,8 @@
#include "qstringlistmodel.h"
+#include <QtCore/qvector.h>
+
#ifndef QT_NO_STRINGLISTMODEL
QT_BEGIN_NAMESPACE
@@ -54,7 +56,7 @@ QT_BEGIN_NAMESPACE
\brief The QStringListModel class provides a model that supplies strings to views.
\ingroup model-view
- \inmodule QtWidgets
+ \inmodule QtCore
QStringListModel is an editable model that can be used for simple
cases where you need to display a number of strings in a view
diff --git a/src/widgets/itemviews/qstringlistmodel.h b/src/corelib/itemmodels/qstringlistmodel.h
index 5efed8753e..c70072de9e 100644
--- a/src/widgets/itemviews/qstringlistmodel.h
+++ b/src/corelib/itemmodels/qstringlistmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,18 +42,18 @@
#ifndef QSTRINGLISTMODEL_H
#define QSTRINGLISTMODEL_H
+#include <QtCore/qabstractitemmodel.h>
#include <QtCore/qstringlist.h>
-#include <QtWidgets/qabstractitemview.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
+QT_MODULE(Core)
#ifndef QT_NO_STRINGLISTMODEL
-class Q_WIDGETS_EXPORT QStringListModel : public QAbstractListModel
+class Q_CORE_EXPORT QStringListModel : public QAbstractListModel
{
Q_OBJECT
public:
diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri
index 8b69d771b7..1139e3074a 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -2,8 +2,6 @@
HEADERS += \
kernel/qabstracteventdispatcher.h \
- kernel/qabstractitemmodel.h \
- kernel/qabstractitemmodel_p.h \
kernel/qbasictimer.h \
kernel/qeventloop.h\
kernel/qpointer.h \
@@ -42,7 +40,6 @@ HEADERS += \
SOURCES += \
kernel/qabstracteventdispatcher.cpp \
- kernel/qabstractitemmodel.cpp \
kernel/qbasictimer.cpp \
kernel/qeventloop.cpp \
kernel/qcoreapplication.cpp \
@@ -102,46 +99,31 @@ nacl {
kernel/qfunctions_nacl.h
}
-unix:!symbian {
- SOURCES += \
- kernel/qcore_unix.cpp \
- kernel/qcrashhandler.cpp \
- kernel/qsharedmemory_unix.cpp \
- kernel/qsystemsemaphore_unix.cpp
- HEADERS += \
- kernel/qcore_unix_p.h \
- kernel/qcrashhandler_p.h
-
- contains(QT_CONFIG, glib) {
- SOURCES += \
- kernel/qeventdispatcher_glib.cpp
- HEADERS += \
- kernel/qeventdispatcher_glib_p.h
- QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
- LIBS_PRIVATE +=$$QT_LIBS_GLIB
- }
- SOURCES += \
- kernel/qeventdispatcher_unix.cpp
- HEADERS += \
- kernel/qeventdispatcher_unix_p.h
+unix|integrity {
+ SOURCES += \
+ kernel/qcore_unix.cpp \
+ kernel/qcrashhandler.cpp \
+ kernel/qsharedmemory_unix.cpp \
+ kernel/qsystemsemaphore_unix.cpp \
+ kernel/qeventdispatcher_unix.cpp \
+ kernel/qtimerinfo_unix.cpp
- contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri)
-}
+ HEADERS += \
+ kernel/qcore_unix_p.h \
+ kernel/qcrashhandler_p.h \
+ kernel/qeventdispatcher_unix_p.h \
+ kernel/qtimerinfo_unix_p.h
-symbian {
+ contains(QT_CONFIG, glib) {
SOURCES += \
- kernel/qcore_unix.cpp \
- kernel/qcrashhandler.cpp \
- kernel/qeventdispatcher_symbian.cpp \
- kernel/qcore_symbian_p.cpp \
- kernel/qsharedmemory_symbian.cpp \
- kernel/qsystemsemaphore_symbian.cpp
-
+ kernel/qeventdispatcher_glib.cpp
HEADERS += \
- kernel/qcore_unix_p.h \
- kernel/qcrashhandler_p.h \
- kernel/qeventdispatcher_symbian_p.h \
- kernel/qcore_symbian_p.h
+ kernel/qeventdispatcher_glib_p.h
+ QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
+ LIBS_PRIVATE +=$$QT_LIBS_GLIB
+ }
+
+ contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri)
}
vxworks {
@@ -151,19 +133,3 @@ vxworks {
kernel/qfunctions_vxworks.h
}
-
-integrity {
- SOURCES += \
- kernel/qcore_unix.cpp \
- kernel/qcrashhandler.cpp \
- kernel/qsharedmemory_unix.cpp \
- kernel/qsystemsemaphore_unix.cpp \
- kernel/qeventdispatcher_unix.cpp
- HEADERS += \
- kernel/qcore_unix_p.h \
- kernel/qcrashhandler_p.h \
- kernel/qeventdispatcher_unix_p.h
-
- contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri)
-}
-
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index b936ac4ed2..1d4bf3cf1f 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -96,7 +96,10 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
{
- timerIdFreeList()->release(timerId);
+ // this function may be called by a global destructor after
+ // timerIdFreeList() has been destructed
+ if (QtTimerIdFreeList *fl = timerIdFreeList())
+ fl->release(timerId);
}
/*!
@@ -230,22 +233,39 @@ QAbstractEventDispatcher *QAbstractEventDispatcher::instance(QThread *thread)
*/
/*!
+ \obsolete
+
\fn int QAbstractEventDispatcher::registerTimer(int interval, QObject *object)
- Registers a timer with the specified \a interval for the given \a object.
+ Registers a timer with the specified \a interval for the given \a object
+ and returns the timer id.
+*/
+
+/*!
+ \obsolete
+
+ \fn void QAbstractEventDispatcher::registerTimer(int timerId, int interval, QObject *object)
+
+ Register a timer with the specified \a timerId and \a interval for the
+ given \a object.
+*/
+
+/*!
+ Registers a timer with the specified \a interval and \a timerType for the
+ given \a object and returns the timer id.
*/
-int QAbstractEventDispatcher::registerTimer(int interval, QObject *object)
+int QAbstractEventDispatcher::registerTimer(int interval, Qt::TimerType timerType, QObject *object)
{
int id = QAbstractEventDispatcherPrivate::allocateTimerId();
- registerTimer(id, interval, object);
+ registerTimer(id, interval, timerType, object);
return id;
}
/*!
- \fn void QAbstractEventDispatcher::registerTimer(int timerId, int interval, QObject *object)
+ \fn void QAbstractEventDispatcher::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object)
- Register a timer with the specified \a timerId and \a interval for
- the given \a object.
+ Register a timer with the specified \a timerId, \a interval, and \a
+ timerType for the given \a object.
*/
/*!
@@ -269,8 +289,10 @@ int QAbstractEventDispatcher::registerTimer(int interval, QObject *object)
/*!
\fn QList<TimerInfo> QAbstractEventDispatcher::registeredTimers(QObject *object) const
- Returns a list of registered timers for \a object. The timer ID
- is the first member in each pair; the interval is the second.
+ Returns a list of registered timers for \a object. The TimerInfo struct has
+ \c timerId, \c interval, and \c timerType members.
+
+ \sa Qt::TimerType
*/
/*! \fn void QAbstractEventDispatcher::wakeUp()
diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h
index 36bd1be368..80e77c02af 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.h
+++ b/src/corelib/kernel/qabstracteventdispatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,6 @@ QT_MODULE(Core)
class QAbstractEventDispatcherPrivate;
class QSocketNotifier;
-template <typename T1, typename T2> struct QPair;
class Q_CORE_EXPORT QAbstractEventDispatcher : public QObject
{
@@ -61,7 +60,16 @@ class Q_CORE_EXPORT QAbstractEventDispatcher : public QObject
Q_DECLARE_PRIVATE(QAbstractEventDispatcher)
public:
- typedef QPair<int, int> TimerInfo;
+ struct TimerInfo
+ {
+ int timerId;
+ int interval;
+ Qt::TimerType timerType;
+
+ inline TimerInfo(int id, int i, Qt::TimerType t)
+ : timerId(id), interval(i), timerType(t)
+ { }
+ };
explicit QAbstractEventDispatcher(QObject *parent = 0);
~QAbstractEventDispatcher();
@@ -74,8 +82,14 @@ public:
virtual void registerSocketNotifier(QSocketNotifier *notifier) = 0;
virtual void unregisterSocketNotifier(QSocketNotifier *notifier) = 0;
- int registerTimer(int interval, QObject *object);
- virtual void registerTimer(int timerId, int interval, QObject *object) = 0;
+#if QT_DEPRECATED_SINCE(5,0)
+ QT_DEPRECATED inline int registerTimer(int interval, QObject *object)
+ { return registerTimer(interval, Qt::CoarseTimer, object); }
+ QT_DEPRECATED inline void registerTimer(int timerId, int interval, QObject *object)
+ { registerTimer(timerId, interval, Qt::CoarseTimer, object); }
+#endif
+ int registerTimer(int interval, Qt::TimerType timerType, QObject *object);
+ virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) = 0;
virtual bool unregisterTimer(int timerId) = 0;
virtual bool unregisterTimers(QObject *object) = 0;
virtual QList<TimerInfo> registeredTimers(QObject *object) const = 0;
diff --git a/src/corelib/kernel/qabstracteventdispatcher_p.h b/src/corelib/kernel/qabstracteventdispatcher_p.h
index 31c579d865..6e1c81ae33 100644
--- a/src/corelib/kernel/qabstracteventdispatcher_p.h
+++ b/src/corelib/kernel/qabstracteventdispatcher_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp
index 8efeea6fae..a52152875f 100644
--- a/src/corelib/kernel/qbasictimer.cpp
+++ b/src/corelib/kernel/qbasictimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,8 +40,8 @@
****************************************************************************/
#include "qbasictimer.h"
-#include "qcoreapplication.h"
#include "qabstracteventdispatcher.h"
+#include "qabstracteventdispatcher_p.h"
QT_BEGIN_NAMESPACE
@@ -106,18 +106,55 @@ QT_BEGIN_NAMESPACE
/*!
\fn void QBasicTimer::start(int msec, QObject *object)
- Starts (or restarts) the timer with a \a msec milliseconds
- timeout.
+ Starts (or restarts) the timer with a \a msec milliseconds timeout. The
+ timer will be a Qt::CoarseTimer. See Qt::TimerType for information on the
+ different timer types.
The given \a object will receive timer events.
- \sa stop() isActive() QObject::timerEvent()
+ \sa stop() isActive() QObject::timerEvent() Qt::CoarseTimer
*/
void QBasicTimer::start(int msec, QObject *obj)
{
- stop();
- if (obj)
- id = obj->startTimer(msec);
+ QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
+ if (!eventDispatcher) {
+ qWarning("QBasicTimer::start: QBasicTimer can only be used with threads started with QThread");
+ return;
+ }
+ if (id) {
+ eventDispatcher->unregisterTimer(id);
+ QAbstractEventDispatcherPrivate::releaseTimerId(id);
+ }
+ id = 0;
+ if (obj)
+ id = eventDispatcher->registerTimer(msec, Qt::CoarseTimer, obj);
+}
+
+/*!
+ \overload
+
+ Starts (or restarts) the timer with a \a msec milliseconds timeout and the
+ given \a timerType. See Qt::TimerType for information on the different
+ timer types.
+
+ The given \a object will receive timer events.
+
+ \sa stop() isActive() QObject::timerEvent() Qt::TimerType
+ */
+void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj)
+{
+ QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
+ if (!eventDispatcher) {
+ qWarning("QBasicTimer::start: QBasicTimer can only be used with threads started with QThread");
+ return;
+ }
+ if (id) {
+ eventDispatcher->unregisterTimer(id);
+ QAbstractEventDispatcherPrivate::releaseTimerId(id);
+ }
+ id = 0;
+ if (obj)
+ id = eventDispatcher->registerTimer(msec, timerType, obj);
}
/*!
@@ -131,6 +168,7 @@ void QBasicTimer::stop()
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
if (eventDispatcher)
eventDispatcher->unregisterTimer(id);
+ QAbstractEventDispatcherPrivate::releaseTimerId(id);
}
id = 0;
}
diff --git a/src/corelib/kernel/qbasictimer.h b/src/corelib/kernel/qbasictimer.h
index f13848cb85..84b232e766 100644
--- a/src/corelib/kernel/qbasictimer.h
+++ b/src/corelib/kernel/qbasictimer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,7 @@
#define QBASICTIMER_H
#include <QtCore/qglobal.h>
+#include <QtCore/qnamespace.h>
QT_BEGIN_HEADER
@@ -63,6 +64,7 @@ public:
inline int timerId() const { return id; }
void start(int msec, QObject *obj);
+ void start(int msec, Qt::TimerType timerType, QObject *obj);
void stop();
};
Q_DECLARE_TYPEINFO(QBasicTimer, Q_MOVABLE_TYPE);
diff --git a/src/corelib/kernel/qcore_mac.cpp b/src/corelib/kernel/qcore_mac.cpp
index 0814c1aec7..88cc83ce48 100644
--- a/src/corelib/kernel/qcore_mac.cpp
+++ b/src/corelib/kernel/qcore_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index adbad83cad..4efd6bf653 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
deleted file mode 100644
index 5b52ec22a1..0000000000
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <exception>
-#include <e32base.h>
-#include <e32uid.h>
-#include "qcore_symbian_p.h"
-#include <string>
-#include <in_sock.h>
-
-QT_BEGIN_NAMESPACE
-
-/*
- Helper function for calling into Symbian classes that expect a TDes&.
- This function converts a QString to a TDes by allocating memory that
- must be deleted by the caller.
-*/
-
-Q_CORE_EXPORT HBufC* qt_QString2HBufC(const QString& aString)
-{
- HBufC *buffer;
-#ifdef QT_NO_UNICODE
- TPtrC8 ptr(reinterpret_cast<const TUint8*>(aString.toLocal8Bit().constData()));
-#else
- TPtrC16 ptr(qt_QString2TPtrC(aString));
-#endif
- buffer = HBufC::New(ptr.Length());
- Q_CHECK_PTR(buffer);
- buffer->Des().Copy(ptr);
- return buffer;
-}
-
-Q_CORE_EXPORT QString qt_TDesC2QString(const TDesC& aDescriptor)
-{
-#ifdef QT_NO_UNICODE
- return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length());
-#else
- return QString(reinterpret_cast<const QChar *>(aDescriptor.Ptr()), aDescriptor.Length());
-#endif
-}
-
-QHBufC::QHBufC()
- : m_hBufC(0)
-{
-}
-
-QHBufC::QHBufC(const QHBufC &src)
- : m_hBufC(src.m_hBufC->Alloc())
-{
- Q_CHECK_PTR(m_hBufC);
-}
-
-/*!
- \internal
- Constructs a QHBufC from an HBufC. Note that the QHBufC instance takes
- ownership of the HBufC.
-*/
-QHBufC::QHBufC(HBufC *src)
- : m_hBufC(src)
-{
-}
-
-QHBufC::QHBufC(const QString &src)
-{
- m_hBufC = qt_QString2HBufC(src);
-}
-
-QHBufC::~QHBufC()
-{
- if (m_hBufC)
- delete m_hBufC;
-}
-
-class QS60PluginResolver
-{
-public:
- QS60PluginResolver()
- : initTried(false) {}
-
- ~QS60PluginResolver() {
- lib.Close();
- }
-
- TLibraryFunction resolve(int ordinal) {
- if (!initTried) {
- init();
- initTried = true;
- }
-
- if (lib.Handle())
- return lib.Lookup(ordinal);
- else
- return reinterpret_cast<TLibraryFunction>(NULL);
- }
-
-private:
- void init()
- {
- _LIT(KLibName_3_1, "qts60plugin_3_1" QT_LIBINFIX_UNICODE L".dll");
- _LIT(KLibName_3_2, "qts60plugin_3_2" QT_LIBINFIX_UNICODE L".dll");
- _LIT(KLibName_5_0, "qts60plugin_5_0" QT_LIBINFIX_UNICODE L".dll");
-
- TPtrC libName;
- TInt uidValue;
- switch (QSysInfo::s60Version()) {
- case QSysInfo::SV_S60_3_1:
- libName.Set(KLibName_3_1);
- uidValue = 0x2001E620;
- break;
- case QSysInfo::SV_S60_3_2:
- libName.Set(KLibName_3_2);
- uidValue = 0x2001E621;
- break;
- case QSysInfo::SV_S60_5_0: // Fall through to default
- default:
- // Default to 5.0 version, as any unknown platform is likely to be newer than that
- libName.Set(KLibName_5_0);
- uidValue = 0x2001E622;
- break;
- }
-
- TUidType libUid(KDynamicLibraryUid, KSharedLibraryUid, TUid::Uid(uidValue));
- lib.Load(libName, libUid);
-
- // Duplicate lib handle to enable process wide access to it. Since Duplicate overwrites
- // existing handle without closing it, store original for subsequent closing.
- RLibrary origHandleCloser = lib;
- lib.Duplicate(RThread(), EOwnerProcess);
- origHandleCloser.Close();
- }
-
- RLibrary lib;
- bool initTried;
-};
-
-Q_GLOBAL_STATIC(QS60PluginResolver, qt_s60_plugin_resolver);
-
-/*!
- \internal
- Resolves a platform version specific function from S60 plugin.
- If plugin is missing or resolving fails for another reason, NULL is returned.
-*/
-Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal)
-{
- return qt_s60_plugin_resolver()->resolve(ordinal);
-}
-
-class QS60RFsSession
-{
-public:
- QS60RFsSession() {
- qt_symbian_throwIfError(iFs.Connect());
- qt_symbian_throwIfError(iFs.ShareProtected());
- }
-
- ~QS60RFsSession() {
- iFs.Close();
- }
-
- RFs& GetRFs() {
- return iFs;
- }
-
-private:
-
- RFs iFs;
-};
-
-uint qHash(const RSubSessionBase& key)
-{
- return qHash(key.SubSessionHandle());
-}
-
-Q_GLOBAL_STATIC(QS60RFsSession, qt_s60_RFsSession);
-
-Q_CORE_EXPORT RFs& qt_s60GetRFs()
-{
- return qt_s60_RFsSession()->GetRFs();
-}
-
-QSymbianSocketManager::QSymbianSocketManager() :
- iNextSocket(0), iDefaultConnection(0)
-{
- TSessionPref preferences;
- // ### In future this could be changed to KAfInet6 when that is more common than IPv4
- preferences.iAddrFamily = KAfInet;
- preferences.iProtocol = KProtocolInetIp;
- //use global message pool, as we do not know how many sockets app will use
- //TODO: is this the right choice?
- qt_symbian_throwIfError(iSocketServ.Connect(preferences, -1));
- qt_symbian_throwIfError(iSocketServ.ShareAuto());
-}
-
-QSymbianSocketManager::~QSymbianSocketManager()
-{
- iSocketServ.Close();
- if(!socketMap.isEmpty()) {
- qWarning("leaked %d sockets on exit", socketMap.count());
- }
-}
-
-RSocketServ& QSymbianSocketManager::getSocketServer() {
- return iSocketServ;
-}
-
-int QSymbianSocketManager::addSocket(const RSocket& socket) {
- QHashableSocket sock(static_cast<const QHashableSocket &>(socket));
- QMutexLocker l(&iMutex);
- Q_ASSERT(!socketMap.contains(sock));
- if(socketMap.contains(sock))
- return socketMap.value(sock);
- // allocate socket number
- int guard = 0;
- while(reverseSocketMap.contains(iNextSocket)) {
- iNextSocket++;
- iNextSocket %= max_sockets;
- guard++;
- if(guard > max_sockets)
- return -1;
- }
- int id = iNextSocket;
-
- socketMap[sock] = id;
- reverseSocketMap[id] = sock;
- return id + socket_offset;
-}
-
-bool QSymbianSocketManager::removeSocket(const RSocket &socket) {
- QHashableSocket sock(static_cast<const QHashableSocket &>(socket));
- QMutexLocker l(&iMutex);
- if(!socketMap.contains(sock))
- return false;
- int id = socketMap.value(sock);
- socketMap.remove(sock);
- reverseSocketMap.remove(id);
- return true;
-}
-
-int QSymbianSocketManager::lookupSocket(const RSocket& socket) const {
- QHashableSocket sock(static_cast<const QHashableSocket &>(socket));
- QMutexLocker l(&iMutex);
- if(!socketMap.contains(sock))
- return -1;
- int id = socketMap.value(sock);
- return id + socket_offset;
-}
-
-bool QSymbianSocketManager::lookupSocket(int fd, RSocket& socket) const {
- QMutexLocker l(&iMutex);
- int id = fd - socket_offset;
- if(!reverseSocketMap.contains(id))
- return false;
- socket = reverseSocketMap.value(id);
- return true;
-}
-
-void QSymbianSocketManager::setDefaultConnection(RConnection* con)
-{
- iDefaultConnection = con;
-}
-
-RConnection* QSymbianSocketManager::defaultConnection() const
-{
- return iDefaultConnection;
-}
-
-Q_GLOBAL_STATIC(QSymbianSocketManager, qt_symbianSocketManager);
-
-QSymbianSocketManager& QSymbianSocketManager::instance()
-{
- return *(qt_symbianSocketManager());
-}
-
-Q_CORE_EXPORT RSocketServ& qt_symbianGetSocketServer()
-{
- return QSymbianSocketManager::instance().getSocketServer();
-}
-
-QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h
deleted file mode 100644
index 84c6fed4db..0000000000
--- a/src/corelib/kernel/qcore_symbian_p.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QCORE_SYMBIAN_P_H
-#define QCORE_SYMBIAN_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <e32std.h>
-#include <QtCore/qglobal.h>
-#include <QtCore/qmutex.h>
-#include <qstring.h>
-#include <qrect.h>
-#include <qhash.h>
-#include <f32file.h>
-#include <es_sock.h>
-
-#define QT_LSTRING2(x) L##x
-#define QT_LSTRING(x) QT_LSTRING2(x)
-
-#if defined(QT_LIBINFIX)
-# define QT_LIBINFIX_UNICODE QT_LSTRING(QT_LIBINFIX)
-#else
-# define QT_LIBINFIX_UNICODE L""
-#endif
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-Q_CORE_EXPORT HBufC* qt_QString2HBufC(const QString& aString);
-
-Q_CORE_EXPORT QString qt_TDesC2QString(const TDesC& aDescriptor);
-inline QString qt_TDes2QString(const TDes& aDescriptor) { return qt_TDesC2QString(aDescriptor); }
-
-static inline QSize qt_TSize2QSize(const TSize& ts)
-{
- return QSize(ts.iWidth, ts.iHeight);
-}
-
-static inline TSize qt_QSize2TSize(const QSize& qs)
-{
- return TSize(qs.width(), qs.height());
-}
-
-static inline QRect qt_TRect2QRect(const TRect& tr)
-{
- return QRect(tr.iTl.iX, tr.iTl.iY, tr.Width(), tr.Height());
-}
-
-static inline TRect qt_QRect2TRect(const QRect& qr)
-{
- return TRect(TPoint(qr.left(), qr.top()), TSize(qr.width(), qr.height()));
-}
-
-// Returned TPtrC is valid as long as the given parameter is valid and unmodified
-static inline TPtrC qt_QString2TPtrC( const QString& string )
-{
- return TPtrC16(static_cast<const TUint16*>(string.utf16()), string.length());
-}
-
-/*!
- \internal
- This class is a wrapper around the Symbian HBufC descriptor class.
- It makes sure that the heap allocated HBufC class is freed when it is
- destroyed.
-*/
-class Q_CORE_EXPORT QHBufC
-{
-public:
- QHBufC();
- QHBufC(const QHBufC &src);
- QHBufC(HBufC *src);
- QHBufC(const QString &src);
- ~QHBufC();
-
- inline operator HBufC *() { return m_hBufC; }
- inline operator const HBufC *() const { return m_hBufC; }
- inline HBufC *data() { return m_hBufC; }
- inline const HBufC *data() const { return m_hBufC; }
- inline HBufC & operator*() { return *m_hBufC; }
- inline const HBufC & operator*() const { return *m_hBufC; }
- inline HBufC * operator->() { return m_hBufC; }
- inline const HBufC * operator->() const { return m_hBufC; }
-
- inline bool operator==(const QHBufC &param) const { return data() == param.data(); }
- inline bool operator!=(const QHBufC &param) const { return data() != param.data(); }
-
-private:
- HBufC *m_hBufC;
-};
-
-inline uint qHash(TUid uid)
-{
- return qHash(uid.iUid);
-}
-
-// S60 version specific function ordinals that can be resolved
-enum S60PluginFuncOrdinals
-{
- S60Plugin_TimeFormatL = 1,
- S60Plugin_GetTimeFormatSpec = 2,
- S60Plugin_GetLongDateFormatSpec = 3,
- S60Plugin_GetShortDateFormatSpec = 4,
- S60Plugin_LocalizedDirectoryName = 5,
- S60Plugin_GetSystemDrive = 6
-};
-
-Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal);
-
-Q_CORE_EXPORT RFs& qt_s60GetRFs();
-Q_CORE_EXPORT RSocketServ& qt_symbianGetSocketServer();
-
-// Defined in qlocale_symbian.cpp.
-Q_CORE_EXPORT QByteArray qt_symbianLocaleName(int code);
-
-template <typename R>
-struct QScopedPointerRCloser
-{
- static inline void cleanup(R *rPointer)
- {
- // Enforce a complete type.
- // If you get a compile error here, read the section on forward declared
- // classes in the QScopedPointer documentation.
- typedef char IsIncompleteType[ sizeof(R) ? 1 : -1 ];
- (void) sizeof(IsIncompleteType);
-
- if (rPointer)
- rPointer->Close();
- }
-};
-
-//Wrapper for RSocket so it can be used as a key in QHash or QMap
-class QHashableSocket : public RSocket
-{
-public:
- bool operator==(const QHashableSocket &other) const
- {
- return SubSessionHandle() == other.SubSessionHandle()
- && Session().Handle() == other.Session().Handle();
- }
- bool operator<(const QHashableSocket &other) const
- {
- if (Session().Handle() == other.Session().Handle())
- return SubSessionHandle() < other.SubSessionHandle();
- return Session().Handle() < other.Session().Handle();
- }
-};
-
-uint qHash(const RSubSessionBase& key);
-
-/*!
- \internal
- This class exists in QtCore for the benefit of QSocketNotifier, which uses integer
- file descriptors in its public API.
- So we need a way to map between int and RSocket.
- Additionally, it is used to host the global RSocketServ session
-*/
-class Q_CORE_EXPORT QSymbianSocketManager
-{
-public:
- QSymbianSocketManager();
- ~QSymbianSocketManager();
-
- /*!
- \internal
- \return handle to the socket server
- */
- RSocketServ& getSocketServer();
- /*!
- \internal
- Adds a symbian socket to the global map
- \param an open socket
- \return pseudo file descriptor, -1 if out of resources
- */
- int addSocket(const RSocket &sock);
- /*!
- \internal
- Removes a symbian socket from the global map
- \param an open socket
- \return true if the socket was in the map
- */
- bool removeSocket(const RSocket &sock);
- /*!
- \internal
- Get pseudo file descriptor for a socket
- \param an open socket
- \return integer handle, or -1 if not in map
- */
- int lookupSocket(const RSocket &sock) const;
- /*!
- \internal
- Get socket for a pseudo file descriptor
- \param an open socket fd
- \param sock (out) socket handle
- \return true on success or false if not in map
- */
- bool lookupSocket(int fd, RSocket& sock) const;
-
- /*!
- \internal
- Set the default connection to use for new sockets
- \param an open connection
- */
- void setDefaultConnection(RConnection* con);
- /*!
- \internal
- Get the default connection to use for new sockets
- \return the connection, or null pointer if there is none set
- */
- RConnection *defaultConnection() const;
-
- /*!
- \internal
- Gets a reference to the singleton socket manager
- */
- static QSymbianSocketManager& instance();
-private:
- int allocateSocket();
-
- const static int max_sockets = 0x20000; //covers all TCP and UDP ports, probably run out of memory first
- const static int socket_offset = 0x40000000; //hacky way of separating sockets from file descriptors
- int iNextSocket;
- QHash<QHashableSocket, int> socketMap;
- QHash<int, RSocket> reverseSocketMap;
- mutable QMutex iMutex;
- RSocketServ iSocketServ;
- RConnection *iDefaultConnection;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif //QCORE_SYMBIAN_P_H
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index f30fceeb68..08a2f69bf3 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index e7259d29c9..9ac4f5c480 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 7ff82b1bca..05f26cc87f 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -143,7 +143,7 @@ static inline void qt_init_symbian_apa_arguments(int &argc, char **&argv)
TPtrC8 apaCmdLine = commandLine->TailEnd();
int tailLen = apaCmdLine.Length();
if (tailLen) {
- apaTail = reinterpret_cast<char *>(qMalloc(tailLen + 1));
+ apaTail = reinterpret_cast<char *>(malloc(tailLen + 1));
qMemCopy(apaTail, reinterpret_cast<const char *>(apaCmdLine.Ptr()), tailLen);
apaTail[tailLen] = '\0';
apaArgv = new QVector<char *>(8);
@@ -300,7 +300,7 @@ Q_CORE_EXPORT uint qGlobalPostedEventsCount()
QCoreApplication *QCoreApplication::self = 0;
QAbstractEventDispatcher *QCoreApplicationPrivate::eventDispatcher = 0;
-uint QCoreApplicationPrivate::attribs;
+uint QCoreApplicationPrivate::attribs = (1 << Qt::AA_SynthesizeMouseForUnhandledTouchEvents);
#ifdef Q_OS_UNIX
Qt::HANDLE qt_application_thread_id = 0;
@@ -802,26 +802,7 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
QObjectPrivate *d = receiver->d_func();
QThreadData *threadData = d->threadData;
QScopedLoopLevelCounter loopLevelCounter(threadData);
-
-#ifdef QT_JAMBI_BUILD
- int deleteWatch = 0;
- int *oldDeleteWatch = QObjectPrivate::setDeleteWatch(d, &deleteWatch);
-
- bool inEvent = d->inEventHandler;
- d->inEventHandler = true;
-#endif
-
- bool returnValue;
- returnValue = notify(receiver, event);
-
-#ifdef QT_JAMBI_BUILD
- // Restore the previous state if the object was not deleted..
- if (!deleteWatch) {
- d->inEventHandler = inEvent;
- }
- QObjectPrivate::resetDeleteWatch(d, oldDeleteWatch, deleteWatch);
-#endif
- return returnValue;
+ return notify(receiver, event);
}
@@ -1424,9 +1405,18 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
if (!allowDeferredDelete) {
// cannot send deferred delete
if (!event_type && !receiver) {
- // don't lose the event
- data->postEventList.addEvent(pe);
+ // we must copy it first; we want to re-post the event
+ // with the event pointer intact, but we can't delay
+ // nulling the event ptr until after re-posting, as
+ // addEvent may invalidate pe.
+ QPostEvent pe_copy = pe;
+
+ // null out the event so if sendPostedEvents recurses, it
+ // will ignore this one, as it's been re-posted.
const_cast<QPostEvent &>(pe).event = 0;
+
+ // re-post the copied event so it isn't lost
+ data->postEventList.addEvent(pe_copy);
}
continue;
}
@@ -1528,7 +1518,7 @@ void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)
const_cast<QPostEvent &>(pe).event = 0;
} else if (!data->postEventList.recursion) {
if (i != j)
- data->postEventList.swap(i, j);
+ qSwap(data->postEventList[i], data->postEventList[j]);
++j;
}
}
@@ -1842,9 +1832,9 @@ bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator)
/*!
Returns the directory that contains the application executable.
- For example, if you have installed Qt in the \c{C:\Trolltech\Qt}
+ For example, if you have installed Qt in the \c{C:\Qt}
directory, and you run the \c{regexp} example, this function will
- return "C:/Trolltech/Qt/examples/tools/regexp".
+ return "C:/Qt/examples/tools/regexp".
On Mac OS X this will point to the directory actually containing the
executable, which may be inside of an application bundle (if the
@@ -2587,6 +2577,14 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
\sa Q_OBJECT, QObject::tr(), QObject::trUtf8()
*/
+/*!
+ \enum QCoreApplication::Type
+
+ \value Tty a console application
+ \value GuiClient a GUI application
+ \value GuiServer \e{Deprecated.} this value is only left for compatibility.
+*/
+
QT_END_NAMESPACE
#include "moc_qcoreapplication.cpp"
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 3d6aa170fd..abbc6e5821 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -78,6 +78,12 @@ public:
enum { ApplicationFlags = QT_VERSION
};
+ enum Type {
+ Tty,
+ GuiClient,
+ GuiServer // # deprecated
+ };
+
QCoreApplication(int &argc, char **argv, int = ApplicationFlags);
~QCoreApplication();
diff --git a/src/corelib/kernel/qcoreapplication_mac.cpp b/src/corelib/kernel/qcoreapplication_mac.cpp
index 8fec4bfcb2..289c2f4bdb 100644
--- a/src/corelib/kernel/qcoreapplication_mac.cpp
+++ b/src/corelib/kernel/qcoreapplication_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index d61a5a1bf5..692e460114 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index 1b51e6f568..3cba628a41 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcorecmdlineargs_p.h b/src/corelib/kernel/qcorecmdlineargs_p.h
index 2081d5cc17..937c9898cd 100644
--- a/src/corelib/kernel/qcorecmdlineargs_p.h
+++ b/src/corelib/kernel/qcorecmdlineargs_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 213f0e4a58..bf8207283b 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -108,7 +108,6 @@ QT_BEGIN_NAMESPACE
\value ApplicationPaletteChange The default application palette has changed.
\value ApplicationWindowIconChange The application's icon has changed.
\value ChildAdded An object gets a child (QChildEvent).
- \value ChildInserted An object gets a child (QChildEvent). Qt3Support only, use ChildAdded instead.
\value ChildPolished A widget child gets polished (QChildEvent).
\value ChildRemoved An object loses a child (QChildEvent).
\value Clipboard The clipboard contents have changed (QClipboardEvent).
@@ -252,8 +251,6 @@ QT_BEGIN_NAMESPACE
\omitvalue AcceptDropsChange
\omitvalue ActivateControl
\omitvalue CaptionChange
- \omitvalue ChildInsertedRequest
- \omitvalue ChildInserted
\omitvalue Create
\omitvalue DeactivateControl
\omitvalue Destroy
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index ba1106276a..cbdf13c992 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -185,9 +185,6 @@ public:
HoverLeave = 128, // mouse cursor leaves a hover widget
HoverMove = 129, // mouse cursor move inside a hover widget
- AccessibilityHelp = 119, // accessibility help text request
- AccessibilityDescription = 130, // accessibility description text request
-
// last event id used = 132
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/corelib/kernel/qcoreglobaldata.cpp b/src/corelib/kernel/qcoreglobaldata.cpp
index bac95251fd..3854f7d53a 100644
--- a/src/corelib/kernel/qcoreglobaldata.cpp
+++ b/src/corelib/kernel/qcoreglobaldata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcoreglobaldata_p.h b/src/corelib/kernel/qcoreglobaldata_p.h
index f12d42842b..7b5120a0dc 100644
--- a/src/corelib/kernel/qcoreglobaldata_p.h
+++ b/src/corelib/kernel/qcoreglobaldata_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcrashhandler.cpp b/src/corelib/kernel/qcrashhandler.cpp
index 979e215997..8f4577be24 100644
--- a/src/corelib/kernel/qcrashhandler.cpp
+++ b/src/corelib/kernel/qcrashhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qcrashhandler_p.h b/src/corelib/kernel/qcrashhandler_p.h
index 2383bb9dcc..a23dc98967 100644
--- a/src/corelib/kernel/qcrashhandler_p.h
+++ b/src/corelib/kernel/qcrashhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 0773915391..f34570007b 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -509,7 +509,7 @@ void QEventDispatcherGlib::unregisterSocketNotifier(QSocketNotifier *notifier)
}
}
-void QEventDispatcherGlib::registerTimer(int timerId, int interval, QObject *object)
+void QEventDispatcherGlib::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object)
{
#ifndef QT_NO_DEBUG
if (timerId < 1 || interval < 0 || !object) {
@@ -522,7 +522,7 @@ void QEventDispatcherGlib::registerTimer(int timerId, int interval, QObject *obj
#endif
Q_D(QEventDispatcherGlib);
- d->timerSource->timerList.registerTimer(timerId, interval, object);
+ d->timerSource->timerList.registerTimer(timerId, interval, timerType, object);
}
bool QEventDispatcherGlib::unregisterTimer(int timerId)
diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h
index 419f2f3dc0..facacb07a8 100644
--- a/src/corelib/kernel/qeventdispatcher_glib_p.h
+++ b/src/corelib/kernel/qeventdispatcher_glib_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -80,7 +80,7 @@ public:
void registerSocketNotifier(QSocketNotifier *socketNotifier);
void unregisterSocketNotifier(QSocketNotifier *socketNotifier);
- void registerTimer(int timerId, int interval, QObject *object);
+ void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object);
bool unregisterTimer(int timerId);
bool unregisterTimers(QObject *object);
QList<TimerInfo> registeredTimers(QObject *object) const;
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
deleted file mode 100644
index 1d7ecce9ae..0000000000
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ /dev/null
@@ -1,1316 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qeventdispatcher_symbian_p.h"
-#include <private/qthread_p.h>
-#include <qcoreapplication.h>
-#include <private/qcoreapplication_p.h>
-#include <qsemaphore.h>
-
-#include <unistd.h>
-#include <errno.h>
-
-QT_BEGIN_NAMESPACE
-
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
-// when the system UI is Qt based, priority drop is not needed as CPU starved processes will not be killed.
-#undef QT_SYMBIAN_PRIORITY_DROP
-#else
-#define QT_SYMBIAN_PRIORITY_DROP
-#endif
-
-#define WAKE_UP_PRIORITY CActive::EPriorityStandard
-#define TIMER_PRIORITY CActive::EPriorityHigh
-#define NULLTIMER_PRIORITY CActive::EPriorityLow
-#define COMPLETE_DEFERRED_ACTIVE_OBJECTS_PRIORITY CActive::EPriorityIdle
-
-static inline int qt_pipe_write(int socket, const char *data, qint64 len)
-{
- return ::write(socket, data, len);
-}
-#if defined(write)
-# undef write
-#endif
-
-static inline int qt_pipe_close(int socket)
-{
- return ::close(socket);
-}
-#if defined(close)
-# undef close
-#endif
-
-static inline int qt_pipe_fcntl(int socket, int command)
-{
- return ::fcntl(socket, command);
-}
-static inline int qt_pipe2_fcntl(int socket, int command, int option)
-{
- return ::fcntl(socket, command, option);
-}
-#if defined(fcntl)
-# undef fcntl
-#endif
-
-static inline int qt_socket_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
-{
- return ::select(nfds, readfds, writefds, exceptfds, timeout);
-}
-
-// This simply interrupts the select and locks the mutex until destroyed.
-class QSelectMutexGrabber
-{
-public:
- QSelectMutexGrabber(int writeFd, int readFd, QMutex *mutex)
- : m_mutex(mutex)
- {
- if (m_mutex->tryLock())
- return;
-
- char dummy = 0;
- qt_pipe_write(writeFd, &dummy, 1);
-
- m_mutex->lock();
-
- char buffer;
- while (::read(readFd, &buffer, 1) > 0) {}
- }
-
- ~QSelectMutexGrabber()
- {
- m_mutex->unlock();
- }
-
-private:
- QMutex *m_mutex;
-};
-
-/*
- * This class is designed to aid in implementing event handling in a more round robin fashion. We
- * cannot change active objects that we do not own, but the active objects that Qt owns will use
- * this as a base class with convenience functions.
- *
- * Here is how it works: On every RunL, the deriving class should call maybeQueueForLater().
- * This will return whether the active object has been queued, or whether it should run immediately.
- * Queued objects will run again after other events have been processed.
- *
- * The QCompleteDeferredAOs class is a special object that runs after all others, which will
- * reactivate the objects that were previously not run.
- */
-QActiveObject::QActiveObject(TInt priority, QEventDispatcherSymbian *dispatcher)
- : CActive(priority),
- m_dispatcher(dispatcher),
- m_hasAlreadyRun(false),
- m_hasRunAgain(false),
- m_iterationCount(1)
-{
-}
-
-QActiveObject::~QActiveObject()
-{
- if (m_hasRunAgain)
- m_dispatcher->removeDeferredActiveObject(this);
-}
-
-bool QActiveObject::maybeQueueForLater()
-{
- Q_ASSERT(!m_hasRunAgain);
-
- if (!m_hasAlreadyRun || m_dispatcher->iterationCount() != m_iterationCount) {
- // First occurrence of this event in this iteration.
- m_hasAlreadyRun = true;
- m_iterationCount = m_dispatcher->iterationCount();
- return false;
- } else {
- // The event has already occurred.
- m_dispatcher->addDeferredActiveObject(this);
- m_hasRunAgain = true;
- return true;
- }
-}
-
-bool QActiveObject::maybeDeferSocketEvent()
-{
- Q_ASSERT(!m_hasRunAgain);
- Q_ASSERT(m_dispatcher);
- if (!m_dispatcher->areSocketEventsBlocked()) {
- return false;
- }
- m_hasRunAgain = true;
- m_dispatcher->addDeferredSocketActiveObject(this);
- return true;
-}
-
-void QActiveObject::reactivateAndComplete()
-{
- TInt error = iStatus.Int();
- iStatus = KRequestPending;
- SetActive();
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, error);
-
- m_hasRunAgain = false;
- m_hasAlreadyRun = false;
-}
-
-QWakeUpActiveObject::QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher)
- : QActiveObject(WAKE_UP_PRIORITY, dispatcher)
-{
- m_hostThreadId = RThread().Id();
- CActiveScheduler::Add(this);
- iStatus = KRequestPending;
- SetActive();
-}
-
-QWakeUpActiveObject::~QWakeUpActiveObject()
-{
- Cancel();
-}
-
-void QWakeUpActiveObject::DoCancel()
-{
- if (iStatus.Int() == KRequestPending) {
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- } else if (IsActive() && m_hostThreadId != RThread().Id()) {
- // This is being cancelled in the adopted monitor thread, which can happen if an adopted thread with
- // an event loop has exited. The event loop creates an event dispatcher with this active object, which may be complete but not run on exit.
- // We force a cancellation in this thread, because a) the object cannot be deleted while active and b) without a cancellation
- // the thread semaphore will be one count down.
- // It is possible for this problem to affect other active objects. They symptom would be that finished signals
- // from adopted threads are not sent, or they arrive much later than they should.
- TRequestStatus *status = &iStatus;
- User::RequestComplete(status, KErrNone);
- }
-}
-
-void QWakeUpActiveObject::RunL()
-{
- if (maybeQueueForLater())
- return;
-
- iStatus = KRequestPending;
- SetActive();
- QT_TRYCATCH_LEAVING(m_dispatcher->wakeUpWasCalled());
-}
-
-QTimerActiveObject::QTimerActiveObject(QEventDispatcherSymbian *dispatcher, SymbianTimerInfo *timerInfo)
- : QActiveObject((timerInfo->interval) ? TIMER_PRIORITY : NULLTIMER_PRIORITY , dispatcher),
- m_timerInfo(timerInfo), m_expectedTimeSinceLastEvent(0)
-{
- // start the timeout timer to ensure initialisation
- m_timeoutTimer.start();
-}
-
-QTimerActiveObject::~QTimerActiveObject()
-{
- Cancel();
- m_rTimer.Close(); //close of null handle is safe
-}
-
-void QTimerActiveObject::DoCancel()
-{
- if (m_timerInfo->interval > 0) {
- m_rTimer.Cancel();
- } else {
- if (iStatus.Int() == KRequestPending) {
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
- }
-}
-
-void QTimerActiveObject::RunL()
-{
- int error = KErrNone;
- if (iStatus == KErrNone) {
- QT_TRYCATCH_ERROR(error, Run());
- } else {
- error = iStatus.Int();
- }
- // All Symbian error codes are negative.
- if (error < 0) {
- CActiveScheduler::Current()->Error(error); // stop and report here, as this timer will be deleted on scope exit
- }
-}
-
-#define MAX_SYMBIAN_TIMEOUT_MS 2000000
-void QTimerActiveObject::StartTimer()
-{
- if (m_timerInfo->msLeft > MAX_SYMBIAN_TIMEOUT_MS) {
- //There is loss of accuracy anyway due to needing to restart the timer every 33 minutes,
- //so the 1/64s res of After() is acceptable for these very long timers.
- m_rTimer.After(iStatus, MAX_SYMBIAN_TIMEOUT_MS * 1000);
- m_timerInfo->msLeft -= MAX_SYMBIAN_TIMEOUT_MS;
- } else {
- // this algorithm implements drift correction for repeating timers
- // calculate how late we are for this event
- int timeSinceLastEvent = m_timeoutTimer.restart();
- int overshoot = timeSinceLastEvent - m_expectedTimeSinceLastEvent;
- if (overshoot > m_timerInfo->msLeft) {
- // we skipped a whole timeout, restart from here
- overshoot = 0;
- }
- // calculate when the next event should happen
- int waitTime = m_timerInfo->msLeft - overshoot;
- m_expectedTimeSinceLastEvent = waitTime;
- // limit the actual ms wait time to avoid wild corrections
- // this will cause the real event time to slowly drift back to the expected event time
- // measurements show that Symbian timers always fire 1 or 2 ms late
- const int limit = 4;
- waitTime = qMax(m_timerInfo->msLeft - limit, waitTime);
- m_rTimer.HighRes(iStatus, waitTime * 1000);
- m_timerInfo->msLeft = 0;
- }
- SetActive();
-}
-
-void QTimerActiveObject::Run()
-{
- //restart timer immediately, if the timeout has been split because it overflows max for platform.
- if (m_timerInfo->msLeft > 0) {
- StartTimer();
- return;
- }
-
- if (maybeQueueForLater())
- return;
-
- if (m_timerInfo->interval > 0) {
- // Start a new timer immediately so that we don't lose time.
- m_timerInfo->msLeft = m_timerInfo->interval;
- StartTimer();
-
- m_timerInfo->dispatcher->timerFired(m_timerInfo->timerId);
- } else {
- // However, we only complete zero timers after the event has finished,
- // in order to prevent busy looping when doing nested loops.
-
- // Keep the refpointer around in order to avoid deletion until the end of this function.
- SymbianTimerInfoPtr timerInfoPtr(m_timerInfo);
-
- m_timerInfo->dispatcher->timerFired(m_timerInfo->timerId);
-
- iStatus = KRequestPending;
- SetActive();
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
-}
-
-void QTimerActiveObject::Start()
-{
- CActiveScheduler::Add(this);
- m_timerInfo->msLeft = m_timerInfo->interval;
- if (m_timerInfo->interval > 0) {
- if (!m_rTimer.Handle()) {
- qt_symbian_throwIfError(m_rTimer.CreateLocal());
- }
- m_timeoutTimer.start();
- m_expectedTimeSinceLastEvent = 0;
- StartTimer();
- } else {
- iStatus = KRequestPending;
- SetActive();
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
-}
-
-SymbianTimerInfo::SymbianTimerInfo()
- : timerAO(0)
-{
-}
-
-SymbianTimerInfo::~SymbianTimerInfo()
-{
- delete timerAO;
-}
-
-QCompleteDeferredAOs::QCompleteDeferredAOs(QEventDispatcherSymbian *dispatcher)
- : CActive(COMPLETE_DEFERRED_ACTIVE_OBJECTS_PRIORITY),
- m_dispatcher(dispatcher)
-{
- CActiveScheduler::Add(this);
- iStatus = KRequestPending;
- SetActive();
-}
-
-QCompleteDeferredAOs::~QCompleteDeferredAOs()
-{
- Cancel();
-}
-
-void QCompleteDeferredAOs::complete()
-{
- if (iStatus.Int() == KRequestPending) {
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
-}
-
-void QCompleteDeferredAOs::DoCancel()
-{
- if (iStatus.Int() == KRequestPending) {
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
-}
-
-void QCompleteDeferredAOs::RunL()
-{
- iStatus = KRequestPending;
- SetActive();
-
- QT_TRYCATCH_LEAVING(m_dispatcher->reactivateDeferredActiveObjects());
-}
-
-QSelectThread::QSelectThread()
- : m_quit(false)
-{
- if (::pipe(m_pipeEnds) != 0) {
- qWarning("Select thread was unable to open a pipe, errno: %i", errno);
- } else {
- int flags0 = qt_pipe_fcntl(m_pipeEnds[0], F_GETFL);
- int flags1 = qt_pipe_fcntl(m_pipeEnds[1], F_GETFL);
- // We should check the error code here, but Open C has a bug that returns
- // failure even though the operation was successful.
- qt_pipe2_fcntl(m_pipeEnds[0], F_SETFL, flags0 | O_NONBLOCK);
- qt_pipe2_fcntl(m_pipeEnds[1], F_SETFL, flags1 | O_NONBLOCK);
- }
-}
-
-QSelectThread::~QSelectThread()
-{
- qt_pipe_close(m_pipeEnds[1]);
- qt_pipe_close(m_pipeEnds[0]);
-}
-
-void QSelectThread::run()
-{
- Q_D(QThread);
-
- m_mutex.lock();
-
- while (!m_quit) {
- fd_set readfds;
- fd_set writefds;
- fd_set exceptionfds;
-
- FD_ZERO(&readfds);
- FD_ZERO(&writefds);
- FD_ZERO(&exceptionfds);
-
- int maxfd = 0;
- maxfd = qMax(maxfd, updateSocketSet(QSocketNotifier::Read, &readfds));
- maxfd = qMax(maxfd, updateSocketSet(QSocketNotifier::Write, &writefds));
- maxfd = qMax(maxfd, updateSocketSet(QSocketNotifier::Exception, &exceptionfds));
- maxfd = qMax(maxfd, m_pipeEnds[0]);
- maxfd++;
-
- FD_SET(m_pipeEnds[0], &readfds);
-
- int ret;
- int savedSelectErrno;
- ret = qt_socket_select(maxfd, &readfds, &writefds, &exceptionfds, 0);
- savedSelectErrno = errno;
-
- if(ret == 0) {
- // do nothing
- } else if (ret < 0) {
- switch (savedSelectErrno) {
- case EBADF:
- case EINVAL:
- case ENOMEM:
- case EFAULT:
- qWarning("::select() returned an error: %i", savedSelectErrno);
- break;
- case ECONNREFUSED:
- case EPIPE:
- qWarning("::select() returned an error: %i (go through sockets)", savedSelectErrno);
- // prepare to go through all sockets
- // mark in fd sets both:
- // good ones
- // ones that return -1 in select
- // after loop update notifiers for all of them
-
- // as we don't have "exception" notifier type
- // we should force monitoring fd_set of this
- // type as well
-
- // clean @ start
- FD_ZERO(&readfds);
- FD_ZERO(&writefds);
- FD_ZERO(&exceptionfds);
- for (QHash<QSocketNotifier *, TRequestStatus *>::const_iterator i = m_AOStatuses.begin();
- i != m_AOStatuses.end(); ++i) {
-
- fd_set onefds;
- FD_ZERO(&onefds);
- FD_SET(i.key()->socket(), &onefds);
-
- fd_set excfds;
- FD_ZERO(&excfds);
- FD_SET(i.key()->socket(), &excfds);
-
- maxfd = i.key()->socket() + 1;
-
- struct timeval timeout;
- timeout.tv_sec = 0;
- timeout.tv_usec = 0;
-
- ret = 0;
-
- if(i.key()->type() == QSocketNotifier::Read) {
- ret = ::select(maxfd, &onefds, 0, &excfds, &timeout);
- if(ret != 0) FD_SET(i.key()->socket(), &readfds);
- } else if(i.key()->type() == QSocketNotifier::Write) {
- ret = ::select(maxfd, 0, &onefds, &excfds, &timeout);
- if(ret != 0) FD_SET(i.key()->socket(), &writefds);
- }
-
- } // end for
-
- // traversed all, so update
- updateActivatedNotifiers(QSocketNotifier::Exception, &exceptionfds);
- updateActivatedNotifiers(QSocketNotifier::Read, &readfds);
- updateActivatedNotifiers(QSocketNotifier::Write, &writefds);
-
- break;
- case EINTR: // Should never occur on Symbian, but this is future proof!
- default:
- qWarning("::select() returned an unknown error: %i", savedSelectErrno);
-
- break;
- }
- } else {
- updateActivatedNotifiers(QSocketNotifier::Exception, &exceptionfds);
- updateActivatedNotifiers(QSocketNotifier::Read, &readfds);
- updateActivatedNotifiers(QSocketNotifier::Write, &writefds);
- }
-
- if (FD_ISSET(m_pipeEnds[0], &readfds))
- m_waitCond.wait(&m_mutex);
- }
-
- m_mutex.unlock();
-}
-
-void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestStatus *status )
-{
- Q_D(QThread);
-
- if (!isRunning()) {
- start();
- }
-
- Q_ASSERT(QThread::currentThread() == this->thread());
-
- QSelectMutexGrabber lock(m_pipeEnds[1], m_pipeEnds[0], &m_mutex);
-
- Q_ASSERT(!m_AOStatuses.contains(notifier));
-
- m_AOStatuses.insert(notifier, status);
-
- m_waitCond.wakeAll();
-}
-
-void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier )
-{
- Q_ASSERT(QThread::currentThread() == this->thread());
-
- QSelectMutexGrabber lock(m_pipeEnds[1], m_pipeEnds[0], &m_mutex);
-
- m_AOStatuses.remove(notifier);
-
- m_waitCond.wakeAll();
-}
-
-void QSelectThread::restart()
-{
- Q_ASSERT(QThread::currentThread() == this->thread());
-
- QSelectMutexGrabber lock(m_pipeEnds[1], m_pipeEnds[0], &m_mutex);
-
- m_waitCond.wakeAll();
-}
-
-int QSelectThread::updateSocketSet(QSocketNotifier::Type type, fd_set *fds)
-{
- int maxfd = 0;
- if(m_AOStatuses.isEmpty()) {
- /*
- * Wonder if should return -1
- * to signal that no descriptors
- * added to fds
- */
- return maxfd;
- }
- for ( QHash<QSocketNotifier *, TRequestStatus *>::const_iterator i = m_AOStatuses.begin();
- i != m_AOStatuses.end(); ++i) {
- if (i.key()->type() == type) {
- FD_SET(i.key()->socket(), fds);
- maxfd = qMax(maxfd, i.key()->socket());
- } else if(type == QSocketNotifier::Exception) {
- /*
- * We are registering existing sockets
- * always to exception set
- *
- * Doing double FD_SET shouldn't
- * matter
- */
- FD_SET(i.key()->socket(), fds);
- maxfd = qMax(maxfd, i.key()->socket());
- }
- }
-
- return maxfd;
-}
-
-void QSelectThread::updateActivatedNotifiers(QSocketNotifier::Type type, fd_set *fds)
-{
- Q_D(QThread);
- if(m_AOStatuses.isEmpty()) {
- return;
- }
- QList<QSocketNotifier *> toRemove;
- for (QHash<QSocketNotifier *, TRequestStatus *>::const_iterator i = m_AOStatuses.begin();
- i != m_AOStatuses.end(); ++i) {
- if (i.key()->type() == type && FD_ISSET(i.key()->socket(), fds)) {
- toRemove.append(i.key());
- TRequestStatus *status = i.value();
- // Thread data is still owned by the main thread.
- QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone);
- } else if(type == QSocketNotifier::Exception && FD_ISSET(i.key()->socket(), fds)) {
- /*
- * check if socket is in exception set
- * then signal RequestComplete for it
- */
- qWarning("exception on %d [will close the socket handle - hack]", i.key()->socket());
- // quick fix; there is a bug
- // when doing read on socket
- // errors not preoperly mapped
- // after offline-ing the device
- // on some devices we do get exception
- ::close(i.key()->socket());
- toRemove.append(i.key());
- TRequestStatus *status = i.value();
- QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone);
- }
- }
-
- for (int c = 0; c < toRemove.size(); ++c) {
- m_AOStatuses.remove(toRemove[c]);
- }
-}
-
-void QSelectThread::stop()
-{
- m_quit = true;
- restart();
- wait();
-}
-
-QSocketActiveObject::QSocketActiveObject(QEventDispatcherSymbian *dispatcher, QSocketNotifier *notifier)
- : QActiveObject(CActive::EPriorityStandard, dispatcher),
- m_notifier(notifier),
- m_inSocketEvent(false),
- m_deleteLater(false)
-{
- CActiveScheduler::Add(this);
- iStatus = KRequestPending;
- SetActive();
-}
-
-QSocketActiveObject::~QSocketActiveObject()
-{
- Cancel();
-}
-
-void QSocketActiveObject::DoCancel()
-{
- if (iStatus.Int() == KRequestPending) {
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
-}
-
-void QSocketActiveObject::RunL()
-{
- if (maybeDeferSocketEvent())
- return;
- if (maybeQueueForLater())
- return;
-
- QT_TRYCATCH_LEAVING(run());
-}
-
-void QSocketActiveObject::run()
-{
- QEvent e(QEvent::SockAct);
- m_inSocketEvent = true;
- QCoreApplication::sendEvent(m_notifier, &e);
- m_inSocketEvent = false;
-
- if (m_deleteLater) {
- delete this;
- } else {
- iStatus = KRequestPending;
- SetActive();
- m_dispatcher->reactivateSocketNotifier(m_notifier);
- }
-}
-
-void QSocketActiveObject::deleteLater()
-{
- if (m_inSocketEvent) {
- m_deleteLater = true;
- } else {
- delete this;
- }
-}
-
-#ifdef QT_SYMBIAN_PRIORITY_DROP
-class QIdleDetectorThread
-{
-public:
- QIdleDetectorThread()
- : m_state(STATE_RUN), m_stop(false), m_running(false)
- {
- start();
- }
-
- ~QIdleDetectorThread()
- {
- stop();
- }
-
- void start()
- {
- QMutexLocker lock(&m_mutex);
- if (m_running)
- return;
- m_stop = false;
- m_state = STATE_RUN;
- TInt err = m_idleDetectorThread.Create(KNullDesC(), &idleDetectorThreadFunc, 1024, &User::Allocator(), this);
- if (err != KErrNone)
- return; // Fail silently on error. Next kick will try again. Exception might stop the event being processed
- m_idleDetectorThread.SetPriority(EPriorityAbsoluteBackgroundNormal);
- m_idleDetectorThread.Resume();
- m_running = true;
- // get a callback from QCoreApplication destruction to stop this thread
- qAddPostRoutine(StopIdleDetectorThread);
- }
-
- void stop()
- {
- QMutexLocker lock(&m_mutex);
- if (!m_running)
- return;
- // close down the idle thread because if corelib is loaded temporarily, this would leak threads into the host process
- m_stop = true;
- m_kick.release();
- m_idleDetectorThread.SetPriority(EPriorityNormal);
- TRequestStatus s;
- m_idleDetectorThread.Logon(s);
- User::WaitForRequest(s);
- m_idleDetectorThread.Close();
- m_running = false;
- }
-
- void kick()
- {
- start();
- m_state = STATE_KICKED;
- m_kick.release();
- }
-
- bool hasRun()
- {
- return m_state == STATE_RUN;
- }
-
-private:
- static TInt idleDetectorThreadFunc(TAny* self)
- {
- User::RenameThread(_L("IdleDetectorThread"));
- static_cast<QIdleDetectorThread*>(self)->IdleLoop();
- return KErrNone;
- }
-
- void IdleLoop()
- {
- while (!m_stop) {
- m_kick.acquire();
- m_state = STATE_RUN;
- }
- }
-
- static void StopIdleDetectorThread();
-
-private:
- enum IdleStates {STATE_KICKED, STATE_RUN} m_state;
- bool m_stop;
- bool m_running;
- RThread m_idleDetectorThread;
- QSemaphore m_kick;
- QMutex m_mutex;
-};
-
-Q_GLOBAL_STATIC(QIdleDetectorThread, idleDetectorThread);
-
-void QIdleDetectorThread::StopIdleDetectorThread()
-{
- idleDetectorThread()->stop();
-}
-
-const int maxBusyTime = 2000; // maximum time we allow idle detector to be blocked before worrying, in milliseconds
-const int baseDelay = 1000; // minimum delay time used when backing off to allow idling, in microseconds
-#endif
-
-QEventDispatcherSymbian::QEventDispatcherSymbian(QObject *parent)
- : QAbstractEventDispatcher(parent),
- m_selectThread(0),
- m_activeScheduler(0),
- m_wakeUpAO(0),
- m_completeDeferredAOs(0),
- m_interrupt(false),
- m_wakeUpDone(0),
- m_iterationCount(0),
- m_insideTimerEvent(false),
- m_noSocketEvents(false)
-{
-#ifdef QT_SYMBIAN_PRIORITY_DROP
- m_delay = baseDelay;
- m_avgEventTime = 0;
- idleDetectorThread();
-#endif
-}
-
-QEventDispatcherSymbian::~QEventDispatcherSymbian()
-{
-}
-
-void QEventDispatcherSymbian::startingUp()
-{
- if( !CActiveScheduler::Current() ) {
- m_activeScheduler = q_check_ptr(new CQtActiveScheduler()); // CBase derived class needs to be checked on new
- CActiveScheduler::Install(m_activeScheduler);
- }
- m_wakeUpAO = q_check_ptr(new QWakeUpActiveObject(this));
- m_completeDeferredAOs = q_check_ptr(new QCompleteDeferredAOs(this));
- // We already might have posted events, wakeup once to process them
- wakeUp();
-}
-
-QSelectThread& QEventDispatcherSymbian::selectThread() {
- if (!m_selectThread)
- m_selectThread = new QSelectThread;
- return *m_selectThread;
-}
-
-void QEventDispatcherSymbian::closingDown()
-{
- if (m_selectThread && m_selectThread->isRunning()) {
- m_selectThread->stop();
- }
- delete m_selectThread;
- m_selectThread = 0;
-
- delete m_completeDeferredAOs;
- delete m_wakeUpAO;
- if (m_activeScheduler) {
- delete m_activeScheduler;
- }
-}
-
-bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags flags )
-{
- bool handledAnyEvent = false;
- bool oldNoSocketEventsValue = m_noSocketEvents;
- bool oldInsideTimerEventValue = m_insideTimerEvent;
-
- m_insideTimerEvent = false;
-
- QT_TRY {
- Q_D(QAbstractEventDispatcher);
-
- // It is safe if this counter overflows. The main importance is that each
- // iteration count is different from the last.
- m_iterationCount++;
-
- RThread &thread = d->threadData->symbian_thread_handle;
-
- bool block;
- if (flags & QEventLoop::WaitForMoreEvents) {
- block = true;
- emit aboutToBlock();
- } else {
- block = false;
- }
-
- if (flags & QEventLoop::ExcludeSocketNotifiers) {
- m_noSocketEvents = true;
- } else {
- m_noSocketEvents = false;
- handledAnyEvent = sendDeferredSocketEvents();
- }
-
- bool handledSymbianEvent = false;
- m_interrupt = false;
-
-#ifdef QT_SYMBIAN_PRIORITY_DROP
- QElapsedTimer eventTimer;
-#endif
-
- while (1) {
- if (block) {
- // This is where Qt will spend most of its time.
- CActiveScheduler::Current()->WaitForAnyRequest();
- } else {
- if (thread.RequestCount() == 0) {
-#ifdef QT_SYMBIAN_PRIORITY_DROP
- if (idleDetectorThread()->hasRun()) {
- m_lastIdleRequestTimer.start();
- idleDetectorThread()->kick();
- } else if (m_lastIdleRequestTimer.elapsed() > maxBusyTime) {
- User::AfterHighRes(m_delay);
- }
-#endif
- break;
- }
- // This one should return without delay.
- CActiveScheduler::Current()->WaitForAnyRequest();
- }
-
-#ifdef QT_SYMBIAN_PRIORITY_DROP
- if (idleDetectorThread()->hasRun()) {
- if (m_delay > baseDelay)
- m_delay -= baseDelay;
- m_lastIdleRequestTimer.start();
- idleDetectorThread()->kick();
- } else if (m_lastIdleRequestTimer.elapsed() > maxBusyTime) {
- User::AfterHighRes(m_delay);
- // allow delay to be up to 1/4 of execution time
- if (!idleDetectorThread()->hasRun() && m_delay*3 < m_avgEventTime)
- m_delay += baseDelay;
- }
- eventTimer.start();
-#endif
-
- TInt error;
- handledSymbianEvent = CActiveScheduler::RunIfReady(error, KMinTInt);
- if (error) {
- qWarning("CActiveScheduler::RunIfReady() returned error: %i\n", error);
- CActiveScheduler::Current()->Error(error);
- }
-
-#ifdef QT_SYMBIAN_PRIORITY_DROP
- int eventDur = eventTimer.elapsed()*1000;
- // average is calcualted as a 5% decaying exponential average
- m_avgEventTime = (m_avgEventTime * 95 + eventDur * 5) / 100;
-#endif
-
- if (!handledSymbianEvent) {
- qFatal("QEventDispatcherSymbian::processEvents(): Caught Symbian stray signal");
- }
- handledAnyEvent = true;
- if (m_interrupt) {
- break;
- }
- block = false;
- };
-
- emit awake();
- } QT_CATCH (const std::exception& ex) {
-#ifndef QT_NO_EXCEPTIONS
- CActiveScheduler::Current()->Error(qt_symbian_exception2Error(ex));
-#endif
- }
-
- m_noSocketEvents = oldNoSocketEventsValue;
- m_insideTimerEvent = oldInsideTimerEventValue;
-
- return handledAnyEvent;
-}
-
-void QEventDispatcherSymbian::timerFired(int timerId)
-{
- QHash<int, SymbianTimerInfoPtr>::iterator i = m_timerList.find(timerId);
- if (i == m_timerList.end()) {
- // The timer has been deleted. Ignore this event.
- return;
- }
-
- SymbianTimerInfoPtr timerInfo = *i;
-
- // Prevent infinite timer recursion.
- if (timerInfo->inTimerEvent) {
- return;
- }
-
- timerInfo->inTimerEvent = true;
- bool oldInsideTimerEventValue = m_insideTimerEvent;
- m_insideTimerEvent = true;
-
- QTimerEvent event(timerInfo->timerId);
- QCoreApplication::sendEvent(timerInfo->receiver, &event);
-
- m_insideTimerEvent = oldInsideTimerEventValue;
- timerInfo->inTimerEvent = false;
-
- return;
-}
-
-void QEventDispatcherSymbian::wakeUpWasCalled()
-{
- // The reactivation should happen in RunL, right before the call to this function.
- // This is because m_wakeUpDone is the "signal" that the object can be completed
- // once more.
- // Also, by dispatching the posted events after resetting m_wakeUpDone, we guarantee
- // that no posted event notification will be lost. If we did it the other way
- // around, it would be possible for another thread to post an event right after
- // the sendPostedEvents was done, but before the object was ready to be completed
- // again. This could deadlock the application if there are no other posted events.
- m_wakeUpDone.fetchAndStoreOrdered(0);
- sendPostedEvents();
-}
-
-void QEventDispatcherSymbian::interrupt()
-{
- m_interrupt = true;
- wakeUp();
-}
-
-void QEventDispatcherSymbian::wakeUp()
-{
- Q_D(QAbstractEventDispatcher);
-
- if (m_wakeUpAO && m_wakeUpDone.testAndSetAcquire(0, 1)) {
- TRequestStatus *status = &m_wakeUpAO->iStatus;
- QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone);
- }
-}
-
-bool QEventDispatcherSymbian::sendPostedEvents()
-{
- Q_D(QAbstractEventDispatcher);
-
- // moveToThread calls this and canWait == true -> Events will never get processed
- // if we check for d->threadData->canWait
- //
- // QCoreApplication::postEvent sets canWait = false, but after the object and events
- // are moved to a new thread, the canWait in new thread is true i.e. not changed to reflect
- // the flag on old thread. That's why events in a new thread will not get processed.
- // This migth be actually bug in moveToThread functionality, but because other platforms
- // do not check canWait in wakeUp (where we essentially are now) - decided to remove it from
- // here as well.
-
- //if (!d->threadData->canWait) {
- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
- return true;
- //}
- //return false;
-}
-
-inline void QEventDispatcherSymbian::addDeferredActiveObject(QActiveObject *object)
-{
- queueDeferredActiveObjectsCompletion();
- m_deferredActiveObjects.append(object);
-}
-
-inline void QEventDispatcherSymbian::removeDeferredActiveObject(QActiveObject *object)
-{
- m_deferredActiveObjects.removeAll(object);
- m_deferredSocketEvents.removeAll(object);
-}
-
-inline void QEventDispatcherSymbian::addDeferredSocketActiveObject(QActiveObject *object)
-{
- m_deferredSocketEvents.append(object);
-}
-
-void QEventDispatcherSymbian::queueDeferredActiveObjectsCompletion()
-{
- m_completeDeferredAOs->complete();
-}
-
-void QEventDispatcherSymbian::reactivateDeferredActiveObjects()
-{
- while (!m_deferredActiveObjects.isEmpty()) {
- QActiveObject *object = m_deferredActiveObjects.takeFirst();
- object->reactivateAndComplete();
- }
-
- // We do this because we want to return from processEvents. This is because
- // each invocation of processEvents should only run each active object once.
- // The active scheduler should run them continously, however.
- m_interrupt = true;
-}
-
-bool QEventDispatcherSymbian::sendDeferredSocketEvents()
-{
- bool sentAnyEvents = false;
- while (!m_deferredSocketEvents.isEmpty()) {
- sentAnyEvents = true;
- QActiveObject *object = m_deferredSocketEvents.takeFirst();
- object->reactivateAndComplete();
- }
-
- return sentAnyEvents;
-}
-
-void QEventDispatcherSymbian::flush()
-{
-}
-
-bool QEventDispatcherSymbian::hasPendingEvents()
-{
- Q_D(QAbstractEventDispatcher);
- return (d->threadData->symbian_thread_handle.RequestCount() != 0
- || !d->threadData->canWait || !m_deferredSocketEvents.isEmpty());
-}
-
-void QEventDispatcherSymbian::registerSocketNotifier ( QSocketNotifier * notifier )
-{
- //check socket descriptor is usable
- if (notifier->socket() >= FD_SETSIZE || notifier->socket() < 0) {
- //same warning message as the unix event dispatcher for easy testing
- qWarning("QSocketNotifier: Internal error");
- return;
- }
- //note - this is only for "open C" file descriptors
- //for native sockets, an active object in the symbian socket engine handles this
- QSocketActiveObject *socketAO = new QSocketActiveObject(this, notifier);
- Q_CHECK_PTR(socketAO);
- m_notifiers.insert(notifier, socketAO);
- selectThread().requestSocketEvents(notifier, &socketAO->iStatus);
-}
-
-void QEventDispatcherSymbian::unregisterSocketNotifier ( QSocketNotifier * notifier )
-{
- //note - this is only for "open C" file descriptors
- //for native sockets, an active object in the symbian socket engine handles this
- if (m_selectThread)
- m_selectThread->cancelSocketEvents(notifier);
- if (m_notifiers.contains(notifier)) {
- QSocketActiveObject *sockObj = *m_notifiers.find(notifier);
- m_deferredSocketEvents.removeAll(sockObj);
- sockObj->deleteLater();
- m_notifiers.remove(notifier);
- }
-}
-
-void QEventDispatcherSymbian::reactivateSocketNotifier(QSocketNotifier *notifier)
-{
- selectThread().requestSocketEvents(notifier, &m_notifiers[notifier]->iStatus);
-}
-
-void QEventDispatcherSymbian::registerTimer ( int timerId, int interval, QObject * object )
-{
- if (interval < 0) {
- qWarning("Timer interval < 0");
- interval = 0;
- }
-
- SymbianTimerInfoPtr timer(new SymbianTimerInfo);
- timer->timerId = timerId;
- timer->interval = interval;
- timer->inTimerEvent = false;
- timer->receiver = object;
- timer->dispatcher = this;
- timer->timerAO = q_check_ptr(new QTimerActiveObject(this, timer.data()));
- m_timerList.insert(timerId, timer);
-
- timer->timerAO->Start();
-
- if (m_insideTimerEvent)
- // If we are inside a timer event, we need to prevent event starvation
- // by preventing newly created timers from running in the same event processing
- // iteration. Do this by calling the maybeQueueForLater() function to "fake" that we have
- // already run once. This will cause the next run to be added to the deferred
- // queue instead.
- timer->timerAO->maybeQueueForLater();
-}
-
-bool QEventDispatcherSymbian::unregisterTimer ( int timerId )
-{
- if (!m_timerList.contains(timerId)) {
- return false;
- }
-
- SymbianTimerInfoPtr timerInfo = m_timerList.take(timerId);
-
- if (!QObjectPrivate::get(timerInfo->receiver)->inThreadChangeEvent)
- QAbstractEventDispatcherPrivate::releaseTimerId(timerId);
-
- return true;
-}
-
-bool QEventDispatcherSymbian::unregisterTimers ( QObject * object )
-{
- if (m_timerList.isEmpty())
- return false;
-
- bool unregistered = false;
- for (QHash<int, SymbianTimerInfoPtr>::iterator i = m_timerList.begin(); i != m_timerList.end(); ) {
- if ((*i)->receiver == object) {
- i = m_timerList.erase(i);
- unregistered = true;
- } else {
- ++i;
- }
- }
-
- return unregistered;
-}
-
-QList<QEventDispatcherSymbian::TimerInfo> QEventDispatcherSymbian::registeredTimers ( QObject * object ) const
-{
- QList<TimerInfo> list;
- for (QHash<int, SymbianTimerInfoPtr>::const_iterator i = m_timerList.begin(); i != m_timerList.end(); ++i) {
- if ((*i)->receiver == object) {
- list.push_back(TimerInfo((*i)->timerId, (*i)->interval));
- }
- }
-
- return list;
-}
-
-/*
- * This active scheduler class implements a simple report and continue policy, for Symbian OS leaves
- * or exceptions from Qt that fall back to the scheduler.
- * It will be used in cases where there is no existing active scheduler installed.
- * Apps which link to qts60main.lib will have the UI active scheduler installed in the main thread
- * instead of this one. But this would be used in other threads in the UI.
- * An app could replace this behaviour by installing an alternative active scheduler.
- */
-void CQtActiveScheduler::Error(TInt aError) const
-{
- QT_TRY {
- qWarning("Error from active scheduler %d", aError);
- }
- QT_CATCH (const std::bad_alloc&) {} // ignore alloc fails, nothing more can be done
-}
-
-bool QActiveObject::wait(CActive* ao, int ms)
-{
- if (!ao->IsActive())
- return true; //request already complete
- bool timedout = false;
- if (ms > 0) {
- TRequestStatus tstat;
- RTimer t;
- if (KErrNone != t.CreateLocal())
- return false;
- t.HighRes(tstat, ms*1000);
- User::WaitForRequest(tstat, ao->iStatus);
- if (tstat != KRequestPending) {
- timedout = true;
- } else {
- t.Cancel();
- //balance thread semaphore
- User::WaitForRequest(tstat);
- }
- t.Close();
- } else {
- User::WaitForRequest(ao->iStatus);
- }
- if (timedout)
- return false;
-
- //evil cast to allow calling of protected virtual
- ((QActiveObject*)ao)->RunL();
-
- //clear active & pending flags
- ao->iStatus = TRequestStatus();
-
- return true;
-}
-
-bool QActiveObject::wait(QList<CActive*> aos, int ms)
-{
- QVector<TRequestStatus*> stati;
- stati.reserve(aos.count() + 1);
- foreach (CActive* ao, aos) {
- if (!ao->IsActive())
- return true; //request already complete
- stati.append(&(ao->iStatus));
- }
- bool timedout = false;
- TRequestStatus tstat;
- RTimer t;
- if (ms > 0) {
- if (KErrNone != t.CreateLocal())
- return false;
- t.HighRes(tstat, ms*1000);
- stati.append(&tstat);
- }
- User::WaitForNRequest(stati.data(), stati.count());
- if (ms > 0) {
- if (tstat != KRequestPending) {
- timedout = true;
- } else {
- t.Cancel();
- //balance thread semaphore
- User::WaitForRequest(tstat);
- }
- t.Close();
- }
- if (timedout)
- return false;
-
- foreach (CActive* ao, aos) {
- if (ao->iStatus != KRequestPending) {
- //evil cast to allow calling of protected virtual
- ((QActiveObject*)ao)->RunL();
-
- //clear active & pending flags
- ao->iStatus = TRequestStatus();
- break; //only call one
- }
- }
- return true;
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qeventdispatcher_symbian_p.cpp"
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
deleted file mode 100644
index e327a9cdc5..0000000000
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ /dev/null
@@ -1,327 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QEVENTDISPATCHER_SYMBIAN_P_H
-#define QEVENTDISPATCHER_SYMBIAN_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qhash.h>
-#include <qset.h>
-#include <qshareddata.h>
-#include <qabstracteventdispatcher.h>
-#include <private/qabstracteventdispatcher_p.h>
-#include <qthread.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qsocketnotifier.h>
-#include <qdatetime.h>
-#include <qelapsedtimer.h>
-
-#include <e32base.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/select.h>
-
-QT_BEGIN_NAMESPACE
-
-
-class QEventDispatcherSymbian;
-class QTimerActiveObject;
-
-class Q_CORE_EXPORT QActiveObject : public CActive
-{
-public:
- QActiveObject(TInt priority, QEventDispatcherSymbian *dispatcher);
- ~QActiveObject();
-
- bool maybeQueueForLater();
- bool maybeDeferSocketEvent();
-
- void reactivateAndComplete();
-
- static bool wait(CActive* ao, int ms);
- static bool wait(QList<CActive*> aos, int ms);
-protected:
- QEventDispatcherSymbian *m_dispatcher;
-
-private:
- bool m_hasAlreadyRun : 1;
- bool m_hasRunAgain : 1;
- int m_iterationCount;
-};
-
-class QWakeUpActiveObject : public QActiveObject
-{
-public:
- QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher);
- ~QWakeUpActiveObject();
-
- void Complete();
-
-protected:
- void DoCancel();
- void RunL();
-
-private:
- TThreadId m_hostThreadId;
-};
-
-struct SymbianTimerInfo : public QSharedData
-{
- SymbianTimerInfo();
- ~SymbianTimerInfo();
-
- int timerId;
- int interval;
- int msLeft;
- bool inTimerEvent;
- QObject *receiver;
- QTimerActiveObject *timerAO;
- QEventDispatcherSymbian *dispatcher;
-};
-
-typedef QExplicitlySharedDataPointer<SymbianTimerInfo> SymbianTimerInfoPtr;
-
-// This is a bit of a proxy class. See comments in SetActive and Start for details.
-class QTimerActiveObject : public QActiveObject
-{
-public:
- QTimerActiveObject(QEventDispatcherSymbian *dispatcher, SymbianTimerInfo *timerInfo);
- ~QTimerActiveObject();
-
- void Start();
-
-protected:
- void DoCancel();
- void RunL();
-
-private:
- void Run();
- void StartTimer();
-
-private:
- SymbianTimerInfo *m_timerInfo;
- QElapsedTimer m_timeoutTimer;
- int m_expectedTimeSinceLastEvent;
- RTimer m_rTimer;
-};
-
-class QCompleteDeferredAOs : public CActive
-{
-public:
- QCompleteDeferredAOs(QEventDispatcherSymbian *dispatcher);
- ~QCompleteDeferredAOs();
-
- void complete();
-
-protected:
- void DoCancel();
- void RunL();
-
-private:
- QEventDispatcherSymbian *m_dispatcher;
-};
-
-class QSocketActiveObject : public QActiveObject
-{
-public:
- QSocketActiveObject(QEventDispatcherSymbian *dispatcher, QSocketNotifier *notifier);
- ~QSocketActiveObject();
-
- void deleteLater();
-
-protected:
- void DoCancel();
- void RunL();
- void run();
-
-private:
- QSocketNotifier *m_notifier;
- bool m_inSocketEvent;
- bool m_deleteLater;
-
- friend class QEventDispatcherSymbian;
-};
-
-class QSelectThread : public QThread
-{
- Q_DECLARE_PRIVATE(QThread)
-
-public:
- QSelectThread();
- ~QSelectThread();
-
- void requestSocketEvents ( QSocketNotifier *notifier, TRequestStatus *status );
- void cancelSocketEvents ( QSocketNotifier *notifier );
- void restart();
- void stop();
-
-protected:
- void run();
-
-private:
- int updateSocketSet(QSocketNotifier::Type type, fd_set *fds);
- void updateActivatedNotifiers(QSocketNotifier::Type type, fd_set *fds);
-
-private:
- int m_pipeEnds[2];
- QHash<QSocketNotifier *, TRequestStatus *> m_AOStatuses;
- QMutex m_mutex;
- QWaitCondition m_waitCond;
- bool m_quit;
-};
-
-class Q_CORE_EXPORT CQtActiveScheduler : public CActiveScheduler
-{
-public: // from CActiveScheduler
- virtual void Error(TInt aError) const;
-};
-
-class Q_CORE_EXPORT QEventDispatcherSymbian : public QAbstractEventDispatcher
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QAbstractEventDispatcher)
-
-public:
- QEventDispatcherSymbian(QObject *parent = 0);
- ~QEventDispatcherSymbian();
-
- void flush();
- bool hasPendingEvents();
- void interrupt();
- bool processEvents ( QEventLoop::ProcessEventsFlags flags );
- void registerSocketNotifier ( QSocketNotifier * notifier );
- void registerTimer ( int timerId, int interval, QObject * object );
- QList<TimerInfo> registeredTimers ( QObject * object ) const;
- void unregisterSocketNotifier ( QSocketNotifier * notifier );
- bool unregisterTimer ( int timerId );
- bool unregisterTimers ( QObject * object );
- void wakeUp();
-
- void startingUp();
- void closingDown();
-
- void timerFired(int timerId);
- void wakeUpWasCalled();
- void reactivateSocketNotifier(QSocketNotifier *notifier);
-
- void addDeferredActiveObject(QActiveObject *object);
- void removeDeferredActiveObject(QActiveObject *object);
- void queueDeferredActiveObjectsCompletion();
- // Can be overridden to activate local active objects too, but do call baseclass!
- virtual void reactivateDeferredActiveObjects();
-
- inline int iterationCount() const { return m_iterationCount; }
-
- void addDeferredSocketActiveObject(QActiveObject *object);
- inline bool areSocketEventsBlocked() const { return m_noSocketEvents; }
-
- static void RequestComplete(TRequestStatus *&status, TInt reason);
- static void RequestComplete(RThread &threadHandle, TRequestStatus *&status, TInt reason);
-
-private:
- bool sendPostedEvents();
- bool sendDeferredSocketEvents();
-
- QSelectThread& selectThread();
-private:
- QSelectThread *m_selectThread;
-
- CQtActiveScheduler *m_activeScheduler;
-
- QHash<int, SymbianTimerInfoPtr> m_timerList;
- QHash<QSocketNotifier *, QSocketActiveObject *> m_notifiers;
-
- QWakeUpActiveObject *m_wakeUpAO;
- QCompleteDeferredAOs *m_completeDeferredAOs;
-
- volatile bool m_interrupt;
- QAtomicInt m_wakeUpDone;
-
- unsigned char m_iterationCount;
- bool m_insideTimerEvent;
- bool m_noSocketEvents;
- //deferred until socket events are enabled
- QList<QActiveObject *> m_deferredSocketEvents;
- //deferred until idle
- QList<QActiveObject *> m_deferredActiveObjects;
-
- int m_delay;
- int m_avgEventTime;
- QElapsedTimer m_lastIdleRequestTimer;
-};
-
-#ifdef QT_DEBUG
-# define VERIFY_PENDING_REQUEST_STATUS \
- Q_ASSERT(status->Int() == KRequestPending);
-#else
-# define VERIFY_PENDING_REQUEST_STATUS
-#endif
-
-// Convenience functions for doing some sanity checking on our own complete code.
-// Unless QT_DEBUG is defined, it is exactly equivalent to the Symbian version.
-inline void QEventDispatcherSymbian::RequestComplete(TRequestStatus *&status, TInt reason)
-{
- VERIFY_PENDING_REQUEST_STATUS
- User::RequestComplete(status, reason);
-}
-inline void QEventDispatcherSymbian::RequestComplete(RThread &threadHandle, TRequestStatus *&status, TInt reason)
-{
- VERIFY_PENDING_REQUEST_STATUS
- threadHandle.RequestComplete(status, reason);
-}
-
-#undef VERIFY_PENDING_REQUEST_STATUS
-
-QT_END_NAMESPACE
-
-#endif // QEVENTDISPATCHER_SYMBIAN_P_H
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index 27efac6985..26a9e9f0ca 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,8 +72,6 @@
QT_BEGIN_NAMESPACE
-Q_CORE_EXPORT bool qt_disable_lowpriority_timers=false;
-
/*****************************************************************************
UNIX signal handling
*****************************************************************************/
@@ -309,326 +307,6 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags,
return (nevents + q->activateSocketNotifiers());
}
-/*
- * Internal functions for manipulating timer data structures. The
- * timerBitVec array is used for keeping track of timer identifiers.
- */
-
-QTimerInfoList::QTimerInfoList()
-{
-#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_NACL)
- if (!QElapsedTimer::isMonotonic()) {
- // not using monotonic timers, initialize the timeChanged() machinery
- previousTime = qt_gettime();
-
- tms unused;
- previousTicks = times(&unused);
-
- ticksPerSecond = sysconf(_SC_CLK_TCK);
- msPerTick = 1000/ticksPerSecond;
- } else {
- // detected monotonic timers
- previousTime.tv_sec = previousTime.tv_usec = 0;
- previousTicks = 0;
- ticksPerSecond = 0;
- msPerTick = 0;
- }
-#endif
-
- firstTimerInfo = 0;
-}
-
-timeval QTimerInfoList::updateCurrentTime()
-{
- return (currentTime = qt_gettime());
-}
-
-#if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_INTEGRITY)) || defined(QT_BOOTSTRAPPED)
-
-template <>
-timeval qAbs(const timeval &t)
-{
- timeval tmp = t;
- if (tmp.tv_sec < 0) {
- tmp.tv_sec = -tmp.tv_sec - 1;
- tmp.tv_usec -= 1000000;
- }
- if (tmp.tv_sec == 0 && tmp.tv_usec < 0) {
- tmp.tv_usec = -tmp.tv_usec;
- }
- return normalizedTimeval(tmp);
-}
-
-/*
- Returns true if the real time clock has changed by more than 10%
- relative to the processor time since the last time this function was
- called. This presumably means that the system time has been changed.
-
- If /a delta is nonzero, delta is set to our best guess at how much the system clock was changed.
-*/
-bool QTimerInfoList::timeChanged(timeval *delta)
-{
-#ifdef Q_OS_NACL
- Q_UNUSED(delta)
- return false; // Calling "times" crashes.
-#endif
- struct tms unused;
- clock_t currentTicks = times(&unused);
-
- clock_t elapsedTicks = currentTicks - previousTicks;
- timeval elapsedTime = currentTime - previousTime;
-
- timeval elapsedTimeTicks;
- elapsedTimeTicks.tv_sec = elapsedTicks / ticksPerSecond;
- elapsedTimeTicks.tv_usec = (((elapsedTicks * 1000) / ticksPerSecond) % 1000) * 1000;
-
- timeval dummy;
- if (!delta)
- delta = &dummy;
- *delta = elapsedTime - elapsedTimeTicks;
-
- previousTicks = currentTicks;
- previousTime = currentTime;
-
- // If tick drift is more than 10% off compared to realtime, we assume that the clock has
- // been set. Of course, we have to allow for the tick granularity as well.
- timeval tickGranularity;
- tickGranularity.tv_sec = 0;
- tickGranularity.tv_usec = msPerTick * 1000;
- return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10);
-}
-
-void QTimerInfoList::repairTimersIfNeeded()
-{
- if (QElapsedTimer::isMonotonic())
- return;
- timeval delta;
- if (timeChanged(&delta))
- timerRepair(delta);
-}
-
-#else // !(_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(QT_BOOTSTRAPPED)
-
-void QTimerInfoList::repairTimersIfNeeded()
-{
-}
-
-#endif
-
-/*
- insert timer info into list
-*/
-void QTimerInfoList::timerInsert(QTimerInfo *ti)
-{
- int index = size();
- while (index--) {
- register const QTimerInfo * const t = at(index);
- if (!(ti->timeout < t->timeout))
- break;
- }
- insert(index+1, ti);
-}
-
-/*
- repair broken timer
-*/
-void QTimerInfoList::timerRepair(const timeval &diff)
-{
- // repair all timers
- for (int i = 0; i < size(); ++i) {
- register QTimerInfo *t = at(i);
- t->timeout = t->timeout + diff;
- }
-}
-
-static timeval roundToMillisecond(timeval val)
-{
- // always round up
- // worst case scenario is that the first trigger of a 1-ms timer is 0.999 ms late
-
- int us = val.tv_usec % 1000;
- val.tv_usec += 1000 - us;
- return normalizedTimeval(val);
-}
-
-/*
- Returns the time to wait for the next timer, or null if no timers
- are waiting.
-*/
-bool QTimerInfoList::timerWait(timeval &tm)
-{
- timeval currentTime = updateCurrentTime();
- repairTimersIfNeeded();
-
- // Find first waiting timer not already active
- QTimerInfo *t = 0;
- for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
- if (!(*it)->activateRef) {
- t = *it;
- break;
- }
- }
-
- if (!t)
- return false;
-
- if (currentTime < t->timeout) {
- // time to wait
- tm = roundToMillisecond(t->timeout - currentTime);
- } else {
- // no time to wait
- tm.tv_sec = 0;
- tm.tv_usec = 0;
- }
-
- return true;
-}
-
-void QTimerInfoList::registerTimer(int timerId, int interval, QObject *object)
-{
- QTimerInfo *t = new QTimerInfo;
- t->id = timerId;
- t->interval.tv_sec = interval / 1000;
- t->interval.tv_usec = (interval % 1000) * 1000;
- t->timeout = updateCurrentTime() + t->interval;
- t->obj = object;
- t->activateRef = 0;
-
- timerInsert(t);
-}
-
-bool QTimerInfoList::unregisterTimer(int timerId)
-{
- // set timer inactive
- for (int i = 0; i < count(); ++i) {
- register QTimerInfo *t = at(i);
- if (t->id == timerId) {
- // found it
- removeAt(i);
- if (t == firstTimerInfo)
- firstTimerInfo = 0;
- if (t->activateRef)
- *(t->activateRef) = 0;
-
- // release the timer id
- if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent)
- QAbstractEventDispatcherPrivate::releaseTimerId(timerId);
-
- delete t;
- return true;
- }
- }
- // id not found
- return false;
-}
-
-bool QTimerInfoList::unregisterTimers(QObject *object)
-{
- if (isEmpty())
- return false;
- for (int i = 0; i < count(); ++i) {
- register QTimerInfo *t = at(i);
- if (t->obj == object) {
- // object found
- removeAt(i);
- if (t == firstTimerInfo)
- firstTimerInfo = 0;
- if (t->activateRef)
- *(t->activateRef) = 0;
-
- // release the timer id
- if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent)
- QAbstractEventDispatcherPrivate::releaseTimerId(t->id);
-
- delete t;
- // move back one so that we don't skip the new current item
- --i;
- }
- }
- return true;
-}
-
-QList<QPair<int, int> > QTimerInfoList::registeredTimers(QObject *object) const
-{
- QList<QPair<int, int> > list;
- for (int i = 0; i < count(); ++i) {
- register const QTimerInfo * const t = at(i);
- if (t->obj == object)
- list << QPair<int, int>(t->id, t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000);
- }
- return list;
-}
-
-/*
- Activate pending timers, returning how many where activated.
-*/
-int QTimerInfoList::activateTimers()
-{
- if (qt_disable_lowpriority_timers || isEmpty())
- return 0; // nothing to do
-
- int n_act = 0, maxCount = 0;
- firstTimerInfo = 0;
-
- timeval currentTime = updateCurrentTime();
- repairTimersIfNeeded();
-
-
- // Find out how many timer have expired
- for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
- if (currentTime < (*it)->timeout)
- break;
- maxCount++;
- }
-
- //fire the timers.
- while (maxCount--) {
- if (isEmpty())
- break;
-
- QTimerInfo *currentTimerInfo = first();
- if (currentTime < currentTimerInfo->timeout)
- break; // no timer has expired
-
- if (!firstTimerInfo) {
- firstTimerInfo = currentTimerInfo;
- } else if (firstTimerInfo == currentTimerInfo) {
- // avoid sending the same timer multiple times
- break;
- } else if (currentTimerInfo->interval < firstTimerInfo->interval
- || currentTimerInfo->interval == firstTimerInfo->interval) {
- firstTimerInfo = currentTimerInfo;
- }
-
- // remove from list
- removeFirst();
-
- // determine next timeout time
- currentTimerInfo->timeout += currentTimerInfo->interval;
- if (currentTimerInfo->timeout < currentTime)
- currentTimerInfo->timeout = currentTime + currentTimerInfo->interval;
-
- // reinsert timer
- timerInsert(currentTimerInfo);
- if (currentTimerInfo->interval.tv_usec > 0 || currentTimerInfo->interval.tv_sec > 0)
- n_act++;
-
- if (!currentTimerInfo->activateRef) {
- // send event, but don't allow it to recurse
- currentTimerInfo->activateRef = &currentTimerInfo;
-
- QTimerEvent e(currentTimerInfo->id);
- QCoreApplication::sendEvent(currentTimerInfo->obj, &e);
-
- if (currentTimerInfo)
- currentTimerInfo->activateRef = 0;
- }
- }
-
- firstTimerInfo = 0;
- return n_act;
-}
-
QEventDispatcherUNIX::QEventDispatcherUNIX(QObject *parent)
: QAbstractEventDispatcher(*new QEventDispatcherUNIXPrivate, parent)
{ }
@@ -652,7 +330,7 @@ int QEventDispatcherUNIX::select(int nfds, fd_set *readfds, fd_set *writefds, fd
/*!
\internal
*/
-void QEventDispatcherUNIX::registerTimer(int timerId, int interval, QObject *obj)
+void QEventDispatcherUNIX::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *obj)
{
#ifndef QT_NO_DEBUG
if (timerId < 1 || interval < 0 || !obj) {
@@ -665,7 +343,7 @@ void QEventDispatcherUNIX::registerTimer(int timerId, int interval, QObject *obj
#endif
Q_D(QEventDispatcherUNIX);
- d->timerList.registerTimer(timerId, interval, obj);
+ d->timerList.registerTimer(timerId, interval, timerType, obj);
}
/*!
diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h
index 122f17f9e9..f4862bd9c3 100644
--- a/src/corelib/kernel/qeventdispatcher_unix_p.h
+++ b/src/corelib/kernel/qeventdispatcher_unix_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,6 +59,7 @@
#include "private/qcore_unix_p.h"
#include "private/qpodlist_p.h"
#include "QtCore/qvarlengtharray.h"
+#include "private/qtimerinfo_unix_p.h"
#if defined(Q_OS_VXWORKS)
# include <sys/times.h>
@@ -71,50 +72,6 @@
QT_BEGIN_NAMESPACE
-// internal timer info
-struct QTimerInfo {
- int id; // - timer identifier
- timeval interval; // - timer interval
- timeval timeout; // - when to sent event
- QObject *obj; // - object to receive event
- QTimerInfo **activateRef; // - ref from activateTimers
-};
-
-class QTimerInfoList : public QList<QTimerInfo*>
-{
-#if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC)) || defined(QT_BOOTSTRAPPED)
- timeval previousTime;
- clock_t previousTicks;
- int ticksPerSecond;
- int msPerTick;
-
- bool timeChanged(timeval *delta);
-#endif
-
- // state variables used by activateTimers()
- QTimerInfo *firstTimerInfo;
-
-public:
- QTimerInfoList();
-
- timeval currentTime;
- timeval updateCurrentTime();
-
- // must call updateCurrentTime() first!
- void repairTimersIfNeeded();
-
- bool timerWait(timeval &);
- void timerInsert(QTimerInfo *);
- void timerRepair(const timeval &);
-
- void registerTimer(int timerId, int interval, QObject *object);
- bool unregisterTimer(int timerId);
- bool unregisterTimers(QObject *object);
- QList<QPair<int, int> > registeredTimers(QObject *object) const;
-
- int activateTimers();
-};
-
struct QSockNot
{
QSocketNotifier *obj;
@@ -154,7 +111,7 @@ public:
void registerSocketNotifier(QSocketNotifier *notifier);
void unregisterSocketNotifier(QSocketNotifier *notifier);
- void registerTimer(int timerId, int interval, QObject *object);
+ void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object);
bool unregisterTimer(int timerId);
bool unregisterTimers(QObject *object);
QList<TimerInfo> registeredTimers(QObject *object) const;
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index afee536d02..3ade11ca60 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -332,26 +332,6 @@ void QEventDispatcherWin32Private::activateEventNotifier(QWinEventNotifier * wen
QCoreApplication::sendEvent(wen, &event);
}
-// ### Qt 5: remove
-Q_CORE_EXPORT bool winPeekMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin,
- UINT wMsgFilterMax, UINT wRemoveMsg)
-{
- return PeekMessage(msg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
-}
-
-// ### Qt 5: remove
-Q_CORE_EXPORT bool winPostMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- return PostMessage(hWnd, msg, wParam, lParam);
-}
-
-// ### Qt 5: remove
-Q_CORE_EXPORT bool winGetMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin,
- UINT wMsgFilterMax)
-{
- return GetMessage(msg, hWnd, wMsgFilterMin, wMsgFilterMax);
-}
-
// This function is called by a workerthread
void WINAPI QT_WIN_CALLBACK qt_fast_timer_proc(uint timerId, uint /*reserved*/, DWORD_PTR user, DWORD_PTR /*reserved*/, DWORD_PTR /*reserved*/)
{
@@ -501,11 +481,16 @@ static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatch
wc.lpszClassName = reinterpret_cast<const wchar_t *> (className.utf16());
RegisterClass(&wc);
+#ifdef Q_OS_WINCE
+ HWND parent = 0;
+#else
+ HWND parent = HWND_MESSAGE;
+#endif
HWND wnd = CreateWindow(wc.lpszClassName, // classname
wc.lpszClassName, // window name
0, // style
0, 0, 0, 0, // geometry
- 0, // parent
+ parent, // parent
0, // menu handle
qWinAppInst(), // application
0); // windows creation data.
@@ -530,30 +515,29 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t)
Q_Q(QEventDispatcherWin32);
int ok = 0;
- if (t->interval > 20 || !t->interval || !qtimeSetEvent) {
+ uint interval = t->interval;
+ if (interval == 0u) {
+ // optimization for single-shot-zero-timer
+ QCoreApplication::postEvent(q, new QZeroTimerEvent(t->timerId));
ok = 1;
- if (!t->interval) // optimization for single-shot-zero-timer
- QCoreApplication::postEvent(q, new QZeroTimerEvent(t->timerId));
- else
- ok = SetTimer(internalHwnd, t->timerId, (uint) t->interval, 0);
- } else {
- ok = t->fastTimerId = qtimeSetEvent(t->interval, 1, qt_fast_timer_proc, (DWORD_PTR)t,
+ } else if ((interval < 20u || t->timerType == Qt::PreciseTimer) && qtimeSetEvent) {
+ ok = t->fastTimerId = qtimeSetEvent(interval, 1, qt_fast_timer_proc, (DWORD_PTR)t,
TIME_CALLBACK_FUNCTION | TIME_PERIODIC | TIME_KILL_SYNCHRONOUS);
- if (ok == 0) { // fall back to normal timer if no more multimedia timers available
- ok = SetTimer(internalHwnd, t->timerId, (uint) t->interval, 0);
- }
+ } else if (interval >= 20000u || t->timerType == Qt::VeryCoarseTimer) {
+ // round the interval, VeryCoarseTimers only have full second accuracy
+ interval = ((interval + 500)) / 1000 * 1000;
+ }
+ if (ok == 0) {
+ // user normal timers for (Very)CoarseTimers, or if no more multimedia timers available
+ ok = SetTimer(internalHwnd, t->timerId, interval, 0);
}
if (ok == 0)
qErrnoWarning("QEventDispatcherWin32::registerTimer: Failed to create a timer");
}
-void QEventDispatcherWin32Private::unregisterTimer(WinTimerInfo *t, bool closingDown)
+void QEventDispatcherWin32Private::unregisterTimer(WinTimerInfo *t)
{
- // mark timer as unused
- if (!QObjectPrivate::get(t->obj)->inThreadChangeEvent && !closingDown)
- QAbstractEventDispatcherPrivate::releaseTimerId(t->timerId);
-
if (t->interval == 0) {
QCoreApplicationPrivate::removePostedTimerEvent(t->dispatcher, t->timerId);
} else if (t->fastTimerId != 0) {
@@ -859,7 +843,7 @@ void QEventDispatcherWin32::unregisterSocketNotifier(QSocketNotifier *notifier)
d->doWsaAsyncSelect(sockfd);
}
-void QEventDispatcherWin32::registerTimer(int timerId, int interval, QObject *object)
+void QEventDispatcherWin32::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object)
{
if (timerId < 1 || interval < 0 || !object) {
qWarning("QEventDispatcherWin32::registerTimer: invalid arguments");
@@ -875,6 +859,7 @@ void QEventDispatcherWin32::registerTimer(int timerId, int interval, QObject *ob
t->dispatcher = this;
t->timerId = timerId;
t->interval = interval;
+ t->timerType = timerType;
t->obj = object;
t->inTimerEvent = false;
t->fastTimerId = 0;
@@ -953,7 +938,7 @@ QEventDispatcherWin32::registeredTimers(QObject *object) const
for (int i = 0; i < d->timerVec.size(); ++i) {
const WinTimerInfo *t = d->timerVec.at(i);
if (t && t->obj == object)
- list << TimerInfo(t->timerId, t->interval);
+ list << TimerInfo(t->timerId, t->interval, t->timerType);
}
return list;
}
@@ -1050,7 +1035,7 @@ void QEventDispatcherWin32::closingDown()
// clean up any timers
for (int i = 0; i < d->timerVec.count(); ++i)
- d->unregisterTimer(d->timerVec.at(i), true);
+ d->unregisterTimer(d->timerVec.at(i));
d->timerVec.clear();
d->timerDict.clear();
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h
index 4a7aac0c04..833fcf13ac 100644
--- a/src/corelib/kernel/qeventdispatcher_win_p.h
+++ b/src/corelib/kernel/qeventdispatcher_win_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -84,7 +84,7 @@ public:
void registerSocketNotifier(QSocketNotifier *notifier);
void unregisterSocketNotifier(QSocketNotifier *notifier);
- void registerTimer(int timerId, int interval, QObject *object);
+ void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object);
bool unregisterTimer(int timerId);
bool unregisterTimers(QObject *object);
QList<TimerInfo> registeredTimers(QObject *object) const;
@@ -120,6 +120,7 @@ struct WinTimerInfo { // internal timer info
QObject *dispatcher;
int timerId;
int interval;
+ Qt::TimerType timerType;
QObject *obj; // - object to receive events
bool inTimerEvent;
int fastTimerId;
@@ -160,7 +161,7 @@ public:
WinTimerVec timerVec;
WinTimerDict timerDict;
void registerTimer(WinTimerInfo *t);
- void unregisterTimer(WinTimerInfo *t, bool closingDown = false);
+ void unregisterTimer(WinTimerInfo *t);
void sendTimerEvent(int timerId);
// socket notifiers
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp
index 37c06a2093..05e284ba34 100644
--- a/src/corelib/kernel/qeventloop.cpp
+++ b/src/corelib/kernel/qeventloop.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qeventloop.h b/src/corelib/kernel/qeventloop.h
index 5bd4146352..a76ba0ad93 100644
--- a/src/corelib/kernel/qeventloop.h
+++ b/src/corelib/kernel/qeventloop.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_nacl.cpp b/src/corelib/kernel/qfunctions_nacl.cpp
index 410df0f1e8..76272154b3 100644
--- a/src/corelib/kernel/qfunctions_nacl.cpp
+++ b/src/corelib/kernel/qfunctions_nacl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_nacl.h b/src/corelib/kernel/qfunctions_nacl.h
index c4c1fd0e2e..a2f5d928f0 100644
--- a/src/corelib/kernel/qfunctions_nacl.h
+++ b/src/corelib/kernel/qfunctions_nacl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_p.h b/src/corelib/kernel/qfunctions_p.h
index 1e75fec25d..88686e976a 100644
--- a/src/corelib/kernel/qfunctions_p.h
+++ b/src/corelib/kernel/qfunctions_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_vxworks.cpp b/src/corelib/kernel/qfunctions_vxworks.cpp
index 845825740e..c39e6ad458 100644
--- a/src/corelib/kernel/qfunctions_vxworks.cpp
+++ b/src/corelib/kernel/qfunctions_vxworks.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_vxworks.h b/src/corelib/kernel/qfunctions_vxworks.h
index d7d4ebe382..22dc7bcc06 100644
--- a/src/corelib/kernel/qfunctions_vxworks.h
+++ b/src/corelib/kernel/qfunctions_vxworks.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_wince.cpp b/src/corelib/kernel/qfunctions_wince.cpp
index f0f1a071b9..8fd09679ce 100644
--- a/src/corelib/kernel/qfunctions_wince.cpp
+++ b/src/corelib/kernel/qfunctions_wince.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qfunctions_wince.h b/src/corelib/kernel/qfunctions_wince.h
index 5569b7c777..d634cba67e 100644
--- a/src/corelib/kernel/qfunctions_wince.h
+++ b/src/corelib/kernel/qfunctions_wince.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmath.cpp b/src/corelib/kernel/qmath.cpp
index 376a707d66..fb5087092c 100644
--- a/src/corelib/kernel/qmath.cpp
+++ b/src/corelib/kernel/qmath.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h
index cc20f96166..793138a5e0 100644
--- a/src/corelib/kernel/qmath.h
+++ b/src/corelib/kernel/qmath.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc
index 5b21740d3a..b2de54ee32 100644
--- a/src/corelib/kernel/qmath.qdoc
+++ b/src/corelib/kernel/qmath.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 3178ee1b26..d7cbab8e3a 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -657,26 +657,17 @@ static const QMetaObject *QMetaObject_findMetaObject(const QMetaObject *self, co
if (strcmp(self->d.stringdata, name) == 0)
return self;
if (self->d.extradata) {
-#ifdef Q_NO_DATA_RELOCATION
- const QMetaObjectAccessor *e;
- Q_ASSERT(priv(self->d.data)->revision >= 2);
-#else
const QMetaObject **e;
if (priv(self->d.data)->revision < 2) {
e = (const QMetaObject**)(self->d.extradata);
} else
-#endif
{
const QMetaObjectExtraData *extra = (const QMetaObjectExtraData*)(self->d.extradata);
e = extra->objects;
}
if (e) {
while (*e) {
-#ifdef Q_NO_DATA_RELOCATION
- if (const QMetaObject *m =QMetaObject_findMetaObject(&((*e)()), name))
-#else
if (const QMetaObject *m =QMetaObject_findMetaObject((*e), name))
-#endif
return m;
++e;
}
@@ -855,7 +846,7 @@ QMetaProperty QMetaObject::property(int index) const
Q_ASSERT(colon <= enum_name || *(colon-1) == ':');
if (colon > enum_name) {
int len = colon-enum_name-1;
- scope_buffer = (char *)qMalloc(len+1);
+ scope_buffer = (char *)malloc(len+1);
qMemCopy(scope_buffer, enum_name, len);
scope_buffer[len] = '\0';
scope_name = scope_buffer;
@@ -870,7 +861,7 @@ QMetaProperty QMetaObject::property(int index) const
if (scope)
result.menum = scope->enumerator(scope->indexOfEnumerator(enum_name));
if (scope_buffer)
- qFree(scope_buffer);
+ free(scope_buffer);
}
}
}
@@ -1644,9 +1635,9 @@ bool QMetaMethod::invoke(QObject *object,
}
int nargs = 1; // include return type
- void **args = (void **) qMalloc(paramCount * sizeof(void *));
+ void **args = (void **) malloc(paramCount * sizeof(void *));
Q_CHECK_PTR(args);
- int *types = (int *) qMalloc(paramCount * sizeof(int));
+ int *types = (int *) malloc(paramCount * sizeof(int));
Q_CHECK_PTR(types);
types[0] = 0; // return type
args[0] = 0;
@@ -1663,8 +1654,8 @@ bool QMetaMethod::invoke(QObject *object,
if (types[x] && args[x])
QMetaType::destroy(types[x], args[x]);
}
- qFree(types);
- qFree(args);
+ free(types);
+ free(args);
return false;
}
}
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h
index 47ccc9e2b7..61ca373745 100644
--- a/src/corelib/kernel/qmetaobject.h
+++ b/src/corelib/kernel/qmetaobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmetaobject_moc_p.h b/src/corelib/kernel/qmetaobject_moc_p.h
index fd4e5d25c8..abfdc442c0 100644
--- a/src/corelib/kernel/qmetaobject_moc_p.h
+++ b/src/corelib/kernel/qmetaobject_moc_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index b99907e822..45fb95495c 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index dd098e8a64..601d52529f 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -265,11 +265,7 @@ public:
QList<QByteArray> classInfoNames;
QList<QByteArray> classInfoValues;
QList<QMetaEnumBuilderPrivate> enumerators;
-#ifdef Q_NO_DATA_RELOCATION
- QList<QMetaObjectAccessor> relatedMetaObjects;
-#else
QList<const QMetaObject *> relatedMetaObjects;
-#endif
int flags;
};
@@ -695,11 +691,7 @@ int QMetaObjectBuilder::addClassInfo(const QByteArray& name, const QByteArray& v
\sa relatedMetaObjectCount(), relatedMetaObject()
\sa removeRelatedMetaObject()
*/
-#ifdef Q_NO_DATA_RELOCATION
-int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObjectAccessor &meta)
-#else
int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObject *meta)
-#endif
{
Q_ASSERT(meta);
int index = d->relatedMetaObjects.size();
@@ -772,14 +764,10 @@ void QMetaObjectBuilder::addMetaObject
}
if ((members & RelatedMetaObjects) != 0) {
-#ifdef Q_NO_DATA_RELOCATION
- const QMetaObjectAccessor *objects = 0;
-#else
const QMetaObject **objects;
if (priv(prototype->d.data)->revision < 2) {
objects = (const QMetaObject **)(prototype->d.extradata);
} else
-#endif
{
const QMetaObjectExtraData *extra = (const QMetaObjectExtraData *)(prototype->d.extradata);
if (extra)
@@ -871,11 +859,7 @@ QMetaEnumBuilder QMetaObjectBuilder::enumerator(int index) const
const QMetaObject *QMetaObjectBuilder::relatedMetaObject(int index) const
{
if (index >= 0 && index < d->relatedMetaObjects.size())
-#ifdef Q_NO_DATA_RELOCATION
- return &((*(d->relatedMetaObjects[index]))());
-#else
return d->relatedMetaObjects[index];
-#endif
else
return 0;
}
@@ -1414,13 +1398,8 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
reinterpret_cast<QMetaObjectExtraData *>(buf + size);
size += sizeof(QMetaObjectExtraData);
ALIGN(size, QMetaObject *);
-#ifdef Q_NO_DATA_RELOCATION
- QMetaObjectAccessor *objects =
- reinterpret_cast<QMetaObjectAccessor *>(buf + size);
-#else
const QMetaObject **objects =
reinterpret_cast<const QMetaObject **>(buf + size);
-#endif
if (buf) {
if (d->relatedMetaObjects.size() > 0) {
extra->objects = objects;
@@ -1444,7 +1423,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
/*!
Converts this meta object builder into a concrete QMetaObject.
- The return value should be deallocated using qFree() once it
+ The return value should be deallocated using free() once it
is no longer needed.
The returned meta object is a snapshot of the state of the
@@ -1455,7 +1434,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
QMetaObject *QMetaObjectBuilder::toMetaObject() const
{
int size = buildMetaObject(d, 0, false);
- char *buf = reinterpret_cast<char *>(qMalloc(size));
+ char *buf = reinterpret_cast<char *>(malloc(size));
memset(buf, 0, size);
buildMetaObject(d, buf, false);
return reinterpret_cast<QMetaObject *>(buf);
@@ -1619,14 +1598,10 @@ void QMetaObjectBuilder::serialize(QDataStream& stream) const
}
// Write the related meta objects.
-#ifdef Q_NO_DATA_RELOCATION
- //### What do we do here?
-#else
for (index = 0; index < d->relatedMetaObjects.size(); ++index) {
const QMetaObject *meta = d->relatedMetaObjects[index];
stream << QByteArray(meta->className());
}
-#endif
// Add an extra empty QByteArray for additional data in future versions.
// This should help maintain backwards compatibility, allowing older
@@ -1799,9 +1774,6 @@ void QMetaObjectBuilder::deserialize
}
// Read the related meta objects.
-#ifdef Q_NO_DATA_RELOCATION
- //### What do we do here
-#else
for (index = 0; index < relatedMetaObjectCount; ++index) {
if (stream.status() != QDataStream::Ok)
return;
@@ -1813,7 +1785,6 @@ void QMetaObjectBuilder::deserialize
}
addRelatedMetaObject(cl);
}
-#endif
// Read the extra data block, which is reserved for future use.
stream >> name;
diff --git a/src/corelib/kernel/qmetaobjectbuilder_p.h b/src/corelib/kernel/qmetaobjectbuilder_p.h
index a563d6a5cd..bf3fd2499c 100644
--- a/src/corelib/kernel/qmetaobjectbuilder_p.h
+++ b/src/corelib/kernel/qmetaobjectbuilder_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -136,11 +136,7 @@ public:
int addClassInfo(const QByteArray& name, const QByteArray& value);
-#ifdef Q_NO_DATA_RELOCATION
- int addRelatedMetaObject(const QMetaObjectAccessor &meta);
-#else
int addRelatedMetaObject(const QMetaObject *meta);
-#endif
void addMetaObject(const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members = AllMembers);
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 76537c79cb..375c7b75bb 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,6 +50,7 @@
#include "qvector.h"
#include "qlocale.h"
#include "qeasingcurve.h"
+#include "quuid.h"
#include "qvariant.h"
#include "qmetatypeswitcher_p.h"
@@ -61,6 +62,7 @@
# include "qbitarray.h"
# include "qurl.h"
# include "qvariant.h"
+# include "qabstractitemmodel.h"
#endif
#ifndef QT_NO_GEOM_VARIANT
@@ -107,6 +109,7 @@ template<> struct TypeDefiniton<QVariant> { static const bool IsAvailable = fals
template<> struct TypeDefiniton<QBitArray> { static const bool IsAvailable = false; };
template<> struct TypeDefiniton<QUrl> { static const bool IsAvailable = false; };
template<> struct TypeDefiniton<QEasingCurve> { static const bool IsAvailable = false; };
+template<> struct TypeDefiniton<QModelIndex> { static const bool IsAvailable = false; };
#endif
#ifdef QT_NO_REGEXP
template<> struct TypeDefiniton<QRegExp> { static const bool IsAvailable = false; };
@@ -240,6 +243,16 @@ template<> struct TypeDefiniton<QRegExp> { static const bool IsAvailable = false
*/
/*!
+ \enum QMetaType::TypeFlags
+
+ The enum describes attributes of a type supported by QMetaType.
+
+ \value NeedsConstruction This type has non-trivial constructors. If the flag is not set instances can be safely initialized with memset to 0.
+ \value NeedsDestruction This type has a non-trivial destructor. If the flag is not set calls to the destructor are not necessary before discarding objects.
+ \value MovableType An instance of a type having this attribute can be safely moved by memcpy.
+*/
+
+/*!
\class QMetaType
\brief The QMetaType class manages named types in the meta-object system.
@@ -297,6 +310,14 @@ public:
int alias;
};
+namespace
+{
+union CheckThatItIsPod
+{ // This should break if QMetaTypeInterface is not a POD type
+ QMetaTypeInterface iface;
+};
+}
+
Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE);
Q_GLOBAL_STATIC(QVector<QCustomTypeInfo>, customTypes)
Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
@@ -415,7 +436,7 @@ static int qMetaTypeCustomType_unlocked(const char *typeName, int length)
int QMetaType::registerType(const char *typeName, Deleter deleter,
Creator creator)
{
- return registerType(typeName, deleter, creator, 0, 0, 0);
+ return registerType(typeName, deleter, creator, 0, 0, 0, TypeFlags());
}
/*! \internal
@@ -430,7 +451,7 @@ int QMetaType::registerType(const char *typeName, Deleter deleter,
Creator creator,
Destructor destructor,
Constructor constructor,
- int size)
+ int size, TypeFlags flags)
{
QVector<QCustomTypeInfo> *ct = customTypes();
if (!ct || !typeName || !deleter || !creator)
@@ -454,10 +475,15 @@ int QMetaType::registerType(const char *typeName, Deleter deleter,
inf.typeName = normalizedTypeName;
inf.creator = creator;
inf.deleter = deleter;
+#ifndef QT_NO_DATASTREAM
+ inf.loadOp = 0;
+ inf.saveOp = 0;
+#endif
inf.alias = -1;
inf.constructor = constructor;
inf.destructor = destructor;
inf.size = size;
+ inf.flags = flags;
idx = ct->size() + User;
ct->append(inf);
}
@@ -765,6 +791,9 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
return false;
qMetaTypeWidgetsHelper[type - FirstWidgetsType].saveOp(stream, data);
break;
+ case QMetaType::QUuid:
+ stream << *static_cast<const NS(QUuid)*>(data);
+ break;
default: {
const QVector<QCustomTypeInfo> * const ct = customTypes();
if (!ct)
@@ -972,6 +1001,9 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
return false;
qMetaTypeWidgetsHelper[type - FirstWidgetsType].loadOp(stream, data);
break;
+ case QMetaType::QUuid:
+ stream >> *static_cast< NS(QUuid)*>(data);
+ break;
default: {
const QVector<QCustomTypeInfo> * const ct = customTypes();
if (!ct)
@@ -1092,6 +1124,12 @@ void *QMetaType::create(int type, const void *copy)
case QMetaType::QEasingCurve:
return new NS(QEasingCurve)(*static_cast<const NS(QEasingCurve)*>(copy));
#endif
+ case QMetaType::QUuid:
+ return new NS(QUuid)(*static_cast<const NS(QUuid)*>(copy));
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QModelIndex:
+ return new NS(QModelIndex)(*static_cast<const NS(QModelIndex)*>(copy));
+#endif
case QMetaType::Void:
return 0;
default:
@@ -1189,6 +1227,12 @@ void *QMetaType::create(int type, const void *copy)
case QMetaType::QEasingCurve:
return new NS(QEasingCurve);
#endif
+ case QMetaType::QUuid:
+ return new NS(QUuid);
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QModelIndex:
+ return new NS(QModelIndex);
+#endif
case QMetaType::Void:
return 0;
default:
@@ -1356,6 +1400,14 @@ void QMetaType::destroy(int type, void *data)
delete static_cast< NS(QEasingCurve)* >(data);
break;
#endif
+ case QMetaType::QUuid:
+ delete static_cast< NS(QUuid)* >(data);
+ break;
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QModelIndex:
+ delete static_cast< NS(QModelIndex)* >(data);
+ break;
+#endif
case QMetaType::Void:
break;
default: {
@@ -1387,9 +1439,8 @@ void QMetaType::destroy(int type, void *data)
}
namespace {
-template<class Filter>
class TypeConstructor {
- template<typename T, bool IsAcceptedType = Filter::template Acceptor<T>::IsAccepted>
+ template<typename T, bool IsAcceptedType = DefinedTypesFilter::Acceptor<T>::IsAccepted>
struct ConstructorImpl {
static void *Construct(const int /*type*/, void *where, const T *copy) { return qMetaTypeConstructHelper(where, copy); }
};
@@ -1398,13 +1449,11 @@ class TypeConstructor {
static void *Construct(const int type, void *where, const T *copy)
{
QMetaType::Constructor ctor = 0;
- if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType) {
- Q_ASSERT(qMetaTypeGuiHelper);
+ if (QTypeModuleInfo<T>::IsGui) {
if (!qMetaTypeGuiHelper)
return 0;
ctor = qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].constructor;
- } else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType) {
- Q_ASSERT(qMetaTypeWidgetsHelper);
+ } else if (QTypeModuleInfo<T>::IsWidget) {
if (!qMetaTypeWidgetsHelper)
return 0;
ctor = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].constructor;
@@ -1474,15 +1523,14 @@ void *QMetaType::construct(int type, void *where, const void *copy)
{
if (!where)
return 0;
- TypeConstructor<DefinedTypesFilter> constructor(type, where);
+ TypeConstructor constructor(type, where);
return QMetaTypeSwitcher::switcher<void*>(constructor, type, copy);
}
namespace {
-template<class Filter>
class TypeDestructor {
- template<typename T, bool IsAcceptedType = Filter::template Acceptor<T>::IsAccepted>
+ template<typename T, bool IsAcceptedType = DefinedTypesFilter::Acceptor<T>::IsAccepted>
struct DestructorImpl {
static void Destruct(const int /* type */, T *where) { qMetaTypeDestructHelper(where); }
};
@@ -1491,13 +1539,11 @@ class TypeDestructor {
static void Destruct(const int type, void *where)
{
QMetaType::Destructor dtor = 0;
- if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType) {
- Q_ASSERT(qMetaTypeGuiHelper);
+ if (QTypeModuleInfo<T>::IsGui) {
if (!qMetaTypeGuiHelper)
return;
dtor = qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].destructor;
- } else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType) {
- Q_ASSERT(qMetaTypeWidgetsHelper);
+ } else if (QTypeModuleInfo<T>::IsWidget) {
if (!qMetaTypeWidgetsHelper)
return;
dtor = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].destructor;
@@ -1550,15 +1596,14 @@ void QMetaType::destruct(int type, void *where)
{
if (!where)
return;
- TypeDestructor<DefinedTypesFilter> destructor(type);
+ TypeDestructor destructor(type);
QMetaTypeSwitcher::switcher<void>(destructor, type, where);
}
namespace {
-template<class Filter>
class SizeOf {
- template<typename T, bool IsAcceptedType = Filter::template Acceptor<T>::IsAccepted>
+ template<typename T, bool IsAcceptedType = DefinedTypesFilter::Acceptor<T>::IsAccepted>
struct SizeOfImpl {
static int Size(const int) { return sizeof(T); }
};
@@ -1566,13 +1611,11 @@ class SizeOf {
struct SizeOfImpl<T, /* IsAcceptedType = */ false> {
static int Size(const int type)
{
- if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType) {
- Q_ASSERT(qMetaTypeGuiHelper);
+ if (QTypeModuleInfo<T>::IsGui) {
if (!qMetaTypeGuiHelper)
return 0;
return qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].size;
- } else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType) {
- Q_ASSERT(qMetaTypeWidgetsHelper);
+ } else if (QTypeModuleInfo<T>::IsWidget) {
if (!qMetaTypeWidgetsHelper)
return 0;
return qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].size;
@@ -1617,10 +1660,77 @@ private:
*/
int QMetaType::sizeOf(int type)
{
- SizeOf<DefinedTypesFilter> sizeOf(type);
+ SizeOf sizeOf(type);
return QMetaTypeSwitcher::switcher<int>(sizeOf, type, 0);
}
+namespace {
+class Flags
+{
+ template<typename T, bool IsAcceptedType = DefinedTypesFilter::Acceptor<T>::IsAccepted>
+ struct FlagsImpl
+ {
+ static quint32 Flags(const int)
+ {
+ return (!QTypeInfo<T>::isStatic * QMetaType::MovableType)
+ | (QTypeInfo<T>::isComplex * QMetaType::NeedsConstruction)
+ | (QTypeInfo<T>::isComplex * QMetaType::NeedsDestruction);
+ }
+ };
+ template<typename T>
+ struct FlagsImpl<T, /* IsAcceptedType = */ false>
+ {
+ static quint32 Flags(const int type)
+ {
+ return Flags::undefinedTypeFlags(type);
+ }
+ };
+public:
+ Flags(const int type)
+ : m_type(type)
+ {}
+ template<typename T>
+ quint32 delegate(const T*) { return FlagsImpl<T>::Flags(m_type); }
+ quint32 delegate(const QMetaTypeSwitcher::UnknownType*) { return customTypeFlags(m_type); }
+private:
+ const int m_type;
+ static quint32 customTypeFlags(const int type)
+ {
+ const QVector<QCustomTypeInfo> * const ct = customTypes();
+ if (!ct)
+ return 0;
+ QReadLocker locker(customTypesLock());
+ if (ct->count() <= type - QMetaType::User)
+ return 0;
+ return ct->at(type - QMetaType::User).flags;
+ }
+ static quint32 undefinedTypeFlags(const int type);
+};
+
+quint32 Flags::undefinedTypeFlags(const int type)
+{
+ if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType)
+ return qMetaTypeGuiHelper ? qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].flags : 0;
+ else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType)
+ return qMetaTypeWidgetsHelper ? qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].flags : 0;
+ return customTypeFlags(type);
+}
+
+} // namespace
+
+/*!
+ \since 5.0
+
+ Returns flags of the given \a type.
+
+ \sa TypeFlags()
+*/
+QMetaType::TypeFlags QMetaType::typeFlags(int type)
+{
+ Flags flags(type);
+ return static_cast<QMetaType::TypeFlags>(QMetaTypeSwitcher::switcher<quint32>(flags, type, 0));
+}
+
/*!
\fn int qRegisterMetaType(const char *typeName)
\relates QMetaType
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 717e72c810..843044eee6 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -98,6 +98,8 @@ QT_MODULE(Core)
F(QPointF, 26, QPointF) \
F(QRegExp, 27, QRegExp) \
F(QEasingCurve, 29, QEasingCurve) \
+ F(QUuid, 30, QUuid) \
+ F(QModelIndex, 31, QModelIndex) \
F(QVariant, 138, QVariant) \
#define QT_FOR_EACH_STATIC_CORE_POINTER(F)\
@@ -182,7 +184,7 @@ public:
// these are merged with QVariant
QT_FOR_EACH_STATIC_TYPE(QT_DEFINE_METATYPE_ID)
- LastCoreType = QEasingCurve,
+ LastCoreType = QModelIndex,
FirstGuiType = QFont,
LastGuiType = QPolygonF,
FirstWidgetsType = QIcon,
@@ -202,6 +204,13 @@ public:
User = 256
};
+ enum TypeFlag {
+ NeedsConstruction = 0x1,
+ NeedsDestruction = 0x2,
+ MovableType = 0x4
+ };
+ Q_DECLARE_FLAGS(TypeFlags, TypeFlag)
+
typedef void (*Deleter)(void *);
typedef void *(*Creator)(const void *);
@@ -222,11 +231,13 @@ public:
Creator creator,
Destructor destructor,
Constructor constructor,
- int size);
+ int size,
+ QMetaType::TypeFlags flags);
static int registerTypedef(const char *typeName, int aliasId);
static int type(const char *typeName);
static const char *typeName(int type);
static int sizeOf(int type);
+ static TypeFlags typeFlags(int type);
static bool isRegistered(int type);
static void *create(int type, const void *copy = 0);
#if QT_DEPRECATED_SINCE(5, 0)
@@ -246,6 +257,8 @@ public:
#undef QT_DEFINE_METATYPE_ID
+Q_DECLARE_OPERATORS_FOR_FLAGS(QMetaType::TypeFlags)
+
template <typename T>
void qMetaTypeDeleteHelper(T *t)
{
@@ -334,11 +347,20 @@ int qRegisterMetaType(const char *typeName
typedef void(*DestructPtr)(T*);
DestructPtr ipdptr = qMetaTypeDestructHelper<T>;
+ QMetaType::TypeFlags flags;
+ if (!QTypeInfo<T>::isStatic)
+ flags |= QMetaType::MovableType;
+ if (QTypeInfo<T>::isComplex) {
+ flags |= QMetaType::NeedsConstruction;
+ flags |= QMetaType::NeedsDestruction;
+ }
+
return QMetaType::registerType(typeName, reinterpret_cast<QMetaType::Deleter>(dptr),
reinterpret_cast<QMetaType::Creator>(cptr),
reinterpret_cast<QMetaType::Destructor>(ipdptr),
reinterpret_cast<QMetaType::Constructor>(ipcptr),
- sizeof(T));
+ sizeof(T),
+ flags);
}
#ifndef QT_NO_DATASTREAM
diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h
index 92311afc8e..11139288d1 100644
--- a/src/corelib/kernel/qmetatype_p.h
+++ b/src/corelib/kernel/qmetatype_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,11 +57,22 @@
QT_BEGIN_NAMESPACE
-enum { /* TYPEMODULEINFO flags */
- Q_CORE_TYPE = 1,
- Q_GUI_TYPE = 2,
- Q_WIDGET_TYPE = 3
-};
+namespace QModulesPrivate {
+enum Names { Core, Gui, Widgets, Unknown, ModulesCount /* ModulesCount has to be at the end */ };
+
+static inline int moduleForType(const int typeId)
+{
+ if (typeId <= QMetaType::LastCoreType)
+ return Core;
+ if (typeId <= QMetaType::LastGuiType)
+ return Gui;
+ if (typeId <= QMetaType::LastWidgetsType)
+ return Widgets;
+ if (typeId <= QMetaType::LastCoreExtType)
+ return Core;
+ return Unknown;
+}
+}
template <typename T>
class QTypeModuleInfo
@@ -73,7 +84,6 @@ public:
IsGui = false,
IsUnknown = !IsCore
};
- static inline int module() { return IsCore ? Q_CORE_TYPE : 0; }
};
#define QT_ASSIGN_TYPE_TO_MODULE(TYPE, MODULE) \
@@ -82,9 +92,9 @@ class QTypeModuleInfo<TYPE > \
{ \
public: \
enum Module { \
- IsCore = (((MODULE) == (Q_CORE_TYPE))), \
- IsWidget = (((MODULE) == (Q_WIDGET_TYPE))), \
- IsGui = (((MODULE) == (Q_GUI_TYPE))), \
+ IsCore = (((MODULE) == (QModulesPrivate::Core))), \
+ IsWidget = (((MODULE) == (QModulesPrivate::Widgets))), \
+ IsGui = (((MODULE) == (QModulesPrivate::Gui))), \
IsUnknown = !(IsCore || IsWidget || IsGui) \
}; \
static inline int module() { return MODULE; } \
@@ -96,11 +106,11 @@ public: \
#define QT_DECLARE_CORE_MODULE_TYPES_ITER(TypeName, TypeId, Name) \
- QT_ASSIGN_TYPE_TO_MODULE(Name, Q_CORE_TYPE);
+ QT_ASSIGN_TYPE_TO_MODULE(Name, QModulesPrivate::Core);
#define QT_DECLARE_GUI_MODULE_TYPES_ITER(TypeName, TypeId, Name) \
- QT_ASSIGN_TYPE_TO_MODULE(Name, Q_GUI_TYPE);
+ QT_ASSIGN_TYPE_TO_MODULE(Name, QModulesPrivate::Gui);
#define QT_DECLARE_WIDGETS_MODULE_TYPES_ITER(TypeName, TypeId, Name) \
- QT_ASSIGN_TYPE_TO_MODULE(Name, Q_WIDGET_TYPE);
+ QT_ASSIGN_TYPE_TO_MODULE(Name, QModulesPrivate::Widgets);
QT_FOR_EACH_STATIC_CORE_CLASS(QT_DECLARE_CORE_MODULE_TYPES_ITER)
QT_FOR_EACH_STATIC_CORE_TEMPLATE(QT_DECLARE_CORE_MODULE_TYPES_ITER)
@@ -113,7 +123,7 @@ QT_FOR_EACH_STATIC_WIDGETS_CLASS(QT_DECLARE_WIDGETS_MODULE_TYPES_ITER)
class QMetaTypeInterface
{
-private:
+public:
template<typename T>
struct Impl {
static void *creator(const T *t)
@@ -140,31 +150,6 @@ private:
return new (where) T;
}
};
-public:
- template<typename T>
- explicit QMetaTypeInterface(T *)
- : creator(reinterpret_cast<QMetaType::Creator>(Impl<T>::creator))
- , deleter(reinterpret_cast<QMetaType::Deleter>(Impl<T>::deleter))
- #ifndef QT_NO_DATASTREAM
- , saveOp(reinterpret_cast<QMetaType::SaveOperator>(Impl<T>::saver))
- , loadOp(reinterpret_cast<QMetaType::LoadOperator>(Impl<T>::loader))
- #endif
- , constructor(reinterpret_cast<QMetaType::Constructor>(Impl<T>::constructor))
- , destructor(reinterpret_cast<QMetaType::Destructor>(Impl<T>::destructor))
- , size(sizeof(T))
- {}
-
- QMetaTypeInterface()
- : creator(0)
- , deleter(0)
- #ifndef QT_NO_DATASTREAM
- , saveOp(0)
- , loadOp(0)
- #endif
- , constructor(0)
- , destructor(0)
- , size(0)
- {}
QMetaType::Creator creator;
QMetaType::Deleter deleter;
@@ -175,8 +160,30 @@ public:
QMetaType::Constructor constructor;
QMetaType::Destructor destructor;
int size;
+ quint32 flags; // same as QMetaType::TypeFlags
};
+#ifndef QT_NO_DATASTREAM
+# define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \
+ /*saveOp*/(reinterpret_cast<QMetaType::SaveOperator>(QMetaTypeInterface::Impl<Type>::saver)), \
+ /*loadOp*/(reinterpret_cast<QMetaType::LoadOperator>(QMetaTypeInterface::Impl<Type>::loader)),
+#else
+# define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type)
+#endif
+
+#define QT_METATYPE_INTERFACE_INIT(Type) \
+{ \
+ /*creator*/(reinterpret_cast<QMetaType::Creator>(QMetaTypeInterface::Impl<Type>::creator)), \
+ /*deleter*/(reinterpret_cast<QMetaType::Deleter>(QMetaTypeInterface::Impl<Type>::deleter)), \
+ QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \
+ /*constructor*/(reinterpret_cast<QMetaType::Constructor>(QMetaTypeInterface::Impl<Type>::constructor)), \
+ /*destructor*/(reinterpret_cast<QMetaType::Destructor>(QMetaTypeInterface::Impl<Type>::destructor)), \
+ /*size*/(sizeof(Type)), \
+ /*flags*/(!QTypeInfo<Type>::isStatic * QMetaType::MovableType) \
+ | (QTypeInfo<Type>::isComplex * QMetaType::NeedsConstruction) \
+ | (QTypeInfo<Type>::isComplex * QMetaType::NeedsDestruction) \
+}
+
QT_END_NAMESPACE
#endif // QMETATYPE_P_H
diff --git a/src/corelib/kernel/qmetatypeswitcher_p.h b/src/corelib/kernel/qmetatypeswitcher_p.h
index cba6504956..d3cf1024c3 100644
--- a/src/corelib/kernel/qmetatypeswitcher_p.h
+++ b/src/corelib/kernel/qmetatypeswitcher_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index 9d1e03e9e8..c43ef505fb 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qmimedata.h b/src/corelib/kernel/qmimedata.h
index e8f32ed43c..60498b7ab8 100644
--- a/src/corelib/kernel/qmimedata.h
+++ b/src/corelib/kernel/qmimedata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index e4ef826ffd..bebdcac662 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,6 +44,7 @@
#include "qmetaobject_p.h"
#include "qabstracteventdispatcher.h"
+#include "qabstracteventdispatcher_p.h"
#include "qcoreapplication.h"
#include "qcoreapplication_p.h"
#include "qvariant.h"
@@ -162,30 +163,28 @@ QObjectPrivate::QObjectPrivate(int version)
q_ptr = 0;
parent = 0; // no parent yet. It is set by setParent()
isWidget = false; // assume not a widget object
- pendTimer = false; // no timers yet
blockSig = false; // not blocking signals
wasDeleted = false; // double-delete catcher
+ isDeletingChildren = false; // set by deleteChildren()
sendChildEvents = true; // if we should send ChildInsert and ChildRemove events to parent
receiveChildEvents = true;
postedEvents = 0;
extraData = 0;
connectedSignals[0] = connectedSignals[1] = 0;
- inThreadChangeEvent = false;
-#ifdef QT_JAMBI_BUILD
- inEventHandler = false;
- deleteWatch = 0;
-#endif
metaObject = 0;
- hasGuards = false;
isWindow = false;
}
QObjectPrivate::~QObjectPrivate()
{
- if (pendTimer) {
+ if (!runningTimers.isEmpty()) {
// unregister pending timers
if (threadData->eventDispatcher)
threadData->eventDispatcher->unregisterTimers(q_ptr);
+
+ // release the timer ids back to the pool
+ for (int i = 0; i < runningTimers.size(); ++i)
+ QAbstractEventDispatcherPrivate::releaseTimerId(runningTimers.at(i));
}
if (postedEvents)
@@ -194,10 +193,6 @@ QObjectPrivate::~QObjectPrivate()
threadData->deref();
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
-#ifdef QT_JAMBI_BUILD
- if (deleteWatch)
- *deleteWatch = 1;
-#endif
#ifndef QT_NO_USERDATA
if (extraData)
qDeleteAll(extraData->userData);
@@ -205,25 +200,6 @@ QObjectPrivate::~QObjectPrivate()
#endif
}
-
-#ifdef QT_JAMBI_BUILD
-int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) {
- int *old = d->deleteWatch;
- d->deleteWatch = w;
- return old;
-}
-
-
-void QObjectPrivate::resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int deleteWatch) {
- if (!deleteWatch)
- d->deleteWatch = oldWatch;
-
- if (oldWatch)
- *oldWatch = deleteWatch;
-}
-#endif
-
-
/*!\internal
For a given metaobject, compute the signal offset, and the method offset (including signals)
*/
@@ -408,113 +384,6 @@ void QObjectPrivate::cleanConnectionLists()
}
}
-typedef QMultiHash<QObject *, QObject **> GuardHash;
-Q_GLOBAL_STATIC(GuardHash, guardHash)
-Q_GLOBAL_STATIC(QMutex, guardHashLock)
-
-/*!\internal
- */
-void QMetaObject::addGuard(QObject **ptr)
-{
- if (!*ptr)
- return;
- GuardHash *hash = guardHash();
- if (!hash) {
- *ptr = 0;
- return;
- }
- QMutexLocker locker(guardHashLock());
- QObjectPrivate::get(*ptr)->hasGuards = true;
- hash->insert(*ptr, ptr);
-}
-
-/*!\internal
- */
-void QMetaObject::removeGuard(QObject **ptr)
-{
- if (!*ptr)
- return;
- GuardHash *hash = guardHash();
- /* check that the hash is empty - otherwise we might detach
- the shared_null hash, which will alloc, which is not nice */
- if (!hash || hash->isEmpty())
- return;
- QMutexLocker locker(guardHashLock());
- if (!*ptr) //check again, under the lock
- return;
- GuardHash::iterator it = hash->find(*ptr);
- const GuardHash::iterator end = hash->end();
- bool more = false; //if the QObject has more pointer attached to it.
- for (; it.key() == *ptr && it != end; ++it) {
- if (it.value() == ptr) {
- it = hash->erase(it);
- if (!more) more = (it != end && it.key() == *ptr);
- break;
- }
- more = true;
- }
- if (!more)
- QObjectPrivate::get(*ptr)->hasGuards = false;
-}
-
-/*!\internal
- */
-void QMetaObject::changeGuard(QObject **ptr, QObject *o)
-{
- GuardHash *hash = guardHash();
- if (!hash) {
- *ptr = 0;
- return;
- }
- QMutexLocker locker(guardHashLock());
- if (o) {
- hash->insert(o, ptr);
- QObjectPrivate::get(o)->hasGuards = true;
- }
- if (*ptr) {
- bool more = false; //if the QObject has more pointer attached to it.
- GuardHash::iterator it = hash->find(*ptr);
- const GuardHash::iterator end = hash->end();
- for (; it.key() == *ptr && it != end; ++it) {
- if (it.value() == ptr) {
- it = hash->erase(it);
- if (!more) more = (it != end && it.key() == *ptr);
- break;
- }
- more = true;
- }
- if (!more)
- QObjectPrivate::get(*ptr)->hasGuards = false;
- }
- *ptr = o;
-}
-
-/*! \internal
- */
-void QObjectPrivate::clearGuards(QObject *object)
-{
- GuardHash *hash = 0;
- QMutex *mutex = 0;
- QT_TRY {
- hash = guardHash();
- mutex = guardHashLock();
- } QT_CATCH(const std::bad_alloc &) {
- // do nothing in case of OOM - code below is safe
- }
-
- /* check that the hash is empty - otherwise we might detach
- the shared_null hash, which will alloc, which is not nice */
- if (hash && !hash->isEmpty()) {
- QMutexLocker locker(mutex);
- GuardHash::iterator it = hash->find(object);
- const GuardHash::iterator end = hash->end();
- while (it.key() == object && it != end) {
- *it.value() = 0;
- it = hash->erase(it);
- }
- }
-}
-
/*! \internal
*/
QMetaCallEvent::QMetaCallEvent(ushort method_offset, ushort method_relative, QObjectPrivate::StaticMetaCallFunction callFunction,
@@ -546,8 +415,8 @@ QMetaCallEvent::~QMetaCallEvent()
if (types_[i] && args_[i])
QMetaType::destroy(types_[i], args_[i]);
}
- qFree(types_);
- qFree(args_);
+ free(types_);
+ free(args_);
}
#ifndef QT_NO_THREAD
if (semaphore_)
@@ -563,7 +432,7 @@ void QMetaCallEvent::placeMetaCall(QObject *object)
{
if (slotObj_) {
slotObj_->call(object, args_);
- } else if (callFunction_) {
+ } else if (callFunction_ && method_offset_ <= object->metaObject()->methodOffset()) {
callFunction_(object, QMetaObject::InvokeMetaMethod, method_relative_, args_);
} else {
QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, method_offset_ + method_relative_, args_);
@@ -839,12 +708,6 @@ QObject::~QObject()
d->wasDeleted = true;
d->blockSig = 0; // unblock signals so we always emit destroyed()
- if (d->hasGuards && !d->isWidget) {
- // set all QPointers for this object to zero - note that
- // ~QWidget() does this for us, so we don't have to do it twice
- QObjectPrivate::clearGuards(this);
- }
-
QtSharedPointer::ExternalRefCountData *sharedRefcount = d->sharedRefcount.load();
if (sharedRefcount) {
if (sharedRefcount->strongref.load() > 0) {
@@ -950,13 +813,6 @@ QObject::~QObject()
if (d->parent) // remove it from parent object
d->setParent_helper(0);
-
-#ifdef QT_JAMBI_BUILD
- if (d->inEventHandler) {
- qWarning("QObject: Do not delete object, '%s', during its event handler!",
- objectName().isNull() ? "unnamed" : qPrintable(objectName()));
- }
-#endif
}
QObjectPrivate::Connection::~Connection()
@@ -1096,13 +952,20 @@ QString QObject::objectName() const
void QObject::setObjectName(const QString &name)
{
Q_D(QObject);
- bool objectNameChanged = d->declarativeData && d->objectName != name;
+ if (d->objectName != name) {
+ d->objectName = name;
+ if (d->declarativeData)
+ d->declarativeData->objectNameChanged(d->declarativeData, this);
+ emit objectNameChanged(d->objectName);
+ }
+}
- d->objectName = name;
+/*! \fn void QObject::objectNameChanged(const QString &objectName)
- if (objectNameChanged)
- d->declarativeData->objectNameChanged(d->declarativeData, this);
-}
+ This signal is emitted after the object's name has been changed. The new object name is passed as \a objectName.
+
+ \sa QObject::objectName
+*/
/*!
\fn bool QObject::isWidgetType() const
@@ -1144,9 +1007,6 @@ bool QObject::event(QEvent *e)
case QEvent::MetaCall:
{
-#ifdef QT_JAMBI_BUILD
- d_func()->inEventHandler = false;
-#endif
QMetaCallEvent *mce = static_cast<QMetaCallEvent*>(e);
QConnectionSenderSwitcher sw(this, const_cast<QObject*>(mce->sender()), mce->signalId());
@@ -1160,15 +1020,12 @@ bool QObject::event(QEvent *e)
QThreadData *threadData = d->threadData;
QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher;
if (eventDispatcher) {
- QList<QPair<int, int> > timers = eventDispatcher->registeredTimers(this);
+ QList<QAbstractEventDispatcher::TimerInfo> timers = eventDispatcher->registeredTimers(this);
if (!timers.isEmpty()) {
- // set inThreadChangeEvent to true to tell the dispatcher not to release out timer ids
- // back to the pool (since the timer ids are moving to a new thread).
- d->inThreadChangeEvent = true;
+ // do not to release our timer ids back to the pool (since the timer ids are moving to a new thread).
eventDispatcher->unregisterTimers(this);
- d->inThreadChangeEvent = false;
QMetaObject::invokeMethod(this, "_q_reregisterTimers", Qt::QueuedConnection,
- Q_ARG(void*, (new QList<QPair<int, int> >(timers))));
+ Q_ARG(void*, (new QList<QAbstractEventDispatcher::TimerInfo>(timers))));
}
}
break;
@@ -1451,15 +1308,6 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData
currentSender->ref = 0;
currentSender = 0;
-#ifdef QT_JAMBI_BUILD
- // the current event thread also shouldn't restore the delete watch
- inEventHandler = false;
-
- if (deleteWatch)
- *deleteWatch = 1;
- deleteWatch = 0;
-#endif
-
// set new thread data
targetData->ref();
threadData->deref();
@@ -1474,11 +1322,11 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData
void QObjectPrivate::_q_reregisterTimers(void *pointer)
{
Q_Q(QObject);
- QList<QPair<int, int> > *timerList = reinterpret_cast<QList<QPair<int, int> > *>(pointer);
+ QList<QAbstractEventDispatcher::TimerInfo> *timerList = reinterpret_cast<QList<QAbstractEventDispatcher::TimerInfo> *>(pointer);
QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher;
for (int i = 0; i < timerList->size(); ++i) {
- const QPair<int, int> &pair = timerList->at(i);
- eventDispatcher->registerTimer(pair.first, pair.second, q);
+ const QAbstractEventDispatcher::TimerInfo &ti = timerList->at(i);
+ eventDispatcher->registerTimer(ti.timerId, ti.interval, ti.timerType, q);
}
delete timerList;
}
@@ -1510,10 +1358,12 @@ void QObjectPrivate::_q_reregisterTimers(void *pointer)
\snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 8
- Note that QTimer's accuracy depends on the underlying operating
- system and hardware. Most platforms support an accuracy of 20
- milliseconds; some provide more. If Qt is unable to deliver the
- requested number of timer events, it will silently discard some.
+ Note that QTimer's accuracy depends on the underlying operating system and
+ hardware. The \a timerType argument allows you to customize the accuracy of
+ the timer. See Qt::TimerType for information on the different timer types.
+ Most platforms support an accuracy of 20 milliseconds; some provide more.
+ If Qt is unable to deliver the requested number of timer events, it will
+ silently discard some.
The QTimer class provides a high-level programming interface with
single-shot timers and timer signals instead of events. There is
@@ -1523,7 +1373,7 @@ void QObjectPrivate::_q_reregisterTimers(void *pointer)
\sa timerEvent(), killTimer(), QTimer::singleShot()
*/
-int QObject::startTimer(int interval)
+int QObject::startTimer(int interval, Qt::TimerType timerType)
{
Q_D(QObject);
@@ -1532,13 +1382,13 @@ int QObject::startTimer(int interval)
return 0;
}
- d->pendTimer = true; // set timer flag
-
if (!d->threadData->eventDispatcher) {
qWarning("QObject::startTimer: QTimer can only be used with threads started with QThread");
return 0;
}
- return d->threadData->eventDispatcher->registerTimer(interval, this);
+ int timerId = d->threadData->eventDispatcher->registerTimer(interval, timerType, this);
+ d->runningTimers.append(timerId);
+ return timerId;
}
/*!
@@ -1553,8 +1403,23 @@ int QObject::startTimer(int interval)
void QObject::killTimer(int id)
{
Q_D(QObject);
- if (d->threadData->eventDispatcher)
- d->threadData->eventDispatcher->unregisterTimer(id);
+ if (id) {
+ int at = d->runningTimers.indexOf(id);
+ if (at == -1) {
+ // timer isn't owned by this object
+ qWarning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s), timer has not been killed",
+ id,
+ this,
+ qPrintable(objectName()));
+ return;
+ }
+
+ if (d->threadData->eventDispatcher)
+ d->threadData->eventDispatcher->unregisterTimer(id);
+
+ d->runningTimers.remove(at);
+ QAbstractEventDispatcherPrivate::releaseTimerId(id);
+ }
}
@@ -1774,8 +1639,8 @@ void QObject::setParent(QObject *parent)
void QObjectPrivate::deleteChildren()
{
- const bool reallyWasDeleted = wasDeleted;
- wasDeleted = true;
+ Q_ASSERT_X(!isDeletingChildren, "QObjectPrivate::deleteChildren()", "isDeletingChildren already set, did this function recurse?");
+ isDeletingChildren = true;
// delete children objects
// don't use qDeleteAll as the destructor of the child might
// delete siblings
@@ -1786,7 +1651,7 @@ void QObjectPrivate::deleteChildren()
}
children.clear();
currentChildBeingDeleted = 0;
- wasDeleted = reallyWasDeleted;
+ isDeletingChildren = false;
}
void QObjectPrivate::setParent_helper(QObject *o)
@@ -1796,13 +1661,13 @@ void QObjectPrivate::setParent_helper(QObject *o)
return;
if (parent) {
QObjectPrivate *parentD = parent->d_func();
- if (parentD->wasDeleted && wasDeleted
+ if (parentD->isDeletingChildren && wasDeleted
&& parentD->currentChildBeingDeleted == q) {
// don't do anything since QObjectPrivate::deleteChildren() already
// cleared our entry in parentD->children.
} else {
const int index = parentD->children.indexOf(q);
- if (parentD->wasDeleted) {
+ if (parentD->isDeletingChildren) {
parentD->children[index] = 0;
} else {
parentD->children.removeAt(index);
@@ -1829,7 +1694,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
}
}
}
- if (!wasDeleted && declarativeData)
+ if (!isDeletingChildren && declarativeData)
QAbstractDeclarativeData::parentChanged(declarativeData, q, o);
}
@@ -2060,10 +1925,10 @@ static bool check_signal_macro(const QObject *sender, const char *signal,
int sigcode = extract_code(signal);
if (sigcode != QSIGNAL_CODE) {
if (sigcode == QSLOT_CODE)
- qWarning("Object::%s: Attempt to %s non-signal %s::%s",
+ qWarning("QObject::%s: Attempt to %s non-signal %s::%s",
func, op, sender->metaObject()->className(), signal+1);
else
- qWarning("Object::%s: Use the SIGNAL macro to %s %s::%s",
+ qWarning("QObject::%s: Use the SIGNAL macro to %s %s::%s",
func, op, sender->metaObject()->className(), signal);
return false;
}
@@ -2074,7 +1939,7 @@ static bool check_method_code(int code, const QObject *object,
const char *method, const char *func)
{
if (code != QSLOT_CODE && code != QSIGNAL_CODE) {
- qWarning("Object::%s: Use the SLOT or SIGNAL macro to "
+ qWarning("QObject::%s: Use the SLOT or SIGNAL macro to "
"%s %s::%s", func, func, object->metaObject()->className(), method);
return false;
}
@@ -2091,11 +1956,11 @@ static void err_method_notfound(const QObject *object,
}
const char *loc = extract_location(method);
if (strchr(method,')') == 0) // common typing mistake
- qWarning("Object::%s: Parentheses expected, %s %s::%s%s%s",
+ qWarning("QObject::%s: Parentheses expected, %s %s::%s%s%s",
func, type, object->metaObject()->className(), method+1,
loc ? " in ": "", loc ? loc : "");
else
- qWarning("Object::%s: No such %s %s::%s%s%s",
+ qWarning("QObject::%s: No such %s %s::%s%s%s",
func, type, object->metaObject()->className(), method+1,
loc ? " in ": "", loc ? loc : "");
@@ -2109,9 +1974,9 @@ static void err_info_about_objects(const char * func,
QString a = sender ? sender->objectName() : QString();
QString b = receiver ? receiver->objectName() : QString();
if (!a.isEmpty())
- qWarning("Object::%s: (sender name: '%s')", func, a.toLocal8Bit().data());
+ qWarning("QObject::%s: (sender name: '%s')", func, a.toLocal8Bit().data());
if (!b.isEmpty())
- qWarning("Object::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());
+ qWarning("QObject::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());
}
/*!
@@ -2691,7 +2556,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
const QObject *receiver, const char *method)
{
if (sender == 0 || (receiver == 0 && method != 0)) {
- qWarning("Object::disconnect: Unexpected null parameter");
+ qWarning("QObject::disconnect: Unexpected null parameter");
return false;
}
@@ -2816,12 +2681,12 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
const QObject *receiver, const QMetaMethod &method)
{
if (sender == 0 || (receiver == 0 && method.mobj != 0)) {
- qWarning("Object::disconnect: Unexpected null parameter");
+ qWarning("QObject::disconnect: Unexpected null parameter");
return false;
}
if (signal.mobj) {
if(signal.methodType() != QMetaMethod::Signal) {
- qWarning("Object::%s: Attempt to %s non-signal %s::%s",
+ qWarning("QObject::%s: Attempt to %s non-signal %s::%s",
"disconnect","unbind",
sender->metaObject()->className(), signal.signature());
return false;
@@ -3239,9 +3104,9 @@ static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connect
int nargs = 1; // include return type
while (argumentTypes[nargs-1])
++nargs;
- int *types = (int *) qMalloc(nargs*sizeof(int));
+ int *types = (int *) malloc(nargs*sizeof(int));
Q_CHECK_PTR(types);
- void **args = (void **) qMalloc(nargs*sizeof(void *));
+ void **args = (void **) malloc(nargs*sizeof(void *));
Q_CHECK_PTR(args);
types[0] = 0; // return type
args[0] = 0; // return value
@@ -4004,11 +3869,6 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
void qDeleteInEventHandler(QObject *o)
{
-#ifdef QT_JAMBI_BUILD
- if (!o)
- return;
- QObjectPrivate::get(o)->inEventHandler = false;
-#endif
delete o;
}
@@ -4273,7 +4133,7 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot, const QMetaObject *senderMetaObject)
{
if (sender == 0 || (receiver == 0 && slot != 0)) {
- qWarning("Object::disconnect: Unexpected null parameter");
+ qWarning("QObject::disconnect: Unexpected null parameter");
return false;
}
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 307518d81e..11f524180c 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -96,17 +96,13 @@ public:
QObjectList children;
uint isWidget : 1;
- uint pendTimer : 1;
uint blockSig : 1;
uint wasDeleted : 1;
- uint ownObjectName : 1;
+ uint isDeletingChildren : 1;
uint sendChildEvents : 1;
uint receiveChildEvents : 1;
- uint inEventHandler : 1; //only used if QT_JAMBI_BUILD
- uint inThreadChangeEvent : 1;
- uint hasGuards : 1; //true iff there is one or more QPointer attached to this object
uint isWindow : 1; //for QWindow
- uint unused : 21;
+ uint unused : 25;
int postedEvents;
QMetaObject *metaObject; // assert dynamic
};
@@ -115,7 +111,7 @@ public:
class Q_CORE_EXPORT QObject
{
Q_OBJECT
- Q_PROPERTY(QString objectName READ objectName WRITE setObjectName)
+ Q_PROPERTY(QString objectName READ objectName WRITE setObjectName NOTIFY objectNameChanged)
Q_DECLARE_PRIVATE(QObject)
public:
@@ -152,7 +148,7 @@ public:
QThread *thread() const;
void moveToThread(QThread *thread);
- int startTimer(int interval);
+ int startTimer(int interval, Qt::TimerType timerType = Qt::CoarseTimer);
void killTimer(int id);
template<typename T>
@@ -214,7 +210,12 @@ public:
reinterpret_cast<typename SignalType::Object *>(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast<typename SignalType::Object *>(0));
//compilation error if the arguments does not match.
- typedef typename QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::IncompatibleSignalSlotArguments EnsureCompatibleArguments;
+ Q_STATIC_ASSERT_X(int(SignalType::ArgumentCount) >= int(SlotType::ArgumentCount),
+ "The slot requires more arguments than the signal provides.");
+ Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::value),
+ "Signal and slot arguments are not compatible.");
+ Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible<typename SlotType::ReturnType, typename SignalType::ReturnType>::value),
+ "Return type of the slot is not compatible with the return type of the signal.");
const int *types = 0;
if (type == Qt::QueuedConnection || type == Qt::BlockingQueuedConnection)
@@ -236,8 +237,12 @@ public:
typedef QtPrivate::FunctionPointer<Func2> SlotType;
//compilation error if the arguments does not match.
- typedef typename QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::IncompatibleSignalSlotArguments EnsureCompatibleArguments;
- typedef typename QtPrivate::QEnableIf<(int(SignalType::ArgumentCount) >= int(SlotType::ArgumentCount))>::Type EnsureArgumentsCount;
+ Q_STATIC_ASSERT_X(int(SignalType::ArgumentCount) >= int(SlotType::ArgumentCount),
+ "The slot requires more arguments than the signal provides.");
+ Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::value),
+ "Signal and slot arguments are not compatible.");
+ Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible<typename SlotType::ReturnType, typename SignalType::ReturnType>::value),
+ "Return type of the slot is not compatible with the return type of the signal.");
return connectImpl(sender, reinterpret_cast<void **>(&signal), sender, 0,
new QStaticSlotObject<Func2,
@@ -278,7 +283,9 @@ public:
reinterpret_cast<typename SignalType::Object *>(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast<typename SignalType::Object *>(0));
//compilation error if the arguments does not match.
- typedef typename QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::IncompatibleSignalSlotArguments EnsureCompatibleArguments;
+ Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::value),
+ "Signal and slot arguments are not compatible.");
+
return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, reinterpret_cast<void **>(&slot),
&SignalType::Object::staticMetaObject);
}
@@ -287,8 +294,8 @@ public:
const QObject *receiver, void **zero)
{
// This is the overload for when one wish to disconnect a signal from any slot. (slot=0)
- // Since the function template parametter cannot be deduced from '0', we use a
- // dummy void ** parametter that must be equal to 0
+ // Since the function template parameter cannot be deduced from '0', we use a
+ // dummy void ** parameter that must be equal to 0
Q_ASSERT(!zero);
typedef QtPrivate::FunctionPointer<Func1> SignalType;
return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, zero,
@@ -313,6 +320,7 @@ public:
Q_SIGNALS:
void destroyed(QObject * = 0);
+ void objectNameChanged(const QString &objectName);
public:
inline QObject *parent() const { return d_ptr->parent; }
diff --git a/src/corelib/kernel/qobject_impl.h b/src/corelib/kernel/qobject_impl.h
index 660294b956..44aaa9a218 100644
--- a/src/corelib/kernel/qobject_impl.h
+++ b/src/corelib/kernel/qobject_impl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -441,36 +441,40 @@ namespace QtPrivate {
/*
Logic that check if the arguments of the slot matches the argument of the signal.
To be used like this:
- CheckCompatibleArguments<FunctionPointer<Signal>::Arguments, FunctionPointer<Slot>::Arguments>::IncompatibleSignalSlotArguments
- The IncompatibleSignalSlotArguments type do not exist if the argument are incompatible and can
- then produce error message.
+ Q_STATIC_ASSERT(CheckCompatibleArguments<FunctionPointer<Signal>::Arguments, FunctionPointer<Slot>::Arguments>::value)
*/
- template<typename T, bool B> struct CheckCompatibleArgumentsHelper {};
- template<typename T> struct CheckCompatibleArgumentsHelper<T, true> : T {};
template<typename A1, typename A2> struct AreArgumentsCompatible {
static int test(A2);
static char test(...);
- static A2 dummy();
+ static A1 dummy();
enum { value = sizeof(test(dummy())) == sizeof(int) };
};
template<typename A1, typename A2> struct AreArgumentsCompatible<A1, A2&> { enum { value = false }; };
template<typename A> struct AreArgumentsCompatible<A&, A&> { enum { value = true }; };
+ // void as a return value
+ template<typename A> struct AreArgumentsCompatible<void, A> { enum { value = true }; };
+ template<typename A> struct AreArgumentsCompatible<A, void> { enum { value = true }; };
+ template<> struct AreArgumentsCompatible<void, void> { enum { value = true }; };
#ifndef Q_COMPILER_VARIADIC_TEMPLATES
- template <typename List1, typename List2> struct CheckCompatibleArguments{};
- template <> struct CheckCompatibleArguments<void, void> { typedef bool IncompatibleSignalSlotArguments; };
- template <typename List1> struct CheckCompatibleArguments<List1, void> { typedef bool IncompatibleSignalSlotArguments; };
+ template <typename List1, typename List2> struct CheckCompatibleArguments { enum { value = false }; };
+ template <> struct CheckCompatibleArguments<void, void> { enum { value = true }; };
+ template <typename List1> struct CheckCompatibleArguments<List1, void> { enum { value = true }; };
template <typename Arg1, typename Arg2, typename Tail1, typename Tail2> struct CheckCompatibleArguments<List<Arg1, Tail1>, List<Arg2, Tail2> >
- : CheckCompatibleArgumentsHelper<CheckCompatibleArguments<Tail1, Tail2>, AreArgumentsCompatible<
- typename RemoveConstRef<Arg1>::Type, typename RemoveConstRef<Arg2>::Type>::value > {};
+ {
+ enum { value = AreArgumentsCompatible<typename RemoveConstRef<Arg1>::Type, typename RemoveConstRef<Arg2>::Type>::value
+ && CheckCompatibleArguments<Tail1, Tail2>::value };
+ };
#else
- template <typename List1, typename List2> struct CheckCompatibleArguments{};
- template <> struct CheckCompatibleArguments<List<>, List<>> { typedef bool IncompatibleSignalSlotArguments; };
- template <typename List1> struct CheckCompatibleArguments<List1, List<>> { typedef bool IncompatibleSignalSlotArguments; };
+ template <typename List1, typename List2> struct CheckCompatibleArguments { enum { value = false }; };
+ template <> struct CheckCompatibleArguments<List<>, List<>> { enum { value = true }; };
+ template <typename List1> struct CheckCompatibleArguments<List1, List<>> { enum { value = true }; };
template <typename Arg1, typename Arg2, typename... Tail1, typename... Tail2>
struct CheckCompatibleArguments<List<Arg1, Tail1...>, List<Arg2, Tail2...>>
- : CheckCompatibleArgumentsHelper<CheckCompatibleArguments<List<Tail1...>, List<Tail2...>>, AreArgumentsCompatible<
- typename RemoveConstRef<Arg1>::Type, typename RemoveConstRef<Arg2>::Type>::value > {};
+ {
+ enum { value = AreArgumentsCompatible<typename RemoveConstRef<Arg1>::Type, typename RemoveConstRef<Arg2>::Type>::value
+ && CheckCompatibleArguments<List<Tail1...>, List<Tail2...>>::value };
+ };
#endif
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 5519a69c34..dbd2e4fa37 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -179,11 +179,6 @@ public:
static inline void resetCurrentSender(QObject *receiver,
Sender *currentSender,
Sender *previousSender);
-#ifdef QT_JAMBI_BUILD
- static int *setDeleteWatch(QObjectPrivate *d, int *newWatch);
- static void resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int deleteWatch);
-#endif
- static void clearGuards(QObject *);
static QObjectPrivate *get(QObject *o) {
return o->d_func();
@@ -203,6 +198,7 @@ public:
Sender *currentSender; // object currently activating the object
mutable quint32 connectedSignals[2];
+ QVector<int> runningTimers;
QList<QPointer<QObject> > eventFilters;
union {
QObject *currentChildBeingDeleted;
@@ -212,9 +208,6 @@ public:
// these objects are all used to indicate that a QObject was deleted
// plus QPointer, which keeps a separate list
QAtomicPointer<QtSharedPointer::ExternalRefCountData> sharedRefcount;
-#ifdef QT_JAMBI_BUILD
- int *deleteWatch;
-#endif
};
diff --git a/src/corelib/kernel/qobjectcleanuphandler.cpp b/src/corelib/kernel/qobjectcleanuphandler.cpp
index 512aa097ee..8a0cc2840e 100644
--- a/src/corelib/kernel/qobjectcleanuphandler.cpp
+++ b/src/corelib/kernel/qobjectcleanuphandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qobjectcleanuphandler.h b/src/corelib/kernel/qobjectcleanuphandler.h
index 601164f784..5997f0e250 100644
--- a/src/corelib/kernel/qobjectcleanuphandler.h
+++ b/src/corelib/kernel/qobjectcleanuphandler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index bfb6808ad5..dfcc81be03 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -136,18 +136,11 @@ template <typename T1, typename T2>
inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
#endif // QT_NO_QOBJECT_CHECK
-#ifdef Q_NO_DATA_RELOCATION
-#define Q_OBJECT_GETSTATICMETAOBJECT static const QMetaObject &getStaticMetaObject();
-#else
-#define Q_OBJECT_GETSTATICMETAOBJECT
-#endif
-
/* tmake ignore Q_OBJECT */
#define Q_OBJECT \
public: \
Q_OBJECT_CHECK \
static const QMetaObject staticMetaObject; \
- Q_OBJECT_GETSTATICMETAOBJECT \
virtual const QMetaObject *metaObject() const; \
virtual void *qt_metacast(const char *); \
QT_TR_FUNCTIONS \
@@ -162,8 +155,8 @@ private: \
#define Q_GADGET \
public: \
static const QMetaObject staticMetaObject; \
- Q_OBJECT_GETSTATICMETAOBJECT \
private:
+
#else // Q_MOC_RUN
#define slots slots
#define signals signals
@@ -341,11 +334,6 @@ struct Q_CORE_EXPORT QMetaObject
static void activate(QObject *sender, int signal_index, void **argv);
static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv);
- // internal guarded pointers
- static void addGuard(QObject **ptr);
- static void removeGuard(QObject **ptr);
- static void changeGuard(QObject **ptr, QObject *o);
-
static bool invokeMethod(QObject *obj, const char *member,
Qt::ConnectionType,
QGenericReturnArgument ret,
@@ -474,11 +462,7 @@ typedef const QMetaObject& (*QMetaObjectAccessor)();
struct QMetaObjectExtraData
{
-#ifdef Q_NO_DATA_RELOCATION
- const QMetaObjectAccessor *objects;
-#else
const QMetaObject **objects;
-#endif
typedef void (*StaticMetacallFunction)(QObject *, QMetaObject::Call, int, void **); //from revision 6
//typedef int (*StaticMetaCall)(QMetaObject::Call, int, void **); //used from revison 2 until revison 5
diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp
index c7fcf4f1e8..575dad9ed8 100644
--- a/src/corelib/kernel/qpointer.cpp
+++ b/src/corelib/kernel/qpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,7 +44,7 @@
\brief The QPointer class is a template class that provides guarded pointers to QObject.
\ingroup objectmodel
-
+ \obsolete Use QWeakPointer instead.
A guarded pointer, QPointer<T>, behaves like a normal C++
pointer \c{T *}, except that it is automatically set to 0 when the
@@ -57,6 +57,24 @@
destroyed while you still hold a reference to it. You can safely
test the pointer for validity.
+ Note that Qt 5 introduces two slight changes in behavior when using QPointer.
+
+ \list
+
+ \i When using QPointer on a QWidget (or a subclass of QWidget), previously
+ the QPointer would be cleared by the QWidget destructor. Now, the QPointer
+ is cleared by the QObject destructor (since this is when QWeakPointers are
+ cleared). Any QPointers tracking a widget will \b NOT be cleared before the
+ QWidget destructor destroys the children for the widget being tracked.
+
+ \i When constructing a QSharedPointer to take ownership of an object after a
+ QPointer is already tracking the object. Previously, the shared pointer
+ construction would not be affected by the QPointer, but now that QPointer
+ is implemented using QWeakPoiner, constructing the QSharedPointer will
+ cause an \c abort().
+
+ \endlist
+
Qt also provides QSharedPointer, an implementation of a reference-counted
shared pointer object, which can be used to maintain a collection of
references to an individual pointer.
diff --git a/src/corelib/kernel/qpointer.h b/src/corelib/kernel/qpointer.h
index e9f302e317..4c0aebb41d 100644
--- a/src/corelib/kernel/qpointer.h
+++ b/src/corelib/kernel/qpointer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,7 @@
#ifndef QPOINTER_H
#define QPOINTER_H
-#include <QtCore/qobject.h>
+#include <QtCore/qsharedpointer.h>
QT_BEGIN_HEADER
@@ -50,34 +50,35 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Core)
+#if QT_DEPRECATED_SINCE(5,0)
+
template <class T>
-class QPointer
+class QT_DEPRECATED QPointer
{
- QObject *o;
+ QWeakPointer<T> wp;
+
public:
- inline QPointer() : o(0) {}
- inline QPointer(T *p) : o(p)
- { QMetaObject::addGuard(&o); }
- inline QPointer(const QPointer<T> &p) : o(p.o)
- { QMetaObject::addGuard(&o); }
- inline ~QPointer()
- { QMetaObject::removeGuard(&o); }
+ inline QPointer() : wp() { }
+ inline QPointer(T *p) : wp(p) { }
+ inline QPointer(const QPointer<T> &p) : wp(p.wp) { }
+ inline ~QPointer() { }
+
inline QPointer<T> &operator=(const QPointer<T> &p)
- { if (this != &p) QMetaObject::changeGuard(&o, p.o); return *this; }
+ { wp = p.wp; return *this; }
inline QPointer<T> &operator=(T* p)
- { if (o != p) QMetaObject::changeGuard(&o, p); return *this; }
+ { wp = p; return *this; }
inline bool isNull() const
- { return !o; }
+ { return wp.isNull(); }
inline T* operator->() const
- { return static_cast<T*>(const_cast<QObject*>(o)); }
+ { return wp.data(); }
inline T& operator*() const
- { return *static_cast<T*>(const_cast<QObject*>(o)); }
+ { return *wp.data(); }
inline operator T*() const
- { return static_cast<T*>(const_cast<QObject*>(o)); }
+ { return wp.data(); }
inline T* data() const
- { return static_cast<T*>(const_cast<QObject*>(o)); }
+ { return wp.data(); }
};
@@ -161,6 +162,8 @@ inline bool operator!= (int i, const QPointer<T> &p)
{ Q_ASSERT(i == 0); return !i && !p.isNull(); }
#endif
+#endif // QT_DEPRECATED_SINCE(5,0)
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index acb6044bac..c5b1b56747 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsharedmemory.h b/src/corelib/kernel/qsharedmemory.h
index b2ce7e20f4..d536e94fa1 100644
--- a/src/corelib/kernel/qsharedmemory.h
+++ b/src/corelib/kernel/qsharedmemory.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h
index d5fafeff97..d3d3c023ba 100644
--- a/src/corelib/kernel/qsharedmemory_p.h
+++ b/src/corelib/kernel/qsharedmemory_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsharedmemory_symbian.cpp b/src/corelib/kernel/qsharedmemory_symbian.cpp
deleted file mode 100644
index fdd513a475..0000000000
--- a/src/corelib/kernel/qsharedmemory_symbian.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qsharedmemory.h"
-#include "qsharedmemory_p.h"
-#include "qsystemsemaphore.h"
-#include "qcore_symbian_p.h"
-#include <qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-#ifndef QT_NO_SHAREDMEMORY
-
-#define QSHAREDMEMORY_DEBUG
-
-QSharedMemoryPrivate::QSharedMemoryPrivate() : QObjectPrivate(),
- memory(0), size(0), error(QSharedMemory::NoError),
- systemSemaphore(QString()), lockedByMe(false)
-{
-}
-
-void QSharedMemoryPrivate::setErrorString(const QString &function, TInt errorCode)
-{
- if (errorCode == KErrNone)
- return;
- switch (errorCode) {
- case KErrAlreadyExists:
- error = QSharedMemory::AlreadyExists;
- errorString = QSharedMemory::tr("%1: already exists").arg(function);
- break;
- case KErrNotFound:
- error = QSharedMemory::NotFound;
- errorString = QSharedMemory::tr("%1: doesn't exists").arg(function);
- break;
- case KErrArgument:
- error = QSharedMemory::InvalidSize;
- errorString = QSharedMemory::tr("%1: invalid size").arg(function);
- break;
- case KErrNoMemory:
- error = QSharedMemory::OutOfResources;
- errorString = QSharedMemory::tr("%1: out of resources").arg(function);
- break;
- case KErrPermissionDenied:
- error = QSharedMemory::PermissionDenied;
- errorString = QSharedMemory::tr("%1: permission denied").arg(function);
- break;
- default:
- errorString = QSharedMemory::tr("%1: unknown error %2").arg(function).arg(errorCode);
- error = QSharedMemory::UnknownError;
-#if defined QSHAREDMEMORY_DEBUG
- qDebug() << errorString << "key" << key;
-#endif
- }
-}
-
-key_t QSharedMemoryPrivate::handle()
-{
- // Not really cost effective to check here if shared memory is attachable, as it requires
- // exactly the same call as attaching, so always assume handle is valid and return failure
- // from attach.
- return 1;
-}
-
-bool QSharedMemoryPrivate::cleanHandle()
-{
- chunk.Close();
- return true;
-}
-
-bool QSharedMemoryPrivate::create(int size)
-{
- QString function = QLatin1String("QSharedMemory::create");
- if (nativeKey.isEmpty()) {
- error = QSharedMemory::KeyError;
- errorString = QSharedMemory::tr("%1: key error").arg(function);
- return false;
- }
-
- TPtrC ptr(qt_QString2TPtrC(nativeKey));
-
- TInt err = chunk.CreateGlobal(ptr, size, size);
-
- setErrorString(function, err);
-
- if (err != KErrNone)
- return false;
-
- // Zero out the created chunk
- Mem::FillZ(chunk.Base(), chunk.Size());
-
- return true;
-}
-
-bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode /* mode */)
-{
- // Grab a pointer to the memory block
- if (!chunk.Handle()) {
- QString function = QLatin1String("QSharedMemory::handle");
- if (nativeKey.isEmpty()) {
- error = QSharedMemory::KeyError;
- errorString = QSharedMemory::tr("%1: unable to make key").arg(function);
- return false;
- }
-
- TPtrC ptr(qt_QString2TPtrC(nativeKey));
-
- TInt err = KErrNoMemory;
-
- err = chunk.OpenGlobal(ptr, false);
-
- if (err != KErrNone) {
- setErrorString(function, err);
- return false;
- }
- }
-
- size = chunk.Size();
- memory = chunk.Base();
-
- return true;
-}
-
-bool QSharedMemoryPrivate::detach()
-{
- chunk.Close();
-
- memory = 0;
- size = 0;
-
- return true;
-}
-
-#endif //QT_NO_SHAREDMEMORY
-
-QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index 2bbda4933f..fd435d7b97 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
index 3cc14fe512..c02ab15c88 100644
--- a/src/corelib/kernel/qsharedmemory_win.cpp
+++ b/src/corelib/kernel/qsharedmemory_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsignalmapper.cpp b/src/corelib/kernel/qsignalmapper.cpp
index 665b9e22b5..7bdffd4153 100644
--- a/src/corelib/kernel/qsignalmapper.cpp
+++ b/src/corelib/kernel/qsignalmapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsignalmapper.h b/src/corelib/kernel/qsignalmapper.h
index 72593679a9..04278b491c 100644
--- a/src/corelib/kernel/qsignalmapper.h
+++ b/src/corelib/kernel/qsignalmapper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp
index 5e99d1d483..60970f1cd2 100644
--- a/src/corelib/kernel/qsocketnotifier.cpp
+++ b/src/corelib/kernel/qsocketnotifier.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -168,7 +168,7 @@ QT_BEGIN_NAMESPACE
\sa setEnabled(), isEnabled()
*/
-QSocketNotifier::QSocketNotifier(int socket, Type type, QObject *parent)
+QSocketNotifier::QSocketNotifier(qintptr socket, Type type, QObject *parent)
: QObject(parent)
{
if (socket < 0)
diff --git a/src/corelib/kernel/qsocketnotifier.h b/src/corelib/kernel/qsocketnotifier.h
index 07dc129825..186979db4c 100644
--- a/src/corelib/kernel/qsocketnotifier.h
+++ b/src/corelib/kernel/qsocketnotifier.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,7 +58,7 @@ class Q_CORE_EXPORT QSocketNotifier : public QObject
public:
enum Type { Read, Write, Exception };
- QSocketNotifier(int socket, Type, QObject *parent = 0);
+ QSocketNotifier(qintptr socket, Type, QObject *parent = 0);
~QSocketNotifier();
inline int socket() const { return sockfd; }
@@ -78,7 +78,7 @@ protected:
private:
Q_DISABLE_COPY(QSocketNotifier)
- int sockfd;
+ qintptr sockfd;
Type sntype;
bool snenabled;
};
diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp
index 71c2807341..708eba89a6 100644
--- a/src/corelib/kernel/qsystemerror.cpp
+++ b/src/corelib/kernel/qsystemerror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,6 +46,10 @@
# if defined(Q_CC_MSVC)
# include <crtdbg.h>
# endif
+#else
+# if (_WIN32_WCE >= 0x700)
+# include <errno.h>
+# endif
#endif
#ifdef Q_OS_WIN
#include <windows.h>
@@ -76,6 +80,27 @@ namespace {
}
#endif
+#ifdef Q_OS_WIN
+static QString windowsErrorString(int errorCode)
+{
+ QString ret;
+ wchar_t *string = 0;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ errorCode,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPWSTR)&string,
+ 0,
+ NULL);
+ ret = QString::fromWCharArray(string);
+ LocalFree((HLOCAL)string);
+
+ if (ret.isEmpty() && errorCode == ERROR_MOD_NOT_FOUND)
+ ret = QString::fromLatin1("The specified module could not be found.");
+ return ret;
+}
+#endif
+
static QString standardLibraryErrorString(int errorCode)
{
const char *s = 0;
@@ -96,11 +121,15 @@ static QString standardLibraryErrorString(int errorCode)
s = QT_TRANSLATE_NOOP("QIODevice", "No space left on device");
break;
default: {
- #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX)
- QByteArray buf(1024, '\0');
- ret = fromstrerror_helper(strerror_r(errorCode, buf.data(), buf.size()), buf);
+ #ifdef Q_OS_WINCE
+ ret = windowsErrorString(errorCode);
#else
- ret = QString::fromLocal8Bit(strerror(errorCode));
+ #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX)
+ QByteArray buf(1024, '\0');
+ ret = fromstrerror_helper(strerror_r(errorCode, buf.data(), buf.size()), buf);
+ #else
+ ret = QString::fromLocal8Bit(strerror(errorCode));
+ #endif
#endif
break; }
}
@@ -112,27 +141,6 @@ static QString standardLibraryErrorString(int errorCode)
return ret.trimmed();
}
-#ifdef Q_OS_WIN
-static QString windowsErrorString(int errorCode)
-{
- QString ret;
- wchar_t *string = 0;
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errorCode,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPWSTR)&string,
- 0,
- NULL);
- ret = QString::fromWCharArray(string);
- LocalFree((HLOCAL)string);
-
- if (ret.isEmpty() && errorCode == ERROR_MOD_NOT_FOUND)
- ret = QString::fromLatin1("The specified module could not be found.");
- return ret;
-}
-#endif
-
#ifdef Q_OS_SYMBIAN
static QString symbianErrorString(int errorCode)
{
diff --git a/src/corelib/kernel/qsystemerror_p.h b/src/corelib/kernel/qsystemerror_p.h
index 0bcada7350..2a90760197 100644
--- a/src/corelib/kernel/qsystemerror_p.h
+++ b/src/corelib/kernel/qsystemerror_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsystemsemaphore.cpp b/src/corelib/kernel/qsystemsemaphore.cpp
index 98ee6f4231..690a4e8b92 100644
--- a/src/corelib/kernel/qsystemsemaphore.cpp
+++ b/src/corelib/kernel/qsystemsemaphore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsystemsemaphore.h b/src/corelib/kernel/qsystemsemaphore.h
index 1623215ec5..0cb69d5e7c 100644
--- a/src/corelib/kernel/qsystemsemaphore.h
+++ b/src/corelib/kernel/qsystemsemaphore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h
index d4e86e8866..31fd596fd5 100644
--- a/src/corelib/kernel/qsystemsemaphore_p.h
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
deleted file mode 100644
index 96c19afcfc..0000000000
--- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qsystemsemaphore.h"
-#include "qsystemsemaphore_p.h"
-#include "qcoreapplication.h"
-#include <qdebug.h>
-
-#include "qcore_symbian_p.h"
-#include <e32cmn.h>
-QT_BEGIN_NAMESPACE
-
-#ifndef QT_NO_SYSTEMSEMAPHORE
-
-QSystemSemaphorePrivate::QSystemSemaphorePrivate() :
- error(QSystemSemaphore::NoError)
-{
-}
-
-void QSystemSemaphorePrivate::setErrorString(const QString &function, int err)
-{
- if (err == KErrNone){
- return;
- }
- switch(err){
- case KErrAlreadyExists:
- errorString = QCoreApplication::tr("%1: already exists", "QSystemSemaphore").arg(function);
- error = QSystemSemaphore::AlreadyExists;
- break;
- case KErrNotFound:
- errorString = QCoreApplication::tr("%1: does not exist", "QSystemSemaphore").arg(function);
- error = QSystemSemaphore::NotFound;
- break;
- case KErrNoMemory:
- case KErrInUse:
- errorString = QCoreApplication::tr("%1: out of resources", "QSystemSemaphore").arg(function);
- error = QSystemSemaphore::OutOfResources;
- break;
- case KErrPermissionDenied:
- errorString = QCoreApplication::tr("%1: permission denied", "QSystemSemaphore").arg(function);
- error = QSystemSemaphore::PermissionDenied;
- break;
-default:
- errorString = QCoreApplication::tr("%1: unknown error %2", "QSystemSemaphore").arg(function).arg(err);
- error = QSystemSemaphore::UnknownError;
- }
-
-#if defined QSYSTEMSEMAPHORE_DEBUG
- qDebug() << errorString << "key" << key;
-#endif
-}
-
-int QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode)
-{
- if (semaphore.Handle()) {
- return semaphore.Handle();
- }
-
- // don't allow making handles on empty keys
- if (key.isEmpty())
- return 0;
-
- TPtrC name(qt_QString2TPtrC(fileName));
- int err = KErrAlreadyExists;
- int tryCount = 10;
- // Sort out race conditions by retrying several times until existing handle is acquired.
- // Sometimes opening can fail inexplicably with KErrPermissionDenied many times in a row.
- while (err != KErrNoMemory && err != KErrNone && tryCount-- >= 0) {
- err = semaphore.CreateGlobal(name, initialValue, EOwnerProcess);
- if (err != KErrNoMemory && err != KErrNone)
- err = semaphore.OpenGlobal(name,EOwnerProcess);
- }
- if (err){
- setErrorString(QLatin1String("QSystemSemaphore::handle"),err);
- return 0;
- }
- return semaphore.Handle();
-}
-
-void QSystemSemaphorePrivate::cleanHandle()
-{
- semaphore.Close();
-}
-
-bool QSystemSemaphorePrivate::modifySemaphore(int count)
-{
- if (0 == handle())
- return false;
-
- if (count > 0) {
- semaphore.Signal(count);
- } else {
- semaphore.Wait();
- }
- return true;
-}
-
-#endif //QT_NO_SYSTEMSEMAPHORE
-
-QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp
index 5e533e7f0e..cc86e335e5 100644
--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qsystemsemaphore_win.cpp b/src/corelib/kernel/qsystemsemaphore_win.cpp
index 30cab7ebfe..aad78459d7 100644
--- a/src/corelib/kernel/qsystemsemaphore_win.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp
index 927aa672a1..2f9ccdae46 100644
--- a/src/corelib/kernel/qtcore_eval.cpp
+++ b/src/corelib/kernel/qtcore_eval.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
static const char boilerplate_unsuported[] =
"\nQt %1 Evaluation License\n"
- "Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).\n"
"All rights reserved.\n\n"
"This trial version may only be used for evaluation purposes\n"
"and will shut down after 120 minutes.\n"
@@ -65,7 +65,7 @@ static const char boilerplate_unsuported[] =
static const char boilerplate_supported[] =
"\nQt %1 Evaluation License\n"
- "Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).\n"
"All rights reserved.\n\n"
"This trial version may only be used for evaluation purposes\n"
"Registered to:\n"
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 9be661e42f..da1cfe91b2 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -134,7 +134,6 @@ QT_BEGIN_NAMESPACE
{Analog Clock Example}, {Wiggly Example}
*/
-
static const int INV_TIMER = -1; // invalid timer id
/*!
@@ -142,7 +141,7 @@ static const int INV_TIMER = -1; // invalid timer id
*/
QTimer::QTimer(QObject *parent)
- : QObject(parent), id(INV_TIMER), inter(0), del(0), single(0), nulltimer(0)
+ : QObject(parent), id(INV_TIMER), inter(0), del(0), single(0), nulltimer(0), type(Qt::CoarseTimer)
{
}
@@ -203,7 +202,7 @@ void QTimer::start()
if (id != INV_TIMER) // stop running timer
stop();
nulltimer = (!inter && single);
- id = QObject::startTimer(inter);
+ id = QObject::startTimer(inter, Qt::TimerType(type));
}
/*!
@@ -257,18 +256,18 @@ class QSingleShotTimer : public QObject
int timerId;
public:
~QSingleShotTimer();
- QSingleShotTimer(int msec, QObject *r, const char * m);
+ QSingleShotTimer(int msec, Qt::TimerType timerType, QObject *r, const char * m);
Q_SIGNALS:
void timeout();
protected:
void timerEvent(QTimerEvent *);
};
-QSingleShotTimer::QSingleShotTimer(int msec, QObject *receiver, const char *member)
+QSingleShotTimer::QSingleShotTimer(int msec, Qt::TimerType timerType, QObject *receiver, const char *member)
: QObject(QAbstractEventDispatcher::instance())
{
connect(this, SIGNAL(timeout()), receiver, member);
- timerId = startTimer(msec);
+ timerId = startTimer(msec, timerType);
}
QSingleShotTimer::~QSingleShotTimer()
@@ -318,6 +317,28 @@ QT_END_INCLUDE_NAMESPACE
void QTimer::singleShot(int msec, QObject *receiver, const char *member)
{
+ // coarse timers are worst in their first firing
+ // so we prefer a high precision timer for something that happens only once
+ // unless the timeout is too big, in which case we go for coarse anyway
+ singleShot(msec, msec >= 2000 ? Qt::CoarseTimer : Qt::PreciseTimer, receiver, member);
+}
+
+/*! \overload
+ \reentrant
+ This static function calls a slot after a given time interval.
+
+ It is very convenient to use this function because you do not need
+ to bother with a \link QObject::timerEvent() timerEvent\endlink or
+ create a local QTimer object.
+
+ The \a receiver is the receiving object and the \a member is the slot. The
+ time interval is \a msec milliseconds. The \a timerType affects the
+ accuracy of the timer.
+
+ \sa start()
+*/
+void QTimer::singleShot(int msec, Qt::TimerType timerType, QObject *receiver, const char *member)
+{
if (receiver && member) {
if (msec == 0) {
// special code shortpath for 0-timers
@@ -330,7 +351,7 @@ void QTimer::singleShot(int msec, QObject *receiver, const char *member)
QMetaObject::invokeMethod(receiver, methodName.constData(), Qt::QueuedConnection);
return;
}
- (void) new QSingleShotTimer(msec, receiver, member);
+ (void) new QSingleShotTimer(msec, timerType, receiver, member);
}
}
@@ -361,8 +382,17 @@ void QTimer::setInterval(int msec)
inter = msec;
if (id != INV_TIMER) { // create new timer
QObject::killTimer(id); // restart timer
- id = QObject::startTimer(msec);
+ id = QObject::startTimer(msec, Qt::TimerType(type));
}
}
+/*!
+ \property QTimer::timerType
+ \brief controls the accuracy of the timer
+
+ The default value for this property is \c Qt::CoarseTimer.
+
+ \sa Qt::TimerType
+*/
+
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h
index 707bc83d3c..6fb32f9bde 100644
--- a/src/corelib/kernel/qtimer.h
+++ b/src/corelib/kernel/qtimer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,6 +58,7 @@ class Q_CORE_EXPORT QTimer : public QObject
Q_OBJECT
Q_PROPERTY(bool singleShot READ isSingleShot WRITE setSingleShot)
Q_PROPERTY(int interval READ interval WRITE setInterval)
+ Q_PROPERTY(Qt::TimerType timerType READ timerType WRITE setTimerType)
Q_PROPERTY(bool active READ isActive)
public:
explicit QTimer(QObject *parent = 0);
@@ -69,10 +70,14 @@ public:
void setInterval(int msec);
int interval() const { return inter; }
+ void setTimerType(Qt::TimerType atype) { this->type = atype; }
+ Qt::TimerType timerType() const { return Qt::TimerType(type); }
+
inline void setSingleShot(bool singleShot);
inline bool isSingleShot() const { return single; }
static void singleShot(int msec, QObject *receiver, const char *member);
+ static void singleShot(int msec, Qt::TimerType timerType, QObject *receiver, const char *member);
public Q_SLOTS:
void start(int msec);
@@ -95,6 +100,8 @@ private:
int id, inter, del;
uint single : 1;
uint nulltimer : 1;
+ uint type : 2;
+ // reserved : 28
};
inline void QTimer::setSingleShot(bool asingleShot) { single = asingleShot; }
diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp
new file mode 100644
index 0000000000..b89d4ccb30
--- /dev/null
+++ b/src/corelib/kernel/qtimerinfo_unix.cpp
@@ -0,0 +1,625 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qelapsedtimer.h>
+#include <qcoreapplication.h>
+
+#include "private/qcore_unix_p.h"
+#include "private/qtimerinfo_unix_p.h"
+#include "private/qobject_p.h"
+#include "private/qabstracteventdispatcher_p.h"
+
+#ifdef QTIMERINFO_DEBUG
+# include <QDebug>
+# include <QThread>
+#endif
+
+#include <sys/times.h>
+
+QT_BEGIN_NAMESPACE
+
+Q_CORE_EXPORT bool qt_disable_lowpriority_timers=false;
+
+/*
+ * Internal functions for manipulating timer data structures. The
+ * timerBitVec array is used for keeping track of timer identifiers.
+ */
+
+QTimerInfoList::QTimerInfoList()
+{
+#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_NACL)
+ if (!QElapsedTimer::isMonotonic()) {
+ // not using monotonic timers, initialize the timeChanged() machinery
+ previousTime = qt_gettime();
+
+ tms unused;
+ previousTicks = times(&unused);
+
+ ticksPerSecond = sysconf(_SC_CLK_TCK);
+ msPerTick = 1000/ticksPerSecond;
+ } else {
+ // detected monotonic timers
+ previousTime.tv_sec = previousTime.tv_usec = 0;
+ previousTicks = 0;
+ ticksPerSecond = 0;
+ msPerTick = 0;
+ }
+#endif
+
+ firstTimerInfo = 0;
+}
+
+timeval QTimerInfoList::updateCurrentTime()
+{
+ return (currentTime = qt_gettime());
+}
+
+#if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_INTEGRITY)) || defined(QT_BOOTSTRAPPED)
+
+template <>
+timeval qAbs(const timeval &t)
+{
+ timeval tmp = t;
+ if (tmp.tv_sec < 0) {
+ tmp.tv_sec = -tmp.tv_sec - 1;
+ tmp.tv_usec -= 1000000;
+ }
+ if (tmp.tv_sec == 0 && tmp.tv_usec < 0) {
+ tmp.tv_usec = -tmp.tv_usec;
+ }
+ return normalizedTimeval(tmp);
+}
+
+/*
+ Returns true if the real time clock has changed by more than 10%
+ relative to the processor time since the last time this function was
+ called. This presumably means that the system time has been changed.
+
+ If /a delta is nonzero, delta is set to our best guess at how much the system clock was changed.
+*/
+bool QTimerInfoList::timeChanged(timeval *delta)
+{
+#ifdef Q_OS_NACL
+ Q_UNUSED(delta)
+ return false; // Calling "times" crashes.
+#endif
+ struct tms unused;
+ clock_t currentTicks = times(&unused);
+
+ clock_t elapsedTicks = currentTicks - previousTicks;
+ timeval elapsedTime = currentTime - previousTime;
+
+ timeval elapsedTimeTicks;
+ elapsedTimeTicks.tv_sec = elapsedTicks / ticksPerSecond;
+ elapsedTimeTicks.tv_usec = (((elapsedTicks * 1000) / ticksPerSecond) % 1000) * 1000;
+
+ timeval dummy;
+ if (!delta)
+ delta = &dummy;
+ *delta = elapsedTime - elapsedTimeTicks;
+
+ previousTicks = currentTicks;
+ previousTime = currentTime;
+
+ // If tick drift is more than 10% off compared to realtime, we assume that the clock has
+ // been set. Of course, we have to allow for the tick granularity as well.
+ timeval tickGranularity;
+ tickGranularity.tv_sec = 0;
+ tickGranularity.tv_usec = msPerTick * 1000;
+ return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10);
+}
+
+/*
+ repair broken timer
+*/
+void QTimerInfoList::timerRepair(const timeval &diff)
+{
+ // repair all timers
+ for (int i = 0; i < size(); ++i) {
+ register QTimerInfo *t = at(i);
+ t->timeout = t->timeout + diff;
+ }
+}
+
+void QTimerInfoList::repairTimersIfNeeded()
+{
+ if (QElapsedTimer::isMonotonic())
+ return;
+ timeval delta;
+ if (timeChanged(&delta))
+ timerRepair(delta);
+}
+
+#else // !(_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(QT_BOOTSTRAPPED)
+
+void QTimerInfoList::repairTimersIfNeeded()
+{
+}
+
+#endif
+
+/*
+ insert timer info into list
+*/
+void QTimerInfoList::timerInsert(QTimerInfo *ti)
+{
+ int index = size();
+ while (index--) {
+ register const QTimerInfo * const t = at(index);
+ if (!(ti->timeout < t->timeout))
+ break;
+ }
+ insert(index+1, ti);
+}
+
+inline timeval &operator+=(timeval &t1, int ms)
+{
+ t1.tv_sec += ms / 1000;
+ t1.tv_usec += ms % 1000 * 1000;
+ return normalizedTimeval(t1);
+}
+
+inline timeval operator+(const timeval &t1, int ms)
+{
+ timeval t2 = t1;
+ return t2 += ms;
+}
+
+static timeval roundToMillisecond(timeval val)
+{
+ // always round up
+ // worst case scenario is that the first trigger of a 1-ms timer is 0.999 ms late
+
+ int us = val.tv_usec % 1000;
+ val.tv_usec += 1000 - us;
+ return normalizedTimeval(val);
+}
+
+#ifdef QTIMERINFO_DEBUG
+QDebug operator<<(QDebug s, timeval tv)
+{
+ s.nospace() << tv.tv_sec << "." << qSetFieldWidth(6) << qSetPadChar(QChar(48)) << tv.tv_usec << reset;
+ return s.space();
+}
+QDebug operator<<(QDebug s, Qt::TimerType t)
+{
+ s << (t == Qt::PreciseTimer ? "P" :
+ t == Qt::CoarseTimer ? "C" : "VC");
+ return s;
+}
+#endif
+
+static void calculateCoarseTimerTimeout(QTimerInfo *t, timeval currentTime)
+{
+ // The coarse timer works like this:
+ // - interval under 40 ms: round to even
+ // - between 40 and 99 ms: round to multiple of 4
+ // - otherwise: try to wake up at a multiple of 25 ms, with a maximum error of 5%
+ //
+ // We try to wake up at the following second-fraction, in order of preference:
+ // 0 ms
+ // 500 ms
+ // 250 ms or 750 ms
+ // 200, 400, 600, 800 ms
+ // other multiples of 100
+ // other multiples of 50
+ // other multiples of 25
+ //
+ // The objective is to make most timers wake up at the same time, thereby reducing CPU wakeups.
+
+ register uint interval = uint(t->interval);
+ register uint msec = uint(t->timeout.tv_usec) / 1000;
+ Q_ASSERT(interval >= 20);
+
+ // Calculate how much we can round and still keep within 5% error
+ uint absMaxRounding = interval / 20;
+
+ if (interval < 100 && interval != 25 && interval != 50 && interval != 75) {
+ // special mode for timers of less than 100 ms
+ if (interval < 50) {
+ // round to even
+ // round towards multiples of 50 ms
+ register bool roundUp = (msec % 50) >= 25;
+ msec >>= 1;
+ msec |= uint(roundUp);
+ msec <<= 1;
+ } else {
+ // round to multiple of 4
+ // round towards multiples of 100 ms
+ register bool roundUp = (msec % 100) >= 50;
+ msec >>= 2;
+ msec |= uint(roundUp);
+ msec <<= 2;
+ }
+ } else {
+ uint min = qMax<int>(0, msec - absMaxRounding);
+ uint max = qMin(1000u, msec + absMaxRounding);
+
+ // find the boundary that we want, according to the rules above
+ // extra rules:
+ // 1) whatever the interval, we'll take any round-to-the-second timeout
+ if (min == 0) {
+ msec = 0;
+ goto recalculate;
+ } else if (max == 1000) {
+ msec = 1000;
+ goto recalculate;
+ }
+
+ uint wantedBoundaryMultiple;
+
+ // 2) if the interval is a multiple of 500 ms and > 5000 ms, we'll always round
+ // towards a round-to-the-second
+ // 3) if the interval is a multiple of 500 ms, we'll round towards the nearest
+ // multiple of 500 ms
+ if ((interval % 500) == 0) {
+ if (interval >= 5000) {
+ msec = msec >= 500 ? max : min;
+ goto recalculate;
+ } else {
+ wantedBoundaryMultiple = 500;
+ }
+ } else if ((interval % 50) == 0) {
+ // 4) same for multiples of 250, 200, 100, 50
+ uint mult50 = interval / 50;
+ if ((mult50 % 4) == 0) {
+ // multiple of 200
+ wantedBoundaryMultiple = 200;
+ } else if ((mult50 % 2) == 0) {
+ // multiple of 100
+ wantedBoundaryMultiple = 100;
+ } else if ((mult50 % 5) == 0) {
+ // multiple of 250
+ wantedBoundaryMultiple = 250;
+ } else {
+ // multiple of 50
+ wantedBoundaryMultiple = 50;
+ }
+ } else {
+ wantedBoundaryMultiple = 25;
+ }
+
+ uint base = msec / wantedBoundaryMultiple * wantedBoundaryMultiple;
+ uint middlepoint = base + wantedBoundaryMultiple / 2;
+ if (msec < middlepoint)
+ msec = qMax(base, min);
+ else
+ msec = qMin(base + wantedBoundaryMultiple, max);
+ }
+
+recalculate:
+ if (msec == 1000u) {
+ ++t->timeout.tv_sec;
+ t->timeout.tv_usec = 0;
+ } else {
+ t->timeout.tv_usec = msec * 1000;
+ }
+
+ if (t->timeout < currentTime)
+ t->timeout += interval;
+}
+
+static void calculateNextTimeout(QTimerInfo *t, timeval currentTime)
+{
+ switch (t->timerType) {
+ case Qt::PreciseTimer:
+ case Qt::CoarseTimer:
+ t->timeout += t->interval;
+ if (t->timeout < currentTime) {
+ t->timeout = currentTime;
+ t->timeout += t->interval;
+ }
+#ifdef QTIMERINFO_DEBUG
+ t->expected += t->interval;
+ if (t->expected < currentTime) {
+ t->expected = currentTime;
+ t->expected += t->interval;
+ }
+#endif
+ if (t->timerType == Qt::CoarseTimer)
+ calculateCoarseTimerTimeout(t, currentTime);
+ return;
+
+ case Qt::VeryCoarseTimer:
+ // we don't need to take care of the microsecond component of t->interval
+ t->timeout.tv_sec += t->interval;
+ if (t->timeout.tv_sec <= currentTime.tv_sec)
+ t->timeout.tv_sec = currentTime.tv_sec + t->interval;
+#ifdef QTIMERINFO_DEBUG
+ t->expected.tv_sec += t->interval;
+ if (t->expected.tv_sec <= currentTime.tv_sec)
+ t->expected.tv_sec = currentTime.tv_sec + t->interval;
+#endif
+ return;
+ }
+
+#ifdef QTIMERINFO_DEBUG
+ if (t->timerType != Qt::PreciseTimer)
+ qDebug() << "timer" << t->timerType << hex << t->id << dec << "interval" << t->interval
+ << "originally expected at" << t->expected << "will fire at" << t->timeout
+ << "or" << (t->timeout - t->expected) << "s late";
+#endif
+}
+
+/*
+ Returns the time to wait for the next timer, or null if no timers
+ are waiting.
+*/
+bool QTimerInfoList::timerWait(timeval &tm)
+{
+ timeval currentTime = updateCurrentTime();
+ repairTimersIfNeeded();
+
+ // Find first waiting timer not already active
+ QTimerInfo *t = 0;
+ for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
+ if (!(*it)->activateRef) {
+ t = *it;
+ break;
+ }
+ }
+
+ if (!t)
+ return false;
+
+ if (currentTime < t->timeout) {
+ // time to wait
+ tm = roundToMillisecond(t->timeout - currentTime);
+ } else {
+ // no time to wait
+ tm.tv_sec = 0;
+ tm.tv_usec = 0;
+ }
+
+ return true;
+}
+
+void QTimerInfoList::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object)
+{
+ QTimerInfo *t = new QTimerInfo;
+ t->id = timerId;
+ t->interval = interval;
+ t->timerType = timerType;
+ t->obj = object;
+ t->activateRef = 0;
+
+ timeval expected = updateCurrentTime() + interval;
+
+ switch (timerType) {
+ case Qt::PreciseTimer:
+ // high precision timer is based on millisecond precision
+ // so no adjustment is necessary
+ t->timeout = expected;
+ break;
+
+ case Qt::CoarseTimer:
+ // this timer has up to 5% coarseness
+ // so our boundaries are 20 ms and 20 s
+ // below 20 ms, 5% inaccuracy is below 1 ms, so we convert to high precision
+ // above 20 s, 5% inaccuracy is above 1 s, so we convert to VeryCoarseTimer
+ if (interval >= 20000) {
+ t->timerType = Qt::VeryCoarseTimer;
+ // fall through
+ } else {
+ t->timeout = expected;
+ if (interval <= 20) {
+ t->timerType = Qt::PreciseTimer;
+ // no adjustment is necessary
+ } else if (interval <= 20000) {
+ calculateCoarseTimerTimeout(t, currentTime);
+ }
+ break;
+ }
+ // fall through
+ case Qt::VeryCoarseTimer:
+ // the very coarse timer is based on full second precision,
+ // so we keep the interval in seconds (round to closest second)
+ t->interval /= 500;
+ t->interval += 1;
+ t->interval >>= 1;
+ t->timeout.tv_sec = currentTime.tv_sec + t->interval;
+ t->timeout.tv_usec = 0;
+
+ // if we're past the half-second mark, increase the timeout again
+ if (currentTime.tv_usec > 500*1000)
+ ++t->timeout.tv_sec;
+ }
+
+ timerInsert(t);
+
+#ifdef QTIMERINFO_DEBUG
+ t->expected = expected;
+ t->cumulativeError = 0;
+ t->count = 0;
+ if (t->timerType != Qt::PreciseTimer)
+ qDebug() << "timer" << t->timerType << hex <<t->id << dec << "interval" << t->interval << "expected at"
+ << t->expected << "will fire first at" << t->timeout;
+#endif
+}
+
+bool QTimerInfoList::unregisterTimer(int timerId)
+{
+ // set timer inactive
+ for (int i = 0; i < count(); ++i) {
+ register QTimerInfo *t = at(i);
+ if (t->id == timerId) {
+ // found it
+ removeAt(i);
+ if (t == firstTimerInfo)
+ firstTimerInfo = 0;
+ if (t->activateRef)
+ *(t->activateRef) = 0;
+ delete t;
+ return true;
+ }
+ }
+ // id not found
+ return false;
+}
+
+bool QTimerInfoList::unregisterTimers(QObject *object)
+{
+ if (isEmpty())
+ return false;
+ for (int i = 0; i < count(); ++i) {
+ register QTimerInfo *t = at(i);
+ if (t->obj == object) {
+ // object found
+ removeAt(i);
+ if (t == firstTimerInfo)
+ firstTimerInfo = 0;
+ if (t->activateRef)
+ *(t->activateRef) = 0;
+ delete t;
+ // move back one so that we don't skip the new current item
+ --i;
+ }
+ }
+ return true;
+}
+
+QList<QAbstractEventDispatcher::TimerInfo> QTimerInfoList::registeredTimers(QObject *object) const
+{
+ QList<QAbstractEventDispatcher::TimerInfo> list;
+ for (int i = 0; i < count(); ++i) {
+ register const QTimerInfo * const t = at(i);
+ if (t->obj == object) {
+ list << QAbstractEventDispatcher::TimerInfo(t->id,
+ (t->timerType == Qt::VeryCoarseTimer
+ ? t->interval * 1000
+ : t->interval),
+ t->timerType);
+ }
+ }
+ return list;
+}
+
+/*
+ Activate pending timers, returning how many where activated.
+*/
+int QTimerInfoList::activateTimers()
+{
+ if (qt_disable_lowpriority_timers || isEmpty())
+ return 0; // nothing to do
+
+ int n_act = 0, maxCount = 0;
+ firstTimerInfo = 0;
+
+ timeval currentTime = updateCurrentTime();
+ // qDebug() << "Thread" << QThread::currentThreadId() << "woken up at" << currentTime;
+ repairTimersIfNeeded();
+
+
+ // Find out how many timer have expired
+ for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
+ if (currentTime < (*it)->timeout)
+ break;
+ maxCount++;
+ }
+
+ //fire the timers.
+ while (maxCount--) {
+ if (isEmpty())
+ break;
+
+ QTimerInfo *currentTimerInfo = first();
+ if (currentTime < currentTimerInfo->timeout)
+ break; // no timer has expired
+
+ if (!firstTimerInfo) {
+ firstTimerInfo = currentTimerInfo;
+ } else if (firstTimerInfo == currentTimerInfo) {
+ // avoid sending the same timer multiple times
+ break;
+ } else if (currentTimerInfo->interval < firstTimerInfo->interval
+ || currentTimerInfo->interval == firstTimerInfo->interval) {
+ firstTimerInfo = currentTimerInfo;
+ }
+
+ // remove from list
+ removeFirst();
+
+#ifdef QTIMERINFO_DEBUG
+ float diff;
+ if (currentTime < currentTimerInfo->expected) {
+ // early
+ timeval early = currentTimerInfo->expected - currentTime;
+ diff = -(early.tv_sec + early.tv_usec / 1000000.0);
+ } else {
+ timeval late = currentTime - currentTimerInfo->expected;
+ diff = late.tv_sec + late.tv_usec / 1000000.0;
+ }
+ currentTimerInfo->cumulativeError += diff;
+ ++currentTimerInfo->count;
+ if (currentTimerInfo->timerType != Qt::PreciseTimer)
+ qDebug() << "timer" << currentTimerInfo->timerType << hex << currentTimerInfo->id << dec << "interval"
+ << currentTimerInfo->interval << "firing at" << currentTime
+ << "(orig" << currentTimerInfo->expected << "scheduled at" << currentTimerInfo->timeout
+ << ") off by" << diff << "activation" << currentTimerInfo->count
+ << "avg error" << (currentTimerInfo->cumulativeError / currentTimerInfo->count);
+#endif
+
+ // determine next timeout time
+ calculateNextTimeout(currentTimerInfo, currentTime);
+
+ // reinsert timer
+ timerInsert(currentTimerInfo);
+ if (currentTimerInfo->interval > 0)
+ n_act++;
+
+ if (!currentTimerInfo->activateRef) {
+ // send event, but don't allow it to recurse
+ currentTimerInfo->activateRef = &currentTimerInfo;
+
+ QTimerEvent e(currentTimerInfo->id);
+ QCoreApplication::sendEvent(currentTimerInfo->obj, &e);
+
+ if (currentTimerInfo)
+ currentTimerInfo->activateRef = 0;
+ }
+ }
+
+ firstTimerInfo = 0;
+ // qDebug() << "Thread" << QThread::currentThreadId() << "activated" << n_act << "timers";
+ return n_act;
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qtimerinfo_unix_p.h b/src/corelib/kernel/qtimerinfo_unix_p.h
new file mode 100644
index 0000000000..8a057dda60
--- /dev/null
+++ b/src/corelib/kernel/qtimerinfo_unix_p.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTIMERINFO_UNIX_P_H
+#define QTIMERINFO_UNIX_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+// #define QTIMERINFO_DEBUG
+
+#include "qabstracteventdispatcher.h"
+
+#include <sys/time.h> // struct timeval
+
+QT_BEGIN_NAMESPACE
+
+// internal timer info
+struct QTimerInfo {
+ int id; // - timer identifier
+ int interval; // - timer interval in milliseconds
+ Qt::TimerType timerType; // - timer type
+ timeval timeout; // - when to actually fire
+ QObject *obj; // - object to receive event
+ QTimerInfo **activateRef; // - ref from activateTimers
+
+#ifdef QTIMERINFO_DEBUG
+ timeval expected; // when timer is expected to fire
+ float cumulativeError;
+ uint count;
+#endif
+};
+
+class Q_CORE_EXPORT QTimerInfoList : public QList<QTimerInfo*>
+{
+#if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC)) || defined(QT_BOOTSTRAPPED)
+ timeval previousTime;
+ clock_t previousTicks;
+ int ticksPerSecond;
+ int msPerTick;
+
+ bool timeChanged(timeval *delta);
+ void timerRepair(const timeval &);
+#endif
+
+ // state variables used by activateTimers()
+ QTimerInfo *firstTimerInfo;
+
+public:
+ QTimerInfoList();
+
+ timeval currentTime;
+ timeval updateCurrentTime();
+
+ // must call updateCurrentTime() first!
+ void repairTimersIfNeeded();
+
+ bool timerWait(timeval &);
+ void timerInsert(QTimerInfo *);
+
+ void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object);
+ bool unregisterTimer(int timerId);
+ bool unregisterTimers(QObject *object);
+ QList<QAbstractEventDispatcher::TimerInfo> registeredTimers(QObject *object) const;
+
+ int activateTimers();
+};
+
+QT_END_NAMESPACE
+
+#endif // QTIMERINFO_UNIX_P_H
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 2796902590..aadf3a76e9 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qtranslator.h b/src/corelib/kernel/qtranslator.h
index 43cd63d1da..b1f378a8b5 100644
--- a/src/corelib/kernel/qtranslator.h
+++ b/src/corelib/kernel/qtranslator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qtranslator_p.h b/src/corelib/kernel/qtranslator_p.h
index 426be0b19b..23164ecac6 100644
--- a/src/corelib/kernel/qtranslator_p.h
+++ b/src/corelib/kernel/qtranslator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 29717398a8..72229c0e63 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,6 +52,10 @@
#include "qstringlist.h"
#include "qurl.h"
#include "qlocale.h"
+#include "quuid.h"
+#ifndef QT_BOOTSTRAPPED
+#include "qabstractitemmodel.h"
+#endif
#include "private/qvariant_p.h"
#include "qmetatype_p.h"
@@ -74,6 +78,25 @@ QT_BEGIN_NAMESPACE
#endif
namespace {
+class HandlersManager
+{
+ static const QVariant::Handler *Handlers[QModulesPrivate::ModulesCount];
+public:
+ const QVariant::Handler *operator[] (const int typeId) const
+ {
+ return Handlers[QModulesPrivate::moduleForType(typeId)];
+ }
+
+ void registerHandler(const QModulesPrivate::Names name, const QVariant::Handler *handler)
+ {
+ Handlers[name] = handler;
+ }
+
+ inline void unregisterHandler(const QModulesPrivate::Names name);
+};
+} // namespace
+
+namespace {
template<typename T>
struct TypeDefiniton {
static const bool IsAvailable = true;
@@ -82,6 +105,7 @@ struct TypeDefiniton {
// Ignore these types, as incomplete
#ifdef QT_BOOTSTRAPPED
template<> struct TypeDefiniton<QEasingCurve> { static const bool IsAvailable = false; };
+template<> struct TypeDefiniton<QModelIndex> { static const bool IsAvailable = false; };
#endif
#ifdef QT_NO_GEOM_VARIANT
template<> struct TypeDefiniton<QRect> { static const bool IsAvailable = false; };
@@ -100,7 +124,9 @@ struct CoreTypesFilter {
static const bool IsAccepted = QTypeModuleInfo<T>::IsCore && TypeDefiniton<T>::IsAvailable;
};
};
-} // namspace
+} // annonymous used to hide TypeDefiniton
+
+namespace { // annonymous used to hide QVariant handlers
static void construct(QVariant::Private *x, const void *copy)
{
@@ -324,6 +350,9 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
case QVariant::Url:
*str = v_cast<QUrl>(d)->toString();
break;
+ case QVariant::Uuid:
+ *str = v_cast<QUuid>(d)->toString();
+ break;
default:
return false;
}
@@ -688,6 +717,15 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
return *ok;
}
#endif
+ case QVariant::Uuid:
+ switch (d->type) {
+ case QVariant::String:
+ *static_cast<QUuid *>(result) = QUuid(*v_cast<QString>(d));
+ break;
+ default:
+ return false;
+ }
+ break;
default:
return false;
}
@@ -697,101 +735,9 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
static void streamDebug(QDebug dbg, const QVariant &v)
{
- switch (v.userType()) {
- case QVariant::Int:
- dbg.nospace() << v.toInt();
- break;
- case QVariant::UInt:
- dbg.nospace() << v.toUInt();
- break;
- case QVariant::LongLong:
- dbg.nospace() << v.toLongLong();
- break;
- case QVariant::ULongLong:
- dbg.nospace() << v.toULongLong();
- break;
- case QMetaType::Float:
- dbg.nospace() << v.toFloat();
- break;
- case QMetaType::QObjectStar:
- dbg.nospace() << qvariant_cast<QObject *>(v);
- break;
- case QVariant::Double:
- dbg.nospace() << v.toDouble();
- break;
- case QVariant::Bool:
- dbg.nospace() << v.toBool();
- break;
- case QVariant::String:
- dbg.nospace() << v.toString();
- break;
- case QVariant::Char:
- dbg.nospace() << v.toChar();
- break;
- case QVariant::StringList:
- dbg.nospace() << v.toStringList();
- break;
- case QVariant::Map:
- dbg.nospace() << v.toMap();
- break;
- case QVariant::Hash:
- dbg.nospace() << v.toHash();
- break;
- case QVariant::List:
- dbg.nospace() << v.toList();
- break;
- case QVariant::Date:
- dbg.nospace() << v.toDate();
- break;
- case QVariant::Time:
- dbg.nospace() << v.toTime();
- break;
- case QVariant::DateTime:
- dbg.nospace() << v.toDateTime();
- break;
-#ifndef QT_BOOTSTRAPPED
- case QVariant::EasingCurve:
- dbg.nospace() << v.toEasingCurve();
- break;
-#endif
- case QVariant::ByteArray:
- dbg.nospace() << v.toByteArray();
- break;
- case QVariant::Url:
- dbg.nospace() << v.toUrl();
- break;
-#ifndef QT_NO_GEOM_VARIANT
- case QVariant::Point:
- dbg.nospace() << v.toPoint();
- break;
- case QVariant::PointF:
- dbg.nospace() << v.toPointF();
- break;
- case QVariant::Rect:
- dbg.nospace() << v.toRect();
- break;
- case QVariant::Size:
- dbg.nospace() << v.toSize();
- break;
- case QVariant::SizeF:
- dbg.nospace() << v.toSizeF();
- break;
- case QVariant::Line:
- dbg.nospace() << v.toLine();
- break;
- case QVariant::LineF:
- dbg.nospace() << v.toLineF();
- break;
- case QVariant::RectF:
- dbg.nospace() << v.toRectF();
- break;
-#endif
- case QVariant::BitArray:
- //dbg.nospace() << v.toBitArray();
- break;
- default:
- break;
- }
+ QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr());
+ QVariantDebugStream<CoreTypesFilter> stream(dbg, d);
+ QMetaTypeSwitcher::switcher<void>(stream, d->type, 0);
}
#endif
@@ -813,13 +759,142 @@ const QVariant::Handler qt_kernel_variant_handler = {
#endif
};
+static void dummyConstruct(QVariant::Private *, const void *) { Q_ASSERT_X(false, "QVariant", "Trying to construct an unknown type"); }
+static void dummyClear(QVariant::Private *) { Q_ASSERT_X(false, "QVariant", "Trying to clear an unknown type"); }
+static bool dummyIsNull(const QVariant::Private *d) { Q_ASSERT_X(false, "QVariant::isNull", "Trying to call isNull on an unknown type"); return d->is_null; }
+static bool dummyCompare(const QVariant::Private *, const QVariant::Private *) { Q_ASSERT_X(false, "QVariant", "Trying to compare an unknown types"); return false; }
+static bool dummyConvert(const QVariant::Private *, QVariant::Type , void *, bool *) { Q_ASSERT_X(false, "QVariant", "Trying to convert an unknown type"); return false; }
+#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
+static void dummyStreamDebug(QDebug, const QVariant &) { Q_ASSERT_X(false, "QVariant", "Trying to convert an unknown type"); }
+#endif
+const QVariant::Handler qt_dummy_variant_handler = {
+ dummyConstruct,
+ dummyClear,
+ dummyIsNull,
+#ifndef QT_NO_DATASTREAM
+ 0,
+ 0,
+#endif
+ dummyCompare,
+ dummyConvert,
+ 0,
+#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
+ dummyStreamDebug
+#else
+ 0
+#endif
+};
+
+static void customConstruct(QVariant::Private *d, const void *copy)
+{
+ const uint size = QMetaType::sizeOf(d->type);
+ if (!size) {
+ d->type = QVariant::Invalid;
+ return;
+ }
+
+ // this logic should match with QVariantIntegrator::CanUseInternalSpace
+ if (size <= sizeof(QVariant::Private::Data)
+ && (QMetaType::typeFlags(d->type) & QMetaType::MovableType)) {
+ QMetaType::construct(d->type, &d->data.ptr, copy);
+ d->is_shared = false;
+ } else {
+ void *ptr = QMetaType::create(d->type, copy);
+ d->is_shared = true;
+ d->data.shared = new QVariant::PrivateShared(ptr);
+ }
+}
+
+static void customClear(QVariant::Private *d)
+{
+ if (!d->is_shared) {
+ QMetaType::destruct(d->type, &d->data.ptr);
+ } else {
+ QMetaType::destroy(d->type, d->data.shared->ptr);
+ delete d->data.shared;
+ }
+}
+
+static bool customIsNull(const QVariant::Private *d)
+{
+ return d->is_null;
+}
+
+static bool customCompare(const QVariant::Private *a, const QVariant::Private *b)
+{
+ const char *const typeName = QMetaType::typeName(a->type);
+ if (Q_UNLIKELY(!typeName) && Q_LIKELY(!QMetaType::isRegistered(a->type)))
+ qFatal("QVariant::compare: type %d unknown to QVariant.", a->type);
+
+ const void *a_ptr = a->is_shared ? a->data.shared->ptr : &(a->data.ptr);
+ const void *b_ptr = b->is_shared ? b->data.shared->ptr : &(b->data.ptr);
+
+ uint typeNameLen = qstrlen(typeName);
+ if (typeNameLen > 0 && typeName[typeNameLen - 1] == '*')
+ return *static_cast<void *const *>(a_ptr) == *static_cast<void *const *>(b_ptr);
+
+ if (a->is_null && b->is_null)
+ return true;
+
+ return !memcmp(a_ptr, b_ptr, QMetaType::sizeOf(a->type));
+}
+
+static bool customConvert(const QVariant::Private *, QVariant::Type, void *, bool *ok)
+{
+ if (ok)
+ *ok = false;
+ return false;
+}
+
+#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
+static void customStreamDebug(QDebug, const QVariant &) {}
+#endif
+
+const QVariant::Handler qt_custom_variant_handler = {
+ customConstruct,
+ customClear,
+ customIsNull,
+#ifndef QT_NO_DATASTREAM
+ 0,
+ 0,
+#endif
+ customCompare,
+ customConvert,
+ 0,
+#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
+ customStreamDebug
+#else
+ 0
+#endif
+};
+
+} // annonymous used to hide QVariant handlers
+
+static HandlersManager handlerManager;
+Q_STATIC_ASSERT_X(!QModulesPrivate::Core, "Initialization assumes that ModulesNames::Core is 0");
+const QVariant::Handler *HandlersManager::Handlers[QModulesPrivate::ModulesCount]
+ = { &qt_kernel_variant_handler, &qt_dummy_variant_handler,
+ &qt_dummy_variant_handler, &qt_custom_variant_handler };
+
Q_CORE_EXPORT const QVariant::Handler *qcoreVariantHandler()
{
return &qt_kernel_variant_handler;
}
+inline void HandlersManager::unregisterHandler(const QModulesPrivate::Names name)
+{
+ Handlers[name] = &qt_dummy_variant_handler;
+}
-const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler;
+Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names */name, const QVariant::Handler *handler)
+{
+ handlerManager.registerHandler(static_cast<QModulesPrivate::Names>(name), handler);
+}
+
+Q_CORE_EXPORT void QVariantPrivate::unregisterHandler(const int /* Modules::Names */ name)
+{
+ handlerManager.unregisterHandler(static_cast<QModulesPrivate::Names>(name));
+}
/*!
\class QVariant
@@ -923,6 +998,8 @@ const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler;
\value DateTime a QDateTime
\value Double a double
\value EasingCurve a QEasingCurve
+ \value Uuid a QUuid
+ \value ModelIndex a QModelIndex
\value Font a QFont
\value Hash a QVariantHash
\value Icon a QIcon
@@ -1018,7 +1095,7 @@ const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler;
void QVariant::create(int type, const void *copy)
{
d.type = type;
- handler->construct(&d, copy);
+ handlerManager[type]->construct(&d, copy);
}
/*!
@@ -1035,7 +1112,7 @@ void QVariant::create(int type, const void *copy)
QVariant::~QVariant()
{
if ((d.is_shared && !d.data.shared->ref.deref()) || (!d.is_shared && d.type > Char))
- handler->clear(&d);
+ handlerManager[d.type]->clear(&d);
}
/*!
@@ -1051,7 +1128,7 @@ QVariant::QVariant(const QVariant &p)
if (d.is_shared) {
d.data.shared->ref.ref();
} else if (p.d.type > Char) {
- handler->construct(&d, p.constData());
+ handlerManager[d.type]->construct(&d, p.constData());
d.is_null = p.d.is_null;
}
}
@@ -1435,7 +1512,7 @@ QVariant& QVariant::operator=(const QVariant &variant)
d = variant.d;
} else if (variant.d.type > Char) {
d.type = variant.d.type;
- handler->construct(&d, variant.constData());
+ handlerManager[d.type]->construct(&d, variant.constData());
d.is_null = variant.d.is_null;
} else {
d = variant.d;
@@ -1465,9 +1542,9 @@ void QVariant::detach()
Private dd;
dd.type = d.type;
- handler->construct(&dd, constData());
+ handlerManager[d.type]->construct(&dd, constData());
if (!d.data.shared->ref.deref())
- handler->clear(&d);
+ handlerManager[d.type]->clear(&d);
d.data.shared = dd.data.shared;
}
@@ -1496,7 +1573,7 @@ const char *QVariant::typeName() const
void QVariant::clear()
{
if ((d.is_shared && !d.data.shared->ref.deref()) || (!d.is_shared && d.type > Char))
- handler->clear(&d);
+ handlerManager[d.type]->clear(&d);
d.type = Invalid;
d.is_null = true;
d.is_shared = false;
@@ -1732,14 +1809,14 @@ QDataStream& operator<<(QDataStream &s, const QVariant::Type p)
*/
template <typename T>
-inline T qVariantToHelper(const QVariant::Private &d, QVariant::Type t,
- const QVariant::Handler *handler, T * = 0)
+inline T qVariantToHelper(const QVariant::Private &d, const HandlersManager &handlerManager)
{
- if (d.type == t)
+ const QVariant::Type targetType = static_cast<const QVariant::Type>(qMetaTypeId<T>());
+ if (d.type == targetType)
return *v_cast<T>(&d);
T ret;
- handler->convert(&d, t, &ret, 0);
+ handlerManager[d.type]->convert(&d, targetType, &ret, 0);
return ret;
}
@@ -1754,7 +1831,7 @@ inline T qVariantToHelper(const QVariant::Private &d, QVariant::Type t,
*/
QStringList QVariant::toStringList() const
{
- return qVariantToHelper<QStringList>(d, StringList, handler);
+ return qVariantToHelper<QStringList>(d, handlerManager);
}
/*!
@@ -1767,7 +1844,7 @@ QStringList QVariant::toStringList() const
*/
QString QVariant::toString() const
{
- return qVariantToHelper<QString>(d, String, handler);
+ return qVariantToHelper<QString>(d, handlerManager);
}
/*!
@@ -1778,7 +1855,7 @@ QString QVariant::toString() const
*/
QVariantMap QVariant::toMap() const
{
- return qVariantToHelper<QVariantMap>(d, Map, handler);
+ return qVariantToHelper<QVariantMap>(d, handlerManager);
}
/*!
@@ -1789,7 +1866,7 @@ QVariantMap QVariant::toMap() const
*/
QVariantHash QVariant::toHash() const
{
- return qVariantToHelper<QVariantHash>(d, Hash, handler);
+ return qVariantToHelper<QVariantHash>(d, handlerManager);
}
/*!
@@ -1805,7 +1882,7 @@ QVariantHash QVariant::toHash() const
*/
QDate QVariant::toDate() const
{
- return qVariantToHelper<QDate>(d, Date, handler);
+ return qVariantToHelper<QDate>(d, handlerManager);
}
/*!
@@ -1821,7 +1898,7 @@ QDate QVariant::toDate() const
*/
QTime QVariant::toTime() const
{
- return qVariantToHelper<QTime>(d, Time, handler);
+ return qVariantToHelper<QTime>(d, handlerManager);
}
/*!
@@ -1838,7 +1915,7 @@ QTime QVariant::toTime() const
*/
QDateTime QVariant::toDateTime() const
{
- return qVariantToHelper<QDateTime>(d, DateTime, handler);
+ return qVariantToHelper<QDateTime>(d, handlerManager);
}
/*!
@@ -1853,7 +1930,7 @@ QDateTime QVariant::toDateTime() const
#ifndef QT_BOOTSTRAPPED
QEasingCurve QVariant::toEasingCurve() const
{
- return qVariantToHelper<QEasingCurve>(d, EasingCurve, handler);
+ return qVariantToHelper<QEasingCurve>(d, handlerManager);
}
#endif
@@ -1868,7 +1945,7 @@ QEasingCurve QVariant::toEasingCurve() const
*/
QByteArray QVariant::toByteArray() const
{
- return qVariantToHelper<QByteArray>(d, ByteArray, handler);
+ return qVariantToHelper<QByteArray>(d, handlerManager);
}
#ifndef QT_NO_GEOM_VARIANT
@@ -1882,7 +1959,7 @@ QByteArray QVariant::toByteArray() const
*/
QPoint QVariant::toPoint() const
{
- return qVariantToHelper<QPoint>(d, Point, handler);
+ return qVariantToHelper<QPoint>(d, handlerManager);
}
/*!
@@ -1895,7 +1972,7 @@ QPoint QVariant::toPoint() const
*/
QRect QVariant::toRect() const
{
- return qVariantToHelper<QRect>(d, Rect, handler);
+ return qVariantToHelper<QRect>(d, handlerManager);
}
/*!
@@ -1908,7 +1985,7 @@ QRect QVariant::toRect() const
*/
QSize QVariant::toSize() const
{
- return qVariantToHelper<QSize>(d, Size, handler);
+ return qVariantToHelper<QSize>(d, handlerManager);
}
/*!
@@ -1921,7 +1998,7 @@ QSize QVariant::toSize() const
*/
QSizeF QVariant::toSizeF() const
{
- return qVariantToHelper<QSizeF>(d, SizeF, handler);
+ return qVariantToHelper<QSizeF>(d, handlerManager);
}
/*!
@@ -1934,7 +2011,7 @@ QSizeF QVariant::toSizeF() const
*/
QRectF QVariant::toRectF() const
{
- return qVariantToHelper<QRectF>(d, RectF, handler);
+ return qVariantToHelper<QRectF>(d, handlerManager);
}
/*!
@@ -1947,7 +2024,7 @@ QRectF QVariant::toRectF() const
*/
QLineF QVariant::toLineF() const
{
- return qVariantToHelper<QLineF>(d, LineF, handler);
+ return qVariantToHelper<QLineF>(d, handlerManager);
}
/*!
@@ -1960,7 +2037,7 @@ QLineF QVariant::toLineF() const
*/
QLine QVariant::toLine() const
{
- return qVariantToHelper<QLine>(d, Line, handler);
+ return qVariantToHelper<QLine>(d, handlerManager);
}
/*!
@@ -1973,7 +2050,7 @@ QLine QVariant::toLine() const
*/
QPointF QVariant::toPointF() const
{
- return qVariantToHelper<QPointF>(d, PointF, handler);
+ return qVariantToHelper<QPointF>(d, handlerManager);
}
#endif // QT_NO_GEOM_VARIANT
@@ -1988,7 +2065,7 @@ QPointF QVariant::toPointF() const
*/
QUrl QVariant::toUrl() const
{
- return qVariantToHelper<QUrl>(d, Url, handler);
+ return qVariantToHelper<QUrl>(d, handlerManager);
}
/*!
@@ -2001,7 +2078,7 @@ QUrl QVariant::toUrl() const
*/
QLocale QVariant::toLocale() const
{
- return qVariantToHelper<QLocale>(d, Locale, handler);
+ return qVariantToHelper<QLocale>(d, handlerManager);
}
/*!
@@ -2016,7 +2093,7 @@ QLocale QVariant::toLocale() const
#ifndef QT_NO_REGEXP
QRegExp QVariant::toRegExp() const
{
- return qVariantToHelper<QRegExp>(d, RegExp, handler);
+ return qVariantToHelper<QRegExp>(d, handlerManager);
}
#endif
@@ -2030,7 +2107,7 @@ QRegExp QVariant::toRegExp() const
*/
QChar QVariant::toChar() const
{
- return qVariantToHelper<QChar>(d, Char, handler);
+ return qVariantToHelper<QChar>(d, handlerManager);
}
/*!
@@ -2041,12 +2118,12 @@ QChar QVariant::toChar() const
*/
QBitArray QVariant::toBitArray() const
{
- return qVariantToHelper<QBitArray>(d, BitArray, handler);
+ return qVariantToHelper<QBitArray>(d, handlerManager);
}
template <typename T>
inline T qNumVariantToHelper(const QVariant::Private &d,
- const QVariant::Handler *handler, bool *ok, const T& val)
+ const HandlersManager &handlerManager, bool *ok, const T& val)
{
uint t = qMetaTypeId<T>();
if (ok)
@@ -2054,8 +2131,8 @@ inline T qNumVariantToHelper(const QVariant::Private &d,
if (d.type == t)
return val;
- T ret;
- if (!handler->convert(&d, QVariant::Type(t), &ret, ok) && ok)
+ T ret = 0;
+ if (!handlerManager[d.type]->convert(&d, QVariant::Type(t), &ret, ok) && ok)
*ok = false;
return ret;
}
@@ -2077,7 +2154,7 @@ inline T qNumVariantToHelper(const QVariant::Private &d,
*/
int QVariant::toInt(bool *ok) const
{
- return qNumVariantToHelper<int>(d, handler, ok, d.data.i);
+ return qNumVariantToHelper<int>(d, handlerManager, ok, d.data.i);
}
/*!
@@ -2097,7 +2174,7 @@ int QVariant::toInt(bool *ok) const
*/
uint QVariant::toUInt(bool *ok) const
{
- return qNumVariantToHelper<uint>(d, handler, ok, d.data.u);
+ return qNumVariantToHelper<uint>(d, handlerManager, ok, d.data.u);
}
/*!
@@ -2112,7 +2189,7 @@ uint QVariant::toUInt(bool *ok) const
*/
qlonglong QVariant::toLongLong(bool *ok) const
{
- return qNumVariantToHelper<qlonglong>(d, handler, ok, d.data.ll);
+ return qNumVariantToHelper<qlonglong>(d, handlerManager, ok, d.data.ll);
}
/*!
@@ -2128,7 +2205,7 @@ qlonglong QVariant::toLongLong(bool *ok) const
*/
qulonglong QVariant::toULongLong(bool *ok) const
{
- return qNumVariantToHelper<qulonglong>(d, handler, ok, d.data.ull);
+ return qNumVariantToHelper<qulonglong>(d, handlerManager, ok, d.data.ull);
}
/*!
@@ -2148,7 +2225,7 @@ bool QVariant::toBool() const
return d.data.b;
bool res = false;
- handler->convert(&d, Bool, &res, 0);
+ handlerManager[d.type]->convert(&d, Bool, &res, 0);
return res;
}
@@ -2165,7 +2242,7 @@ bool QVariant::toBool() const
*/
double QVariant::toDouble(bool *ok) const
{
- return qNumVariantToHelper<double>(d, handler, ok, d.data.d);
+ return qNumVariantToHelper<double>(d, handlerManager, ok, d.data.d);
}
/*!
@@ -2182,7 +2259,7 @@ double QVariant::toDouble(bool *ok) const
*/
float QVariant::toFloat(bool *ok) const
{
- return qNumVariantToHelper<float>(d, handler, ok, d.data.f);
+ return qNumVariantToHelper<float>(d, handlerManager, ok, d.data.f);
}
/*!
@@ -2199,7 +2276,7 @@ float QVariant::toFloat(bool *ok) const
*/
qreal QVariant::toReal(bool *ok) const
{
- return qNumVariantToHelper<qreal>(d, handler, ok, d.data.real);
+ return qNumVariantToHelper<qreal>(d, handlerManager, ok, d.data.real);
}
/*!
@@ -2210,7 +2287,7 @@ qreal QVariant::toReal(bool *ok) const
*/
QVariantList QVariant::toList() const
{
- return qVariantToHelper<QVariantList>(d, List, handler);
+ return qVariantToHelper<QVariantList>(d, handlerManager);
}
@@ -2253,7 +2330,7 @@ static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] =
| 1 << QVariant::UInt | 1 << QVariant::Bool | 1 << QVariant::Double
| 1 << QVariant::Date | 1 << QVariant::Time | 1 << QVariant::DateTime
| 1 << QVariant::LongLong | 1 << QVariant::ULongLong | 1 << QVariant::Char
- | 1 << QVariant::Url,
+ | 1 << QVariant::Url | 1 << QVariant::Uuid,
/*QStringList*/ 1 << QVariant::List | 1 << QVariant::String,
@@ -2292,7 +2369,9 @@ static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] =
/*QHash*/ 0,
-/*QEasingCurve*/ 0
+/*QEasingCurve*/ 0,
+
+/*QUuid*/ 1 << QVariant::String
};
/*!
@@ -2418,13 +2497,25 @@ bool QVariant::convert(Type t)
return false;
bool isOk = true;
- if (!handler->convert(&oldValue.d, t, data(), &isOk))
+ if (!handlerManager[d.type]->convert(&oldValue.d, t, data(), &isOk))
isOk = false;
d.is_null = !isOk;
return isOk;
}
/*!
+ \fn convert(const int type, void *ptr) const
+ \internal
+ Created for qvariant_cast() usage
+*/
+bool QVariant::convert(const int type, void *ptr) const
+{
+ Q_ASSERT(type < int(QMetaType::User));
+ return handlerManager[type]->convert(&d, QVariant::Type(type), ptr, 0);
+}
+
+
+/*!
\fn bool operator==(const QVariant &v1, const QVariant &v2)
\relates QVariant
@@ -2490,7 +2581,7 @@ bool QVariant::cmp(const QVariant &v) const
if (!v2.canConvert(Type(d.type)) || !v2.convert(Type(d.type)))
return false;
}
- return handler->compare(&d, &v2.d);
+ return handlerManager[d.type]->compare(&d, &v2.d);
}
/*! \internal
@@ -2520,15 +2611,15 @@ void* QVariant::data()
*/
bool QVariant::isNull() const
{
- return handler->isNull(&d);
+ return handlerManager[d.type]->isNull(&d);
}
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QVariant &v)
{
#ifndef Q_BROKEN_DEBUG_STREAM
- dbg.nospace() << "QVariant(" << v.typeName() << ", ";
- QVariant::handler->debugStream(dbg, v);
+ dbg.nospace() << "QVariant(" << QMetaType::typeName(v.userType()) << ", ";
+ handlerManager[v.d.type]->debugStream(dbg, v);
dbg.nospace() << ')';
return dbg.space();
#else
@@ -2541,7 +2632,7 @@ QDebug operator<<(QDebug dbg, const QVariant &v)
QDebug operator<<(QDebug dbg, const QVariant::Type p)
{
#ifndef Q_BROKEN_DEBUG_STREAM
- dbg.nospace() << "QVariant::" << QVariant::typeToName(p);
+ dbg.nospace() << "QVariant::" << QMetaType::typeName(p);
return dbg.space();
#else
qWarning("This compiler doesn't support streaming QVariant::Type to QDebug");
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 02458a07e0..35c584fa51 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -123,6 +123,8 @@ class Q_CORE_EXPORT QVariant
RegExp = QMetaType::QRegExp,
Hash = QMetaType::QVariantHash,
EasingCurve = QMetaType::QEasingCurve,
+ Uuid = QMetaType::QUuid,
+ ModelIndex = QMetaType::QModelIndex,
LastCoreType = QMetaType::LastCoreType,
Font = QMetaType::QFont,
@@ -370,35 +372,35 @@ class Q_CORE_EXPORT QVariant
{ return !cmp(v); }
protected:
- friend inline bool qvariant_cast_helper(const QVariant &, QVariant::Type, void *);
- friend void qRegisterGuiVariant();
- friend void qUnregisterGuiVariant();
friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
#ifndef QT_NO_DEBUG_STREAM
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &);
#endif
Private d;
-
- static const Handler *handler;
-
+#ifndef Q_NO_TEMPLATE_FRIENDS
+ template<typename T>
+ friend inline T qvariant_cast(const QVariant &);
+private:
+#else
+public:
+#endif
void create(int type, const void *copy);
bool cmp(const QVariant &other) const;
+ bool convert(const int t, void *ptr) const;
private:
// force compile error, prevent QVariant(bool) to be called
- inline QVariant(void *) { Q_ASSERT(false); }
+ inline QVariant(void *) Q_DECL_EQ_DELETE;
#ifdef QT_NO_CAST_FROM_ASCII
// force compile error when implicit conversion is not wanted
- inline QVariant(const char *) { Q_ASSERT(false); }
+ inline QVariant(const char *) Q_DECL_EQ_DELETE;
#endif
public:
typedef Private DataPtr;
inline DataPtr &data_ptr() { return d; }
+ inline const DataPtr &data_ptr() const { return d; }
};
-inline bool qvariant_cast_helper(const QVariant &v, QVariant::Type tp, void *ptr)
-{ return QVariant::handler->convert(&v.d, tp, ptr, 0); }
-
template <typename T>
inline QVariant qVariantFromValue(const T &t)
{
@@ -488,7 +490,7 @@ template<typename T> inline T qvariant_cast(const QVariant &v)
return *reinterpret_cast<const T *>(v.constData());
if (vid < int(QMetaType::User)) {
T t;
- if (qvariant_cast_helper(v, QVariant::Type(vid), &t))
+ if (v.convert(vid, &t))
return t;
}
return T();
diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h
index 3c2176856d..015ca5b464 100644
--- a/src/corelib/kernel/qvariant_p.h
+++ b/src/corelib/kernel/qvariant_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,20 +58,34 @@
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
+#include <QtCore/private/qmetatype_p.h>
+#include <QtCore/qdebug.h>
#include "qmetatypeswitcher_p.h"
QT_BEGIN_NAMESPACE
+namespace {
+template<typename T>
+struct QVariantIntegrator
+{
+ static const bool CanUseInternalSpace = sizeof(T) <= sizeof(QVariant::Private::Data)
+ && (!QTypeInfo<T>::isStatic);
+};
+Q_STATIC_ASSERT(QVariantIntegrator<double>::CanUseInternalSpace);
+Q_STATIC_ASSERT(QVariantIntegrator<long int>::CanUseInternalSpace);
+Q_STATIC_ASSERT(QVariantIntegrator<qulonglong>::CanUseInternalSpace);
+} // namespace
+
#ifdef Q_CC_SUN // Sun CC picks the wrong overload, so introduce awful hack
template <typename T>
inline T *v_cast(const QVariant::Private *nd, T * = 0)
{
QVariant::Private *d = const_cast<QVariant::Private *>(nd);
- return ((sizeof(T) > sizeof(QVariant::Private::Data))
+ return !QVariantIntegrator<T>::CanUseInternalSpace
? static_cast<T *>(d->data.shared->ptr)
- : static_cast<T *>(static_cast<void *>(&d->data.c)));
+ : static_cast<T *>(static_cast<void *>(&d->data.c));
}
#else // every other compiler in this world
@@ -79,17 +93,17 @@ inline T *v_cast(const QVariant::Private *nd, T * = 0)
template <typename T>
inline const T *v_cast(const QVariant::Private *d, T * = 0)
{
- return ((sizeof(T) > sizeof(QVariant::Private::Data))
+ return !QVariantIntegrator<T>::CanUseInternalSpace
? static_cast<const T *>(d->data.shared->ptr)
- : static_cast<const T *>(static_cast<const void *>(&d->data.c)));
+ : static_cast<const T *>(static_cast<const void *>(&d->data.c));
}
template <typename T>
inline T *v_cast(QVariant::Private *d, T * = 0)
{
- return ((sizeof(T) > sizeof(QVariant::Private::Data))
+ return !QVariantIntegrator<T>::CanUseInternalSpace
? static_cast<T *>(d->data.shared->ptr)
- : static_cast<T *>(static_cast<void *>(&d->data.c)));
+ : static_cast<T *>(static_cast<void *>(&d->data.c));
}
#endif
@@ -110,7 +124,7 @@ private:
template <class T>
inline void v_construct(QVariant::Private *x, const void *copy, T * = 0)
{
- if (sizeof(T) > sizeof(QVariant::Private::Data)) {
+ if (!QVariantIntegrator<T>::CanUseInternalSpace) {
x->data.shared = copy ? new QVariantPrivateSharedEx<T>(*static_cast<const T *>(copy))
: new QVariantPrivateSharedEx<T>;
x->is_shared = true;
@@ -125,7 +139,7 @@ inline void v_construct(QVariant::Private *x, const void *copy, T * = 0)
template <class T>
inline void v_construct(QVariant::Private *x, const T &t)
{
- if (sizeof(T) > sizeof(QVariant::Private::Data)) {
+ if (!QVariantIntegrator<T>::CanUseInternalSpace) {
x->data.shared = new QVariantPrivateSharedEx<T>(t);
x->is_shared = true;
} else {
@@ -138,7 +152,7 @@ template <class T>
inline void v_clear(QVariant::Private *d, T* = 0)
{
- if (sizeof(T) > sizeof(QVariant::Private::Data)) {
+ if (!QVariantIntegrator<T>::CanUseInternalSpace) {
//now we need to cast
//because QVariant::PrivateShared doesn't have a virtual destructor
delete static_cast<QVariantPrivateSharedEx<T>*>(d->data.shared);
@@ -159,24 +173,7 @@ class QVariantComparator {
};
template<typename T>
struct FilteredComparator<T, /* IsAcceptedType = */ false> {
- static bool compare(const QVariant::Private *m_a, const QVariant::Private *m_b)
- {
- const char *const typeName = QMetaType::typeName(m_a->type);
- if (Q_UNLIKELY(!typeName) && Q_LIKELY(!QMetaType::isRegistered(m_a->type)))
- qFatal("QVariant::compare: type %d unknown to QVariant.", m_a->type);
-
- const void *a_ptr = m_a->is_shared ? m_a->data.shared->ptr : &(m_a->data.ptr);
- const void *b_ptr = m_b->is_shared ? m_b->data.shared->ptr : &(m_b->data.ptr);
-
- uint typeNameLen = qstrlen(typeName);
- if (typeNameLen > 0 && typeName[typeNameLen - 1] == '*')
- return *static_cast<void *const *>(a_ptr) == *static_cast<void *const *>(b_ptr);
-
- if (m_a->is_null && m_b->is_null)
- return true;
-
- return !memcmp(a_ptr, b_ptr, QMetaType::sizeOf(m_a->type));
- }
+ static bool compare(const QVariant::Private *, const QVariant::Private *) { return false; }
};
public:
QVariantComparator(const QVariant::Private *a, const QVariant::Private *b)
@@ -293,11 +290,11 @@ protected:
template<class Filter>
class QVariantConstructor
{
- template<typename T, bool IsSmall = (sizeof(T) <= sizeof(QVariant::Private::Data))>
+ template<typename T, bool CanUseInternalSpace = QVariantIntegrator<T>::CanUseInternalSpace>
struct CallConstructor {};
template<typename T>
- struct CallConstructor<T, /* IsSmall = */ true>
+ struct CallConstructor<T, /* CanUseInternalSpace = */ true>
{
CallConstructor(const QVariantConstructor &tc)
{
@@ -310,11 +307,11 @@ class QVariantConstructor
};
template<typename T>
- struct CallConstructor<T, /* IsSmall = */ false>
+ struct CallConstructor<T, /* CanUseInternalSpace = */ false>
{
CallConstructor(const QVariantConstructor &tc)
{
- Q_STATIC_ASSERT(QTypeInfo<T>::isComplex);
+ Q_STATIC_ASSERT(QTypeInfo<T>::isComplex || sizeof(T) > sizeof(QVariant::Private::Data));
tc.m_x->data.shared = tc.m_copy ? new QVariantPrivateSharedEx<T>(*static_cast<const T*>(tc.m_copy))
: new QVariantPrivateSharedEx<T>;
tc.m_x->is_shared = true;
@@ -359,24 +356,8 @@ public:
m_x->is_shared = false;
return;
}
- // it is not a static known type, lets ask QMetaType if it can be constructed for us.
- const uint size = QMetaType::sizeOf(m_x->type);
-
- if (size && size <= sizeof(QVariant::Private::Data)) {
- void *ptr = QMetaType::construct(m_x->type, &m_x->data.ptr, m_copy);
- if (!ptr) {
- m_x->type = QVariant::Invalid;
- }
- m_x->is_shared = false;
- } else {
- void *ptr = QMetaType::create(m_x->type, m_copy);
- if (!ptr) {
- m_x->type = QVariant::Invalid;
- } else {
- m_x->is_shared = true;
- m_x->data.shared = new QVariant::PrivateShared(ptr);
- }
- }
+ qWarning("Trying to construct an instance of an invalid type, type id: %i", m_x->type);
+ m_x->type = QVariant::Invalid;
}
void delegate(const void*)
@@ -425,13 +406,9 @@ public:
void delegate(const QMetaTypeSwitcher::UnknownType*)
{
- // This is not a static type, so lets delegate everyting to QMetaType
- if (!m_d->is_shared) {
- QMetaType::destruct(m_d->type, &m_d->data.ptr);
- } else {
- QMetaType::destroy(m_d->type, m_d->data.shared->ptr);
- delete m_d->data.shared;
- }
+ if (m_d->type == QVariant::UserType)
+ return;
+ qWarning("Trying to destruct an instance of an invalid type, type id: %i", m_d->type);
}
// Ignore nonconstructible type
void delegate(const void*) {}
@@ -439,6 +416,59 @@ private:
QVariant::Private *m_d;
};
+namespace QVariantPrivate {
+Q_CORE_EXPORT void registerHandler(const int /* Modules::Names */ name, const QVariant::Handler *handler);
+Q_CORE_EXPORT void unregisterHandler(const int /* Modules::Names */ name);
+}
+
+#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
+template<class Filter>
+class QVariantDebugStream
+{
+ template<typename T, bool IsAcceptedType = Filter::template Acceptor<T>::IsAccepted>
+ struct Filtered {
+ Filtered(QDebug dbg, QVariant::Private *d)
+ {
+ dbg.nospace() << *v_cast<T>(d);
+ }
+ };
+ template<typename T>
+ struct Filtered<T, /* IsAcceptedType = */ false> {
+ Filtered(QDebug dbg, QVariant::Private *d)
+ {
+ dbg.nospace() << "QVariant::Type(" << d->type << ")";
+ }
+ };
+
+public:
+ QVariantDebugStream(QDebug dbg, QVariant::Private *d)
+ : m_debugStream(dbg)
+ , m_d(d)
+ {}
+
+ template<typename T>
+ void delegate(const T*)
+ {
+ Filtered<T> streamIt(m_debugStream, m_d);
+ }
+
+ void delegate(const QMetaTypeSwitcher::UnknownType*)
+ {
+ if (m_d->type == QVariant::UserType)
+ m_debugStream.nospace() << "QVariant::UserType";
+ else
+ qWarning("Trying to stream an instance of an invalid type, type id: %i", m_d->type);
+ }
+ void delegate(const void*)
+ {
+ m_debugStream.nospace() << "QVariant::Invalid";
+ }
+private:
+ QDebug m_debugStream;
+ QVariant::Private *m_d;
+};
+#endif
+
QT_END_NAMESPACE
#endif // QVARIANT_P_H
diff --git a/src/corelib/kernel/qwineventnotifier.cpp b/src/corelib/kernel/qwineventnotifier.cpp
index 1ef77cdf62..e06e1d5b0a 100644
--- a/src/corelib/kernel/qwineventnotifier.cpp
+++ b/src/corelib/kernel/qwineventnotifier.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/kernel/qwineventnotifier.h b/src/corelib/kernel/qwineventnotifier.h
index d265c8c181..386a640434 100644
--- a/src/corelib/kernel/qwineventnotifier.h
+++ b/src/corelib/kernel/qwineventnotifier.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index e3c6b30820..cfe9a9d1b5 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h
index 510ffed567..2f10807720 100644
--- a/src/corelib/plugin/qelfparser_p.h
+++ b/src/corelib/plugin/qelfparser_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qfactoryinterface.h b/src/corelib/plugin/qfactoryinterface.h
index 647d97f173..b7e4f3de16 100644
--- a/src/corelib/plugin/qfactoryinterface.h
+++ b/src/corelib/plugin/qfactoryinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 749a7deddd..9ae97c6313 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qfactoryloader_p.h b/src/corelib/plugin/qfactoryloader_p.h
index 75d40f8c3f..be40e66efd 100644
--- a/src/corelib/plugin/qfactoryloader_p.h
+++ b/src/corelib/plugin/qfactoryloader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 6a40b5b818..f20abb660d 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -96,7 +96,7 @@ Q_GLOBAL_STATIC(QMutex, qt_library_mutex)
Unix), unless the file name has an absolute path. If the file
cannot be found, QLibrary tries the name with different
platform-specific file suffixes, like ".so" on Unix, ".dylib" on
- the Mac, or ".dll" on Windows and Symbian. This makes it possible
+ the Mac, or ".dll" on Windows. This makes it possible
to specify shared libraries that are only identified by their
basename (i.e. without their suffix), so the same code will work
on different operating systems.
@@ -118,11 +118,6 @@ Q_GLOBAL_STATIC(QMutex, qt_library_mutex)
linking", which is done by the link step in the build process when
linking an executable against a library.
- Note: In Symbian resolving symbols using their names is supported
- only if the library is built as STDDLL. Otherwise ordinals must
- be used. Also, in Symbian the path of the library is ignored and
- system default library location is always used.
-
The following code snippet loads a library, resolves the symbol
"mysymbol", and calls the function if everything succeeded. If
something goes wrong, e.g. the library file does not exist or the
@@ -287,7 +282,7 @@ static bool qt_parse_pattern(const char *s, uint *version, bool *debug)
}
#endif // QT_NO_PLUGIN_CHECK
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_PLUGIN_CHECK)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(QT_NO_PLUGIN_CHECK)
static long qt_find_pattern(const char *s, ulong s_len,
const char *pattern, ulong p_len)
@@ -398,7 +393,7 @@ static bool qt_unix_query(const QString &library, uint *version, bool *debug, QL
return ret;
}
-#endif // Q_OS_UNIX && !Q_OS_MAC && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_PLUGIN_CHECK)
+#endif // Q_OS_UNIX && !Q_OS_MAC && !defined(QT_NO_PLUGIN_CHECK)
static void installCoverageTool(QLibraryPrivate *libPrivate)
{
@@ -435,25 +430,6 @@ static void installCoverageTool(QLibraryPrivate *libPrivate)
#endif
}
-static void releaseCoverageTool(QLibraryPrivate *libPrivate)
-{
-#ifdef __COVERAGESCANNER__
- /*
- __COVERAGESCANNER__ is defined when Qt has been instrumented for code
- coverage by TestCocoon.
- Here is the code to save the execution data.
- See comments about initialization in QLibraryPrivate::load().
- */
- if (libPrivate->pHnd) {
- __coveragescanner_save();
- __coveragescanner_clear();
- __coveragescanner_unregister_library(libPrivate->fileName.toLocal8Bit());
- }
-#else
- Q_UNUSED(libPrivate);
-#endif
-}
-
typedef QMap<QString, QLibraryPrivate*> LibraryMap;
struct LibraryData {
@@ -550,8 +526,6 @@ bool QLibraryPrivate::unload()
void QLibraryPrivate::release()
{
- releaseCoverageTool(this);
-
QMutexLocker locker(qt_library_mutex());
if (!libraryRefCount.deref())
delete this;
@@ -567,14 +541,6 @@ bool QLibraryPrivate::loadPlugin()
return false;
if (load()) {
instance = (QtPluginInstanceFunction)resolve("qt_plugin_instance");
-#if defined(Q_OS_SYMBIAN)
- if (!instance) {
- // If resolving with function name failed (i.e. not STDDLL),
- // try resolving using known ordinal, which for
- // qt_plugin_instance function is always "2".
- instance = (QtPluginInstanceFunction)resolve("2");
- }
-#endif
return instance;
}
if (qt_debug_component())
@@ -594,7 +560,6 @@ bool QLibraryPrivate::loadPlugin()
\row \i AIX \i \c .a
\row \i HP-UX \i \c .sl, \c .so (HP-UXi)
\row \i Mac OS X \i \c .dylib, \c .bundle, \c .so
- \row \i Symbian \i \c .dll
\endtable
Trailing versioning numbers on Unix are ignored.
@@ -603,10 +568,6 @@ bool QLibrary::isLibrary(const QString &fileName)
{
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
return fileName.endsWith(QLatin1String(".dll"), Qt::CaseInsensitive);
-#elif defined(Q_OS_SYMBIAN)
- // Plugin stubs are also considered libraries in Symbian.
- return (fileName.endsWith(QLatin1String(".dll")) ||
- fileName.endsWith(QLatin1String(".qtplugin")));
#else
QString completeSuffix = QFileInfo(fileName).completeSuffix();
if (completeSuffix.isEmpty())
@@ -728,7 +689,7 @@ bool QLibraryPrivate::isPlugin()
}
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
if (!pHnd) {
// use unix shortcut to avoid loading the library
success = qt_unix_query(fileName, &qt_version, &debug, this);
@@ -749,11 +710,7 @@ bool QLibraryPrivate::isPlugin()
hTempModule = ::LoadLibraryEx((wchar_t*)QDir::toNativeSeparators(fileName).utf16(), 0, dwFlags);
SetErrorMode(oldmode);
#else
-# if defined(Q_OS_SYMBIAN)
- //Guard against accidentally trying to load non-plugin libraries by making sure the stub exists
- if (fileinfo.exists())
-# endif
- temporary_load = load_sys();
+ temporary_load = load_sys();
#endif
}
#ifdef Q_OS_WIN
@@ -766,16 +723,7 @@ bool QLibraryPrivate::isPlugin()
: (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_verification_data");
#else
QtPluginQueryVerificationDataFunction qtPluginQueryVerificationDataFunction = NULL;
-# if defined(Q_OS_SYMBIAN)
- if (temporary_load) {
- qtPluginQueryVerificationDataFunction = (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_verification_data");
- // If resolving with function name failed (i.e. not STDDLL), try resolving using known ordinal
- if (!qtPluginQueryVerificationDataFunction)
- qtPluginQueryVerificationDataFunction = (QtPluginQueryVerificationDataFunction) resolve("1");
- }
-# else
qtPluginQueryVerificationDataFunction = (QtPluginQueryVerificationDataFunction) resolve("qt_plugin_query_verification_data");
-# endif
#endif
bool exceptionThrown = false;
bool ret = qt_get_verificationdata(qtPluginQueryVerificationDataFunction,
@@ -927,8 +875,6 @@ QLibrary::QLibrary(QObject *parent)
QLibrary will automatically look for the file with the appropriate
suffix in accordance with the platform, e.g. ".so" on Unix,
".dylib" on Mac OS X, and ".dll" on Windows. (See \l{fileName}.)
-
- Note: In Symbian the path portion of the \a fileName is ignored.
*/
QLibrary::QLibrary(const QString& fileName, QObject *parent)
:QObject(parent), d(0), did_load(false)
@@ -940,14 +886,12 @@ QLibrary::QLibrary(const QString& fileName, QObject *parent)
/*!
Constructs a library object with the given \a parent that will
load the library specified by \a fileName and major version number \a verNum.
- Currently, the version number is ignored on Windows and Symbian.
+ Currently, the version number is ignored on Windows.
We recommend omitting the file's suffix in \a fileName, since
QLibrary will automatically look for the file with the appropriate
suffix in accordance with the platform, e.g. ".so" on Unix,
".dylib" on Mac OS X, and ".dll" on Windows. (See \l{fileName}.)
-
- Note: In Symbian the path portion of the \a fileName is ignored.
*/
QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent)
:QObject(parent), d(0), did_load(false)
@@ -958,14 +902,12 @@ QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent)
/*!
Constructs a library object with the given \a parent that will
load the library specified by \a fileName and full version number \a version.
- Currently, the version number is ignored on Windows and Symbian.
+ Currently, the version number is ignored on Windows.
We recommend omitting the file's suffix in \a fileName, since
QLibrary will automatically look for the file with the appropriate
suffix in accordance with the platform, e.g. ".so" on Unix,
".dylib" on Mac OS X, and ".dll" on Windows. (See \l{fileName}.)
-
- Note: In Symbian the path portion of the \a fileName is ignored.
*/
QLibrary::QLibrary(const QString& fileName, const QString &version, QObject *parent)
:QObject(parent), d(0), did_load(false)
@@ -1007,8 +949,6 @@ QLibrary::~QLibrary()
platforms, fileName() will return "libGL.so". If the file name was
originally passed as "/usr/lib/libGL", fileName() will return
"/usr/lib/libGL.so".
-
- Note: In Symbian the path portion of the \a fileName is ignored.
*/
void QLibrary::setFileName(const QString &fileName)
@@ -1036,9 +976,7 @@ QString QLibrary::fileName() const
Sets the fileName property and major version number to \a fileName
and \a versionNumber respectively.
- The \a versionNumber is ignored on Windows and Symbian.
-
- Note: In Symbian the path portion of the \a fileName is ignored.
+ The \a versionNumber is ignored on Windows.
\sa setFileName()
*/
@@ -1060,9 +998,7 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, int verNum)
Sets the fileName property and full version number to \a fileName
and \a version respectively.
- The \a version parameter is ignored on Windows and Symbian.
-
- Note: In Symbian the path portion of the \a fileName is ignored.
+ The \a version parameter is ignored on Windows.
\sa setFileName()
*/
@@ -1098,9 +1034,6 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, const QString &ver
with \c MY_EXPORT defined as
\snippet doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp 4
-
- Note: In Symbian resolving with symbol names works only if the loaded
- library was built as STDDLL. Otherwise, the ordinals must be used.
*/
QFunctionPointer QLibrary::resolve(const char *symbol)
{
@@ -1120,9 +1053,6 @@ QFunctionPointer QLibrary::resolve(const char *symbol)
The function returns 0 if the symbol could not be resolved or if
the library could not be loaded.
- Note: In Symbian resolving with symbol names works only if the loaded
- library was built as STDDLL. Otherwise, the ordinals must be used.
-
\sa resolve()
*/
QFunctionPointer QLibrary::resolve(const QString &fileName, const char *symbol)
@@ -1143,9 +1073,6 @@ QFunctionPointer QLibrary::resolve(const QString &fileName, const char *symbol)
The function returns 0 if the symbol could not be resolved or if
the library could not be loaded.
- Note: In Symbian resolving with symbol names works only if the loaded
- library was built as STDDLL. Otherwise, the ordinals must be used.
-
\sa resolve()
*/
QFunctionPointer QLibrary::resolve(const QString &fileName, int verNum, const char *symbol)
@@ -1167,9 +1094,6 @@ QFunctionPointer QLibrary::resolve(const QString &fileName, int verNum, const ch
The function returns 0 if the symbol could not be resolved or if
the library could not be loaded.
- Note: In Symbian resolving with symbol names works only if the loaded
- library was built as STDDLL. Otherwise, the ordinals must be used.
-
\sa resolve()
*/
QFunctionPointer QLibrary::resolve(const QString &fileName, const QString &version, const char *symbol)
diff --git a/src/corelib/plugin/qlibrary.h b/src/corelib/plugin/qlibrary.h
index e3f557dd7d..729277e838 100644
--- a/src/corelib/plugin/qlibrary.h
+++ b/src/corelib/plugin/qlibrary.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index 15825c699f..45c8843d20 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index d3b08e1acf..ce6d645ca4 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
index 4eeb2fc441..fd46a7107e 100644
--- a/src/corelib/plugin/qlibrary_win.cpp
+++ b/src/corelib/plugin/qlibrary_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h
index 52661671b5..c9388c1337 100644
--- a/src/corelib/plugin/qplugin.h
+++ b/src/corelib/plugin/qplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc
index 1c24de3254..2149fa7179 100644
--- a/src/corelib/plugin/qplugin.qdoc
+++ b/src/corelib/plugin/qplugin.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
index 591e36e20a..1557df2eef 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,11 +48,6 @@
#include "qdebug.h"
#include "qdir.h"
-#if defined(Q_OS_SYMBIAN)
-# include <f32file.h>
-# include "private/qcore_symbian_p.h"
-#endif
-
#ifndef QT_NO_LIBRARY
QT_BEGIN_NAMESPACE
@@ -106,16 +101,6 @@ QT_BEGIN_NAMESPACE
link to plugins statically. You can use QLibrary if you need to
load dynamic libraries in a statically linked application.
- \note In Symbian the plugin stub files must be used whenever a
- path to plugin is needed. For the purposes of loading plugins,
- the stubs can be considered to have the same name as the actual
- plugin binary. In practice they have ".qtplugin" extension
- instead of ".dll", but this difference is handled transparently
- by QPluginLoader and QLibrary to avoid need for Symbian specific
- plugin handling in most Qt applications. Plugin stubs are needed
- because Symbian Platform Security denies all access to the directory
- where the actual plugin binaries are located.
-
\sa QLibrary, {Plug & Paint Example}
*/
@@ -136,8 +121,6 @@ QPluginLoader::QPluginLoader(QObject *parent)
Unix, - \c .dylib on Mac OS X, and \c .dll on Windows. The suffix
can be verified with QLibrary::isLibrary().
- Note: In Symbian the \a fileName must point to plugin stub file.
-
\sa setFileName()
*/
QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent)
@@ -263,8 +246,6 @@ bool QPluginLoader::isLoaded() const
By default, this property contains an empty string.
- Note: In Symbian the \a fileName must point to plugin stub file.
-
\sa load()
*/
void QPluginLoader::setFileName(const QString &fileName)
@@ -278,48 +259,7 @@ void QPluginLoader::setFileName(const QString &fileName)
did_load = false;
}
-#if defined(Q_OS_SYMBIAN)
- // In Symbian we actually look for plugin stub, so modify the filename
- // to make canonicalFilePath find the file, if .dll is specified.
- QFileInfo fi(fileName);
-
- if (fi.suffix() == QLatin1String("dll")) {
- QString stubName = fileName;
- stubName.chop(3);
- stubName += QLatin1String("qtplugin");
- fi = QFileInfo(stubName);
- }
-
- QString fn = fi.canonicalFilePath();
- // If not found directly, check also all the available drives
- if (!fn.length()) {
- QString stubPath(fi.fileName().length() ? fi.absoluteFilePath() : QString());
- if (stubPath.length() > 1) {
- if (stubPath.at(1).toAscii() == ':')
- stubPath.remove(0,2);
- QFileInfoList driveList(QDir::drives());
- RFs rfs = qt_s60GetRFs();
- foreach(const QFileInfo& drive, driveList) {
- QString testFilePath(drive.absolutePath() + stubPath);
- testFilePath = QDir::cleanPath(testFilePath);
- // Use native Symbian code to check for file existence, because checking
- // for file from under non-existent protected dir like E:/private/<uid> using
- // QFile::exists causes platform security violations on most apps.
- QString nativePath = QDir::toNativeSeparators(testFilePath);
- TPtrC ptr(qt_QString2TPtrC(nativePath));
- TUint attributes;
- TInt err = rfs.Att(ptr, attributes);
- if (err == KErrNone) {
- fn = testFilePath;
- break;
- }
- }
- }
- }
-
-#else
QString fn = QFileInfo(fileName).canonicalFilePath();
-#endif
d = QLibraryPrivate::findOrCreate(fn);
d->loadHints = lh;
diff --git a/src/corelib/plugin/qpluginloader.h b/src/corelib/plugin/qpluginloader.h
index b8f40379c8..0854d3dcdf 100644
--- a/src/corelib/plugin/qpluginloader.h
+++ b/src/corelib/plugin/qpluginloader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp
index bb9c82a35a..f949cc0f86 100644
--- a/src/corelib/plugin/qsystemlibrary.cpp
+++ b/src/corelib/plugin/qsystemlibrary.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h
index 3298f05b8f..4015fb6958 100644
--- a/src/corelib/plugin/qsystemlibrary_p.h
+++ b/src/corelib/plugin/qsystemlibrary_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 6fca1b6709..e73508fce6 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,7 @@
#include "qdatastream.h"
#include "qendian.h"
+#include "qdebug.h"
QT_BEGIN_NAMESPACE
@@ -132,6 +133,29 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (&
}
#endif
+static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCryptographicHash::Algorithm algorithm, int version)
+{
+ QByteArray hashResult;
+
+ // create a scope so later resize won't reallocate
+ {
+ QCryptographicHash hash(algorithm);
+ hash.addData(ns.toRfc4122());
+ hash.addData(baseData);
+ hashResult = hash.result();
+ }
+ hashResult.resize(16); // Sha1 will be too long
+
+ QUuid result = QUuid::fromRfc4122(hashResult);
+
+ result.data3 &= 0x0FFF;
+ result.data3 |= (version << 12);
+ result.data4[0] &= 0x3F;
+ result.data4[0] |= 0x80;
+
+ return result;
+}
+
/*!
\class QUuid
\brief The QUuid class stores a Universally Unique Identifier (UUID).
@@ -230,7 +254,7 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (&
\o 0
\o 1
\o 1
- \o Name
+ \o Md5(Name)
\row
\o 0
@@ -239,6 +263,13 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (&
\o 0
\o Random
+ \row
+ \o 0
+ \o 1
+ \o 0
+ \o 1
+ \o Sha1
+
\endtable
The field layouts for the DCE versions listed in the table above
@@ -384,9 +415,40 @@ QUuid::QUuid(const QByteArray &text)
return;
}
}
+
#endif
/*!
+ \since 5.0
+ \fn QUuid::createUuidV3()
+
+ This functions returns a new UUID with variant QUuid::DCE and version QUuid::MD5.
+ \a ns is the namespace and \a name is the name as described by RFC 4122.
+
+ \sa variant(), version(), createUuidV5()
+*/
+
+/*!
+ \since 5.0
+ \fn QUuid::createUuidV5()
+
+ This functions returns a new UUID with variant QUuid::DCE and version QUuid::SHA1.
+ \a ns is the namespace and \a name is the name as described by RFC 4122.
+
+ \sa variant(), version(), createUuidV3()
+*/
+
+QUuid QUuid::createUuidV3(const QUuid &ns, const QByteArray &baseData)
+{
+ return createFromName(ns, baseData, QCryptographicHash::Md5, 3);
+}
+
+QUuid QUuid::createUuidV5(const QUuid &ns, const QByteArray &baseData)
+{
+ return createFromName(ns, baseData, QCryptographicHash::Sha1, 5);
+}
+
+/*!
Creates a QUuid object from the binary representation of the UUID, as
specified by RFC 4122 section 4.1.2. See toRfc4122() for a further
explanation of the order of bytes required.
@@ -440,15 +502,6 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes)
*/
#ifndef QT_NO_QUUID_STRING
/*!
- \fn QUuid::operator QString() const
- \obsolete
-
- Returns the string representation of the uuid.
-
- \sa toString()
-*/
-
-/*!
Returns the string representation of this QUuid. The string is
formatted as five hex fields separated by '-' and enclosed in
curly braces, i.e., "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where
@@ -739,7 +792,7 @@ QUuid::Version QUuid::version() const
if (isNull()
|| (variant() != DCE)
|| ver < Time
- || ver > Random)
+ || ver > Sha1)
return VerUnknown;
return ver;
}
@@ -927,6 +980,14 @@ QUuid QUuid::createUuid()
guid; otherwise returns false.
*/
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QUuid &id)
+{
+ dbg.nospace() << "QUuid(" << id.toString() << ')';
+ return dbg.space();
+}
+#endif
+
/**
Returns a hash of the QUuid
*/
diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h
index b941079df0..9efb2ba37c 100644
--- a/src/corelib/plugin/quuid.h
+++ b/src/corelib/plugin/quuid.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,7 @@
#define QUUID_H
#include <QtCore/qstring.h>
+#include <QtCore/qcryptographichash.h>
QT_BEGIN_HEADER
@@ -64,8 +65,9 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Core)
-struct Q_CORE_EXPORT QUuid
+class Q_CORE_EXPORT QUuid
{
+public:
enum Variant {
VarUnknown =-1,
NCS = 0, // 0 - -
@@ -78,8 +80,10 @@ struct Q_CORE_EXPORT QUuid
VerUnknown =-1,
Time = 1, // 0 0 0 1
EmbeddedPOSIX = 2, // 0 0 1 0
- Name = 3, // 0 0 1 1
- Random = 4 // 0 1 0 0
+ Md5 = 3, // 0 0 1 1
+ Name = Md5,
+ Random = 4, // 0 1 0 0
+ Sha1 = 5 // 0 1 0 1
};
QUuid()
@@ -108,9 +112,6 @@ struct Q_CORE_EXPORT QUuid
QUuid(const QString &);
QUuid(const char *);
QString toString() const;
-#if QT_DEPRECATED_SINCE(5,0)
- QT_DEPRECATED operator QString() const { return toString(); }
-#endif
QUuid(const QByteArray &);
QByteArray toByteArray() const;
#endif
@@ -175,6 +176,21 @@ struct Q_CORE_EXPORT QUuid
}
#endif
static QUuid createUuid();
+ static QUuid createUuidV3(const QUuid &ns, const QByteArray &baseData);
+ static QUuid createUuidV5(const QUuid &ns, const QByteArray &baseData);
+#ifndef QT_NO_QUUID_STRING
+ static inline QUuid createUuidV3(const QUuid &ns, const QString &baseData)
+ {
+ return QUuid::createUuidV3(ns, baseData.toUtf8());
+ }
+
+ static inline QUuid createUuidV5(const QUuid &ns, const QString &baseData)
+ {
+ return QUuid::createUuidV5(ns, baseData.toUtf8());
+ }
+
+#endif
+
QUuid::Variant variant() const;
QUuid::Version version() const;
@@ -184,11 +200,17 @@ struct Q_CORE_EXPORT QUuid
uchar data4[8];
};
+Q_DECLARE_TYPEINFO(QUuid, Q_MOVABLE_TYPE);
+
#ifndef QT_NO_DATASTREAM
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QUuid &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QUuid &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QUuid &);
+#endif
+
Q_CORE_EXPORT uint qHash(const QUuid &uuid);
QT_END_NAMESPACE
diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp
index 79b72ea538..c2d24e3c00 100644
--- a/src/corelib/statemachine/qabstractstate.cpp
+++ b/src/corelib/statemachine/qabstractstate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qabstractstate.h b/src/corelib/statemachine/qabstractstate.h
index 21169e4fee..33dbde23aa 100644
--- a/src/corelib/statemachine/qabstractstate.h
+++ b/src/corelib/statemachine/qabstractstate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qabstractstate_p.h b/src/corelib/statemachine/qabstractstate_p.h
index 98b1d0a9b4..cf86e0cbe9 100644
--- a/src/corelib/statemachine/qabstractstate_p.h
+++ b/src/corelib/statemachine/qabstractstate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp
index ff2b4b5978..a8fdea2cfc 100644
--- a/src/corelib/statemachine/qabstracttransition.cpp
+++ b/src/corelib/statemachine/qabstracttransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h
index dbe7f3aa38..fd1eedb72e 100644
--- a/src/corelib/statemachine/qabstracttransition.h
+++ b/src/corelib/statemachine/qabstracttransition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h
index 57f962d77d..4de0f4b8d6 100644
--- a/src/corelib/statemachine/qabstracttransition_p.h
+++ b/src/corelib/statemachine/qabstracttransition_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp
index 63f89669b9..f55cdbc927 100644
--- a/src/corelib/statemachine/qeventtransition.cpp
+++ b/src/corelib/statemachine/qeventtransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qeventtransition.h b/src/corelib/statemachine/qeventtransition.h
index 434b72e76c..173d24ef4a 100644
--- a/src/corelib/statemachine/qeventtransition.h
+++ b/src/corelib/statemachine/qeventtransition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qeventtransition_p.h b/src/corelib/statemachine/qeventtransition_p.h
index ed096df81d..6c3dc9dda4 100644
--- a/src/corelib/statemachine/qeventtransition_p.h
+++ b/src/corelib/statemachine/qeventtransition_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qfinalstate.cpp b/src/corelib/statemachine/qfinalstate.cpp
index c583c32183..c2bb2ee218 100644
--- a/src/corelib/statemachine/qfinalstate.cpp
+++ b/src/corelib/statemachine/qfinalstate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qfinalstate.h b/src/corelib/statemachine/qfinalstate.h
index 9a18888c84..652abd6600 100644
--- a/src/corelib/statemachine/qfinalstate.h
+++ b/src/corelib/statemachine/qfinalstate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp
index 5f3a5dcf4c..b45cd30935 100644
--- a/src/corelib/statemachine/qhistorystate.cpp
+++ b/src/corelib/statemachine/qhistorystate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qhistorystate.h b/src/corelib/statemachine/qhistorystate.h
index 1ba28e97f1..e9ec058d53 100644
--- a/src/corelib/statemachine/qhistorystate.h
+++ b/src/corelib/statemachine/qhistorystate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qhistorystate_p.h b/src/corelib/statemachine/qhistorystate_p.h
index b915c2820c..35662d88f8 100644
--- a/src/corelib/statemachine/qhistorystate_p.h
+++ b/src/corelib/statemachine/qhistorystate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qsignaleventgenerator_p.h b/src/corelib/statemachine/qsignaleventgenerator_p.h
index c38177b766..e681add086 100644
--- a/src/corelib/statemachine/qsignaleventgenerator_p.h
+++ b/src/corelib/statemachine/qsignaleventgenerator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp
index 92862cbab6..51a8a82b2d 100644
--- a/src/corelib/statemachine/qsignaltransition.cpp
+++ b/src/corelib/statemachine/qsignaltransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qsignaltransition.h b/src/corelib/statemachine/qsignaltransition.h
index 155e0f3d9d..fd91dd4c6d 100644
--- a/src/corelib/statemachine/qsignaltransition.h
+++ b/src/corelib/statemachine/qsignaltransition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qsignaltransition_p.h b/src/corelib/statemachine/qsignaltransition_p.h
index 8bf928804b..aadb4efcc7 100644
--- a/src/corelib/statemachine/qsignaltransition_p.h
+++ b/src/corelib/statemachine/qsignaltransition_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index 7dc9889dc0..4f37bb0642 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h
index 4d3acc1341..337659295e 100644
--- a/src/corelib/statemachine/qstate.h
+++ b/src/corelib/statemachine/qstate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h
index 74b425361b..daa2f467c1 100644
--- a/src/corelib/statemachine/qstate_p.h
+++ b/src/corelib/statemachine/qstate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 927389a33b..a24c71c105 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h
index 1238f480f4..b2a251038d 100644
--- a/src/corelib/statemachine/qstatemachine.h
+++ b/src/corelib/statemachine/qstatemachine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h
index 3227f81e58..88b16a22bf 100644
--- a/src/corelib/statemachine/qstatemachine_p.h
+++ b/src/corelib/statemachine/qstatemachine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp
index 3cdb3c6d7b..c2c9484cf6 100644
--- a/src/corelib/thread/qatomic.cpp
+++ b/src/corelib/thread/qatomic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h
index eff2182e28..07350ecfcd 100644
--- a/src/corelib/thread/qatomic.h
+++ b/src/corelib/thread/qatomic.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,7 +44,7 @@
#ifndef QATOMIC_H
#define QATOMIC_H
-#include <QtCore/qbasicatomic.h>
+#include <QtCore/qoldbasicatomic.h>
QT_BEGIN_HEADER
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index df36120d88..6c8ed3b897 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index 086a289569..1d7e591b7d 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutex_linux.cpp b/src/corelib/thread/qmutex_linux.cpp
index 18ddd23819..9bb9c9061e 100644
--- a/src/corelib/thread/qmutex_linux.cpp
+++ b/src/corelib/thread/qmutex_linux.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutex_mac.cpp b/src/corelib/thread/qmutex_mac.cpp
index 2fdb2ec489..1a561aa5d5 100644
--- a/src/corelib/thread/qmutex_mac.cpp
+++ b/src/corelib/thread/qmutex_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h
index e385181e0f..0cbc99adc6 100644
--- a/src/corelib/thread/qmutex_p.h
+++ b/src/corelib/thread/qmutex_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutex_unix.cpp b/src/corelib/thread/qmutex_unix.cpp
index b693088015..a426d958f2 100644
--- a/src/corelib/thread/qmutex_unix.cpp
+++ b/src/corelib/thread/qmutex_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp
index 781a632a61..b513b6e1ad 100644
--- a/src/corelib/thread/qmutex_win.cpp
+++ b/src/corelib/thread/qmutex_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutexpool.cpp b/src/corelib/thread/qmutexpool.cpp
index ef4e9560fb..6be5e092d7 100644
--- a/src/corelib/thread/qmutexpool.cpp
+++ b/src/corelib/thread/qmutexpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qmutexpool_p.h b/src/corelib/thread/qmutexpool_p.h
index 20449c24d4..90b89f9a17 100644
--- a/src/corelib/thread/qmutexpool_p.h
+++ b/src/corelib/thread/qmutexpool_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qoldbasicatomic.h
index d3e988d8c5..2f952c9e0a 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qoldbasicatomic.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qorderedmutexlocker_p.h b/src/corelib/thread/qorderedmutexlocker_p.h
index e65a601369..14a29c7edf 100644
--- a/src/corelib/thread/qorderedmutexlocker_p.h
+++ b/src/corelib/thread/qorderedmutexlocker_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp
index f552e6f6d6..54926111d5 100644
--- a/src/corelib/thread/qreadwritelock.cpp
+++ b/src/corelib/thread/qreadwritelock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -107,19 +107,12 @@ QT_BEGIN_NAMESPACE
*/
/*!
- Constructs a QReadWriteLock object in NonRecursive mode.
-
- \sa lockForRead(), lockForWrite()
-*/
-QReadWriteLock::QReadWriteLock()
- :d(new QReadWriteLockPrivate(NonRecursive))
-{ }
-
-/*!
\since 4.4
Constructs a QReadWriteLock object in the given \a recursionMode.
+ The default recursion mode is NonRecursive.
+
\sa lockForRead(), lockForWrite(), RecursionMode
*/
QReadWriteLock::QReadWriteLock(RecursionMode recursionMode)
@@ -513,7 +506,7 @@ void QReadWriteLock::unlock()
\ingroup thread
- The purpose of QWriteLocker (and QReadLocker is to simplify
+ The purpose of QWriteLocker (and QReadLocker) is to simplify
QReadWriteLock locking and unlocking. Locking and unlocking
statements or in exception handling code is error-prone and
difficult to debug. QWriteLocker can be used in such situations
diff --git a/src/corelib/thread/qreadwritelock.h b/src/corelib/thread/qreadwritelock.h
index 7bb6329522..cdbd7894a1 100644
--- a/src/corelib/thread/qreadwritelock.h
+++ b/src/corelib/thread/qreadwritelock.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,8 +60,7 @@ class Q_CORE_EXPORT QReadWriteLock
public:
enum RecursionMode { NonRecursive, Recursive };
- QReadWriteLock(); // ### Qt 5: merge with below
- QReadWriteLock(RecursionMode recursionMode);
+ explicit QReadWriteLock(RecursionMode recursionMode = NonRecursive);
~QReadWriteLock();
void lockForRead();
diff --git a/src/corelib/thread/qreadwritelock_p.h b/src/corelib/thread/qreadwritelock_p.h
index fda7bf44e6..125245bb4a 100644
--- a/src/corelib/thread/qreadwritelock_p.h
+++ b/src/corelib/thread/qreadwritelock_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index acfd478a14..12539a794d 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qsemaphore.h b/src/corelib/thread/qsemaphore.h
index 50d32c5f65..4790a84bb6 100644
--- a/src/corelib/thread/qsemaphore.h
+++ b/src/corelib/thread/qsemaphore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 1df768c1ed..9d48c4dbe5 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index baad793969..597e29546a 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index bbaf664a2d..094c9b0daf 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -81,6 +81,8 @@ public:
: receiver(r), event(e), priority(p)
{ }
};
+Q_DECLARE_TYPEINFO(QPostEvent, Q_MOVABLE_TYPE);
+
inline bool operator<(int priority, const QPostEvent &pe)
{
return pe.priority < priority;
@@ -92,7 +94,7 @@ inline bool operator<(const QPostEvent &pe, int priority)
// This class holds the list of posted events.
// The list has to be kept sorted by priority
-class QPostEventList : public QList<QPostEvent>
+class QPostEventList : public QVector<QPostEvent>
{
public:
// recursion == recursion count for sendPostedEvents()
@@ -106,12 +108,14 @@ public:
QMutex mutex;
inline QPostEventList()
- : QList<QPostEvent>(), recursion(0), startOffset(0), insertionOffset(0)
+ : QVector<QPostEvent>(), recursion(0), startOffset(0), insertionOffset(0)
{ }
void addEvent(const QPostEvent &ev) {
int priority = ev.priority;
- if (isEmpty() || last().priority >= priority) {
+ if (isEmpty() ||
+ last().priority >= priority ||
+ begin() + insertionOffset >= end()) {
// optimization: we can simply append if the last event in
// the queue has higher or equal priority
append(ev);
@@ -125,8 +129,8 @@ public:
}
private:
//hides because they do not keep that list sorted. addEvent must be used
- using QList<QPostEvent>::append;
- using QList<QPostEvent>::insert;
+ using QVector<QPostEvent>::append;
+ using QVector<QPostEvent>::insert;
};
#ifndef QT_NO_THREAD
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 6deae261c6..672b7cb976 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 0c834cfff2..3184b18471 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qthreadstorage.cpp b/src/corelib/thread/qthreadstorage.cpp
index 0913292852..6dba8d670e 100644
--- a/src/corelib/thread/qthreadstorage.cpp
+++ b/src/corelib/thread/qthreadstorage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qthreadstorage.h b/src/corelib/thread/qthreadstorage.h
index 172dff0b3d..790f9a51ef 100644
--- a/src/corelib/thread/qthreadstorage.h
+++ b/src/corelib/thread/qthreadstorage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qwaitcondition.h b/src/corelib/thread/qwaitcondition.h
index 0a96689f0b..7d4eb684ee 100644
--- a/src/corelib/thread/qwaitcondition.h
+++ b/src/corelib/thread/qwaitcondition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc
index 00d4b0ff00..f079e5a6ba 100644
--- a/src/corelib/thread/qwaitcondition.qdoc
+++ b/src/corelib/thread/qwaitcondition.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index dd85bf4023..91aea010d9 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp
index bf1ec5e5ba..0106dbf13a 100644
--- a/src/corelib/thread/qwaitcondition_win.cpp
+++ b/src/corelib/thread/qwaitcondition_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/thread/thread.pri b/src/corelib/thread/thread.pri
index d63bb914e1..974e086684 100644
--- a/src/corelib/thread/thread.pri
+++ b/src/corelib/thread/thread.pri
@@ -7,7 +7,8 @@ HEADERS += thread/qmutex.h \
thread/qthread.h \
thread/qthreadstorage.h \
thread/qwaitcondition.h \
- thread/qatomic.h
+ thread/qatomic.h \
+ thread/qoldbasicatomic.h
# private headers
HEADERS += thread/qmutex_p.h \
@@ -40,3 +41,4 @@ unix: {
else:linux-* { SOURCES += thread/qmutex_linux.cpp }
else { SOURCES += thread/qmutex_unix.cpp }
}
+
diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h
index 90a9caa905..a1c656934d 100644
--- a/src/corelib/tools/qalgorithms.h
+++ b/src/corelib/tools/qalgorithms.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index b11f4092a8..3ba86b6838 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
index 5538180b37..96811cc179 100644
--- a/src/corelib/tools/qbitarray.cpp
+++ b/src/corelib/tools/qbitarray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -725,6 +725,24 @@ QDataStream &operator>>(QDataStream &in, QBitArray &ba)
}
#endif // QT_NO_DATASTREAM
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QBitArray &array)
+{
+ dbg.nospace() << "QBitArray(";
+ for (int i = 0; i < array.size();) {
+ if (array.testBit(i))
+ dbg.nospace() << '1';
+ else
+ dbg.nospace() << '0';
+ i += 1;
+ if (!(i % 4) && (i < array.size()))
+ dbg.nospace() << ' ';
+ }
+ dbg.nospace() << ')';
+ return dbg.space();
+}
+#endif
+
/*!
\fn DataPtr &QBitArray::data_ptr()
\internal
diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h
index 3b66b9f4df..83c81eca90 100644
--- a/src/corelib/tools/qbitarray.h
+++ b/src/corelib/tools/qbitarray.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -170,6 +170,10 @@ Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QBitArray &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QBitArray &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QBitArray &);
+#endif
+
Q_DECLARE_TYPEINFO(QBitArray, Q_MOVABLE_TYPE);
Q_DECLARE_SHARED(QBitArray)
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index e56e4fc8ff..47bf5da619 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -546,7 +546,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
qWarning("qUncompress: Input data is corrupted");
return QByteArray();
}
- QByteArray::Data *p = static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + alloc + 1));
+ QByteArray::Data *p = static_cast<QByteArray::Data *>(::realloc(d.data(), sizeof(QByteArray::Data) + alloc + 1));
if (!p) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
qWarning("qUncompress: could not allocate enough memory to uncompress data");
@@ -567,7 +567,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
qWarning("qUncompress: Input data is corrupted");
return QByteArray();
}
- QByteArray::Data *p = static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + len + 1));
+ QByteArray::Data *p = static_cast<QByteArray::Data *>(::realloc(d.data(), sizeof(QByteArray::Data) + len + 1));
if (!p) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
qWarning("qUncompress: could not allocate enough memory to uncompress data");
@@ -883,7 +883,7 @@ QByteArray &QByteArray::operator=(const QByteArray & other)
{
other.d->ref.ref();
if (!d->ref.deref())
- qFree(d);
+ free(d);
d = other.d;
return *this;
}
@@ -912,7 +912,7 @@ QByteArray &QByteArray::operator=(const char *str)
}
x->ref.ref();
if (!d->ref.deref())
- qFree(d);
+ free(d);
d = x;
return *this;
}
@@ -1302,7 +1302,7 @@ QByteArray::QByteArray(const char *str)
d = const_cast<Data *>(&shared_empty.ba);
} else {
int len = qstrlen(str);
- d = static_cast<Data *>(qMalloc(sizeof(Data) + len + 1));
+ d = static_cast<Data *>(malloc(sizeof(Data) + len + 1));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = len;
@@ -1331,7 +1331,7 @@ QByteArray::QByteArray(const char *data, int size)
} else if (size <= 0) {
d = const_cast<Data *>(&shared_empty.ba);
} else {
- d = static_cast<Data *>(qMalloc(sizeof(Data) + size + 1));
+ d = static_cast<Data *>(malloc(sizeof(Data) + size + 1));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1355,7 +1355,7 @@ QByteArray::QByteArray(int size, char ch)
if (size <= 0) {
d = const_cast<Data *>(&shared_null.ba);
} else {
- d = static_cast<Data *>(qMalloc(sizeof(Data) + size + 1));
+ d = static_cast<Data *>(malloc(sizeof(Data) + size + 1));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1375,7 +1375,7 @@ QByteArray::QByteArray(int size, char ch)
QByteArray::QByteArray(int size, Qt::Initialization)
{
- d = static_cast<Data *>(qMalloc(sizeof(Data) + size + 1));
+ d = static_cast<Data *>(malloc(sizeof(Data) + size + 1));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1411,7 +1411,7 @@ void QByteArray::resize(int size)
if (size == 0 && !d->capacityReserved) {
Data *x = const_cast<Data *>(&shared_empty.ba);
if (!d->ref.deref())
- qFree(d);
+ free(d);
d = x;
} else if (d == &shared_null.ba || d == &shared_empty.ba) {
//
@@ -1422,7 +1422,7 @@ void QByteArray::resize(int size)
// which is used in place of the Qt 3 idiom:
// QByteArray a(sz);
//
- Data *x = static_cast<Data *>(qMalloc(sizeof(Data) + size + 1));
+ Data *x = static_cast<Data *>(malloc(sizeof(Data) + size + 1));
Q_CHECK_PTR(x);
x->ref.initializeOwned();
x->size = size;
@@ -1464,7 +1464,7 @@ QByteArray &QByteArray::fill(char ch, int size)
void QByteArray::realloc(int alloc)
{
if (d->ref != 1 || d->offset) {
- Data *x = static_cast<Data *>(qMalloc(sizeof(Data) + alloc + 1));
+ Data *x = static_cast<Data *>(malloc(sizeof(Data) + alloc + 1));
Q_CHECK_PTR(x);
x->ref.initializeOwned();
x->size = qMin(alloc, d->size);
@@ -1474,10 +1474,10 @@ void QByteArray::realloc(int alloc)
::memcpy(x->data(), d->data(), x->size);
x->data()[x->size] = '\0';
if (!d->ref.deref())
- qFree(d);
+ free(d);
d = x;
} else {
- Data *x = static_cast<Data *>(qRealloc(d, sizeof(Data) + alloc + 1));
+ Data *x = static_cast<Data *>(::realloc(d, sizeof(Data) + alloc + 1));
Q_CHECK_PTR(x);
x->alloc = alloc;
x->offset = 0;
@@ -2730,7 +2730,7 @@ QByteArray QByteArray::toUpper() const
void QByteArray::clear()
{
if (!d->ref.deref())
- qFree(d);
+ free(d);
d = const_cast<Data *>(&shared_null.ba);
d->ref.ref();
}
@@ -3885,7 +3885,7 @@ QByteArray QByteArray::fromRawData(const char *data, int size)
} else if (!size) {
x = const_cast<Data *>(&shared_empty.ba);
} else {
- x = static_cast<Data *>(qMalloc(sizeof(Data) + 1));
+ x = static_cast<Data *>(malloc(sizeof(Data) + 1));
Q_CHECK_PTR(x);
x->ref.initializeOwned();
x->size = size;
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index dcaa6153f9..2409ff1232 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp
index 43924a764e..fbe54fb9b3 100644
--- a/src/corelib/tools/qbytearraymatcher.cpp
+++ b/src/corelib/tools/qbytearraymatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h
index 0eb50bb77d..9acfa0d581 100644
--- a/src/corelib/tools/qbytearraymatcher.h
+++ b/src/corelib/tools/qbytearraymatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qbytedata_p.h b/src/corelib/tools/qbytedata_p.h
index 22ec47fb9d..2708df3d52 100644
--- a/src/corelib/tools/qbytedata_p.h
+++ b/src/corelib/tools/qbytedata_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 2928140863..fc5b8a0a9f 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -61,7 +61,6 @@ class QCache
};
Node *f, *l;
QHash<Key, Node> hash;
- void *unused; // ### Qt5: remove
int mx, total;
inline void unlink(Node &n) {
@@ -123,7 +122,7 @@ private:
template <class Key, class T>
inline QCache<Key, T>::QCache(int amaxCost)
- : f(0), l(0), unused(0), mx(amaxCost), total(0) {}
+ : f(0), l(0), mx(amaxCost), total(0) {}
template <class Key, class T>
inline void QCache<Key,T>::clear()
diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc
index 397c5fbb0c..9c8aef15df 100644
--- a/src/corelib/tools/qcache.qdoc
+++ b/src/corelib/tools/qcache.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index ec4b0cce58..5109bf22a4 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h
index 1bc6962ca1..0e02d109f6 100644
--- a/src/corelib/tools/qchar.h
+++ b/src/corelib/tools/qchar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qcontainerfwd.h b/src/corelib/tools/qcontainerfwd.h
index ed6ab4332c..51ba07d856 100644
--- a/src/corelib/tools/qcontainerfwd.h
+++ b/src/corelib/tools/qcontainerfwd.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp
index eef1f74b8c..29601149e4 100644
--- a/src/corelib/tools/qcontiguouscache.cpp
+++ b/src/corelib/tools/qcontiguouscache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index e192edf0ab..3c43b3abe7 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
index 89b3bab7c6..350c785e8b 100644
--- a/src/corelib/tools/qcryptographichash.cpp
+++ b/src/corelib/tools/qcryptographichash.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,6 +50,7 @@
#include "../../3rdparty/md4/md4.h"
#include "../../3rdparty/md4/md4.cpp"
#include "../../3rdparty/sha1/sha1.cpp"
+#include <qiodevice.h>
QT_BEGIN_NAMESPACE
@@ -155,6 +156,28 @@ void QCryptographicHash::addData(const QByteArray &data)
}
/*!
+ Reads the data from the open QIODevice \a device until it ends
+ and hashes it. Returns true if reading was successful.
+ */
+bool QCryptographicHash::addData(QIODevice* device)
+{
+ if (!device->isReadable())
+ return false;
+
+ if (!device->isOpen())
+ return false;
+
+ char buffer[1024];
+ int length;
+
+ while ((length = device->read(buffer,sizeof(buffer))) > 0)
+ addData(buffer,length);
+
+ return device->atEnd();
+}
+
+
+/*!
Returns the final hash value.
\sa QByteArray::toHex()
diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h
index b40e8cc25b..64d54838fa 100644
--- a/src/corelib/tools/qcryptographichash.h
+++ b/src/corelib/tools/qcryptographichash.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Core)
class QCryptographicHashPrivate;
+class QIODevice;
class Q_CORE_EXPORT QCryptographicHash
{
@@ -68,6 +69,7 @@ public:
void addData(const char *data, int length);
void addData(const QByteArray &data);
+ bool addData(QIODevice* device);
QByteArray result() const;
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 3c8848ba0f..d20b07589e 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -566,18 +566,6 @@ QString QDate::shortMonthName(int month, QDate::MonthNameType type)
}
/*!
- Returns the short version of the name of the \a month. The
- returned name is in normal type which can be used for date formatting.
-
- \sa toString(), longMonthName(), shortDayName(), longDayName()
- */
-
-QString QDate::shortMonthName(int month)
-{
- return shortMonthName(month, QDate::DateFormat);
-}
-
-/*!
\since 4.5
Returns the long name of the \a month for the representation specified
@@ -623,21 +611,6 @@ QString QDate::longMonthName(int month, MonthNameType type)
}
/*!
- Returns the long version of the name of the \a month. The
- returned name is in normal type which can be used for date formatting.
-
- \sa toString(), shortMonthName(), shortDayName(), longDayName()
- */
-
-QString QDate::longMonthName(int month)
-{
- if (month < 1 || month > 12) {
- month = 1;
- }
- return QLocale::system().monthName(month, QLocale::LongFormat);
-}
-
-/*!
\since 4.5
Returns the short name of the \a weekday for the representation specified
@@ -678,21 +651,6 @@ QString QDate::shortDayName(int weekday, MonthNameType type)
}
/*!
- Returns the short version of the name of the \a weekday. The
- returned name is in normal type which can be used for date formatting.
-
- \sa toString(), longDayName(), shortMonthName(), longMonthName()
- */
-
-QString QDate::shortDayName(int weekday)
-{
- if (weekday < 1 || weekday > 7) {
- weekday = 1;
- }
- return QLocale::system().dayName(weekday, QLocale::ShortFormat);
-}
-
-/*!
\since 4.5
Returns the long name of the \a weekday for the representation specified
@@ -731,21 +689,6 @@ QString QDate::longDayName(int weekday, MonthNameType type)
}
return QLocale::system().dayName(weekday, QLocale::LongFormat);
}
-
-/*!
- Returns the long version of the name of the \a weekday. The
- returned name is in normal type which can be used for date formatting.
-
- \sa toString(), shortDayName(), shortMonthName(), longMonthName()
- */
-
-QString QDate::longDayName(int weekday)
-{
- if (weekday < 1 || weekday > 7) {
- weekday = 1;
- }
- return QLocale::system().dayName(weekday, QLocale::LongFormat);
-}
#endif //QT_NO_TEXTDATE
#ifndef QT_NO_DATESTRING
@@ -1346,30 +1289,6 @@ bool QDate::isLeapYear(int y)
}
}
-/*!
- \internal
-
- This function has a confusing name and shouldn't be part of the
- API anyway, since we have toJulian() and fromJulian().
- ### Qt 5: remove it
-*/
-uint QDate::gregorianToJulian(int y, int m, int d)
-{
- return julianDayFromDate(y, m, d);
-}
-
-/*!
- \internal
-
- This function has a confusing name and shouldn't be part of the
- API anyway, since we have toJulian() and fromJulian().
- ### Qt 5: remove it
-*/
-void QDate::julianToGregorian(uint jd, int &y, int &m, int &d)
-{
- getDateFromJulianDay(jd, &y, &m, &d);
-}
-
/*! \fn static QDate QDate::fromJulianDay(int jd)
Converts the Julian day \a jd to a QDate.
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index 62bdcab7cc..ba52f7455c 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,15 +76,10 @@ public:
int weekNumber(int *yearNum = 0) const;
#ifndef QT_NO_TEXTDATE
- // ### Qt 5: merge these functions.
- static QString shortMonthName(int month);
- static QString shortMonthName(int month, MonthNameType type);
- static QString shortDayName(int weekday);
- static QString shortDayName(int weekday, MonthNameType type);
- static QString longMonthName(int month);
- static QString longMonthName(int month, MonthNameType type);
- static QString longDayName(int weekday);
- static QString longDayName(int weekday, MonthNameType type);
+ static QString shortMonthName(int month, MonthNameType type = DateFormat);
+ static QString shortDayName(int weekday, MonthNameType type = DateFormat);
+ static QString longMonthName(int month, MonthNameType type = DateFormat);
+ static QString longDayName(int weekday, MonthNameType type = DateFormat);
#endif // QT_NO_TEXTDATE
#ifndef QT_NO_DATESTRING
QString toString(Qt::DateFormat f = Qt::TextDate) const;
@@ -115,10 +110,6 @@ public:
static bool isValid(int y, int m, int d);
static bool isLeapYear(int year);
- // ### Qt 5: remove these two functions
- static uint gregorianToJulian(int y, int m, int d);
- static void julianToGregorian(uint jd, int &y, int &m, int &d);
-
static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; }
inline int toJulianDay() const { return jd; }
diff --git a/src/corelib/tools/qdatetime_p.h b/src/corelib/tools/qdatetime_p.h
index c20f2123f9..38aa748c6c 100644
--- a/src/corelib/tools/qdatetime_p.h
+++ b/src/corelib/tools/qdatetime_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 4337c4a594..a3614f9b6c 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index 326e7f6e61..ef18ae20bc 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer.cpp b/src/corelib/tools/qelapsedtimer.cpp
index 039c76960e..087252a926 100644
--- a/src/corelib/tools/qelapsedtimer.cpp
+++ b/src/corelib/tools/qelapsedtimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer.h b/src/corelib/tools/qelapsedtimer.h
index 6e5be84c00..73ec8d637e 100644
--- a/src/corelib/tools/qelapsedtimer.h
+++ b/src/corelib/tools/qelapsedtimer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer_generic.cpp b/src/corelib/tools/qelapsedtimer_generic.cpp
index 165efa96f2..3c7bb197d7 100644
--- a/src/corelib/tools/qelapsedtimer_generic.cpp
+++ b/src/corelib/tools/qelapsedtimer_generic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer_mac.cpp b/src/corelib/tools/qelapsedtimer_mac.cpp
index 4b1275fe5c..f8f124f6a9 100644
--- a/src/corelib/tools/qelapsedtimer_mac.cpp
+++ b/src/corelib/tools/qelapsedtimer_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer_symbian.cpp b/src/corelib/tools/qelapsedtimer_symbian.cpp
index dd5909f76f..4ae3f3d1ab 100644
--- a/src/corelib/tools/qelapsedtimer_symbian.cpp
+++ b/src/corelib/tools/qelapsedtimer_symbian.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp
index 8a046063f9..7f3d4f635c 100644
--- a/src/corelib/tools/qelapsedtimer_unix.cpp
+++ b/src/corelib/tools/qelapsedtimer_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qelapsedtimer_win.cpp b/src/corelib/tools/qelapsedtimer_win.cpp
index cd076a60d7..183171e306 100644
--- a/src/corelib/tools/qelapsedtimer_win.cpp
+++ b/src/corelib/tools/qelapsedtimer_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qfreelist.cpp b/src/corelib/tools/qfreelist.cpp
index bbbdb25e49..57530cf3c8 100644
--- a/src/corelib/tools/qfreelist.cpp
+++ b/src/corelib/tools/qfreelist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h
index 5af0bb1807..2105e5af56 100644
--- a/src/corelib/tools/qfreelist_p.h
+++ b/src/corelib/tools/qfreelist_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qharfbuzz.cpp b/src/corelib/tools/qharfbuzz.cpp
index 324cd481ed..4eb6565557 100644
--- a/src/corelib/tools/qharfbuzz.cpp
+++ b/src/corelib/tools/qharfbuzz.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qharfbuzz_p.h b/src/corelib/tools/qharfbuzz_p.h
index f67b094c2d..a8da47b71c 100644
--- a/src/corelib/tools/qharfbuzz_p.h
+++ b/src/corelib/tools/qharfbuzz_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 373b59872c..82ac8a0591 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -171,7 +171,7 @@ const QHashData QHashData::shared_null = {
void *QHashData::allocateNode(int nodeAlign)
{
- void *ptr = strictAlignment ? qMallocAligned(nodeSize, nodeAlign) : qMalloc(nodeSize);
+ void *ptr = strictAlignment ? qMallocAligned(nodeSize, nodeAlign) : malloc(nodeSize);
Q_CHECK_PTR(ptr);
return ptr;
}
@@ -181,7 +181,7 @@ void QHashData::freeNode(void *node)
if (strictAlignment)
qFreeAligned(node);
else
- qFree(node);
+ free(node);
}
QHashData *QHashData::detach_helper(void (*node_duplicate)(Node *, void *),
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index ec9bd42c83..0fdb1ad794 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qiterator.h b/src/corelib/tools/qiterator.h
index c789e23ddc..0747940bf2 100644
--- a/src/corelib/tools/qiterator.h
+++ b/src/corelib/tools/qiterator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index 6594a2f874..0e33aecbe4 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index 0f67652fb5..161123cfff 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h
index af2eda0850..956cbf9ce8 100644
--- a/src/corelib/tools/qline.h
+++ b/src/corelib/tools/qline.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index e5919363a0..acfbcd07eb 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index 55d229d351..966b74ddfa 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 2a3695bb35..2afe1ab969 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,9 @@
#include <new>
#include "qlist.h"
#include "qtools_p.h"
+
#include <string.h>
+#include <stdlib.h>
QT_BEGIN_NAMESPACE
@@ -82,7 +84,7 @@ QListData::Data *QListData::detach_grow(int *idx, int num)
int l = x->end - x->begin;
int nl = l + num;
int alloc = grow(nl);
- Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + alloc * sizeof(void *)));
+ Data* t = static_cast<Data *>(::malloc(DataHeaderSize + alloc * sizeof(void *)));
Q_CHECK_PTR(t);
t->ref.initializeOwned();
@@ -124,7 +126,7 @@ QListData::Data *QListData::detach_grow(int *idx, int num)
QListData::Data *QListData::detach(int alloc)
{
Data *x = d;
- Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + alloc * sizeof(void *)));
+ Data* t = static_cast<Data *>(::malloc(DataHeaderSize + alloc * sizeof(void *)));
Q_CHECK_PTR(t);
t->ref.initializeOwned();
@@ -145,7 +147,7 @@ QListData::Data *QListData::detach(int alloc)
void QListData::realloc(int alloc)
{
Q_ASSERT(d->ref == 1);
- Data *x = static_cast<Data *>(qRealloc(d, DataHeaderSize + alloc * sizeof(void *)));
+ Data *x = static_cast<Data *>(::realloc(d, DataHeaderSize + alloc * sizeof(void *)));
Q_CHECK_PTR(x);
d = x;
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 5c8a58a196..d192d31234 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index d2bb752c6d..1dc384985b 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,6 +56,7 @@ QT_END_NAMESPACE
#include "qplatformdefs.h"
#include "qdatastream.h"
+#include "qdebug.h"
#include "qstring.h"
#include "qlocale.h"
#include "qlocale_p.h"
@@ -775,6 +776,16 @@ QLocale &QLocale::operator=(const QLocale &other)
return *this;
}
+bool QLocale::operator==(const QLocale &other) const
+{
+ return d() == other.d() && numberOptions() == other.numberOptions();
+}
+
+bool QLocale::operator!=(const QLocale &other) const
+{
+ return d() != other.d() || numberOptions() != other.numberOptions();
+}
+
/*!
\since 4.2
@@ -3315,4 +3326,13 @@ QString QLocale::nativeCountryName() const
return getLocaleData(endonyms_data + d()->m_country_endonym_idx, d()->m_country_endonym_size);
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QLocale &l)
+{
+ dbg.nospace() << "QLocale(" << qPrintable(QLocale::languageToString(l.language()))
+ << ", " << qPrintable(QLocale::scriptToString(l.script()))
+ << ", " << qPrintable(QLocale::countryToString(l.country())) << ')';
+ return dbg.space();
+}
+#endif
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index 55dd55b984..9bc4ea70b8 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -739,8 +739,8 @@ public:
QStringList uiLanguages() const;
- inline bool operator==(const QLocale &other) const;
- inline bool operator!=(const QLocale &other) const;
+ bool operator==(const QLocale &other) const;
+ bool operator!=(const QLocale &other) const;
static QString languageToString(Language language);
static QString countryToString(Country country);
@@ -789,10 +789,6 @@ inline QString QLocale::toString(uint i) const
{ return toString(qulonglong(i)); }
inline QString QLocale::toString(float i, char f, int prec) const
{ return toString(double(i), f, prec); }
-inline bool QLocale::operator==(const QLocale &other) const
- { return d() == other.d() && numberOptions() == other.numberOptions(); }
-inline bool QLocale::operator!=(const QLocale &other) const
- { return d() != other.d() || numberOptions() != other.numberOptions(); }
inline QString QLocale::toCurrencyString(short i, const QString &symbol) const
{ return toCurrencyString(qlonglong(i), symbol); }
@@ -810,6 +806,10 @@ Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QLocale &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QLocale &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QLocale &);
+#endif
+
QT_END_NAMESPACE
#ifndef QT_NO_SYSTEMLOCALE
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index fd139c3bec..0337c708a9 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -89,7 +89,7 @@
pair; it does not use the system locale database.
\note For the current keyboard input locale take a look at
- QApplication::keyboardInputLocale().
+ QInputPanel::locale().
QLocale's data is based on Common Locale Data Repository v1.8.1.
@@ -114,7 +114,7 @@
California, Berkeley and its contributors.
\sa QString::arg(), QString::toInt(), QString::toDouble(),
- QApplication::keyboardInputLocale()
+ QInputPanel::locale()
*/
/*!
diff --git a/src/corelib/tools/qlocale_data_p.h b/src/corelib/tools/qlocale_data_p.h
index 95b23a29a6..a29e40079a 100644
--- a/src/corelib/tools/qlocale_data_p.h
+++ b/src/corelib/tools/qlocale_data_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_icu.cpp b/src/corelib/tools/qlocale_icu.cpp
index a04b0bfc5f..0e220ff000 100644
--- a/src/corelib/tools/qlocale_icu.cpp
+++ b/src/corelib/tools/qlocale_icu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_mac.mm b/src/corelib/tools/qlocale_mac.mm
index 82b6b00e5e..ffcbbbca4b 100644
--- a/src/corelib/tools/qlocale_mac.mm
+++ b/src/corelib/tools/qlocale_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index b607038aaf..0b229e5e3f 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index a4f6cc8458..abe437fc89 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index 750379c014..8a57a418e4 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,6 +50,10 @@
#include <stdlib.h>
#include <time.h>
+#ifdef Q_OS_WINCE
+# include "qfunctions_wince.h" // for _control87
+#endif
+
#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
# include <fenv.h>
#endif
diff --git a/src/corelib/tools/qlocale_tools_p.h b/src/corelib/tools/qlocale_tools_p.h
index 996b612208..85e6d3b0d0 100644
--- a/src/corelib/tools/qlocale_tools_p.h
+++ b/src/corelib/tools/qlocale_tools_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp
index 27e1782b93..5839a80e00 100644
--- a/src/corelib/tools/qlocale_unix.cpp
+++ b/src/corelib/tools/qlocale_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp
index 8b4b1b55bf..c09802879c 100644
--- a/src/corelib/tools/qlocale_win.cpp
+++ b/src/corelib/tools/qlocale_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index 76cb203e10..b1e8ecb0ad 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -85,7 +85,7 @@ void QMapData::continueFreeData(int offset)
if (strictAlignment)
qFreeAligned(reinterpret_cast<char *>(prev) - offset);
else
- qFree(reinterpret_cast<char *>(prev) - offset);
+ free(reinterpret_cast<char *>(prev) - offset);
}
delete this;
}
@@ -127,7 +127,7 @@ QMapData::Node *QMapData::node_create(Node *update[], int offset, int alignment)
void *concreteNode = strictAlignment ?
qMallocAligned(offset + sizeof(Node) + level * sizeof(Node *), alignment) :
- qMalloc(offset + sizeof(Node) + level * sizeof(Node *));
+ malloc(offset + sizeof(Node) + level * sizeof(Node *));
Q_CHECK_PTR(concreteNode);
Node *abstractNode = reinterpret_cast<Node *>(reinterpret_cast<char *>(concreteNode) + offset);
@@ -157,7 +157,7 @@ void QMapData::node_delete(Node *update[], int offset, Node *node)
if (strictAlignment)
qFreeAligned(reinterpret_cast<char *>(node) - offset);
else
- qFree(reinterpret_cast<char *>(node) - offset);
+ free(reinterpret_cast<char *>(node) - offset);
}
#ifdef QT_QMAP_DEBUG
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 362b723b0a..f975b7eb16 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp
index 9c7dd038e7..e14e2aa227 100644
--- a/src/corelib/tools/qmargins.cpp
+++ b/src/corelib/tools/qmargins.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qmargins.h b/src/corelib/tools/qmargins.h
index 635ac56137..4e69907440 100644
--- a/src/corelib/tools/qmargins.h
+++ b/src/corelib/tools/qmargins.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h
index 95868840ea..0acd617e26 100644
--- a/src/corelib/tools/qpair.h
+++ b/src/corelib/tools/qpair.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index a9d73419ff..26e7c78996 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qpodlist_p.h b/src/corelib/tools/qpodlist_p.h
index d06c9479e7..9c03f0e64a 100644
--- a/src/corelib/tools/qpodlist_p.h
+++ b/src/corelib/tools/qpodlist_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index bd32fe77b1..9139f4033c 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index b394ece1a6..a6381578d8 100644
--- a/src/corelib/tools/qpoint.h
+++ b/src/corelib/tools/qpoint.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qqueue.cpp b/src/corelib/tools/qqueue.cpp
index 2f5aae4026..5753c7d695 100644
--- a/src/corelib/tools/qqueue.cpp
+++ b/src/corelib/tools/qqueue.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qqueue.h b/src/corelib/tools/qqueue.h
index c10e6c0b2b..9aa7a7bdb0 100644
--- a/src/corelib/tools/qqueue.h
+++ b/src/corelib/tools/qqueue.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index 41ec816c46..2d63eb85e6 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index 58221f4739..34000750ee 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -136,29 +136,23 @@ public:
bool contains(int x, int y) const; // inline methods, _don't_ merge these
bool contains(int x, int y, bool proper) const;
bool contains(const QRect &r, bool proper = false) const;
- QRect unite(const QRect &r) const; // ### Qt 5: make QT4_SUPPORT
QRect united(const QRect &other) const;
- QRect intersect(const QRect &r) const; // ### Qt 5: make QT4_SUPPORT
QRect intersected(const QRect &other) const;
bool intersects(const QRect &r) const;
+#if QT_DEPRECATED_SINCE(5, 0)
+ QT_DEPRECATED QRect unite(const QRect &r) const { return united(r); }
+ QT_DEPRECATED QRect intersect(const QRect &r) const { return intersected(r); }
+#endif
+
friend Q_CORE_EXPORT_INLINE bool operator==(const QRect &, const QRect &);
friend Q_CORE_EXPORT_INLINE bool operator!=(const QRect &, const QRect &);
private:
- // ### Qt 5; remove the ifdef and just have the same order on all platforms.
-#if defined(Q_OS_MAC)
- int y1;
- int x1;
- int y2;
- int x2;
-#else
int x1;
int y1;
int x2;
int y2;
-#endif
-
};
Q_DECLARE_TYPEINFO(QRect, Q_MOVABLE_TYPE);
@@ -440,24 +434,14 @@ inline QRect& QRect::operator&=(const QRect &r)
return *this;
}
-inline QRect QRect::intersect(const QRect &r) const
-{
- return *this & r;
-}
-
inline QRect QRect::intersected(const QRect &other) const
{
- return intersect(other);
-}
-
-inline QRect QRect::unite(const QRect &r) const
-{
- return *this | r;
+ return *this & other;
}
inline QRect QRect::united(const QRect &r) const
{
- return unite(r);
+ return *this | r;
}
inline bool operator==(const QRect &r1, const QRect &r2)
@@ -557,12 +541,15 @@ public:
bool contains(const QPointF &p) const;
bool contains(qreal x, qreal y) const;
bool contains(const QRectF &r) const;
- QRectF unite(const QRectF &r) const; // ### Qt 5: make QT4_SUPPORT
QRectF united(const QRectF &other) const;
- QRectF intersect(const QRectF &r) const; // ### Qt 5: make QT4_SUPPORT
QRectF intersected(const QRectF &other) const;
bool intersects(const QRectF &r) const;
+#if QT_DEPRECATED_SINCE(5, 0)
+ QT_DEPRECATED QRectF unite(const QRectF &r) const { return united(r); }
+ QT_DEPRECATED QRectF intersect(const QRectF &r) const { return intersected(r); }
+#endif
+
friend Q_CORE_EXPORT_INLINE bool operator==(const QRectF &, const QRectF &);
friend Q_CORE_EXPORT_INLINE bool operator!=(const QRectF &, const QRectF &);
@@ -777,24 +764,14 @@ inline QRectF& QRectF::operator&=(const QRectF &r)
return *this;
}
-inline QRectF QRectF::intersect(const QRectF &r) const
-{
- return *this & r;
-}
-
inline QRectF QRectF::intersected(const QRectF &r) const
{
- return intersect(r);
-}
-
-inline QRectF QRectF::unite(const QRectF &r) const
-{
- return *this | r;
+ return *this & r;
}
inline QRectF QRectF::united(const QRectF &r) const
{
- return unite(r);
+ return *this | r;
}
inline bool operator==(const QRectF &r1, const QRectF &r2)
diff --git a/src/corelib/tools/qrefcount.cpp b/src/corelib/tools/qrefcount.cpp
index c40214b2ab..5341d27a91 100644
--- a/src/corelib/tools/qrefcount.cpp
+++ b/src/corelib/tools/qrefcount.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qrefcount.h b/src/corelib/tools/qrefcount.h
index bf864f2f58..698351456f 100644
--- a/src/corelib/tools/qrefcount.h
+++ b/src/corelib/tools/qrefcount.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 688b38d132..d300ed967d 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,6 +45,7 @@
#include "qbitarray.h"
#include "qcache.h"
#include "qdatastream.h"
+#include "qdebug.h"
#include "qlist.h"
#include "qmap.h"
#include "qmutex.h"
@@ -4571,4 +4572,13 @@ QDataStream &operator>>(QDataStream &in, QRegExp &regExp)
}
#endif // QT_NO_DATASTREAM
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QRegExp &r)
+{
+ dbg.nospace() << "QRegExp(patternSyntax=" << r.patternSyntax()
+ << ", pattern='"<< r.pattern() << "')";
+ return dbg.space();
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h
index 4ce2f6e0be..364745e24a 100644
--- a/src/corelib/tools/qregexp.h
+++ b/src/corelib/tools/qregexp.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -127,6 +127,10 @@ Q_CORE_EXPORT QDataStream &operator<<(QDataStream &out, const QRegExp &regExp);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &in, QRegExp &regExp);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_CORE_EXPORT QDebug operator<<(QDebug, const QRegExp &);
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index 4a19e12647..6bbce03a44 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 9277a3ebbf..a95468617b 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h
index a24f62e7ba..41e6dff90c 100644
--- a/src/corelib/tools/qscopedpointer.h
+++ b/src/corelib/tools/qscopedpointer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qscopedpointer_p.h b/src/corelib/tools/qscopedpointer_p.h
index 8dcc503ad2..eb7cc80e54 100644
--- a/src/corelib/tools/qscopedpointer_p.h
+++ b/src/corelib/tools/qscopedpointer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qscopedvaluerollback.cpp b/src/corelib/tools/qscopedvaluerollback.cpp
index 1ad47f45dd..e5b68ded1f 100644
--- a/src/corelib/tools/qscopedvaluerollback.cpp
+++ b/src/corelib/tools/qscopedvaluerollback.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qscopedvaluerollback.h b/src/corelib/tools/qscopedvaluerollback.h
index ee62147540..3b821956eb 100644
--- a/src/corelib/tools/qscopedvaluerollback.h
+++ b/src/corelib/tools/qscopedvaluerollback.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index 5f48042114..7ad16a7943 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -176,9 +176,8 @@ public:
typedef iterator Iterator;
typedef const_iterator ConstIterator;
inline int count() const { return q_hash.count(); }
- inline const_iterator insert(const T &value) // ### Qt 5: should return an 'iterator'
- { return static_cast<typename Hash::const_iterator>(q_hash.insert(value,
- QHashDummyValue())); }
+ inline iterator insert(const T &value)
+ { return static_cast<typename Hash::iterator>(q_hash.insert(value, QHashDummyValue())); }
iterator find(const T &value) { return q_hash.find(value); }
const_iterator find(const T &value) const { return q_hash.find(value); }
inline const_iterator constFind(const T &value) const { return find(value); }
@@ -216,17 +215,6 @@ public:
{ QSet<T> result = *this; result += other; return result; }
inline QSet<T> operator-(const QSet<T> &other) const
{ QSet<T> result = *this; result -= other; return result; }
-#if QT_VERSION < 0x050000
- // ### Qt 5: remove
- inline QSet<T> operator|(const QSet<T> &other)
- { QSet<T> result = *this; result |= other; return result; }
- inline QSet<T> operator&(const QSet<T> &other)
- { QSet<T> result = *this; result &= other; return result; }
- inline QSet<T> operator+(const QSet<T> &other)
- { QSet<T> result = *this; result += other; return result; }
- inline QSet<T> operator-(const QSet<T> &other)
- { QSet<T> result = *this; result -= other; return result; }
-#endif
QList<T> toList() const;
inline QList<T> values() const { return toList(); }
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index f562c68b72..28b53e690d 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp
index ee2b0c4f3c..2995d4a123 100644
--- a/src/corelib/tools/qshareddata.cpp
+++ b/src/corelib/tools/qshareddata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index 6de6a19289..add8025d5a 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index 34060926c7..0069eb6831 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h
index 6b2b41f1de..f4a0c02ebf 100644
--- a/src/corelib/tools/qsharedpointer.h
+++ b/src/corelib/tools/qsharedpointer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index f03889106f..3cad13856c 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 3dfe38a4d1..9001c4a399 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 296c275b61..2fc6d88fb6 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp
index d8bd14de8d..41abb0be17 100644
--- a/src/corelib/tools/qsize.cpp
+++ b/src/corelib/tools/qsize.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qsize.h b/src/corelib/tools/qsize.h
index adc857be96..c9712b3976 100644
--- a/src/corelib/tools/qsize.h
+++ b/src/corelib/tools/qsize.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstack.cpp b/src/corelib/tools/qstack.cpp
index 0fbb8d8516..de851d2f0d 100644
--- a/src/corelib/tools/qstack.cpp
+++ b/src/corelib/tools/qstack.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstack.h b/src/corelib/tools/qstack.h
index 224935455d..35518cfe5e 100644
--- a/src/corelib/tools/qstack.h
+++ b/src/corelib/tools/qstack.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index d57adbe731..dbe1e913c3 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1030,7 +1030,7 @@ QString::QString(const QChar *unicode, int size)
} else if (size <= 0) {
d = const_cast<Data *>(&shared_empty.str);
} else {
- d = (Data*) qMalloc(sizeof(Data)+(size+1)*sizeof(QChar));
+ d = (Data*) ::malloc(sizeof(Data)+(size+1)*sizeof(QChar));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1062,7 +1062,7 @@ QString::QString(const QChar *unicode)
if (!size) {
d = const_cast<Data *>(&shared_empty.str);
} else {
- d = (Data*) qMalloc(sizeof(Data)+(size+1)*sizeof(QChar));
+ d = (Data*) ::malloc(sizeof(Data)+(size+1)*sizeof(QChar));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1087,7 +1087,7 @@ QString::QString(int size, QChar ch)
if (size <= 0) {
d = const_cast<Data *>(&shared_empty.str);
} else {
- d = (Data*) qMalloc(sizeof(Data)+(size+1)*sizeof(QChar));
+ d = (Data*) ::malloc(sizeof(Data)+(size+1)*sizeof(QChar));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1111,7 +1111,7 @@ QString::QString(int size, QChar ch)
*/
QString::QString(int size, Qt::Initialization)
{
- d = (Data*) qMalloc(sizeof(Data)+(size+1)*sizeof(QChar));
+ d = (Data*) ::malloc(sizeof(Data)+(size+1)*sizeof(QChar));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -1133,7 +1133,7 @@ QString::QString(int size, Qt::Initialization)
*/
QString::QString(QChar ch)
{
- d = (Data *) qMalloc(sizeof(Data) + 2*sizeof(QChar));
+ d = (Data *) ::malloc(sizeof(Data) + 2*sizeof(QChar));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = 1;
@@ -1199,7 +1199,7 @@ QString::QString(QChar ch)
// ### Qt 5: rename freeData() to avoid confusion. See task 197625.
void QString::free(Data *d)
{
- qFree(d);
+ ::free(d);
}
/*!
@@ -1312,7 +1312,7 @@ void QString::resize(int size)
void QString::realloc(int alloc)
{
if (d->ref != 1 || d->offset) {
- Data *x = static_cast<Data *>(qMalloc(sizeof(Data) + (alloc+1) * sizeof(QChar)));
+ Data *x = static_cast<Data *>(::malloc(sizeof(Data) + (alloc+1) * sizeof(QChar)));
Q_CHECK_PTR(x);
x->ref.initializeOwned();
x->size = qMin(alloc, d->size);
@@ -1325,7 +1325,7 @@ void QString::realloc(int alloc)
QString::free(d);
d = x;
} else {
- Data *p = static_cast<Data *>(qRealloc(d, sizeof(Data) + (alloc+1) * sizeof(QChar)));
+ Data *p = static_cast<Data *>(::realloc(d, sizeof(Data) + (alloc+1) * sizeof(QChar)));
Q_CHECK_PTR(p);
d = p;
d->alloc = alloc;
@@ -1483,11 +1483,11 @@ QString& QString::insert(int i, const QChar *unicode, int size)
const ushort *s = (const ushort *)unicode;
if (s >= d->data() && s < d->data() + d->alloc) {
// Part of me - take a copy
- ushort *tmp = static_cast<ushort *>(qMalloc(size * sizeof(QChar)));
+ ushort *tmp = static_cast<ushort *>(::malloc(size * sizeof(QChar)));
Q_CHECK_PTR(tmp);
memcpy(tmp, s, size * sizeof(QChar));
insert(i, reinterpret_cast<const QChar *>(tmp), size);
- qFree(tmp);
+ ::free(tmp);
return *this;
}
@@ -1843,7 +1843,7 @@ void QString::replace_helper(uint *indices, int nIndices, int blen, const QChar
// (which we could possibly invalidate via a realloc or corrupt via memcpy operations.)
QChar *afterBuffer = const_cast<QChar *>(after);
if (after >= reinterpret_cast<QChar *>(d->data()) && after < reinterpret_cast<QChar *>(d->data()) + d->size) {
- afterBuffer = static_cast<QChar *>(qMalloc(alen*sizeof(QChar)));
+ afterBuffer = static_cast<QChar *>(::malloc(alen*sizeof(QChar)));
Q_CHECK_PTR(afterBuffer);
::memcpy(afterBuffer, after, alen*sizeof(QChar));
}
@@ -1898,11 +1898,11 @@ void QString::replace_helper(uint *indices, int nIndices, int blen, const QChar
}
} QT_CATCH(const std::bad_alloc &) {
if (afterBuffer != after)
- qFree(afterBuffer);
+ ::free(afterBuffer);
QT_RETHROW;
}
if (afterBuffer != after)
- qFree(afterBuffer);
+ ::free(afterBuffer);
}
/*!
@@ -3756,7 +3756,7 @@ QString::Data *QString::fromLatin1_helper(const char *str, int size)
} else {
if (size < 0)
size = qstrlen(str);
- d = static_cast<Data *>(qMalloc(sizeof(Data) + (size+1) * sizeof(QChar)));
+ d = static_cast<Data *>(::malloc(sizeof(Data) + (size+1) * sizeof(QChar)));
Q_CHECK_PTR(d);
d->ref.initializeOwned();
d->size = size;
@@ -3818,33 +3818,29 @@ QString::Data *QString::fromAscii_helper(const char *str, int size)
return fromLatin1_helper(str, size);
}
-/*!
+/*! \fn QString QString::fromLatin1(const char *str, int size)
Returns a QString initialized with the first \a size characters
of the Latin-1 string \a str.
- If \a size is -1 (default), it is taken to be qstrlen(\a
+ If \a size is -1 (default), it is taken to be strlen(\a
str).
\sa toLatin1(), fromAscii(), fromUtf8(), fromLocal8Bit()
*/
-QString QString::fromLatin1(const char *str, int size)
-{
- return QString(fromLatin1_helper(str, size), 0);
-}
-/*!
+/*! \fn QString QString::fromLocal8Bit(const char *str, int size)
Returns a QString initialized with the first \a size characters
of the 8-bit string \a str.
- If \a size is -1 (default), it is taken to be qstrlen(\a
+ If \a size is -1 (default), it is taken to be strlen(\a
str).
QTextCodec::codecForLocale() is used to perform the conversion.
\sa toLocal8Bit(), fromAscii(), fromLatin1(), fromUtf8()
*/
-QString QString::fromLocal8Bit(const char *str, int size)
+QString QString::fromLocal8Bit_helper(const char *str, int size)
{
if (!str)
return QString();
@@ -3860,11 +3856,11 @@ QString QString::fromLocal8Bit(const char *str, int size)
return fromLatin1(str, size);
}
-/*!
+/*! \fn QString QString::fromAscii(const char *, int size);
Returns a QString initialized with the first \a size characters
from the string \a str.
- If \a size is -1 (default), it is taken to be qstrlen(\a
+ If \a size is -1 (default), it is taken to be strlen(\a
str).
Note that, despite the name, this function actually uses the codec
@@ -3875,16 +3871,12 @@ QString QString::fromLocal8Bit(const char *str, int size)
\sa toAscii(), fromLatin1(), fromUtf8(), fromLocal8Bit()
*/
-QString QString::fromAscii(const char *str, int size)
-{
- return QString(fromAscii_helper(str, size), 0);
-}
-/*!
+/*! \fn QString QString::fromUtf8(const char *str, int size)
Returns a QString initialized with the first \a size bytes
of the UTF-8 string \a str.
- If \a size is -1 (default), it is taken to be qstrlen(\a
+ If \a size is -1 (default), it is taken to be strlen(\a
str).
UTF-8 is a Unicode codec and can represent all characters in a Unicode
@@ -3901,13 +3893,12 @@ QString QString::fromAscii(const char *str, int size)
\sa toUtf8(), fromAscii(), fromLatin1(), fromLocal8Bit()
*/
-QString QString::fromUtf8(const char *str, int size)
+QString QString::fromUtf8_helper(const char *str, int size)
{
if (!str)
return QString();
- if (size < 0)
- size = qstrlen(str);
+ Q_ASSERT(size != -1);
return QUtf8::convertToUnicode(str, size, 0);
}
@@ -7072,7 +7063,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
} else if (!size) {
x = const_cast<Data *>(&shared_empty.str);
} else {
- x = static_cast<Data *>(qMalloc(sizeof(Data) + sizeof(ushort)));
+ x = static_cast<Data *>(::malloc(sizeof(Data) + sizeof(ushort)));
Q_CHECK_PTR(x);
x->ref.initializeOwned();
x->size = size;
@@ -8817,13 +8808,37 @@ QString QString::toHtmlEscaped() const
Creating a QString from it is free in this case, and the generated string data is stored in
the read-only segment of the compiled object file.
+ For compilers not supporting the creation of compile time strings, QStringLiteral will fall back to
+ QLatin1String.
+
+ The result of the QStringLiteral expression can be cast into a QString.
+
+ If you have code looking like:
+ \code
+ if (node.hasAttribute("http-contents-length")) //...
+ \endcode
+ One temporary QString will be created to be passed as the hasAttribute function parameter.
+ This can be quite expensive, as it involves a memory allocation and the copy and the conversion
+ of the data into QString's internal encoding.
+
+ This can be avoided by doing
+ \code
+ if (node.hasAttribute(QStringLiteral("http-contents-length"))) //...
+ \endcode
+ Then the QString's internal data will be generated at compile time and no conversion or allocation
+ will occur at runtime
+
Using QStringLiteral instead of a double quoted ascii literal can significantly speed up creation
of QString's from data known at compile time.
- If the compiler is c++0x enabled the string \a str can actually contain unicode data.
+ If the compiler is C++11 enabled the string \a str can actually contain unicode data.
- For compilers not supporting the creation of compile time strings, QStringLiteral will fall back to
- QLatin1String.
+ \note There are still a few cases in which QLatin1String is more efficient than QStringLiteral:
+ If it is passed to a function that has an overload that takes the QLatin1String directly, without
+ conversion to QString. For instance, this is the case of QString::operator==
+ \code
+ if (attribute.name() == QLatin1String("http-contents-length")) //...
+ \endcode
*/
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 898c80ce35..f7898bbadb 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -49,12 +49,6 @@
#ifndef QT_NO_STL
# include <string>
-
-# ifndef QT_NO_STL_WCHAR
-// workaround for some headers not typedef'ing std::wstring
-typedef std::basic_string<wchar_t> QStdWString;
-# endif // QT_NO_STL_WCHAR
-
#endif // QT_NO_STL
#include <stdarg.h>
@@ -407,10 +401,23 @@ public:
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT;
QVector<uint> toUcs4() const Q_REQUIRED_RESULT;
- static QString fromAscii(const char *, int size = -1);
- static QString fromLatin1(const char *, int size = -1);
- static QString fromUtf8(const char *, int size = -1);
- static QString fromLocal8Bit(const char *, int size = -1);
+ // note - this are all inline so we can benefit from strlen() compile time optimizations
+ static inline QString fromAscii(const char *str, int size = -1)
+ {
+ return QString(fromAscii_helper(str, (str && size == -1) ? int(strlen(str)) : size), 0);
+ }
+ static inline QString fromLatin1(const char *str, int size = -1)
+ {
+ return QString(fromLatin1_helper(str, (str && size == -1) ? int(strlen(str)) : size), 0);
+ }
+ static inline QString fromUtf8(const char *str, int size = -1)
+ {
+ return fromUtf8_helper(str, (str && size == -1) ? int(strlen(str)) : size);
+ }
+ static inline QString fromLocal8Bit(const char *str, int size = -1)
+ {
+ return fromLocal8Bit_helper(str, (str && size == -1) ? int(strlen(str)) : size);
+ }
static QString fromUtf16(const ushort *, int size = -1);
static QString fromUcs4(const uint *, int size = -1);
static QString fromRawData(const QChar *, int size);
@@ -492,13 +499,14 @@ public:
// ASCII compatibility
#ifndef QT_NO_CAST_FROM_ASCII
- inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const char *ch) : d(fromAscii_helper(ch))
+ inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const char *ch)
+ : d(fromAscii_helper(ch, ch ? int(strlen(ch)) : -1))
{}
inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const QByteArray &a)
: d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size())))
{}
inline QT_ASCII_CAST_WARN QString &operator=(const char *ch)
- { return (*this = fromAscii(ch)); }
+ { return (*this = fromAscii(ch, ch ? int(strlen(ch)) : -1)); }
inline QT_ASCII_CAST_WARN QString &operator=(const QByteArray &a)
{ return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); }
inline QT_ASCII_CAST_WARN QString &operator=(char c)
@@ -506,15 +514,15 @@ public:
// these are needed, so it compiles with STL support enabled
inline QT_ASCII_CAST_WARN QString &prepend(const char *s)
- { return prepend(QString::fromAscii(s)); }
+ { return prepend(QString::fromAscii(s, s ? int(strlen(s)) : -1)); }
inline QT_ASCII_CAST_WARN QString &prepend(const QByteArray &s)
{ return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
inline QT_ASCII_CAST_WARN QString &append(const char *s)
- { return append(QString::fromAscii(s)); }
+ { return append(QString::fromAscii(s, s ? int(strlen(s)) : -1)); }
inline QT_ASCII_CAST_WARN QString &append(const QByteArray &s)
{ return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
inline QT_ASCII_CAST_WARN QString &operator+=(const char *s)
- { return append(QString::fromAscii(s)); }
+ { return append(QString::fromAscii(s, s ? int(strlen(s)) : -1)); }
inline QT_ASCII_CAST_WARN QString &operator+=(const QByteArray &s)
{ return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
inline QT_ASCII_CAST_WARN QString &operator+=(char c)
@@ -562,15 +570,8 @@ public:
#ifndef QT_NO_STL
static inline QString fromStdString(const std::string &s);
inline std::string toStdString() const;
-# ifdef qdoc
static inline QString fromStdWString(const std::wstring &s);
inline std::wstring toStdWString() const;
-# else
-# ifndef QT_NO_STL_WCHAR
- static inline QString fromStdWString(const QStdWString &s);
- inline QStdWString toStdWString() const;
-# endif // QT_NO_STL_WCHAR
-# endif // qdoc
#endif
// compatibility
@@ -625,6 +626,8 @@ private:
const QChar *data2, int length2);
static Data *fromLatin1_helper(const char *str, int size = -1);
static Data *fromAscii_helper(const char *str, int size = -1);
+ static QString fromUtf8_helper(const char *str, int size);
+ static QString fromLocal8Bit_helper(const char *, int size);
static int toUcs4_helper(const ushort *uc, int length, uint *out);
void replace_helper(uint *indices, int nIndices, int blen, const QChar *after, int alen);
friend class QCharRef;
@@ -662,17 +665,17 @@ public:
{ return s >= *this; }
inline QT_ASCII_CAST_WARN bool operator==(const char *s) const
- { return QString::fromAscii(s) == *this; }
+ { return QString::fromAscii(s, s ? int(strlen(s)) : -1) == *this; }
inline QT_ASCII_CAST_WARN bool operator!=(const char *s) const
- { return QString::fromAscii(s) != *this; }
+ { return QString::fromAscii(s, s ? int(strlen(s)) : -1) != *this; }
inline QT_ASCII_CAST_WARN bool operator<(const char *s) const
- { return QString::fromAscii(s) > *this; }
+ { return QString::fromAscii(s, s ? int(strlen(s)) : -1) > *this; }
inline QT_ASCII_CAST_WARN bool operator>(const char *s) const
- { return QString::fromAscii(s) < *this; }
+ { return QString::fromAscii(s, s ? int(strlen(s)) : -1) < *this; }
inline QT_ASCII_CAST_WARN bool operator<=(const char *s) const
- { return QString::fromAscii(s) >= *this; }
+ { return QString::fromAscii(s, s ? int(strlen(s)) : -1) >= *this; }
inline QT_ASCII_CAST_WARN bool operator>=(const char *s) const
- { return QString::fromAscii(s) <= *this; }
+ { return QString::fromAscii(s, s ? int(strlen(s)) : -1) <= *this; }
private:
int m_size;
const char *m_data;
@@ -925,7 +928,7 @@ inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); }
inline bool qStringComparisonHelper(const QString &s1, const char *s2)
{
# ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2));
+ if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2, s2 ? int(strlen(s2)) : -1));
# endif
return (s1 == QLatin1String(s2));
}
@@ -934,39 +937,39 @@ inline bool QString::operator==(const char *s) const
inline bool QString::operator!=(const char *s) const
{ return !qStringComparisonHelper(*this, s); }
inline bool QString::operator<(const char *s) const
-{ return *this < QString::fromAscii(s); }
+{ return *this < QString::fromAscii(s, s ? int(strlen(s)) : -1); }
inline bool QString::operator>(const char *s) const
-{ return *this > QString::fromAscii(s); }
+{ return *this > QString::fromAscii(s, s ? int(strlen(s)) : -1); }
inline bool QString::operator<=(const char *s) const
-{ return *this <= QString::fromAscii(s); }
+{ return *this <= QString::fromAscii(s, s ? int(strlen(s)) : -1); }
inline bool QString::operator>=(const char *s) const
-{ return *this >= QString::fromAscii(s); }
+{ return *this >= QString::fromAscii(s, s ? int(strlen(s)) : -1); }
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, const QString &s2)
{ return qStringComparisonHelper(s2, s1); }
inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QString &s2)
{ return !qStringComparisonHelper(s2, s1); }
inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QString &s2)
-{ return (QString::fromAscii(s1) < s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) < s2); }
inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
-{ return (QString::fromAscii(s1) > s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) > s2); }
inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QString &s2)
-{ return (QString::fromAscii(s1) <= s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) <= s2); }
inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
-{ return (QString::fromAscii(s1) >= s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) >= s2); }
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, const QLatin1String &s2)
-{ return QString::fromAscii(s1) == s2; }
+{ return QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) == s2; }
inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QLatin1String &s2)
-{ return QString::fromAscii(s1) != s2; }
+{ return QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) != s2; }
inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QLatin1String &s2)
-{ return (QString::fromAscii(s1) < s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) < s2); }
inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QLatin1String &s2)
-{ return (QString::fromAscii(s1) > s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) > s2); }
inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QLatin1String &s2)
-{ return (QString::fromAscii(s1) <= s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) <= s2); }
inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QLatin1String &s2)
-{ return (QString::fromAscii(s1) >= s2); }
+{ return (QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1) >= s2); }
inline bool operator==(const QLatin1String &s1, const QLatin1String &s2)
{ return (qstrcmp(s1.latin1(), s2.latin1()) == 0); }
@@ -1029,9 +1032,9 @@ inline const QString operator+(QChar s1, const QString &s2)
{ QString t(s1); t += s2; return t; }
# ifndef QT_NO_CAST_FROM_ASCII
inline QT_ASCII_CAST_WARN const QString operator+(const QString &s1, const char *s2)
-{ QString t(s1); t += QString::fromAscii(s2); return t; }
+{ QString t(s1); t += QString::fromAscii(s2, s2 ? int(strlen(s2)) : -1); return t; }
inline QT_ASCII_CAST_WARN const QString operator+(const char *s1, const QString &s2)
-{ QString t = QString::fromAscii(s1); t += s2; return t; }
+{ QString t = QString::fromAscii(s1, s1 ? int(strlen(s1)) : -1); t += s2; return t; }
inline QT_ASCII_CAST_WARN const QString operator+(char c, const QString &s)
{ QString t = s; t.prepend(QChar::fromAscii(c)); return t; }
inline QT_ASCII_CAST_WARN const QString operator+(const QString &s, char c)
@@ -1050,10 +1053,9 @@ inline std::string QString::toStdString() const
inline QString QString::fromStdString(const std::string &s)
{ return fromAscii(s.data(), int(s.size())); }
-# ifndef QT_NO_STL_WCHAR
-inline QStdWString QString::toStdWString() const
+inline std::wstring QString::toStdWString() const
{
- QStdWString str;
+ std::wstring str;
str.resize(length());
#if defined(_MSC_VER) && _MSC_VER >= 1400
@@ -1065,9 +1067,8 @@ inline QStdWString QString::toStdWString() const
str.resize(toWCharArray(&(*str.begin())));
return str;
}
-inline QString QString::fromStdWString(const QStdWString &s)
+inline QString QString::fromStdWString(const std::wstring &s)
{ return fromWCharArray(s.data(), int(s.size())); }
-# endif
#endif
#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE))
@@ -1212,7 +1213,7 @@ inline bool operator>=(const QStringRef &s1, const QStringRef &s2)
inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2)
{
# ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2));
+ if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2, s2 ? int(strlen(s2)) : -1));
# endif
return (s1 == QLatin1String(s2));
}
diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp
index 2b40a68e0b..018a312fa6 100644
--- a/src/corelib/tools/qstringbuilder.cpp
+++ b/src/corelib/tools/qstringbuilder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index de6b655e95..016e37fb38 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index bab7d42215..1fca78b03b 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index bded94399d..6c32f11096 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp
index 0117d78544..36016a9401 100644
--- a/src/corelib/tools/qstringmatcher.cpp
+++ b/src/corelib/tools/qstringmatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h
index ed4e503644..9f5e10b942 100644
--- a/src/corelib/tools/qstringmatcher.h
+++ b/src/corelib/tools/qstringmatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index aabb6949ad..4554ebb34f 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qtextboundaryfinder.h b/src/corelib/tools/qtextboundaryfinder.h
index 4d5369c3af..3f4f309d31 100644
--- a/src/corelib/tools/qtextboundaryfinder.h
+++ b/src/corelib/tools/qtextboundaryfinder.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 0ca406308a..2ff25a9a46 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qtimeline.h b/src/corelib/tools/qtimeline.h
index d65822ff40..06a5d76a4b 100644
--- a/src/corelib/tools/qtimeline.h
+++ b/src/corelib/tools/qtimeline.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qtools_p.h b/src/corelib/tools/qtools_p.h
index 9a7f5dd852..6a1b78b12b 100644
--- a/src/corelib/tools/qtools_p.h
+++ b/src/corelib/tools/qtools_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp
index 88fd2afb72..7fc09e7d60 100644
--- a/src/corelib/tools/qunicodetables.cpp
+++ b/src/corelib/tools/qunicodetables.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h
index 0c9bd02c04..0a357c0da6 100644
--- a/src/corelib/tools/qunicodetables_p.h
+++ b/src/corelib/tools/qunicodetables_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index 6da6cf524d..d37389a8dc 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -95,6 +95,11 @@ public:
}
inline int size() const { return s; }
inline int count() const { return s; }
+ inline int length() const { return s; }
+ inline T& first() { Q_ASSERT(!isEmpty()); return *begin(); }
+ inline const T& first() const { Q_ASSERT(!isEmpty()); return *begin(); }
+ T& last() { Q_ASSERT(!isEmpty()); return *(end() - 1); }
+ const T& last() const { Q_ASSERT(!isEmpty()); return *(end() - 1); }
inline bool isEmpty() const { return (s == 0); }
inline void resize(int size);
inline void clear() { resize(0); }
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index b1d7a1a5b1..c4198aafa7 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -118,6 +118,43 @@
\sa isEmpty(), resize()
*/
+/*! \fn int QVarLengthArray::length() const
+
+ Same as size().
+
+ \sa isEmpty(), resize()
+*/
+
+/*! \fn T& QVarLengthArray::first()
+
+ Returns a reference to the first item in the array. The array must
+ not be empty. If the array can be empty, check isEmpty() before
+ calling this function.
+
+ \sa last(), isEmpty()
+*/
+
+/*! \fn const T& QVarLengthArray::first() const
+
+ \overload
+*/
+
+/*! \fn T& QVarLengthArray::last()
+
+ Returns a reference to the last item in the array. The array must
+ not be empty. If the array can be empty, check isEmpty() before
+ calling this function.
+
+ \sa first(), isEmpty()
+*/
+
+/*! \fn const T& QVarLengthArray::last() const
+
+ \overload
+*/
+
+
+
/*! \fn bool QVarLengthArray::isEmpty() const
Returns true if the array has size 0; otherwise returns false.
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index d4c7fd79f7..59ca11179b 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,7 +41,9 @@
#include "qvector.h"
#include "qtools_p.h"
+
#include <string.h>
+#include <stdlib.h>
QT_BEGIN_NAMESPACE
@@ -56,7 +58,7 @@ const QVectorData QVectorData::shared_null = { Q_REFCOUNT_INITIALIZE_STATIC, 0,
QVectorData *QVectorData::malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init)
{
- QVectorData* p = (QVectorData *)qMalloc(sizeofTypedData + (size - 1) * sizeofT);
+ QVectorData* p = (QVectorData *)::malloc(sizeofTypedData + (size - 1) * sizeofT);
Q_CHECK_PTR(p);
::memcpy(p, init, sizeofTypedData + (qMin(size, init->alloc) - 1) * sizeofT);
return p;
@@ -64,14 +66,14 @@ QVectorData *QVectorData::malloc(int sizeofTypedData, int size, int sizeofT, QVe
QVectorData *QVectorData::allocate(int size, int alignment)
{
- return static_cast<QVectorData *>(alignment > alignmentThreshold() ? qMallocAligned(size, alignment) : qMalloc(size));
+ return static_cast<QVectorData *>(alignment > alignmentThreshold() ? qMallocAligned(size, alignment) : ::malloc(size));
}
QVectorData *QVectorData::reallocate(QVectorData *x, int newsize, int oldsize, int alignment)
{
if (alignment > alignmentThreshold())
return static_cast<QVectorData *>(qReallocAligned(x, newsize, oldsize, alignment));
- return static_cast<QVectorData *>(qRealloc(x, newsize));
+ return static_cast<QVectorData *>(realloc(x, newsize));
}
void QVectorData::free(QVectorData *x, int alignment)
@@ -79,7 +81,7 @@ void QVectorData::free(QVectorData *x, int alignment)
if (alignment > alignmentThreshold())
qFreeAligned(x);
else
- qFree(x);
+ ::free(x);
}
int QVectorData::grow(int sizeofTypedData, int size, int sizeofT, bool excessive)
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index f9db421fdb..51364df91d 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -603,7 +603,7 @@ void QVector<T>::append(const T &t)
}
template <typename T>
-Q_TYPENAME QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
+typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
{
int offset = int(before - p->array);
if (n != 0) {
@@ -637,7 +637,7 @@ Q_TYPENAME QVector<T>::iterator QVector<T>::insert(iterator before, size_type n,
}
template <typename T>
-Q_TYPENAME QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
+typename QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
{
int f = int(abegin - p->array);
int l = int(aend - p->array);
diff --git a/src/corelib/tools/qvsnprintf.cpp b/src/corelib/tools/qvsnprintf.cpp
index 0b85cf0c0a..85f8270ffd 100644
--- a/src/corelib/tools/qvsnprintf.cpp
+++ b/src/corelib/tools/qvsnprintf.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/xml/make-parser.sh b/src/corelib/xml/make-parser.sh
index 11ac2196a6..a02538ba79 100755
--- a/src/corelib/xml/make-parser.sh
+++ b/src/corelib/xml/make-parser.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index bf37902950..04336c3a31 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -885,9 +885,9 @@ void QXmlStreamReaderPrivate::parseEntity(const QString &value)
inline void QXmlStreamReaderPrivate::reallocateStack()
{
stack_size <<= 1;
- sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
+ sym_stack = reinterpret_cast<Value*> (realloc(sym_stack, stack_size * sizeof(Value)));
Q_CHECK_PTR(sym_stack);
- state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
+ state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int)));
Q_CHECK_PTR(sym_stack);
}
@@ -897,8 +897,8 @@ QXmlStreamReaderPrivate::~QXmlStreamReaderPrivate()
#ifndef QT_NO_TEXTCODEC
delete decoder;
#endif
- qFree(sym_stack);
- qFree(state_stack);
+ free(sym_stack);
+ free(state_stack);
delete entityParser;
}
diff --git a/src/corelib/xml/qxmlstream.g b/src/corelib/xml/qxmlstream.g
index 26e7323a5f..88bfcd47cc 100644
--- a/src/corelib/xml/qxmlstream.g
+++ b/src/corelib/xml/qxmlstream.g
@@ -1,6 +1,6 @@
----------------------------------------------------------------------------
--
--- Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+-- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-- All rights reserved.
-- Contact: Nokia Corporation (qt-info@nokia.com)
--
diff --git a/src/corelib/xml/qxmlstream.h b/src/corelib/xml/qxmlstream.h
index 3e19bef273..04f9322712 100644
--- a/src/corelib/xml/qxmlstream.h
+++ b/src/corelib/xml/qxmlstream.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h
index db5fb65246..e67ff3d76b 100644
--- a/src/corelib/xml/qxmlstream_p.h
+++ b/src/corelib/xml/qxmlstream_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/xml/qxmlutils.cpp b/src/corelib/xml/qxmlutils.cpp
index 9cae7632e5..afc4fff8d6 100644
--- a/src/corelib/xml/qxmlutils.cpp
+++ b/src/corelib/xml/qxmlutils.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/corelib/xml/qxmlutils_p.h b/src/corelib/xml/qxmlutils_p.h
index 5fa913e63a..8b8d2358c9 100644
--- a/src/corelib/xml/qxmlutils_p.h
+++ b/src/corelib/xml/qxmlutils_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index 8e74b8b922..8f02bedf15 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index 8178e2ecf3..bb17231c34 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusabstractadaptor.cpp b/src/dbus/qdbusabstractadaptor.cpp
index 9d9e0f6e28..6acbd98fbf 100644
--- a/src/dbus/qdbusabstractadaptor.cpp
+++ b/src/dbus/qdbusabstractadaptor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusabstractadaptor.h b/src/dbus/qdbusabstractadaptor.h
index bb9c11bbaa..2f5896a9cb 100644
--- a/src/dbus/qdbusabstractadaptor.h
+++ b/src/dbus/qdbusabstractadaptor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusabstractadaptor_p.h b/src/dbus/qdbusabstractadaptor_p.h
index 4c197be226..a9e184a186 100644
--- a/src/dbus/qdbusabstractadaptor_p.h
+++ b/src/dbus/qdbusabstractadaptor_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 9f68313040..a63864a0b3 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h
index 34ff4107f9..9cc68594e6 100644
--- a/src/dbus/qdbusabstractinterface.h
+++ b/src/dbus/qdbusabstractinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusabstractinterface_p.h b/src/dbus/qdbusabstractinterface_p.h
index 4f96165aa0..b0fb04e831 100644
--- a/src/dbus/qdbusabstractinterface_p.h
+++ b/src/dbus/qdbusabstractinterface_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index af800d765d..4bb5d55724 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index cea28f9b61..74a5b37078 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h
index d8ca442920..c04e458449 100644
--- a/src/dbus/qdbusargument_p.h
+++ b/src/dbus/qdbusargument_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -201,6 +201,7 @@ public:
QVariant toVariantInternal();
QDBusArgument::ElementType currentType();
+ bool isCurrentTypeStringLike();
public:
DBusMessageIter iterator;
@@ -208,6 +209,11 @@ public:
private:
Q_DISABLE_COPY(QDBusDemarshaller)
+ QString toStringUnchecked();
+ QDBusObjectPath toObjectPathUnchecked();
+ QDBusSignature toSignatureUnchecked();
+ QStringList toStringListUnchecked();
+ QByteArray toByteArrayUnchecked();
};
inline QDBusMarshaller *QDBusArgumentPrivate::marshaller()
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index 7d3cf9be4c..50a55040c8 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -123,23 +123,6 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
}
/*!
- \fn QDBusConnection &QDBusConnection::sessionBus()
- \relates QDBusConnection
-
- Returns a QDBusConnection object opened with the session bus. The object
- reference returned by this function is valid until the application terminates,
- at which point the connection will be closed and the object deleted.
-*/
-/*!
- \fn QDBusConnection &QDBusConnection::systemBus()
- \relates QDBusConnection
-
- Returns a QDBusConnection object opened with the system bus. The object reference returned
- by this function is valid until the QCoreApplication's destructor is run, when the
- connection will be closed and the object, deleted.
-*/
-
-/*!
\class QDBusConnection
\inmodule QtDBus
\since 4.2
@@ -1125,11 +1108,25 @@ Q_GLOBAL_STATIC_WITH_ARGS(QDBusDefaultConnection, _q_sessionBus,
Q_GLOBAL_STATIC_WITH_ARGS(QDBusDefaultConnection, _q_systemBus,
(QDBusConnection::SystemBus, _q_systemBusName))
+/*!
+ \fn QDBusConnection QDBusConnection::sessionBus()
+
+ Returns a QDBusConnection object opened with the session bus. The object
+ reference returned by this function is valid until the application terminates,
+ at which point the connection will be closed and the object deleted.
+*/
QDBusConnection QDBusConnection::sessionBus()
{
return *_q_sessionBus();
}
+/*!
+ \fn QDBusConnection QDBusConnection::systemBus()
+
+ Returns a QDBusConnection object opened with the system bus. The object reference returned
+ by this function is valid until the QCoreApplication's destructor is run, when the
+ connection will be closed and the object, deleted.
+*/
QDBusConnection QDBusConnection::systemBus()
{
return *_q_systemBus();
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index 8b126af77e..3b88ad3f9a 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index d481cf16ba..46fed80865 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusconnectioninterface.cpp b/src/dbus/qdbusconnectioninterface.cpp
index 063fb88afa..46080027a6 100644
--- a/src/dbus/qdbusconnectioninterface.cpp
+++ b/src/dbus/qdbusconnectioninterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusconnectioninterface.h b/src/dbus/qdbusconnectioninterface.h
index a516bc4552..93ee6709eb 100644
--- a/src/dbus/qdbusconnectioninterface.h
+++ b/src/dbus/qdbusconnectioninterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusconnectionmanager_p.h b/src/dbus/qdbusconnectionmanager_p.h
index f9a9e2906e..9d929b019b 100644
--- a/src/dbus/qdbusconnectionmanager_p.h
+++ b/src/dbus/qdbusconnectionmanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuscontext.cpp b/src/dbus/qdbuscontext.cpp
index b65af73e63..e4a5d879d7 100644
--- a/src/dbus/qdbuscontext.cpp
+++ b/src/dbus/qdbuscontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuscontext.h b/src/dbus/qdbuscontext.h
index 8dd9b40981..9ceef6ecc1 100644
--- a/src/dbus/qdbuscontext.h
+++ b/src/dbus/qdbuscontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuscontext_p.h b/src/dbus/qdbuscontext_p.h
index 691e69d2f1..5aa5da0378 100644
--- a/src/dbus/qdbuscontext_p.h
+++ b/src/dbus/qdbuscontext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusdemarshaller.cpp b/src/dbus/qdbusdemarshaller.cpp
index 4103552db1..215e6a1eb1 100644
--- a/src/dbus/qdbusdemarshaller.cpp
+++ b/src/dbus/qdbusdemarshaller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -130,19 +130,43 @@ inline double QDBusDemarshaller::toDouble()
return qIterGet<double>(&iterator);
}
-inline QString QDBusDemarshaller::toString()
+inline QString QDBusDemarshaller::toStringUnchecked()
{
return QString::fromUtf8(qIterGet<char *>(&iterator));
}
+inline QString QDBusDemarshaller::toString()
+{
+ if (isCurrentTypeStringLike())
+ return toStringUnchecked();
+ else
+ return QString();
+}
+
+inline QDBusObjectPath QDBusDemarshaller::toObjectPathUnchecked()
+ {
+ return QDBusObjectPath(QString::fromUtf8(qIterGet<char *>(&iterator)));
+ }
+
inline QDBusObjectPath QDBusDemarshaller::toObjectPath()
{
- return QDBusObjectPath(QString::fromUtf8(qIterGet<char *>(&iterator)));
+ if (isCurrentTypeStringLike())
+ return toObjectPathUnchecked();
+ else
+ return QDBusObjectPath();
}
+inline QDBusSignature QDBusDemarshaller::toSignatureUnchecked()
+ {
+ return QDBusSignature(QString::fromUtf8(qIterGet<char *>(&iterator)));
+ }
+
inline QDBusSignature QDBusDemarshaller::toSignature()
{
- return QDBusSignature(QString::fromUtf8(qIterGet<char *>(&iterator)));
+ if (isCurrentTypeStringLike())
+ return toSignatureUnchecked();
+ else
+ return QDBusSignature();
}
inline QDBusUnixFileDescriptor QDBusDemarshaller::toUnixFileDescriptor()
@@ -236,11 +260,11 @@ QVariant QDBusDemarshaller::toVariantInternal()
case DBUS_TYPE_UINT64:
return toULongLong();
case DBUS_TYPE_STRING:
- return toString();
+ return toStringUnchecked();
case DBUS_TYPE_OBJECT_PATH:
- return QVariant::fromValue(toObjectPath());
+ return QVariant::fromValue(toObjectPathUnchecked());
case DBUS_TYPE_SIGNATURE:
- return QVariant::fromValue(toSignature());
+ return QVariant::fromValue(toSignatureUnchecked());
case DBUS_TYPE_VARIANT:
return QVariant::fromValue(toVariant());
@@ -248,9 +272,9 @@ QVariant QDBusDemarshaller::toVariantInternal()
switch (q_dbus_message_iter_get_element_type(&iterator)) {
case DBUS_TYPE_BYTE:
// QByteArray
- return toByteArray();
+ return toByteArrayUnchecked();
case DBUS_TYPE_STRING:
- return toStringList();
+ return toStringListUnchecked();
case DBUS_TYPE_DICT_ENTRY:
return QVariant::fromValue(duplicate());
@@ -280,7 +304,20 @@ QVariant QDBusDemarshaller::toVariantInternal()
};
}
-QStringList QDBusDemarshaller::toStringList()
+bool QDBusDemarshaller::isCurrentTypeStringLike()
+{
+ const int type = q_dbus_message_iter_get_arg_type(&iterator);
+ switch (type) {
+ case DBUS_TYPE_STRING: //FALLTHROUGH
+ case DBUS_TYPE_OBJECT_PATH: //FALLTHROUGH
+ case DBUS_TYPE_SIGNATURE:
+ return true;
+ default:
+ return false;
+ }
+}
+
+QStringList QDBusDemarshaller::toStringListUnchecked()
{
QStringList list;
@@ -288,12 +325,21 @@ QStringList QDBusDemarshaller::toStringList()
q_dbus_message_iter_recurse(&iterator, &sub.iterator);
q_dbus_message_iter_next(&iterator);
while (!sub.atEnd())
- list.append(sub.toString());
+ list.append(sub.toStringUnchecked());
return list;
}
-QByteArray QDBusDemarshaller::toByteArray()
+QStringList QDBusDemarshaller::toStringList()
+{
+ if (q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_ARRAY
+ && q_dbus_message_iter_get_element_type(&iterator) == DBUS_TYPE_STRING)
+ return toStringListUnchecked();
+ else
+ return QStringList();
+}
+
+QByteArray QDBusDemarshaller::toByteArrayUnchecked()
{
DBusMessageIter sub;
q_dbus_message_iter_recurse(&iterator, &sub);
@@ -304,6 +350,15 @@ QByteArray QDBusDemarshaller::toByteArray()
return QByteArray(data,len);
}
+QByteArray QDBusDemarshaller::toByteArray()
+{
+ if (q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_ARRAY
+ && q_dbus_message_iter_get_element_type(&iterator) == DBUS_TYPE_BYTE) {
+ return toByteArrayUnchecked();
+ }
+ return QByteArray();
+}
+
bool QDBusDemarshaller::atEnd()
{
// dbus_message_iter_has_next is broken if the list has one single element
diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp
index 09e3450ecc..911e104736 100644
--- a/src/dbus/qdbuserror.cpp
+++ b/src/dbus/qdbuserror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h
index 4683f30385..3f6a66c2f4 100644
--- a/src/dbus/qdbuserror.h
+++ b/src/dbus/qdbuserror.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusextratypes.cpp b/src/dbus/qdbusextratypes.cpp
index 05a95c09e5..8d9d2e06fd 100644
--- a/src/dbus/qdbusextratypes.cpp
+++ b/src/dbus/qdbusextratypes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-void QDBusObjectPath::check()
+void QDBusObjectPath::doCheck()
{
if (!QDBusUtil::isValidObjectPath(*this)) {
qWarning("QDBusObjectPath: invalid path \"%s\"", qPrintable(*this));
@@ -54,7 +54,7 @@ void QDBusObjectPath::check()
}
}
-void QDBusSignature::check()
+void QDBusSignature::doCheck()
{
if (!QDBusUtil::isValidSignature(*this)) {
qWarning("QDBusSignature: invalid signature \"%s\"", qPrintable(*this));
diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h
index 984d4537ec..36060ab0a4 100644
--- a/src/dbus/qdbusextratypes.h
+++ b/src/dbus/qdbusextratypes.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,26 +75,26 @@ public:
{ return *this; }
private:
- void check();
+ void doCheck();
};
inline QDBusObjectPath::QDBusObjectPath(const char *objectPath)
: QString(QString::fromLatin1(objectPath))
-{ check(); }
+{ doCheck(); }
inline QDBusObjectPath::QDBusObjectPath(const QLatin1String &objectPath)
: QString(objectPath)
-{ check(); }
+{ doCheck(); }
inline QDBusObjectPath::QDBusObjectPath(const QString &objectPath)
: QString(objectPath)
-{ check(); }
+{ doCheck(); }
inline QDBusObjectPath &QDBusObjectPath::operator=(const QDBusObjectPath &_path)
-{ QString::operator=(_path); check(); return *this; }
+{ QString::operator=(_path); doCheck(); return *this; }
inline void QDBusObjectPath::setPath(const QString &objectPath)
-{ QString::operator=(objectPath); check(); }
+{ QString::operator=(objectPath); doCheck(); }
inline bool operator==(const QDBusObjectPath &lhs, const QDBusObjectPath &rhs)
{ return lhs.path() == rhs.path(); }
@@ -125,26 +125,26 @@ public:
{ return *this; }
private:
- void check();
+ void doCheck();
};
inline QDBusSignature::QDBusSignature(const char *dBusSignature)
: QString(QString::fromAscii(dBusSignature))
-{ check(); }
+{ doCheck(); }
inline QDBusSignature::QDBusSignature(const QLatin1String &dBusSignature)
: QString(dBusSignature)
-{ check(); }
+{ doCheck(); }
inline QDBusSignature::QDBusSignature(const QString &dBusSignature)
: QString(dBusSignature)
-{ check(); }
+{ doCheck(); }
inline QDBusSignature &QDBusSignature::operator=(const QDBusSignature &dbusSignature)
-{ QString::operator=(dbusSignature); check(); return *this; }
+{ QString::operator=(dbusSignature); doCheck(); return *this; }
inline void QDBusSignature::setSignature(const QString &dBusSignature)
-{ QString::operator=(dBusSignature); check(); }
+{ QString::operator=(dBusSignature); doCheck(); }
inline bool operator==(const QDBusSignature &lhs, const QDBusSignature &rhs)
{ return lhs.signature() == rhs.signature(); }
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index f6b433e1ba..59b191bd10 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h
index 745048a7e2..1e39bd734a 100644
--- a/src/dbus/qdbusintegrator_p.h
+++ b/src/dbus/qdbusintegrator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index b670244a0a..1bf468acad 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusinterface.h b/src/dbus/qdbusinterface.h
index 9396d9b483..75e876a389 100644
--- a/src/dbus/qdbusinterface.h
+++ b/src/dbus/qdbusinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusinterface_p.h b/src/dbus/qdbusinterface_p.h
index 1bff192209..b85d3cea77 100644
--- a/src/dbus/qdbusinterface_p.h
+++ b/src/dbus/qdbusinterface_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp
index b874a64644..7d07c92663 100644
--- a/src/dbus/qdbusinternalfilters.cpp
+++ b/src/dbus/qdbusinternalfilters.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusintrospection.cpp b/src/dbus/qdbusintrospection.cpp
index 710a943941..23eda78e5a 100644
--- a/src/dbus/qdbusintrospection.cpp
+++ b/src/dbus/qdbusintrospection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusintrospection_p.h b/src/dbus/qdbusintrospection_p.h
index 29d5772189..025cf63fe3 100644
--- a/src/dbus/qdbusintrospection_p.h
+++ b/src/dbus/qdbusintrospection_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmacros.h b/src/dbus/qdbusmacros.h
index f942a28c58..e508362db0 100644
--- a/src/dbus/qdbusmacros.h
+++ b/src/dbus/qdbusmacros.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp
index 790f044fd7..843388c51e 100644
--- a/src/dbus/qdbusmarshaller.cpp
+++ b/src/dbus/qdbusmarshaller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index 78a1d902c3..8cd2cc5d67 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -389,7 +389,7 @@ QDBusMessage QDBusMessage::createSignal(const QString &path, const QString &inte
When using DBus in a peer-to-peer context (i.e., not on a bus), the \a service parameter is
optional.
- The QDBusObject and QDBusInterface classes provide a simpler abstraction to synchronous
+ The QDBusInterface class provides a simpler abstraction to synchronous
method calling.
This function returns a QDBusMessage object that can be sent with
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 14027ff27b..9cb1a476ca 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmessage_p.h b/src/dbus/qdbusmessage_p.h
index 2c17c38e28..da716a6def 100644
--- a/src/dbus/qdbusmessage_p.h
+++ b/src/dbus/qdbusmessage_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp
index 8daf2300b7..e25de261ed 100644
--- a/src/dbus/qdbusmetaobject.cpp
+++ b/src/dbus/qdbusmetaobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmetaobject_p.h b/src/dbus/qdbusmetaobject_p.h
index d9b1eedaa9..063234a49e 100644
--- a/src/dbus/qdbusmetaobject_p.h
+++ b/src/dbus/qdbusmetaobject_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp
index 20e8969590..e3ed5b5146 100644
--- a/src/dbus/qdbusmetatype.cpp
+++ b/src/dbus/qdbusmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmetatype.h b/src/dbus/qdbusmetatype.h
index 979e28510c..53b4c29591 100644
--- a/src/dbus/qdbusmetatype.h
+++ b/src/dbus/qdbusmetatype.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmetatype_p.h b/src/dbus/qdbusmetatype_p.h
index d33198f450..68deffbe08 100644
--- a/src/dbus/qdbusmetatype_p.h
+++ b/src/dbus/qdbusmetatype_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index 24eabfbfa6..e7c7715eaa 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 2278db4394..1004146f1d 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index 4791c3e6aa..dfdaf4e76a 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h
index ae17214834..02057a74b2 100644
--- a/src/dbus/qdbuspendingcall_p.h
+++ b/src/dbus/qdbuspendingcall_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuspendingreply.cpp b/src/dbus/qdbuspendingreply.cpp
index 2d8c4872ca..5f930c71a1 100644
--- a/src/dbus/qdbuspendingreply.cpp
+++ b/src/dbus/qdbuspendingreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index 926e3ab48d..596a459009 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp
index 145412e3c3..6c5b598ea2 100644
--- a/src/dbus/qdbusreply.cpp
+++ b/src/dbus/qdbusreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h
index 33274f41cf..b9013185b4 100644
--- a/src/dbus/qdbusreply.h
+++ b/src/dbus/qdbusreply.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
index a892e80faf..078f56aa61 100644
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusserver.h b/src/dbus/qdbusserver.h
index d00702a26f..900c652d37 100644
--- a/src/dbus/qdbusserver.h
+++ b/src/dbus/qdbusserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index c56a3d4841..6db9a28712 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusservicewatcher.h b/src/dbus/qdbusservicewatcher.h
index 96318b274d..853064032b 100644
--- a/src/dbus/qdbusservicewatcher.h
+++ b/src/dbus/qdbusservicewatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h
index c7e0dc584e..131437d370 100644
--- a/src/dbus/qdbusthreaddebug_p.h
+++ b/src/dbus/qdbusthreaddebug_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusunixfiledescriptor.cpp b/src/dbus/qdbusunixfiledescriptor.cpp
index 0ee29fc20f..5a8835735e 100644
--- a/src/dbus/qdbusunixfiledescriptor.cpp
+++ b/src/dbus/qdbusunixfiledescriptor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusunixfiledescriptor.h b/src/dbus/qdbusunixfiledescriptor.h
index 9afa6ac8a6..46d933ea24 100644
--- a/src/dbus/qdbusunixfiledescriptor.h
+++ b/src/dbus/qdbusunixfiledescriptor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp
index 0c7f0e63e0..70ef22f428 100644
--- a/src/dbus/qdbusutil.cpp
+++ b/src/dbus/qdbusutil.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index bda0b923d1..50ef4fc9c2 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusvirtualobject.cpp b/src/dbus/qdbusvirtualobject.cpp
index 992ccbf229..c421e7dfd6 100644
--- a/src/dbus/qdbusvirtualobject.cpp
+++ b/src/dbus/qdbusvirtualobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusvirtualobject.h b/src/dbus/qdbusvirtualobject.h
index be323de720..6f0807f16d 100644
--- a/src/dbus/qdbusvirtualobject.h
+++ b/src/dbus/qdbusvirtualobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 076af8a0b7..b49756ebfe 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusxmlparser.cpp b/src/dbus/qdbusxmlparser.cpp
index 19b35e6c07..b1d0b78c96 100644
--- a/src/dbus/qdbusxmlparser.cpp
+++ b/src/dbus/qdbusxmlparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/dbus/qdbusxmlparser_p.h b/src/dbus/qdbusxmlparser_p.h
index 3bf31a48e9..f7677e0ae4 100644
--- a/src/dbus/qdbusxmlparser_p.h
+++ b/src/dbus/qdbusxmlparser_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
deleted file mode 100644
index 8ddfd45060..0000000000
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ /dev/null
@@ -1,4 +0,0 @@
-
-set(Qt5Gui_PLUGIN_TYPES imageformats)
-
-set(Qt5_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qtiff)
diff --git a/src/gui/accessible/accessible.pri b/src/gui/accessible/accessible.pri
index be2fe1acf3..70ac033f77 100644
--- a/src/gui/accessible/accessible.pri
+++ b/src/gui/accessible/accessible.pri
@@ -16,16 +16,4 @@ contains(QT_CONFIG, accessibility) {
HEADERS += accessible/qaccessiblebridge.h
SOURCES += accessible/qaccessiblebridge.cpp
-
-### FIXME
-# mac:!qpa {
-# HEADERS += accessible/qaccessible_mac_p.h
-# OBJECTIVE_SOURCES += accessible/qaccessible_mac.mm \
-# accessible/qaccessible_mac_cocoa.mm
-# } else:win32:!qpa {
-# SOURCES += accessible/qaccessible_win.cpp
-# } else {
-# HEADERS += accessible/qaccessiblebridge.h
-# SOURCES += accessible/qaccessible_unix.cpp accessible/qaccessiblebridge.cpp
-# }
}
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index c65e7df327..de37f67943 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,10 +50,8 @@
#include <private/qguiapplication_p.h>
#include "qplatformaccessibility_qpa.h"
-#include <QtCore/QDebug>
-#include <QtCore/QHash>
-#include <QtCore/QMetaObject>
-#include <QtCore/QMutex>
+#include <QtCore/qdebug.h>
+#include <QtCore/qmetaobject.h>
#include <private/qfactoryloader_p.h>
QT_BEGIN_NAMESPACE
@@ -61,11 +59,13 @@ QT_BEGIN_NAMESPACE
/*!
\class QAccessible
\brief The QAccessible class provides enums and static functions
- relating to accessibility.
+ related to accessibility.
\ingroup accessibility
\inmodule QtWidgets
+ This class is part of \l {Accessibility for QWidget Applications}.
+
Accessible applications can be used by people who are not able to
use applications by conventional means.
@@ -120,94 +120,64 @@ QT_BEGIN_NAMESPACE
\sa QAccessibleInterface
*/
-/*!
- \enum QAccessible::Action
-
- This enum describes the possible types of action that can occur.
-
- \value DefaultAction
- \value Press
- \value SetFocus
- \value Increase
- \value Decrease
- \value Accept
- \value Cancel
- \value Select
- \value ClearSelection
- \value RemoveSelection
- \value ExtendSelection
- \value AddToSelection
-
- \value FirstStandardAction
- \value LastStandardAction
-*/
/*!
- \enum QAccessible::Method
-
- This enum describes the possible types of methods that can be
- invoked on an accessible object.
+ \class QAccessible::State
- \value ListSupportedMethods
- \value SetCursorPosition
- \value GetCursorPosition
+ This structure defines bit flags that indicate
+ the state of an accessible object. The values are:
- \omitvalue ForegroundColor
- \omitvalue BackgroundColor
+ \value active The object is the active window or the active sub-element in a container (that would get focus when focusing the container).
+ \value adjustable The object represents an adjustable value, e.g. sliders.
+ \value animated The object's appearance changes frequently.
+ \value busy The object cannot accept input at the moment.
+ \value checkable The object is checkable.
+ \value checked The object's check box is checked.
+ \value checkStateMixed The third state of checkboxes (half checked in tri-state check boxes).
+ \value collapsed The object is collapsed, e.g. a closed listview item, or an iconified window.
+ \value defaultButton The object represents the default button in a dialog.
+ \value defunct The object no longer exists.
+ \value editable The object has a text carret (and often implements the text interface).
+ \value expandable The object is expandable, mostly used for cells in a tree view.
+ \value expanded The object is expanded, currently its children are visible.
+ \value extSelectable The object supports extended selection.
+ \value focusable The object can receive focus. Only objects in the active window can receive focus.
+ \value focused The object has keyboard focus.
+ \value hasPopup The object opens a popup.
+ \value hotTracked The object's appearance is sensitive to the mouse cursor position.
+ \value invalid The object is no longer valid (because it has been deleted).
+ \value invalidEntry Input validation current input invalid.
+ \value invisible The object is not visible to the user.
+ \value linked The object is linked to another object, e.g. a hyperlink.
+ \value marqueed The object displays scrolling contents, e.g. a log view.
+ \value modal The object blocks input from other objects.
+ \value movable The object can be moved.
+ \value multiLine The object has multiple lines of text (word wrap), as opposed to a single line.
+ \value multiSelectable The object supports multiple selected items.
+ \value offscreen The object is clipped by the visible area. Objects that are off screen are also invisible.
+ \value passwordEdit The object is a password field, e.g. a line edit for entering a Password.
+ \value playsSound The object produces sound when interacted with.
+ \value pressed The object is pressed.
+ \value readOnly The object can usually be edited, but is explicitly set to read-only.
+ \value selectable The object is selectable.
+ \value selectableText The object has text which can be selected. This is different from selectable which refers to the object's children.
+ \value selected The object is selected.
+ \value selfVoicing The object describes itself through speech or sound.
+ \value sizeable The object can be resized, e.g. top-level windows.
+ \value summaryElement The object summarizes the state of the window and should be treated with priority.
+ \value supportsAutoCompletion The object has auto-completion, for example in line edits or combo boxes.
+ \value traversed The object is linked and has been visited.
+ \value updatesFrequently The object changes frequently and needs to be refreshed when accessing it.
+ \value disabled The object is unavailable to the user, e.g. a disabled widget.
- \sa QAccessibleInterface::invokeMethod()
+ Implementations of QAccessibleInterface::state() return a combination
+ of these flags.
*/
/*!
- \fn QSet<Method> QAccessibleInterface::supportedMethods()
- \since 4.3
+ \fn QAccessible::State::State()
- Returns a QSet of \l{QAccessible::}{Method}s that are supported by this
- accessible interface.
-
- \sa QAccessible::Method invokeMethod()
-*/
-
-/*!
- \enum QAccessible::StateFlag
-
- This enum type defines bit flags that can be combined to indicate
- the state of an accessible object. The values are:
-
- \value Animated The object's appearance changes frequently.
- \value Busy The object cannot accept input at the moment.
- \value Checked The object's check box is checked.
- \value Collapsed The object is collapsed, e.g. a closed listview item, or an iconified window.
- \value DefaultButton The object represents the default button in a dialog.
- \value Expanded The object is expandable, and currently the children are visible.
- \value ExtSelectable The object supports extended selection.
- \value Focusable The object can receive focus. Only objects in the active window can receive focus.
- \value Focused The object has keyboard focus.
- \value HasPopup The object opens a popup.
- \value HotTracked The object's appearance is sensitive to the mouse cursor position.
- \value Invisible The object is not visible to the user.
- \value Linked The object is linked to another object, e.g. a hyperlink.
- \value Marqueed The object displays scrolling contents, e.g. a log view.
- \value Mixed The state of the object is not determined, e.g. a tri-state check box that is neither checked nor unchecked.
- \value Modal The object blocks input from other objects.
- \value Movable The object can be moved.
- \value MultiSelectable The object supports multiple selected items.
- \value Normal The normal state.
- \value Offscreen The object is clipped by the visible area. Objects that are off screen are also invisible.
- \value Pressed The object is pressed.
- \value Protected The object is password protected, e.g. a line edit for entering a Password.
- \value ReadOnly The object can usually be edited, but is explicitly set to read-only.
- \value Selectable The object is selectable.
- \value Selected The object is selected.
- \value SelfVoicing The object describes itself through speech or sound.
- \value Sizeable The object can be resized, e.g. top-level windows.
- \value Traversed The object is linked and has been visited.
- \value Unavailable The object is unavailable to the user, e.g. a disabled widget.
- \omitvalue Moveable
- \omitvalue HasInvokeExtension
-
- Implementations of QAccessibleInterface::state() return a combination
- of these flags.
+ Creates a new QAccessible::State with all states set to false.
*/
/*!
@@ -360,7 +330,7 @@ QT_BEGIN_NAMESPACE
\value PopupMenu A menu which lists options that the user can select to perform an action.
\value ProgressBar The object displays the progress of an operation in progress.
\value PropertyPage A property page where the user can change options and settings.
- \value PushButton A button.
+ \value Button A button.
\value RadioButton An object that represents an option that is mutually exclusive with other options.
\value Row A row of cells, usually within a table.
\value RowHeader A header for a row of data.
@@ -391,10 +361,6 @@ QT_BEGIN_NAMESPACE
\value Unrelated The objects are unrelated.
\value Self The objects are the same.
- \value Ancestor The first object is a parent of the second object.
- \value Child The first object is a direct child of the second object.
- \value Descendent The first object is an indirect child of the second object.
- \value Sibling The objects are siblings.
\value Up The first object is above the second object.
\value Down The first object is below the second object.
@@ -409,7 +375,6 @@ QT_BEGIN_NAMESPACE
\value Controller The first object controls the second object.
\value Controlled The first object is controlled by the second object.
- \omitvalue HierarchyMask
\omitvalue GeometryMask
\omitvalue LogicalMask
@@ -433,6 +398,26 @@ QT_BEGIN_NAMESPACE
\value Help A longer text giving information about how to use the object.
\value Accelerator The keyboard shortcut that executes the object's default action.
\value UserText The first value to be used for user defined text.
+ \omitvalue DebugDescription
+*/
+
+/*!
+ \enum QAccessible::InterfaceType
+
+ \l QAccessibleInterface supports several sub interfaces.
+ In order to provide more information about some objects, their accessible
+ representation should implement one or more of these interfaces.
+ When subclassing one of these interfaces, \l QAccessibleInterface::interface_cast also needs to be implemented.
+
+ \value TextInterface For text that supports selections or is more than one line. Simple labels do not need to implement this interface.
+ \value EditableTextInterface For text that can be edited by the user.
+ \value ValueInterface For objects that are used to manipulate a value, for example slider or scroll bar.
+ \value ActionInterface For interactive objects that allow the user to trigger an action. Basically everything that allows for example mouse interaction.
+ \omitvalue ImageInterface For objects that represent an image. This interface is generally less important.
+ \value TableInterface For lists, tables and trees.
+ \value TableCellInterface For cells in a TableInterface object.
+
+ \sa QAccessibleInterface::interface_cast, QAccessibleTextInterface, QAccessibleEditableTextInterface, QAccessibleValueInterface, QAccessibleActionInterface, QAccessibleTableInterface, QAccessibleTableCellInterface
*/
/*!
@@ -657,15 +642,15 @@ bool QAccessible::isActive()
\sa queryAccessibleInterface()
*/
-void QAccessible::setRootObject(QObject *o)
+void QAccessible::setRootObject(QObject *object)
{
if (rootObjectHandler) {
- rootObjectHandler(o);
+ rootObjectHandler(object);
return;
}
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
- pfAccessibility->setRootObject(o);
+ pfAccessibility->setRootObject(object);
}
/*!
@@ -686,12 +671,12 @@ void QAccessible::setRootObject(QObject *o)
the parameters of the call is expensive you can test isActive() to
avoid unnecessary computations.
*/
-void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
+void QAccessible::updateAccessibility(QObject *object, int child, Event reason)
{
- Q_ASSERT(o);
+ Q_ASSERT(object);
if (updateHandler) {
- updateHandler(o, who, reason);
+ updateHandler(object, child, reason);
return;
}
@@ -699,7 +684,7 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
return;
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
- pfAccessibility->notifyAccessibilityUpdate(o, who, reason);
+ pfAccessibility->notifyAccessibilityUpdate(object, child, reason);
}
@@ -711,6 +696,8 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
\ingroup accessibility
\inmodule QtGui
+ This class is part of \l {Accessibility for QWidget Applications}.
+
Accessibility tools (also called AT Clients), such as screen readers
or braille displays, require high-level information about
accessible objects in an application. Accessible objects provide
@@ -740,8 +727,11 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
The functions childCount() and indexOfChild() return the number of
children of an accessible object and the index a child object has
- in its parent. The childAt() function returns the index of a child
- at a given position.
+ in its parent. The childAt() function returns a child QAccessibleInterface
+ that is found at a position. The child does not have to be a direct
+ child. This allows bypassing intermediate layers when the parent already knows the
+ top-most child. childAt() is used for hit testing (finding the object
+ under the mouse).
The relationTo() function provides information about how two
different objects relate to each other, and navigate() allows
@@ -827,9 +817,8 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
/*!
\fn int QAccessibleInterface::indexOfChild(const QAccessibleInterface *child) const
- Returns the 1-based index of the object \a child in this object's
- children list, or -1 if \a child is not a child of this object. 0
- is not a possible return value.
+ Returns the 0-based index of the object \a child in this object's
+ children list, or -1 if \a child is not a child of this object.
All objects provide this information about their children.
@@ -837,12 +826,10 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
*/
/*!
- \fn QAccessible::Relation QAccessibleInterface::relationTo(int child,
-const QAccessibleInterface *other, int otherChild) const
+ \fn QAccessible::Relation QAccessibleInterface::relationTo(const QAccessibleInterface *other) const
- Returns the relationship between this object's \a child and the \a
- other object's \a otherChild. If \a child is 0 the object's own relation
- is returned.
+ Returns the relationship between this object and the \a
+ other object.
The returned value indicates the relation of the called object to
the \a other object, e.g. if this object is a label for \a other
@@ -875,18 +862,21 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
}
/*!
- \fn int QAccessibleInterface::childAt(int x, int y) const
+ \fn QAccessibleInterface *QAccessibleInterface::childAt(int x, int y) const
- Returns the 1-based index of the child that contains the screen
- coordinates (\a x, \a y). This function returns 0 if the point is
- positioned on the object itself. If the tested point is outside
- the boundaries of the object this function returns -1.
+ Returns the QAccessibleInterface of a child that contains the screen coordinates (\a x, \a y).
+ If there are no children at this position this function returns 0.
+ The returned accessible must be a child, but not necessarily a direct child.
This function is only relyable for visible objects (invisible
object might not be laid out correctly).
All visual objects provide this information.
+ A default implementation is provided for objects inheriting QAccessibleObject. This will iterate
+ over all children. If the widget manages its children (e.g. a table) it will be more efficient
+ to write a specialized implementation.
+
\sa rect()
*/
@@ -912,8 +902,7 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
*/
/*!
- \fn int QAccessibleInterface::navigate(RelationFlag relation, int entry, QAccessibleInterface
-**target) const
+ \fn int QAccessibleInterface::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
Navigates from this object to an object that has a relationship
\a relation to this object, and returns the respective object in
@@ -956,18 +945,17 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
*/
/*!
- \fn QString QAccessibleInterface::text(Text t, int child) const
+ \fn QString QAccessibleInterface::text(QAccessible::Text t) const
- Returns the value of the text property \a t of the object, or of
- the object's child if \a child is not 0.
+ Returns the value of the text property \a t of the object.
- The \l Name is a string used by clients to identify, find, or
+ The \l QAccessible::Name is a string used by clients to identify, find, or
announce an accessible object for the user. All objects must have
a name that is unique within their container. The name can be
used differently by clients, so the name should both give a
short description of the object and be unique.
- An accessible object's \l Description provides textual information
+ An accessible object's \l QAccessible::Description provides textual information
about an object's visual appearance. The description is primarily
used to provide greater context for vision-impaired users, but is
also used for context searching or other applications. Not all
@@ -975,17 +963,17 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
description, but a tool button that shows a picture of a smiley
would.
- The \l Value of an accessible object represents visual information
+ The \l QAccessible::Value of an accessible object represents visual information
contained by the object, e.g. the text in a line edit. Usually,
the value can be modified by the user. Not all objects have a
value, e.g. static text labels don't, and some objects have a
state that already is the value, e.g. toggle buttons.
- The \l Help text provides information about the function and
+ The \l QAccessible::Help text provides information about the function and
usage of an accessible object. Not all objects provide this
information.
- The \l Accelerator is a keyboard shortcut that activates the
+ The \l QAccessible::Accelerator is a keyboard shortcut that activates the
object's default action. A keyboard shortcut is the underlined
character in the text of a menu, menu item or widget, and is
either the character itself, or a combination of this character
@@ -993,27 +981,26 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
tool buttons also have shortcut keys and usually display them in
their tooltip.
- All objects provide a string for \l Name.
+ All objects provide a string for \l QAccessible::Name.
\sa role(), state()
*/
/*!
- \fn void QAccessibleInterface::setText(Text t, int child, const QString &text)
+ \fn void QAccessibleInterface::setText(QAccessible::Text t, const QString &text)
- Sets the text property \a t of the object, or of the object's
- child if \a child is not 0, to \a text.
+ Sets the text property \a t of the object to \a text.
- Note that the text properties of most objects are read-only.
+ Note that the text properties of most objects are read-only
+ so calling this function might have no effect.
\sa text()
*/
/*!
- \fn QRect QAccessibleInterface::rect(int child) const
+ \fn QRect QAccessibleInterface::rect() const
- Returns the geometry of the object, or of the object's child if \a child
- is not 0. The geometry is in screen coordinates.
+ Returns the geometry of the object. The geometry is in screen coordinates.
This function is only reliable for visible objects (invisible
objects might not be laid out correctly).
@@ -1024,10 +1011,10 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
*/
/*!
- \fn QAccessible::Role QAccessibleInterface::role(int child) const
+ \fn QAccessible::Role QAccessibleInterface::role() const
- Returns the role of the object, or of the object's child if \a child
- is not 0. The role of an object is usually static.
+ Returns the role of the object.
+ The role of an object is usually static.
All accessible objects have a role.
@@ -1035,10 +1022,10 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterfa
*/
/*!
- \fn QAccessible::State QAccessibleInterface::state(int child) const
+ \fn QAccessible::State QAccessibleInterface::state() const
- Returns the current state of the object, or of the object's child if
- \a child is not 0. The returned value is a combination of the flags in
+ Returns the current state of the object.
+ The returned value is a combination of the flags in
the QAccessible::StateFlag enumeration.
All accessible objects have a state.
@@ -1088,7 +1075,7 @@ QColor QAccessibleInterface::backgroundColor() const
*/
/*!
- \fn QAccessibleTable2Interface *QAccessibleInterface::table2Interface()
+ \fn QAccessibleTableCellInterface *QAccessibleInterface::tableCellInterface()
\internal
*/
@@ -1104,6 +1091,9 @@ QColor QAccessibleInterface::backgroundColor() const
/*!
\class QAccessibleEvent
+
+ \internal
+
\brief The QAccessibleEvent class is used to query addition
accessibility information about complex widgets.
@@ -1127,16 +1117,11 @@ QColor QAccessibleInterface::backgroundColor() const
*/
/*!
- \fn QAccessibleEvent::QAccessibleEvent(Type type, int child)
+ \fn QAccessibleEvent::QAccessibleEvent(Type type)
Constructs an accessibility event of the given \a type, which
must be QEvent::AccessibilityDescription or
QEvent::AccessibilityHelp.
-
- \a child is the (1-based) index of the child to which the request
- applies. If \a child is 0, the request is for the widget itself.
-
- \sa child()
*/
/*!
@@ -1162,6 +1147,7 @@ QColor QAccessibleInterface::backgroundColor() const
\sa value()
*/
+
/*!
Returns the window associated with the underlying object.
For instance, QAccessibleWidget reimplements this and returns
@@ -1191,16 +1177,61 @@ QWindow *QAccessibleInterface::window() const
Returns an invalid QVariant if the object doesn't support the action.
*/
-QVariant QAccessibleInterface::invokeMethod(QAccessible::Method method, const QVariantList &params)
+
+/*!
+ \internal
+ Method to allow extending this class without breaking binary compatibility.
+ The actual behavior and format of \a data depends on \a id argument
+ which must be defined if the class is to be extended with another virtual
+ function.
+ Currently, this is unused.
+*/
+void QAccessibleInterface::virtual_hook(int /*id*/, void * /*data*/)
+{
+}
+
+/*!
+ \fn void *QAccessibleInterface::interface_cast(QAccessible::InterfaceType type)
+
+ \brief Returns a specialized accessibility interface \a type from the generic QAccessibleInterface.
+
+ This function must be reimplemented when providing more information about a widget or object through the
+ specialized interfaces. For example a line edit should implement the QAccessibleTextInterface and QAccessibleEditableTextInterface.
+
+ Qt's QLineEdit for example has its accessibility support implemented in QAccessibleLineEdit.
+ \code
+void *QAccessibleLineEdit::interface_cast(QAccessible::InterfaceType t)
+{
+ if (t == QAccessible::TextInterface)
+ return static_cast<QAccessibleTextInterface*>(this);
+ else if (t == QAccessible::EditableTextInterface)
+ return static_cast<QAccessibleEditableTextInterface*>(this);
+ return QAccessibleWidget::interface_cast(t);
+}
+ \endcode
+
+ \sa QAccessible::InterfaceType, QAccessibleTextInterface, QAccessibleEditableTextInterface, QAccessibleValueInterface, QAccessibleActionInterface, QAccessibleTableInterface, QAccessibleTableCellInterface
+ */
+
+/*! \internal */
+const char *qAccessibleRoleString(QAccessible::Role role)
+{
+ if (role >=0x40)
+ role = QAccessible::UserRole;
+ static int roleEnum = QAccessible::staticMetaObject.indexOfEnumerator("Role");
+ return QAccessible::staticMetaObject.enumerator(roleEnum).valueToKey(role);
+}
+
+/*! \internal */
+const char *qAccessibleEventString(QAccessible::Event event)
{
- Q_UNUSED(method)
- Q_UNUSED(params)
- return QVariant();
+ static int eventEnum = QAccessible::staticMetaObject.indexOfEnumerator("Event");
+ return QAccessible::staticMetaObject.enumerator(eventEnum).valueToKey(event);
}
-QVariant QAccessibleInterface::virtual_hook(const QVariant &)
+bool operator==(const QAccessible::State &first, const QAccessible::State &second)
{
- return QVariant();
+ return memcmp(&first, &second, sizeof(QAccessible::State)) == 0;
}
#ifndef QT_NO_DEBUG_STREAM
@@ -1214,14 +1245,13 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
d << "QAccessibleInterface(" << hex << (void *) iface << dec;
if (iface->isValid()) {
d << " name=" << iface->text(QAccessible::Name) << " ";
- d << "role=" << iface->role() << " ";
+ d << "role=" << qAccessibleRoleString(iface->role()) << " ";
if (iface->childCount())
d << "childc=" << iface->childCount() << " ";
if (iface->object()) {
d << "obj=" << iface->object();
}
- bool invisible = iface->state() & QAccessible::Invisible;
- if (invisible) {
+ if (iface->state().invisible) {
d << "invisible";
} else {
d << "rect=" << iface->rect();
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 6ee1885a3d..bafd3a8a6b 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -148,45 +148,78 @@ public:
AcceleratorChanged = 0x80C0
};
+ // 64 bit enums seem hard on some platforms (windows...)
+ // which makes using a bit field a sensible alternative
+ struct State {
+ // http://msdn.microsoft.com/en-us/library/ms697270.aspx
+ quint64 disabled : 1; // used to be Unavailable
+ quint64 selected : 1;
+ quint64 focusable : 1;
+ quint64 focused : 1;
+ quint64 pressed : 1;
+ quint64 checkable : 1;
+ quint64 checked : 1;
+ quint64 checkStateMixed : 1; // used to be Mixed
+ quint64 readOnly : 1;
+ quint64 hotTracked : 1;
+ quint64 defaultButton : 1;
+ quint64 expanded : 1;
+ quint64 collapsed : 1;
+ quint64 busy : 1;
+ quint64 expandable : 1;
+ quint64 marqueed : 1;
+ quint64 animated : 1;
+ quint64 invisible : 1;
+ quint64 offscreen : 1;
+ quint64 sizeable : 1;
+ quint64 movable : 1;
+ quint64 selfVoicing : 1;
+ quint64 selectable : 1;
+ quint64 linked : 1;
+ quint64 traversed : 1;
+ quint64 multiSelectable : 1;
+ quint64 extSelectable : 1;
+ quint64 passwordEdit : 1; // used to be Protected
+ quint64 hasPopup : 1;
+ quint64 modal : 1;
+
+ // IA2 - we chose to not add some IA2 states for now
+ // Below the ones that seem helpful
+ quint64 active : 1;
+ quint64 invalid : 1; // = defunct
+ quint64 editable : 1;
+ quint64 multiLine : 1;
+ quint64 selectableText : 1;
+ quint64 supportsAutoCompletion : 1;
+
+ // quint64 horizontal : 1;
+ // quint64 vertical : 1;
+ // quint64 invalidEntry : 1;
+ // quint64 managesDescendants : 1;
+ // quint64 singleLine : 1; // we have multi line, this is redundant.
+ // quint64 stale : 1;
+ // quint64 transient : 1;
+ // quint64 pinned : 1;
+
+ // Apple - see http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/
+ // quint64 playsSound : 1;
+ // quint64 summaryElement : 1;
+ // quint64 updatesFrequently : 1;
+ // quint64 adjustable : 1;
+ // more and not included here: http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/Accessibility_RoleAttribute_Ref/Attributes.html
+
+ // MSAA
+ // quint64 alertLow : 1;
+ // quint64 alertMedium : 1;
+ // quint64 alertHigh : 1;
+
+ State() {
+ qMemSet(this, 0, sizeof(State));
+ }
+ };
+
- enum StateFlag {
- Normal = 0x00000000,
- Unavailable = 0x00000001,
- Selected = 0x00000002,
- Focused = 0x00000004,
- Pressed = 0x00000008,
- Checked = 0x00000010,
- Mixed = 0x00000020,
- ReadOnly = 0x00000040,
- HotTracked = 0x00000080,
- DefaultButton = 0x00000100,
- Expanded = 0x00000200,
- Collapsed = 0x00000400,
- Busy = 0x00000800,
- // Floating = 0x00001000,
- Expandable = 0x00001000,
- Marqueed = 0x00002000,
- Animated = 0x00004000,
- Invisible = 0x00008000,
- Offscreen = 0x00010000,
- Sizeable = 0x00020000,
- Movable = 0x00040000,
- SelfVoicing = 0x00080000,
- Focusable = 0x00100000,
- Selectable = 0x00200000,
- Linked = 0x00400000,
- Traversed = 0x00800000,
- MultiSelectable = 0x01000000,
- ExtSelectable = 0x02000000,
- //AlertLow = 0x04000000,
- //AlertMedium = 0x08000000,
- //AlertHigh = 0x10000000, /* reused for HasInvokeExtension */
- Protected = 0x20000000,
- HasPopup = 0x40000000,
- Modal = 0x80000000
- };
- Q_DECLARE_FLAGS(State, StateFlag)
enum Role {
@@ -274,16 +307,7 @@ public:
enum RelationFlag {
Unrelated = 0x00000000,
Self = 0x00000001,
- Ancestor = 0x00000002,
- Child = 0x00000004,
- Descendent = 0x00000008,
- Sibling = 0x00000010,
- HierarchyMask = 0x000000ff,
-
- Up = 0x00000100,
- Down = 0x00000200,
- Left = 0x00000400,
- Right = 0x00000800,
+
Covers = 0x00001000,
Covered = 0x00002000,
GeometryMask = 0x0000ff00,
@@ -297,12 +321,6 @@ public:
};
Q_DECLARE_FLAGS(Relation, RelationFlag)
- enum Method {
- ListSupportedMethods = 0,
- SetCursorPosition = 1,
- GetCursorPosition = 2
- };
-
enum InterfaceType
{
TextInterface,
@@ -324,9 +342,9 @@ public:
static RootObjectHandler installRootObjectHandler(RootObjectHandler);
static QAccessibleInterface *queryAccessibleInterface(QObject *);
- static void updateAccessibility(QObject *, int who, Event reason);
+ static void updateAccessibility(QObject *object, int child, Event reason);
static bool isActive();
- static void setRootObject(QObject*);
+ static void setRootObject(QObject *object);
static void cleanup();
@@ -341,11 +359,9 @@ private:
QAccessible() {}
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::State)
+Q_GUI_EXPORT bool operator==(const QAccessible::State &first, const QAccessible::State &second);
+
Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::Relation)
-QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QSet<QAccessible::Method>)
-QT_BEGIN_NAMESPACE
class QAccessible2Interface;
class QAccessibleTextInterface;
@@ -369,7 +385,7 @@ public:
virtual QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
virtual QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > relations() const;
- virtual int childAt(int x, int y) const = 0;
+ virtual QAccessibleInterface *childAt(int x, int y) const = 0;
// navigation, hierarchy
virtual QAccessibleInterface *parent() const = 0;
@@ -384,16 +400,10 @@ public:
virtual QRect rect() const = 0;
virtual QAccessible::Role role() const = 0;
virtual QAccessible::State state() const = 0;
- // FIXME virtual QSet<QAccessible::State> states() const = 0;
virtual QColor foregroundColor() const;
virtual QColor backgroundColor() const;
- virtual QVariant invokeMethod(QAccessible::Method method, const QVariantList &params = QVariantList());
-
- inline QSet<QAccessible::Method> supportedMethods()
- { return qvariant_cast<QSet<QAccessible::Method> >(invokeMethod(QAccessible::ListSupportedMethods)); }
-
inline QAccessibleTextInterface *textInterface()
{ return reinterpret_cast<QAccessibleTextInterface *>(interface_cast(QAccessible::TextInterface)); }
@@ -415,30 +425,19 @@ public:
inline QAccessibleTableCellInterface *tableCellInterface()
{ return reinterpret_cast<QAccessibleTableCellInterface *>(interface_cast(QAccessible::TableCellInterface)); }
- // FIXME
- virtual QVariant virtual_hook(const QVariant &data);
+ virtual void virtual_hook(int id, void *data);
+
virtual void *interface_cast(QAccessible::InterfaceType)
{ return 0; }
private:
};
-class QAccessibleEvent : public QEvent
-{
-public:
- inline QAccessibleEvent(Type type);
- inline QString value() const { return val; }
- inline void setValue(const QString &aText) { val = aText; }
-
-private:
- QString val;
-};
-
-inline QAccessibleEvent::QAccessibleEvent(Type atype)
- : QEvent(atype) {}
-
#define QAccessibleInterface_iid "com.trolltech.Qt.QAccessibleInterface"
Q_DECLARE_INTERFACE(QAccessibleInterface, QAccessibleInterface_iid)
+Q_GUI_EXPORT const char *qAccessibleRoleString(QAccessible::Role role);
+Q_GUI_EXPORT const char *qAccessibleEventString(QAccessible::Event event);
+
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface);
#endif
diff --git a/src/gui/accessible/qaccessible2.cpp b/src/gui/accessible/qaccessible2.cpp
index d8bebdc697..0a7a8b0b6f 100644
--- a/src/gui/accessible/qaccessible2.cpp
+++ b/src/gui/accessible/qaccessible2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,8 +51,6 @@ QT_BEGIN_NAMESPACE
/*!
\namespace QAccessible2
\ingroup accessibility
- \internal
- \preliminary
\brief The QAccessible2 namespace defines constants relating to
IAccessible2-based interfaces
@@ -64,35 +62,196 @@ QT_BEGIN_NAMESPACE
\class QAccessibleTextInterface
\ingroup accessibility
- \internal
- \preliminary
- \brief The QAccessibleTextInterface class implements support for
- the IAccessibleText interface.
+ \brief The QAccessibleTextInterface class implements support for text handling.
+
+ This interface corresponds to the IAccessibleText interface.
+ It should be implemented for widgets that display more text than a plain label.
+ Labels should be represented by only \l QAccessibleInterface
+ and return their text as name (\l QAccessibleInterface::text() with \l QAccessible::Name as type).
+ The QAccessibleTextInterface is typically for text that a screen reader
+ might want to read line by line, and for widgets that support text selection and input.
+ This interface is, for example, implemented for QLineEdit.
+ Editable text objects should also implement \l QAccessibleEditableTextInterface.
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
/*!
+ \fn QAccessibleTextInterface::~QAccessibleTextInterface()
+ Destructor.
+*/
+
+/*!
+ \fn void QAccessibleTextInterface::addSelection(int startOffset, int endOffset)
+ Select the text from \a startOffset to \a endOffset.
+ The \a startOffset is the first character that will be selected.
+ The \a endOffset is the first character that will not be selected.
+
+ When the object supports multiple selections (e.g. in a word processor),
+ this adds a new selection, otherwise it replaces the previous selection.
+
+ The selection will be \a endOffset - \a startOffset characters long.
+*/
+
+/*!
+ \fn QString QAccessibleTextInterface::attributes(int offset, int *startOffset, int *endOffset) const
+*/
+
+/*!
+ \fn int QAccessibleTextInterface::cursorPosition() const
+
+ Returns the current cursor position.
+*/
+
+/*!
+ \fn QRect QAccessibleTextInterface::characterRect(int offset, QAccessible2::CoordinateType coordType) const
+*/
+
+/*!
+ \fn int QAccessibleTextInterface::selectionCount() const
+
+ Returns the number of selections in this text.
+*/
+
+/*!
+ \fn int QAccessibleTextInterface::offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType) const
+*/
+
+/*!
+ \fn void QAccessibleTextInterface::selection(int selectionIndex, int *startOffset, int *endOffset) const
+*/
+
+/*!
+ \fn QString QAccessibleTextInterface::text(int startOffset, int endOffset) const
+
+ Returns the text from \a startOffset to \a endOffset.
+ The \a startOffset is the first character that will be returned.
+ The \a endOffset is the first character that will not be returned.
+*/
+
+/*!
+ \fn QString QAccessibleTextInterface::textBeforeOffset (int offset, QAccessible2::BoundaryType boundaryType,
+ int *startOffset, int *endOffset) const
+*/
+
+/*!
+ \fn QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
+ int *startOffset, int *endOffset) const
+*/
+
+/*!
+ \fn QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
+ int *startOffset, int *endOffset) const
+*/
+
+/*!
+ \fn void QAccessibleTextInterface::removeSelection(int selectionIndex)
+
+ Clears the selection with \a index selectionIndex.
+*/
+
+/*!
+ \fn void QAccessibleTextInterface::setCursorPosition(int position)
+
+ Moves the cursor to \a position.
+*/
+
+/*!
+ \fn void QAccessibleTextInterface::setSelection(int selectionIndex, int startOffset, int endOffset)
+
+ Set the selection \a selectionIndex to the range from \a startOffset to \a endOffset.
+
+ \sa addSelection(), removeSelection()
+*/
+
+/*!
+ \fn int QAccessibleTextInterface::characterCount() const
+
+ Returns the lenght of the text (total size including spaces).
+*/
+
+/*!
+ \fn void QAccessibleTextInterface::scrollToSubstring(int startIndex, int endIndex)
+
+ Ensures that the text between \a startIndex and \a endIndex is visible.
+*/
+
+/*!
\class QAccessibleEditableTextInterface
\ingroup accessibility
- \internal
- \preliminary
- \brief The QAccessibleEditableTextInterface class implements support for
- the IAccessibleEditableText interface.
+ \brief The QAccessibleEditableTextInterface class implements support for objects with editable text.
+
+ When implementing this interface you will almost certainly also want to implement \l QAccessibleTextInterface.
+
+ Since this interface can be implemented by means of the normal \l QAccessibleTextInterface,
+ \l QAccessibleSimpleEditableTextInterface provides a convenience implementation of this interface.
+ Consider inheriting \l QAccessibleSimpleEditableTextInterface instead.
+
+ \sa QAccessibleInterface
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
/*!
+ \fn QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
+
+
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::copyText(int startOffset, int endOffset) const
+
+ Copies the text from \a startOffset to \a endOffset to the system clip board.
+ The \a startOffset is the first character that will be copied.
+ The \a endOffset is the first character that will not be copied.
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::deleteText(int startOffset, int endOffset)
+
+ Deletes the text from \a startOffset to \a endOffset.
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::insertText(int offset, const QString &text)
+
+ Inserts \a text at position \a offset.
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::cutText(int startOffset, int endOffset)
+
+ Removes the text from \a startOffset to \a endOffset and puts it in the system clip board.
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::pasteText(int offset)
+
+ Pastes text from the system clip board at the position \a offset.
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::replaceText(int startOffset, int endOffset, const QString &text)
+
+ Removes the text from \a startOffset to \a endOffset and instead inserts \a text.
+*/
+
+/*!
+ \fn void QAccessibleEditableTextInterface::setAttributes(int startOffset, int endOffset, const QString &attributes)
+
+ \sa QAccessibleTextInterface::attributes()
+*/
+
+/*!
\class QAccessibleSimpleEditableTextInterface
\ingroup accessibility
- \internal
- \preliminary
\brief The QAccessibleSimpleEditableTextInterface class is a convenience class for
- text-based widgets.
+ text-based widgets. It can be inherited instead of \l QAccessibleEditableTextInterface.
+
+ \sa QAccessibleInterface, QAccessibleEditableTextInterface
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
@@ -100,16 +259,56 @@ QT_BEGIN_NAMESPACE
/*!
\class QAccessibleValueInterface
\ingroup accessibility
- \internal
- \preliminary
- \brief The QAccessibleValueInterface class implements support for
- the IAccessibleValue interface.
+ \brief The QAccessibleValueInterface class implements support for objects that manipulate a value.
+
+ This interface should be implemented by accessible objects that represent a value.
+ Examples are spinner, slider, dial and scroll bar.
+
+ Instead of forcing the user to deal with the individual parts of the widgets, this interface
+ gives an easier approach to the kind of widget it represents.
+
+ Usually this interface is implemented by classes that also implement \l QAccessibleInterface.
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
/*!
+ \fn QAccessibleValueInterface::~QAccessibleValueInterface()
+ Destructor.
+*/
+
+/*!
+ \fn QVariant QAccessibleValueInterface::currentValue() const
+
+ Returns the current value of the widget. This is usually a double or int.
+ \sa setCurrentValue()
+*/
+
+/*!
+ \fn void QAccessibleValueInterface::setCurrentValue(const QVariant &value)
+
+ Sets the \a value. If the desired \a value is out of the range of permissible values,
+ this call will be ignored.
+
+ \sa currentValue(), minimumValue(), maximumValue()
+*/
+
+/*!
+ \fn QVariant QAccessibleValueInterface::maximumValue() const
+
+ Returns the maximum value this object accepts.
+ \sa minimumValue(), currentValue()
+*/
+
+/*!
+ \fn QVariant QAccessibleValueInterface::minimumValue() const
+
+ Returns the minimum value this object accepts.
+ \sa maximumValue(), currentValue()
+*/
+
+/*!
\class QAccessibleImageInterface
\ingroup accessibility
\internal
@@ -122,27 +321,62 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \class QAccessibleTableCellInterface
+ \ingroup accessibility
+
+ \brief The QAccessibleTableCellInterface class implements support for
+ the IAccessibleTable2 Cell interface.
+
+ \link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
+*/
+
+/*!
+ \class QAccessibleTableInterface
+ \ingroup accessibility
+
+ \brief The QAccessibleTableInterface class implements support for
+ the IAccessibleTable2 interface.
+
+ \link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
+*/
+
+
+/*!
\class QAccessibleActionInterface
\ingroup accessibility
- \internal
- \preliminary
\brief The QAccessibleActionInterface class implements support for
invocable actions in the interface.
- Each accessible should implement the action interface if it supports any actions.
- The supported actions should adhere to the naming scheme inside the QAccessible2 namespace.
- Custom actions can be added.
+ Accessible objects should implement the action interface if they support user interaction.
+ Usually this interface is implemented by classes that also implement \l QAccessibleInterface.
+
+ The supported actions should use the predefined actions offered in this class unless they do not
+ fit a predefined action. In that case a custom action can be added.
When subclassing QAccessibleActionInterface you need to provide a list of actionNames which
is the primary means to discover the available actions. Action names are never localized.
In order to present actions to the user there are two functions that need to return localized versions
- of the name and give a description of the action.
-
- In order to invoke the action, doAction is called with an action name.
-
- Most widgets will simply implement the PressAction. This is what happens when the widget is activated by
- being clicked on, space pressed or similar.
+ of the name and give a description of the action. For the predefined action names use
+ \l QAccessibleActionInterface::localizedActionName() and \l QAccessibleActionInterface::localizedActionDescription()
+ to return their localized counterparts.
+
+ In general you should use one of the predefined action names, unless describing an action that does not fit these:
+ \table
+ \header \o Action name \o Description
+ \row \o \l checkAction() \o checks the item (checkbox, radio button, ...)
+ \row \o \l decreaseAction() \o decrease the value of the accessible (e.g. spinbox)
+ \row \o \l increaseAction() \o increase the value of the accessible (e.g. spinbox)
+ \row \o \l pressAction() \o press or click or activate the accessible (should correspont to clicking the object with the mouse)
+ \row \o \l setFocusAction() \o set the focus to this accessible
+ \row \o \l showMenuAction() \o show a context menu, corresponds to right-clicks
+ \row \o \l uncheckAction() \o uncheck the item (checkbox, radio button, ...)
+ \endtable
+
+ In order to invoke the action, \l doAction() is called with an action name.
+
+ Most widgets will simply implement \l pressAction(). This is what happens when the widget is activated by
+ being clicked, space pressed or similar.
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
@@ -150,42 +384,52 @@ QT_BEGIN_NAMESPACE
/*!
\fn QStringList QAccessibleActionInterface::actionNames() const
- Returns a list of valid actions. The actions returned should be in preferred order,
+ Returns the list of actions supported by this accessible object.
+ The actions returned should be in preferred order,
i.e. the action that the user most likely wants to trigger should be returned first,
while the least likely action should be returned last.
- The list does only contain actions that *can* be invoked. Therefore it,
- won't return disabled actions, or actions associated with disabled UI
- controls.
+ The list does only contain actions that can be invoked.
+ It won't return disabled actions, or actions associated with disabled UI controls.
- The list can also be empty.
+ The list can be empty.
- \sa localizedActionName(), doAction()
+ Note that this list is not localized. For a localized representation re-implement \l localizedActionName()
+ and \l localizedActionDescription()
+
+ \sa doAction(), localizedActionName(), localizedActionDescription()
*/
/*!
- \fn QString QAccessibleActionInterface::localizedActionName(const QString &name) const
+ \fn QString QAccessibleActionInterface::localizedActionName(const QString &actionName) const
+
+ Returns a localized action name of \a actionName.
- Returns a localized action name of \a name.
+ For custom actions this function has to be re-implemented.
+ When using one of the default names, you can call this function in QAccessibleActionInterface
+ to get the localized string.
\sa actionNames(), localizedActionDescription()
*/
/*!
- \fn QString QAccessibleActionInterface::localizedActionDescription(const QString &name) const
+ \fn QString QAccessibleActionInterface::localizedActionDescription(const QString &actionName) const
- Returns a localized action description of \a name.
+ Returns a localized action description of the action \a actionName.
- This is what should be presented to the user. The actionNames should always
- be untranslated to make them consistent for screen readers.
+ When using one of the default names, you can call this function in QAccessibleActionInterface
+ to get the localized string.
\sa actionNames(), localizedActionName()
*/
/*!
- \fn void QAccessibleActionInterface::doAction(const QString &actionName) const
+ \fn void QAccessibleActionInterface::doAction(const QString &actionName)
- Invokes the action specified by \a actionName
+ Invokes the action specified by \a actionName.
+ Note that \a actionName is the non-localized name as returned by \l actionNames()
+ This function is usually implemented by calling the same functions
+ that other user interaction, such as clicking the object, would trigger.
\sa actionNames()
*/
@@ -193,11 +437,14 @@ QT_BEGIN_NAMESPACE
/*!
\fn QStringList QAccessibleActionInterface::keyBindingsForAction(const QString &actionName) const
- Returns a list of the keyboard shortcuts available for invoking the action named \a actionName
+ Returns a list of the keyboard shortcuts available for invoking the action named \a actionName.
+
+ This is important to let users learn alternative ways of using the application by emphasizing the keyboard.
\sa actionNames()
*/
+
struct QAccessibleActionStrings
{
QAccessibleActionStrings() :
@@ -246,36 +493,64 @@ QString QAccessibleActionInterface::localizedActionDescription(const QString &ac
return QString();
}
+/*!
+ Returns the name of the press default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::pressAction()
{
return accessibleActionStrings()->pressAction;
}
+/*!
+ Returns the name of the increase default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::increaseAction()
{
return accessibleActionStrings()->increaseAction;
}
+/*!
+ Returns the name of the decrease default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::decreaseAction()
{
return accessibleActionStrings()->decreaseAction;
}
+/*!
+ Returns the name of the show menu default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::showMenuAction()
{
return accessibleActionStrings()->showMenuAction;
}
+/*!
+ Returns the name of the set focus default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::setFocusAction()
{
return accessibleActionStrings()->setFocusAction;
}
+/*!
+ Returns the name of the check default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::checkAction()
{
return accessibleActionStrings()->checkAction;
}
+/*!
+ Returns the name of the uncheck default action.
+ \sa actionNames(), localizedActionName()
+ */
const QString &QAccessibleActionInterface::uncheckAction()
{
return accessibleActionStrings()->uncheckAction;
@@ -405,7 +680,8 @@ static QString textForRange(QAccessibleInterface *iface, int startOffset, int en
}
#endif
-void QAccessibleSimpleEditableTextInterface::copyText(int startOffset, int endOffset)
+/*! \reimp */
+void QAccessibleSimpleEditableTextInterface::copyText(int startOffset, int endOffset) const
{
#ifdef QT_NO_CLIPBOARD
Q_UNUSED(startOffset);
@@ -415,6 +691,7 @@ void QAccessibleSimpleEditableTextInterface::copyText(int startOffset, int endOf
#endif
}
+/*! \reimp */
void QAccessibleSimpleEditableTextInterface::deleteText(int startOffset, int endOffset)
{
QString txt = iface->text(QAccessible::Value);
@@ -422,6 +699,7 @@ void QAccessibleSimpleEditableTextInterface::deleteText(int startOffset, int end
iface->setText(QAccessible::Value, txt);
}
+/*! \reimp */
void QAccessibleSimpleEditableTextInterface::insertText(int offset, const QString &text)
{
QString txt = iface->text(QAccessible::Value);
@@ -429,6 +707,7 @@ void QAccessibleSimpleEditableTextInterface::insertText(int offset, const QStrin
iface->setText(QAccessible::Value, txt);
}
+/*! \reimp */
void QAccessibleSimpleEditableTextInterface::cutText(int startOffset, int endOffset)
{
#ifdef QT_NO_CLIPBOARD
@@ -441,6 +720,7 @@ void QAccessibleSimpleEditableTextInterface::cutText(int startOffset, int endOff
#endif
}
+/*! \reimp */
void QAccessibleSimpleEditableTextInterface::pasteText(int offset)
{
#ifdef QT_NO_CLIPBOARD
@@ -452,6 +732,7 @@ void QAccessibleSimpleEditableTextInterface::pasteText(int offset)
#endif
}
+/*! \reimp */
void QAccessibleSimpleEditableTextInterface::replaceText(int startOffset, int endOffset, const QString &text)
{
QString txt = iface->text(QAccessible::Value);
diff --git a/src/gui/accessible/qaccessible2.h b/src/gui/accessible/qaccessible2.h
index 93db869364..0b1ddc99b1 100644
--- a/src/gui/accessible/qaccessible2.h
+++ b/src/gui/accessible/qaccessible2.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -97,23 +97,23 @@ public:
virtual ~QAccessibleTextInterface() {}
virtual void addSelection(int startOffset, int endOffset) = 0;
- virtual QString attributes(int offset, int *startOffset, int *endOffset) = 0;
- virtual int cursorPosition() = 0;
- virtual QRect characterRect(int offset, QAccessible2::CoordinateType coordType) = 0;
- virtual int selectionCount() = 0;
- virtual int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType) = 0;
- virtual void selection(int selectionIndex, int *startOffset, int *endOffset) = 0;
- virtual QString text(int startOffset, int endOffset) = 0;
+ virtual QString attributes(int offset, int *startOffset, int *endOffset) const = 0;
+ virtual int cursorPosition() const = 0;
+ virtual QRect characterRect(int offset, QAccessible2::CoordinateType coordType) const = 0;
+ virtual int selectionCount() const = 0;
+ virtual int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType) const = 0;
+ virtual void selection(int selectionIndex, int *startOffset, int *endOffset) const = 0;
+ virtual QString text(int startOffset, int endOffset) const = 0;
virtual QString textBeforeOffset (int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset) = 0;
+ int *startOffset, int *endOffset) const = 0;
virtual QString textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset) = 0;
+ int *startOffset, int *endOffset) const = 0;
virtual QString textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset) = 0;
+ int *startOffset, int *endOffset) const = 0;
virtual void removeSelection(int selectionIndex) = 0;
virtual void setCursorPosition(int position) = 0;
virtual void setSelection(int selectionIndex, int startOffset, int endOffset) = 0;
- virtual int characterCount() = 0;
+ virtual int characterCount() const = 0;
virtual void scrollToSubstring(int startIndex, int endIndex) = 0;
};
@@ -122,7 +122,7 @@ class Q_GUI_EXPORT QAccessibleEditableTextInterface
public:
virtual ~QAccessibleEditableTextInterface() {}
- virtual void copyText(int startOffset, int endOffset) = 0;
+ virtual void copyText(int startOffset, int endOffset) const = 0;
virtual void deleteText(int startOffset, int endOffset) = 0;
virtual void insertText(int offset, const QString &text) = 0;
virtual void cutText(int startOffset, int endOffset) = 0;
@@ -136,7 +136,7 @@ class Q_GUI_EXPORT QAccessibleSimpleEditableTextInterface: public QAccessibleEdi
public:
QAccessibleSimpleEditableTextInterface(QAccessibleInterface *accessibleInterface); //###
- void copyText(int startOffset, int endOffset);
+ void copyText(int startOffset, int endOffset) const;
void deleteText(int startOffset, int endOffset);
void insertText(int offset, const QString &text);
void cutText(int startOffset, int endOffset);
@@ -154,15 +154,17 @@ public:
virtual ~QAccessibleValueInterface() {}
- virtual QVariant currentValue() = 0;
+ virtual QVariant currentValue() const = 0;
virtual void setCurrentValue(const QVariant &value) = 0;
- virtual QVariant maximumValue() = 0;
- virtual QVariant minimumValue() = 0;
+ virtual QVariant maximumValue() const = 0;
+ virtual QVariant minimumValue() const = 0;
};
class Q_GUI_EXPORT QAccessibleTableCellInterface
{
public:
+ virtual ~QAccessibleTableCellInterface() {}
+
// Returns the number of columns occupied by this cell accessible.
virtual int columnExtent() const = 0;
@@ -189,6 +191,7 @@ public:
class Q_GUI_EXPORT QAccessibleTableInterface
{
public:
+ virtual ~QAccessibleTableInterface() {}
// Returns the cell at the specified row and column in the table.
virtual QAccessibleInterface *cellAt (int row, int column) const = 0;
@@ -249,6 +252,7 @@ class Q_GUI_EXPORT QAccessibleActionInterface
{
Q_DECLARE_TR_FUNCTIONS(QAccessibleActionInterface)
public:
+ virtual ~QAccessibleActionInterface() {}
virtual QStringList actionNames() const = 0;
virtual QString localizedActionName(const QString &name) const;
@@ -268,10 +272,11 @@ public:
class Q_GUI_EXPORT QAccessibleImageInterface
{
public:
+ virtual ~QAccessibleImageInterface() {}
- virtual QString imageDescription() = 0;
- virtual QSize imageSize() = 0;
- virtual QRect imagePosition(QAccessible2::CoordinateType coordType) = 0;
+ virtual QString imageDescription() const = 0;
+ virtual QSize imageSize() const = 0;
+ virtual QRect imagePosition(QAccessible2::CoordinateType coordType) const = 0;
};
#endif // QT_NO_ACCESSIBILITY
diff --git a/src/gui/accessible/qaccessible_mac.mm b/src/gui/accessible/qaccessible_mac.mm
deleted file mode 100644
index a250730493..0000000000
--- a/src/gui/accessible/qaccessible_mac.mm
+++ /dev/null
@@ -1,2469 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qaccessible.h"
-
-#ifndef QT_NO_ACCESSIBILITY
-#include "qaccessible_mac_p.h"
-#include "qhash.h"
-#include "qset.h"
-#include "qpointer.h"
-#include "qapplication.h"
-#include "qmainwindow.h"
-#include "qtextdocument.h"
-#include "qdebug.h"
-#include "qabstractslider.h"
-#include "qsplitter.h"
-#include "qtabwidget.h"
-#include "qlistview.h"
-#include "qtableview.h"
-#include "qdockwidget.h"
-
-#include <private/qt_mac_p.h>
-#include <private/qwidget_p.h>
-#include <CoreFoundation/CoreFoundation.h>
-
-QT_BEGIN_NAMESPACE
-
-/*
- Set up platform defines. There is a one-to-one correspondence between the
- Carbon and Cocoa roles and attributes, but the prefix and type changes.
-*/
-#ifdef QT_MAC_USE_COCOA
-typedef NSString * const QAXRoleType;
-#define QAXApplicationRole NSAccessibilityApplicationRole
-#define QAXButtonRole NSAccessibilityButtonRole
-#define QAXCancelAction NSAccessibilityCancelAction
-#define QAXCheckBoxRole NSAccessibilityCheckBoxRole
-#define QAXChildrenAttribute NSAccessibilityChildrenAttribute
-#define QAXCloseButtonAttribute NSAccessibilityCloseButtonAttribute
-#define QAXCloseButtonAttribute NSAccessibilityCloseButtonAttribute
-#define QAXColumnRole NSAccessibilityColumnRole
-#define QAXConfirmAction NSAccessibilityConfirmAction
-#define QAXContentsAttribute NSAccessibilityContentsAttribute
-#define QAXDecrementAction NSAccessibilityDecrementAction
-#define QAXDecrementArrowSubrole NSAccessibilityDecrementArrowSubrole
-#define QAXDecrementPageSubrole NSAccessibilityDecrementPageSubrole
-#define QAXDescriptionAttribute NSAccessibilityDescriptionAttribute
-#define QAXEnabledAttribute NSAccessibilityEnabledAttribute
-#define QAXExpandedAttribute NSAccessibilityExpandedAttribute
-#define QAXFocusedAttribute NSAccessibilityFocusedAttribute
-#define QAXFocusedUIElementChangedNotification NSAccessibilityFocusedUIElementChangedNotification
-#define QAXFocusedWindowChangedNotification NSAccessibilityFocusedWindowChangedNotification
-#define QAXGroupRole NSAccessibilityGroupRole
-#define QAXGrowAreaAttribute NSAccessibilityGrowAreaAttribute
-#define QAXGrowAreaRole NSAccessibilityGrowAreaRole
-#define QAXHelpAttribute NSAccessibilityHelpAttribute
-#define QAXHorizontalOrientationValue NSAccessibilityHorizontalOrientationValue
-#define QAXHorizontalScrollBarAttribute NSAccessibilityHorizontalScrollBarAttribute
-#define QAXIncrementAction NSAccessibilityIncrementAction
-#define QAXIncrementArrowSubrole NSAccessibilityIncrementArrowSubrole
-#define QAXIncrementPageSubrole NSAccessibilityIncrementPageSubrole
-#define QAXIncrementorRole NSAccessibilityIncrementorRole
-#define QAXLinkedUIElementsAttribute NSAccessibilityLinkedUIElementsAttribute
-#define QAXListRole NSAccessibilityListRole
-#define QAXMainAttribute NSAccessibilityMainAttribute
-#define QAXMaxValueAttribute NSAccessibilityMaxValueAttribute
-#define QAXMenuBarRole NSAccessibilityMenuBarRole
-#define QAXMenuButtonRole NSAccessibilityMenuButtonRole
-#define QAXMenuClosedNotification NSAccessibilityMenuClosedNotification
-#define QAXMenuItemRole NSAccessibilityMenuItemRole
-#define QAXMenuOpenedNotification NSAccessibilityMenuOpenedNotification
-#define QAXMenuRole NSAccessibilityMenuRole
-#define QAXMinValueAttribute NSAccessibilityMinValueAttribute
-#define QAXMinimizeButtonAttribute NSAccessibilityMinimizeButtonAttribute
-#define QAXMinimizedAttribute NSAccessibilityMinimizedAttribute
-#define QAXNextContentsAttribute NSAccessibilityNextContentsAttribute
-#define QAXOrientationAttribute NSAccessibilityOrientationAttribute
-#define QAXParentAttribute NSAccessibilityParentAttribute
-#define QAXPickAction NSAccessibilityPickAction
-#define QAXPopUpButtonRole NSAccessibilityPopUpButtonRole
-#define QAXPositionAttribute NSAccessibilityPositionAttribute
-#define QAXPressAction NSAccessibilityPressAction
-#define QAXPreviousContentsAttribute NSAccessibilityPreviousContentsAttribute
-#define QAXProgressIndicatorRole NSAccessibilityProgressIndicatorRole
-#define QAXRadioButtonRole NSAccessibilityRadioButtonRole
-#define QAXRoleAttribute NSAccessibilityRoleAttribute
-#define QAXRoleDescriptionAttribute NSAccessibilityRoleDescriptionAttribute
-#define QAXRowRole NSAccessibilityRowRole
-#define QAXRowsAttribute NSAccessibilityRowsAttribute
-#define QAXScrollAreaRole NSAccessibilityScrollAreaRole
-#define QAXScrollBarRole NSAccessibilityScrollBarRole
-#define QAXSelectedAttribute NSAccessibilitySelectedAttribute
-#define QAXSelectedChildrenAttribute NSAccessibilitySelectedChildrenAttribute
-#define QAXSelectedRowsAttribute NSAccessibilitySelectedRowsAttribute
-#define QAXSizeAttribute NSAccessibilitySizeAttribute
-#define QAXSliderRole NSAccessibilitySliderRole
-#define QAXSplitGroupRole NSAccessibilitySplitGroupRole
-#define QAXSplitterRole NSAccessibilitySplitterRole
-#define QAXSplittersAttribute NSAccessibilitySplittersAttribute
-#define QAXStaticTextRole NSAccessibilityStaticTextRole
-#define QAXSubroleAttribute NSAccessibilitySubroleAttribute
-#define QAXSubroleAttribute NSAccessibilitySubroleAttribute
-#define QAXTabGroupRole NSAccessibilityTabGroupRole
-#define QAXTableRole NSAccessibilityTableRole
-#define QAXTabsAttribute NSAccessibilityTabsAttribute
-#define QAXTextFieldRole NSAccessibilityTextFieldRole
-#define QAXTitleAttribute NSAccessibilityTitleAttribute
-#define QAXTitleUIElementAttribute NSAccessibilityTitleUIElementAttribute
-#define QAXToolbarButtonAttribute NSAccessibilityToolbarButtonAttribute
-#define QAXToolbarRole NSAccessibilityToolbarRole
-#define QAXTopLevelUIElementAttribute NSAccessibilityTopLevelUIElementAttribute
-#define QAXUnknownRole NSAccessibilityUnknownRole
-#define QAXValueAttribute NSAccessibilityValueAttribute
-#define QAXValueChangedNotification NSAccessibilityValueChangedNotification
-#define QAXValueIndicatorRole NSAccessibilityValueIndicatorRole
-#define QAXVerticalOrientationValue NSAccessibilityVerticalOrientationValue
-#define QAXVerticalScrollBarAttribute NSAccessibilityVerticalScrollBarAttribute
-#define QAXVisibleRowsAttribute NSAccessibilityVisibleRowsAttribute
-#define QAXWindowAttribute NSAccessibilityWindowAttribute
-#define QAXWindowCreatedNotification NSAccessibilityWindowCreatedNotification
-#define QAXWindowMovedNotification NSAccessibilityWindowMovedNotification
-#define QAXWindowRole NSAccessibilityWindowRole
-#define QAXZoomButtonAttribute NSAccessibilityZoomButtonAttribute
-#else
-typedef CFStringRef const QAXRoleType;
-#define QAXApplicationRole kAXApplicationRole
-#define QAXButtonRole kAXButtonRole
-#define QAXCancelAction kAXCancelAction
-#define QAXCheckBoxRole kAXCheckBoxRole
-#define QAXChildrenAttribute kAXChildrenAttribute
-#define QAXCloseButtonAttribute kAXCloseButtonAttribute
-#define QAXColumnRole kAXColumnRole
-#define QAXConfirmAction kAXConfirmAction
-#define QAXContentsAttribute kAXContentsAttribute
-#define QAXDecrementAction kAXDecrementAction
-#define QAXDecrementArrowSubrole kAXDecrementArrowSubrole
-#define QAXDecrementPageSubrole kAXDecrementPageSubrole
-#define QAXDescriptionAttribute kAXDescriptionAttribute
-#define QAXEnabledAttribute kAXEnabledAttribute
-#define QAXExpandedAttribute kAXExpandedAttribute
-#define QAXFocusedAttribute kAXFocusedAttribute
-#define QAXFocusedUIElementChangedNotification kAXFocusedUIElementChangedNotification
-#define QAXFocusedWindowChangedNotification kAXFocusedWindowChangedNotification
-#define QAXGroupRole kAXGroupRole
-#define QAXGrowAreaAttribute kAXGrowAreaAttribute
-#define QAXGrowAreaRole kAXGrowAreaRole
-#define QAXHelpAttribute kAXHelpAttribute
-#define QAXHorizontalOrientationValue kAXHorizontalOrientationValue
-#define QAXHorizontalScrollBarAttribute kAXHorizontalScrollBarAttribute
-#define QAXIncrementAction kAXIncrementAction
-#define QAXIncrementArrowSubrole kAXIncrementArrowSubrole
-#define QAXIncrementPageSubrole kAXIncrementPageSubrole
-#define QAXIncrementorRole kAXIncrementorRole
-#define QAXLinkedUIElementsAttribute kAXLinkedUIElementsAttribute
-#define QAXListRole kAXListRole
-#define QAXMainAttribute kAXMainAttribute
-#define QAXMaxValueAttribute kAXMaxValueAttribute
-#define QAXMenuBarRole kAXMenuBarRole
-#define QAXMenuButtonRole kAXMenuButtonRole
-#define QAXMenuClosedNotification kAXMenuClosedNotification
-#define QAXMenuItemRole kAXMenuItemRole
-#define QAXMenuOpenedNotification kAXMenuOpenedNotification
-#define QAXMenuRole kAXMenuRole
-#define QAXMinValueAttribute kAXMinValueAttribute
-#define QAXMinimizeButtonAttribute kAXMinimizeButtonAttribute
-#define QAXMinimizedAttribute kAXMinimizedAttribute
-#define QAXNextContentsAttribute kAXNextContentsAttribute
-#define QAXOrientationAttribute kAXOrientationAttribute
-#define QAXParentAttribute kAXParentAttribute
-#define QAXPickAction kAXPickAction
-#define QAXPopUpButtonRole kAXPopUpButtonRole
-#define QAXPositionAttribute kAXPositionAttribute
-#define QAXPressAction kAXPressAction
-#define QAXPreviousContentsAttribute kAXPreviousContentsAttribute
-#define QAXProgressIndicatorRole kAXProgressIndicatorRole
-#define QAXRadioButtonRole kAXRadioButtonRole
-#define QAXRoleAttribute kAXRoleAttribute
-#define QAXRoleDescriptionAttribute kAXRoleDescriptionAttribute
-#define QAXRowRole kAXRowRole
-#define QAXRowsAttribute kAXRowsAttribute
-#define QAXScrollAreaRole kAXScrollAreaRole
-#define QAXScrollBarRole kAXScrollBarRole
-#define QAXSelectedAttribute kAXSelectedAttribute
-#define QAXSelectedChildrenAttribute kAXSelectedChildrenAttribute
-#define QAXSelectedRowsAttribute kAXSelectedRowsAttribute
-#define QAXSizeAttribute kAXSizeAttribute
-#define QAXSliderRole kAXSliderRole
-#define QAXSplitGroupRole kAXSplitGroupRole
-#define QAXSplitterRole kAXSplitterRole
-#define QAXSplittersAttribute kAXSplittersAttribute
-#define QAXStaticTextRole kAXStaticTextRole
-#define QAXSubroleAttribute kAXSubroleAttribute
-#define QAXTabGroupRole kAXTabGroupRole
-#define QAXTableRole kAXTableRole
-#define QAXTabsAttribute kAXTabsAttribute
-#define QAXTextFieldRole kAXTextFieldRole
-#define QAXTitleAttribute kAXTitleAttribute
-#define QAXTitleUIElementAttribute kAXTitleUIElementAttribute
-#define QAXToolbarButtonAttribute kAXToolbarButtonAttribute
-#define QAXToolbarRole kAXToolbarRole
-#define QAXTopLevelUIElementAttribute kAXTopLevelUIElementAttribute
-#define QAXUnknownRole kAXUnknownRole
-#define QAXValueAttribute kAXValueAttribute
-#define QAXValueChangedNotification kAXValueChangedNotification
-#define QAXValueIndicatorRole kAXValueIndicatorRole
-#define QAXVerticalOrientationValue kAXVerticalOrientationValue
-#define QAXVerticalScrollBarAttribute kAXVerticalScrollBarAttribute
-#define QAXVisibleRowsAttribute kAXVisibleRowsAttribute
-#define QAXWindowAttribute kAXWindowAttribute
-#define QAXWindowCreatedNotification kAXWindowCreatedNotification
-#define QAXWindowMovedNotification kAXWindowMovedNotification
-#define QAXWindowRole kAXWindowRole
-#define QAXZoomButtonAttribute kAXZoomButtonAttribute
-#endif
-
-
-/*****************************************************************************
- Externals
- *****************************************************************************/
-extern bool qt_mac_is_macsheet(const QWidget *w); //qwidget_mac.cpp
-extern bool qt_mac_is_macdrawer(const QWidget *w); //qwidget_mac.cpp
-
-/*****************************************************************************
- QAccessible Bindings
- *****************************************************************************/
-//hardcoded bindings between control info and (known) QWidgets
-struct QAccessibleTextBinding {
- int qt;
- QAXRoleType mac;
- bool settable;
-} text_bindings[][10] = {
- { { QAccessible::MenuItem, QAXMenuItemRole, false },
- { -1, 0, false }
- },
- { { QAccessible::MenuBar, QAXMenuBarRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ScrollBar, QAXScrollBarRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Grip, QAXGrowAreaRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Window, QAXWindowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Dialog, QAXWindowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::AlertMessage, QAXWindowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ToolTip, QAXWindowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::HelpBalloon, QAXWindowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::PopupMenu, QAXMenuRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Application, QAXApplicationRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Pane, QAXGroupRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Grouping, QAXGroupRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Separator, QAXSplitterRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ToolBar, QAXToolbarRole, false },
- { -1, 0, false }
- },
- { { QAccessible::PageTab, QAXRadioButtonRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ButtonMenu, QAXMenuButtonRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ButtonDropDown, QAXPopUpButtonRole, false },
- { -1, 0, false }
- },
- { { QAccessible::SpinBox, QAXIncrementorRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Slider, QAXSliderRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ProgressBar, QAXProgressIndicatorRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ComboBox, QAXPopUpButtonRole, false },
- { -1, 0, false }
- },
- { { QAccessible::RadioButton, QAXRadioButtonRole, false },
- { -1, 0, false }
- },
- { { QAccessible::CheckBox, QAXCheckBoxRole, false },
- { -1, 0, false }
- },
- { { QAccessible::StaticText, QAXStaticTextRole, false },
- { QAccessible::Name, QAXValueAttribute, false },
- { -1, 0, false }
- },
- { { QAccessible::Table, QAXTableRole, false },
- { -1, 0, false }
- },
- { { QAccessible::StatusBar, QAXStaticTextRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Column, QAXColumnRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ColumnHeader, QAXColumnRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Row, QAXRowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::RowHeader, QAXRowRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Cell, QAXTextFieldRole, false },
- { -1, 0, false }
- },
- { { QAccessible::PushButton, QAXButtonRole, false },
- { -1, 0, false }
- },
- { { QAccessible::EditableText, QAXTextFieldRole, true },
- { -1, 0, false }
- },
- { { QAccessible::Link, QAXTextFieldRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Indicator, QAXValueIndicatorRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Splitter, QAXSplitGroupRole, false },
- { -1, 0, false }
- },
- { { QAccessible::List, QAXListRole, false },
- { -1, 0, false }
- },
- { { QAccessible::ListItem, QAXStaticTextRole, false },
- { -1, 0, false }
- },
- { { QAccessible::Cell, QAXStaticTextRole, false },
- { -1, 0, false }
- },
- { { -1, 0, false } }
-};
-
-class QAInterface;
-static CFStringRef macRole(const QAInterface &interface);
-
-QDebug operator<<(QDebug debug, const QAInterface &interface)
-{
- if (interface.isValid() == false)
- debug << "invalid interface";
- else
- debug << interface.object() << "id" << interface.id() << "role" << hex << interface.role();
- return debug;
-}
-
-// The root of the Qt accessible hiearchy.
-static QObject *rootObject = 0;
-
-
-bool QAInterface::operator==(const QAInterface &other) const
-{
- if (isValid() == false || other.isValid() == false)
- return (isValid() && other.isValid());
-
- // walk up the parent chain, comparing child indexes, until we reach
- // an interface that has a QObject.
- QAInterface currentThis = *this;
- QAInterface currentOther = other;
-
- while (currentThis.object() == 0) {
- if (currentOther.object() != 0)
- return false;
-
- // fail if the child indexes in the two hirearchies don't match.
- if (currentThis.parent().indexOfChild(currentThis) !=
- currentOther.parent().indexOfChild(currentOther))
- return false;
-
- currentThis = currentThis.parent();
- currentOther = currentOther.parent();
- }
-
- return (currentThis.object() == currentOther.object() && currentThis.id() == currentOther.id());
-}
-
-bool QAInterface::operator!=(const QAInterface &other) const
-{
- return !operator==(other);
-}
-
-uint qHash(const QAInterface &item)
-{
- if (item.isValid())
- return qHash(item.object()) + qHash(item.id());
- else
- return qHash(item.cachedObject()) + qHash(item.id());
-}
-
-QAInterface QAInterface::navigate(RelationFlag relation, int entry) const
-{
- if (!checkValid())
- return QAInterface();
-
- // On a QAccessibleInterface that handles its own children we can short-circut
- // the navigation if this QAInterface refers to one of the children:
- if (child != 0) {
- // The Ancestor interface will always be the same QAccessibleInterface with
- // a child value of 0.
- if (relation == QAccessible::Ancestor)
- return QAInterface(*this, 0);
-
- // The child hiearchy is only one level deep, so navigating to a child
- // of a child is not possible.
- if (relation == QAccessible::Child) {
- return QAInterface();
- }
- }
- QAccessibleInterface *child_iface = 0;
-
- const int status = base.interface->navigate(relation, entry, &child_iface);
-
- if (status == -1)
- return QAInterface(); // not found;
-
- // Check if target is a child of this interface.
- if (!child_iface) {
- return QAInterface(*this, status);
- } else {
- // Target is child_iface or a child of that (status decides).
- return QAInterface(child_iface, status);
- }
-}
-
-QAElement::QAElement()
-:elementRef(0)
-{}
-
-QAElement::QAElement(AXUIElementRef elementRef)
-:elementRef(elementRef)
-{
- if (elementRef != 0) {
- CFRetain(elementRef);
- CFRetain(object());
- }
-}
-
-QAElement::QAElement(const QAElement &element)
-:elementRef(element.elementRef)
-{
- if (elementRef != 0) {
- CFRetain(elementRef);
- CFRetain(object());
- }
-}
-
-QAElement::QAElement(HIObjectRef object, int child)
-{
-#ifndef QT_MAC_USE_COCOA
- if (object == 0) {
- elementRef = 0; // Create invalid QAElement.
- } else {
- elementRef = AXUIElementCreateWithHIObjectAndIdentifier(object, child);
- CFRetain(object);
- }
-#else
- Q_UNUSED(object);
- Q_UNUSED(child);
-#endif
-}
-
-QAElement::~QAElement()
-{
- if (elementRef != 0) {
- CFRelease(object());
- CFRelease(elementRef);
- }
-}
-
-void QAElement::operator=(const QAElement &other)
-{
- if (*this == other)
- return;
-
- if (elementRef != 0) {
- CFRelease(object());
- CFRelease(elementRef);
- }
-
- elementRef = other.elementRef;
-
- if (elementRef != 0) {
- CFRetain(elementRef);
- CFRetain(object());
- }
-}
-
-bool QAElement::operator==(const QAElement &other) const
-{
- if (elementRef == 0 || other.elementRef == 0)
- return (elementRef == other.elementRef);
-
- return CFEqual(elementRef, other.elementRef);
-}
-
-uint qHash(QAElement element)
-{
- return qHash(element.object()) + qHash(element.id());
-}
-
-#ifndef QT_MAC_USE_COCOA
-static QInterfaceFactory *createFactory(const QAInterface &interface);
-#endif
-Q_GLOBAL_STATIC(QAccessibleHierarchyManager, accessibleHierarchyManager);
-
-/*
- Reomves all accessibility info accosiated with the sender object.
-*/
-void QAccessibleHierarchyManager::objectDestroyed(QObject *object)
-{
- HIObjectRef hiObject = qobjectHiobjectHash.value(object);
- delete qobjectElementHash.value(object);
- qobjectElementHash.remove(object);
- hiobjectInterfaceHash.remove(hiObject);
-}
-
-/*
- Removes all stored items.
-*/
-void QAccessibleHierarchyManager::reset()
-{
- qDeleteAll(qobjectElementHash);
- qobjectElementHash.clear();
- hiobjectInterfaceHash.clear();
- qobjectHiobjectHash.clear();
-}
-
-QAccessibleHierarchyManager *QAccessibleHierarchyManager::instance()
-{
- return accessibleHierarchyManager();
-}
-
-#ifndef QT_MAC_USE_COCOA
-static bool isItemView(const QAInterface &interface)
-{
- QObject *object = interface.object();
- return (interface.role() == QAccessible::List || interface.role() == QAccessible::Table
- || (object && qobject_cast<QAbstractItemView *>(interface.object()))
- || (object && object->objectName() == QLatin1String("qt_scrollarea_viewport")
- && qobject_cast<QAbstractItemView *>(object->parent())));
-}
-#endif
-
-static bool isTabWidget(const QAInterface &interface)
-{
- if (QObject *object = interface.object())
- return (object->inherits("QTabWidget") && interface.id() == 0);
- return false;
-}
-
-static bool isStandaloneTabBar(const QAInterface &interface)
-{
- QObject *object = interface.object();
- if (interface.role() == QAccessible::PageTabList && object)
- return (qobject_cast<QTabWidget *>(object->parent()) == 0);
-
- return false;
-}
-
-static bool isEmbeddedTabBar(const QAInterface &interface)
-{
- QObject *object = interface.object();
- if (interface.role() == QAccessible::PageTabList && object)
- return (qobject_cast<QTabWidget *>(object->parent()));
-
- return false;
-}
-
-/*
- Decides if a QAInterface is interesting from an accessibility users point of view.
-*/
-bool isItInteresting(const QAInterface &interface)
-{
- // Mac accessibility does not have an attribute that corresponds to the Invisible/Offscreen
- // state, so we disable the interface here.
- const QAccessible::State state = interface.state();
- if (state & QAccessible::Invisible ||
- state & QAccessible::Offscreen )
- return false;
-
- const QAccessible::Role role = interface.role();
-
- if (QObject * const object = interface.object()) {
- const QString className = QLatin1String(object->metaObject()->className());
-
- // VoiceOver focusing on tool tips can be confusing. The contents of the
- // tool tip is avalible through the description attribute anyway, so
- // we disable accessibility for tool tips.
- if (className == QLatin1String("QTipLabel"))
- return false;
-
- // Hide TabBars that has a QTabWidget parent (the tab widget handles the accessibility)
- if (isEmbeddedTabBar(interface))
- return false;
-
- // Hide docked dockwidgets. ### causes infinitie loop in the apple accessibility code.
- /* if (QDockWidget *dockWidget = qobject_cast<QDockWidget *>(object)) {
- if (dockWidget->isFloating() == false)
- return false;
- }
- */
- }
-
- // Client is a generic role returned by plain QWidgets or other
- // widgets that does not have separate QAccessible interface, such
- // as the TabWidget. Return false unless macRole gives the interface
- // a special role.
- if (role == QAccessible::Client && macRole(interface) == CFStringRef(QAXUnknownRole))
- return false;
-
- // Some roles are not interesting:
- if (role == QAccessible::Border || // QFrame
- role == QAccessible::Application || // We use the system-provided application element.
- role == QAccessible::MenuItem) // The system also provides the menu items.
- return false;
-
- // It is probably better to access the toolbar buttons directly than having
- // to navigate through the toolbar.
- if (role == QAccessible::ToolBar)
- return false;
-
- return true;
-}
-
-QAElement QAccessibleHierarchyManager::registerInterface(QObject *object, int child)
-{
-#ifndef QT_MAC_USE_COCOA
- return registerInterface(QAInterface(QAccessible::queryAccessibleInterface(object), child));
-#else
- Q_UNUSED(object);
- Q_UNUSED(child);
- return QAElement();
-#endif
-}
-
-/*
- Creates a QAXUIelement that corresponds to the given QAInterface.
-*/
-QAElement QAccessibleHierarchyManager::registerInterface(const QAInterface &interface)
-{
-#ifndef QT_MAC_USE_COCOA
- if (interface.isValid() == false)
- return QAElement();
- QAInterface objectInterface = interface.objectInterface();
-
- QObject * qobject = objectInterface.object();
- HIObjectRef hiobject = objectInterface.hiObject();
- if (qobject == 0 || hiobject == 0)
- return QAElement();
-
- if (qobjectElementHash.contains(qobject) == false) {
- registerInterface(qobject, hiobject, createFactory(interface));
- HIObjectSetAccessibilityIgnored(hiobject, !isItInteresting(interface));
- }
-
- return QAElement(hiobject, interface.id());
-#else
- Q_UNUSED(interface);
- return QAElement();
-#endif
-}
-
-#ifndef QT_MAC_USE_COCOA
-#include "qaccessible_mac_carbon.cpp"
-#endif
-
-void QAccessibleHierarchyManager::registerInterface(QObject * qobject, HIObjectRef hiobject, QInterfaceFactory *interfaceFactory)
-{
-#ifndef QT_MAC_USE_COCOA
- if (qobjectElementHash.contains(qobject) == false) {
- qobjectElementHash.insert(qobject, interfaceFactory);
- qobjectHiobjectHash.insert(qobject, hiobject);
- connect(qobject, SIGNAL(destroyed(QObject *)), SLOT(objectDestroyed(QObject *)));
- }
-
- if (hiobjectInterfaceHash.contains(hiobject) == false) {
- hiobjectInterfaceHash.insert(hiobject, interfaceFactory);
- installAcessibilityEventHandler(hiobject);
- }
-#else
- Q_UNUSED(qobject);
- Q_UNUSED(hiobject);
- Q_UNUSED(interfaceFactory);
-#endif
-}
-
-void QAccessibleHierarchyManager::registerChildren(const QAInterface &interface)
-{
- QObject * const object = interface.object();
- if (object == 0)
- return;
-
- QInterfaceFactory *interfaceFactory = qobjectElementHash.value(object);
-
- if (interfaceFactory == 0)
- return;
-
- interfaceFactory->registerChildren();
-}
-
-QAInterface QAccessibleHierarchyManager::lookup(const AXUIElementRef &element)
-{
- if (element == 0)
- return QAInterface();
-#ifndef QT_MAC_USE_COCOA
- HIObjectRef hiObject = AXUIElementGetHIObject(element);
-
- QInterfaceFactory *factory = hiobjectInterfaceHash.value(hiObject);
- if (factory == 0) {
- return QAInterface();
- }
-
- UInt64 id;
- AXUIElementGetIdentifier(element, &id);
- return factory->interface(id);
-#else
- return QAInterface();
-#endif
-}
-
-QAInterface QAccessibleHierarchyManager::lookup(const QAElement &element)
-{
- return lookup(element.element());
-}
-
-QAElement QAccessibleHierarchyManager::lookup(const QAInterface &interface)
-{
- if (interface.isValid() == false)
- return QAElement();
-
- QInterfaceFactory *factory = qobjectElementHash.value(interface.objectInterface().object());
- if (factory == 0)
- return QAElement();
-
- return factory->element(interface);
-}
-
-QAElement QAccessibleHierarchyManager::lookup(QObject * const object, int id)
-{
- QInterfaceFactory *factory = qobjectElementHash.value(object);
- if (factory == 0)
- return QAElement();
-
- return factory->element(id);
-}
-
-/*
- Standard interface mapping, return the stored interface
- or HIObjectRef, and there is an one-to-one mapping between
- the identifier and child.
-*/
-class QStandardInterfaceFactory : public QInterfaceFactory
-{
-public:
- QStandardInterfaceFactory(const QAInterface &interface)
- : m_interface(interface), object(interface.hiObject())
- {
- CFRetain(object);
- }
-
- ~QStandardInterfaceFactory()
- {
- CFRelease(object);
- }
-
-
- QAInterface interface(UInt64 identifier)
- {
- const int child = identifier;
- return QAInterface(m_interface, child);
- }
-
- QAElement element(int id)
- {
- return QAElement(object, id);
- }
-
- QAElement element(const QAInterface &interface)
- {
- if (interface.object() == 0)
- return QAElement();
- return QAElement(object, interface.id());
- }
-
- void registerChildren()
- {
- const int childCount = m_interface.childCount();
- for (int i = 1; i <= childCount; ++i) {
- accessibleHierarchyManager()->registerInterface(m_interface.navigate(QAccessible::Child, i));
- }
- }
-
-private:
- QAInterface m_interface;
- HIObjectRef object;
-};
-
-/*
- Interface mapping where that creates one HIObject for each interface child.
-*/
-class QMultipleHIObjectFactory : public QInterfaceFactory
-{
-public:
- QMultipleHIObjectFactory(const QAInterface &interface)
- : m_interface(interface)
- { }
-
- ~QMultipleHIObjectFactory()
- {
- foreach (HIObjectRef object, objects) {
- CFRelease(object);
- }
- }
-
- QAInterface interface(UInt64 identifier)
- {
- const int child = identifier;
- return QAInterface(m_interface, child);
- }
-
- QAElement element(int child)
- {
- if (child == 0)
- return QAElement(m_interface.hiObject(), 0);
-
- if (child > objects.count())
- return QAElement();
-
- return QAElement(objects.at(child - 1), child);
- }
-
- void registerChildren()
- {
-#ifndef QT_MAC_USE_COCOA
- const int childCount = m_interface.childCount();
- for (int i = 1; i <= childCount; ++i) {
- HIObjectRef hiobject;
- HIObjectCreate(kObjectQtAccessibility, 0, &hiobject);
- objects.append(hiobject);
- accessibleHierarchyManager()->registerInterface(m_interface.object(), hiobject, this);
- HIObjectSetAccessibilityIgnored(hiobject, !isItInteresting(m_interface.navigate(QAccessible::Child, i)));
- }
-#endif
- }
-
-private:
- QAInterface m_interface;
- QList<HIObjectRef> objects;
-};
-
-class QItemViewInterfaceFactory : public QInterfaceFactory
-{
-public:
- QItemViewInterfaceFactory(const QAInterface &interface)
- : m_interface(interface), object(interface.hiObject())
- {
- CFRetain(object);
- columnCount = 0;
- if (QTableView * tableView = qobject_cast<QTableView *>(interface.parent().object())) {
- if (tableView->model())
- columnCount = tableView->model()->columnCount();
- if (tableView->verticalHeader())
- ++columnCount;
- }
- }
-
- ~QItemViewInterfaceFactory()
- {
- CFRelease(object);
- }
-
- QAInterface interface(UInt64 identifier)
- {
- if (identifier == 0)
- return m_interface;
-
- if (m_interface.role() == QAccessible::List)
- return m_interface.childAt(identifier);
-
- if (m_interface.role() == QAccessible::Table) {
- const int index = identifier;
- if (index == 0)
- return m_interface; // return the item view interface.
-
- const int rowIndex = (index - 1) / (columnCount + 1);
- const int cellIndex = (index - 1) % (columnCount + 1);
-/*
- qDebug() << "index" << index;
- qDebug() << "rowIndex" << rowIndex;
- qDebug() << "cellIndex" << cellIndex;
-*/
- const QAInterface rowInterface = m_interface.childAt(rowIndex + 1);
-
- if ((cellIndex) == 0) // Is it a row?
- return rowInterface;
- else {
- return rowInterface.childAt(cellIndex);
- }
- }
-
- return QAInterface();
- }
-
- QAElement element(int id)
- {
- if (id != 0) {
- return QAElement();
- }
- return QAElement(object, 0);
- }
-
- QAElement element(const QAInterface &interface)
- {
- if (interface.object() && interface.object() == m_interface.object()) {
- return QAElement(object, 0);
- } else if (m_interface.role() == QAccessible::List) {
- if (interface.parent().object() && interface.parent().object() == m_interface.object())
- return QAElement(object, m_interface.indexOfChild(interface));
- } else if (m_interface.role() == QAccessible::Table) {
- QAInterface currentInterface = interface;
- int index = 0;
-
- while (currentInterface.isValid() && currentInterface.object() == 0) {
- const QAInterface parentInterface = currentInterface.parent();
-/*
- qDebug() << "current index" << index;
- qDebug() << "current interface" << interface;
-
- qDebug() << "parent interface" << parentInterface;
- qDebug() << "grandparent interface" << parentInterface.parent();
- qDebug() << "childCount" << interface.childCount();
- qDebug() << "index of child" << parentInterface.indexOfChild(currentInterface);
-*/
- index += ((parentInterface.indexOfChild(currentInterface) - 1) * (currentInterface.childCount() + 1)) + 1;
- currentInterface = parentInterface;
-// qDebug() << "new current interface" << currentInterface;
- }
- if (currentInterface.object() == m_interface.object())
- return QAElement(object, index);
-
-
- }
- return QAElement();
- }
-
- void registerChildren()
- {
- // Item view child interfraces don't have their own qobjects, so there is nothing to register here.
- }
-
-private:
- QAInterface m_interface;
- HIObjectRef object;
- int columnCount; // for table views;
-};
-
-#ifndef QT_MAC_USE_COCOA
-static bool managesChildren(const QAInterface &interface)
-{
- return (interface.childCount() > 0 && interface.childAt(1).id() > 0);
-}
-
-static QInterfaceFactory *createFactory(const QAInterface &interface)
-{
- if (isItemView(interface)) {
- return new QItemViewInterfaceFactory(interface);
- } if (managesChildren(interface)) {
- return new QMultipleHIObjectFactory(interface);
- }
-
- return new QStandardInterfaceFactory(interface);
-}
-#endif
-
-QList<QAElement> lookup(const QList<QAInterface> &interfaces)
-{
- QList<QAElement> elements;
- foreach (const QAInterface &interface, interfaces)
- if (interface.isValid()) {
- const QAElement element = accessibleHierarchyManager()->lookup(interface);
- if (element.isValid())
- elements.append(element);
- }
- return elements;
-}
-
-// Debug output helpers:
-/*
-static QString nameForEventKind(UInt32 kind)
-{
- switch(kind) {
- case kEventAccessibleGetChildAtPoint: return QString("GetChildAtPoint"); break;
- case kEventAccessibleGetAllAttributeNames: return QString("GetAllAttributeNames"); break;
- case kEventAccessibleGetNamedAttribute: return QString("GetNamedAttribute"); break;
- case kEventAccessibleSetNamedAttribute: return QString("SetNamedAttribute"); break;
- case kEventAccessibleGetAllActionNames: return QString("GetAllActionNames"); break;
- case kEventAccessibleGetFocusedChild: return QString("GetFocusedChild"); break;
- default:
- return QString("Unknown accessibility event type: %1").arg(kind);
- break;
- };
-}
-*/
-#ifndef QT_MAC_USE_COCOA
-static bool qt_mac_append_cf_uniq(CFMutableArrayRef array, CFTypeRef value)
-{
- if (value == 0)
- return false;
-
- CFRange range;
- range.location = 0;
- range.length = CFArrayGetCount(array);
- if(!CFArrayContainsValue(array, range, value)) {
- CFArrayAppendValue(array, value);
- return true;
- }
- return false;
-}
-
-static OSStatus setAttributeValue(EventRef event, const QList<QAElement> &elements)
-{
- CFMutableArrayRef array = CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks);
- foreach (const QAElement &element, elements) {
- if (element.isValid())
- CFArrayAppendValue(array, element.element());
- }
-
- const OSStatus err = SetEventParameter(event, kEventParamAccessibleAttributeValue,
- typeCFTypeRef, sizeof(array), &array);
- CFRelease(array);
- return err;
-}
-#endif //QT_MAC_USE_COCOA
-
-/*
- Gets the AccessibleObject parameter from an event.
-*/
-static inline AXUIElementRef getAccessibleObjectParameter(EventRef event)
-{
- AXUIElementRef element;
- GetEventParameter(event, kEventParamAccessibleObject, typeCFTypeRef, 0,
- sizeof(element), 0, &element);
- return element;
-}
-
-/*
- The application event handler makes sure that all top-level qt windows are registered
- before any accessibility events are handeled.
-*/
-#ifndef QT_MAC_USE_COCOA
-static OSStatus applicationEventHandler(EventHandlerCallRef next_ref, EventRef event, void *)
-{
- QAInterface rootInterface(QAccessible::queryAccessibleInterface(rootObject ? rootObject : qApp), 0);
- accessibleHierarchyManager()->registerChildren(rootInterface);
-
- return CallNextEventHandler(next_ref, event);
-}
-
-/*
- Returns the value for element by combining the QAccessibility::Checked and
- QAccessibility::Mixed flags into an int value that the Mac accessibilty
- system understands. This works for check boxes, radio buttons, and the like.
- The return values are:
- 0: unchecked
- 1: checked
- 2: undecided
-*/
-static int buttonValue(QAInterface element)
-{
- const QAccessible::State state = element.state();
- if (state & QAccessible::Mixed)
- return 2;
- else if(state & QAccessible::Checked)
- return 1;
- else
- return 0;
-}
-
-static QString getValue(const QAInterface &interface)
-{
- const QAccessible::Role role = interface.role();
- if (role == QAccessible::RadioButton || role == QAccessible::CheckBox)
- return QString::number(buttonValue(interface));
- else
- return interface.text(QAccessible::Value);
-}
-#endif //QT_MAC_USE_COCOA
-
-/*
- Translates a QAccessible::Role into a mac accessibility role.
-*/
-static CFStringRef macRole(const QAInterface &interface)
-{
- const QAccessible::Role qtRole = interface.role();
-
-// qDebug() << "role for" << interface.object() << "interface role" << hex << qtRole;
-
- // Qt accessibility: QAccessible::Splitter contains QAccessible::Grip.
- // Mac accessibility: AXSplitGroup contains AXSplitter.
- if (qtRole == QAccessible::Grip) {
- const QAInterface parent = interface.parent();
- if (parent.isValid() && parent.role() == QAccessible::Splitter)
- return CFStringRef(QAXSplitterRole);
- }
-
- // Tab widgets and standalone tab bars get the kAXTabGroupRole. Accessibility
- // for tab bars emebedded in a tab widget is handled by the tab widget.
- if (isTabWidget(interface) || isStandaloneTabBar(interface))
- return kAXTabGroupRole;
-
- if (QObject *object = interface.object()) {
- // ### The interface for an abstract scroll area returns the generic "Client"
- // role, so we have to to an extra detect on the QObject here.
- if (object->inherits("QAbstractScrollArea") && interface.id() == 0)
- return CFStringRef(QAXScrollAreaRole);
-
- if (object->inherits("QDockWidget"))
- return CFStringRef(QAXUnknownRole);
- }
-
- int i = 0;
- int testRole = text_bindings[i][0].qt;
- while (testRole != -1) {
- if (testRole == qtRole)
- return CFStringRef(text_bindings[i][0].mac);
- ++i;
- testRole = text_bindings[i][0].qt;
- }
-
-// qDebug() << "got unknown role!" << interface << interface.parent();
-
- return CFStringRef(QAXUnknownRole);
-}
-
-/*
- Translates a QAccessible::Role and an attribute name into a QAccessible::Text, taking into
- account execptions listed in text_bindings.
-*/
-#ifndef QT_MAC_USE_COCOA
-static int textForRoleAndAttribute(QAccessible::Role role, CFStringRef attribute)
-{
- // Search for exception, return it if found.
- int testRole = text_bindings[0][0].qt;
- int i = 0;
- while (testRole != -1) {
- if (testRole == role) {
- int j = 1;
- int qtRole = text_bindings[i][j].qt;
- CFStringRef testAttribute = CFStringRef(text_bindings[i][j].mac);
- while (qtRole != -1) {
- if (CFStringCompare(attribute, testAttribute, 0) == kCFCompareEqualTo) {
- return (QAccessible::Text)qtRole;
- }
- ++j;
- testAttribute = CFStringRef(text_bindings[i][j].mac); /// ### custom compare
- qtRole = text_bindings[i][j].qt; /// ### custom compare
- }
- break;
- }
- ++i;
- testRole = text_bindings[i][0].qt;
- }
-
- // Return default mappping
- if (CFStringCompare(attribute, CFStringRef(QAXTitleAttribute), 0) == kCFCompareEqualTo)
- return QAccessible::Name;
- else if (CFStringCompare(attribute, CFStringRef(QAXValueAttribute), 0) == kCFCompareEqualTo)
- return QAccessible::Value;
- else if (CFStringCompare(attribute, CFStringRef(QAXHelpAttribute), 0) == kCFCompareEqualTo)
- return QAccessible::Help;
- else if (CFStringCompare(attribute, CFStringRef(QAXDescriptionAttribute), 0) == kCFCompareEqualTo)
- return QAccessible::Description;
- else
- return -1;
-}
-
-/*
- Returns the subrole string constant for the interface if it has one,
- else returns an empty string.
-*/
-static QCFString subrole(const QAInterface &interface)
-{
- const QAInterface parent = interface.parent();
- if (parent.isValid() == false)
- return QCFString();
-
- if (parent.role() == QAccessible::ScrollBar) {
- QCFString subrole;
- switch(interface.id()) {
- case 1: subrole = CFStringRef(QAXDecrementArrowSubrole); break;
- case 2: subrole = CFStringRef(QAXDecrementPageSubrole); break;
- case 4: subrole = CFStringRef(QAXIncrementPageSubrole); break;
- case 5: subrole = CFStringRef(QAXIncrementArrowSubrole); break;
- default:
- break;
- }
- return subrole;
- }
- return QCFString();
-}
-
-// Gets the scroll bar orientation by asking the QAbstractSlider object directly.
-static Qt::Orientation scrollBarOrientation(const QAInterface &scrollBar)
-{
- QObject *const object = scrollBar.object();
- if (QAbstractSlider * const sliderObject = qobject_cast<QAbstractSlider * const>(object))
- return sliderObject->orientation();
-
- return Qt::Vertical; // D'oh! The interface wasn't a scroll bar.
-}
-
-static QAInterface scrollAreaGetScrollBarInterface(const QAInterface &scrollArea, Qt::Orientation orientation)
-{
- if (macRole(scrollArea) != CFStringRef(CFStringRef(QAXScrollAreaRole)))
- return QAInterface();
-
- // Child 1 is the contents widget, 2 and 3 are the scroll bar containers wich contains possible scroll bars.
- for (int i = 2; i <= 3; ++i) {
- QAInterface scrollBarContainer = scrollArea.childAt(i);
- for (int i = 1; i <= scrollBarContainer.childCount(); ++i) {
- QAInterface scrollBar = scrollBarContainer.childAt(i);
- if (scrollBar.isValid() &&
- scrollBar.role() == QAccessible::ScrollBar &&
- scrollBarOrientation(scrollBar) == orientation)
- return scrollBar;
- }
- }
-
- return QAInterface();
-}
-
-static bool scrollAreaHasScrollBar(const QAInterface &scrollArea, Qt::Orientation orientation)
-{
- return scrollAreaGetScrollBarInterface(scrollArea, orientation).isValid();
-}
-
-static QAElement scrollAreaGetScrollBar(const QAInterface &scrollArea, Qt::Orientation orientation)
-{
- return accessibleHierarchyManager()->lookup(scrollAreaGetScrollBarInterface(scrollArea, orientation));
-}
-
-static QAElement scrollAreaGetContents(const QAInterface &scrollArea)
-{
- // Child 1 is the contents widget,
- return accessibleHierarchyManager()->lookup(scrollArea.navigate(QAccessible::Child, 1));
-}
-
-static QAElement tabWidgetGetContents(const QAInterface &interface)
-{
- // A kAXTabGroup has a kAXContents attribute, which consists of the
- // ui elements for the current tab page. Get the current tab page
- // from the QStackedWidget, where the current visible page can
- // be found at index 1.
- QAInterface stackedWidget = interface.childAt(1);
- accessibleHierarchyManager()->registerChildren(stackedWidget);
- QAInterface tabPageInterface = stackedWidget.childAt(1);
- return accessibleHierarchyManager()->lookup(tabPageInterface);
-}
-
-static QList<QAElement> tabBarGetTabs(const QAInterface &interface)
-{
- // Get the tabs by searching for children with the "PageTab" role.
- // This filters out the left/right navigation buttons.
- accessibleHierarchyManager()->registerChildren(interface);
- QList<QAElement> tabs;
- const int numChildren = interface.childCount();
- for (int i = 1; i < numChildren + 1; ++i) {
- QAInterface child = interface.navigate(QAccessible::Child, i);
- if (child.isValid() && child.role() == QAccessible::PageTab) {
- tabs.append(accessibleHierarchyManager()->lookup(child));
- }
- }
- return tabs;
-}
-
-static QList<QAElement> tabWidgetGetTabs(const QAInterface &interface)
-{
- // Each QTabWidget has two children, a QStackedWidget and a QTabBar.
- // Get the tabs from the QTabBar.
- return tabBarGetTabs(interface.childAt(2));
-}
-
-static QList<QAElement> tabWidgetGetChildren(const QAInterface &interface)
-{
- // The children for a kAXTabGroup should consist of the tabs and the
- // contents of the current open tab page.
- QList<QAElement> children = tabWidgetGetTabs(interface);
- children += tabWidgetGetContents(interface);
- return children;
-}
-#endif //QT_MAC_USE_COCOA
-
-/*
- Returns the label (buddy) interface for interface, or 0 if it has none.
-*/
-/*
-static QAInterface findLabel(const QAInterface &interface)
-{
- return interface.navigate(QAccessible::Label, 1);
-}
-*/
-/*
- Returns a list of interfaces this interface labels, or an empty list if it doesn't label any.
-*/
-/*
-static QList<QAInterface> findLabelled(const QAInterface &interface)
-{
- QList<QAInterface> interfaceList;
-
- int count = 1;
- const QAInterface labelled = interface.navigate(QAccessible::Labelled, count);
- while (labelled.isValid()) {
- interfaceList.append(labelled);
- ++count;
- }
- return interfaceList;
-}
-*/
-/*
- Tests if the given QAInterface has data for a mac attribute.
-*/
-#ifndef QT_MAC_USE_COCOA
-static bool supportsAttribute(CFStringRef attribute, const QAInterface &interface)
-{
- const int text = textForRoleAndAttribute(interface.role(), attribute);
-
- // Special case: Static texts don't have a title.
- if (interface.role() == QAccessible::StaticText && attribute == CFStringRef(QAXTitleAttribute))
- return false;
-
- // Return true if we the attribute matched a QAccessible::Role and we get text for that role from the interface.
- if (text != -1) {
- if (text == QAccessible::Value) // Special case for Value, see getValue()
- return !getValue(interface).isEmpty();
- else
- return !interface.text((QAccessible::Text)text).isEmpty();
- }
-
- if (CFStringCompare(attribute, CFStringRef(QAXChildrenAttribute), 0) == kCFCompareEqualTo) {
- if (interface.childCount() > 0)
- return true;
- }
-
- if (CFStringCompare(attribute, CFStringRef(QAXSubroleAttribute), 0) == kCFCompareEqualTo) {
- return (subrole(interface) != QCFString());
- }
-
- return false;
-}
-
-static void appendIfSupported(CFMutableArrayRef array, CFStringRef attribute, const QAInterface &interface)
-{
- if (supportsAttribute(attribute, interface))
- qt_mac_append_cf_uniq(array, attribute);
-}
-
-/*
- Returns the names of the attributes the give QAInterface supports.
-*/
-static OSStatus getAllAttributeNames(EventRef event, const QAInterface &interface, EventHandlerCallRef next_ref)
-{
- // Call system event handler.
- OSStatus err = CallNextEventHandler(next_ref, event);
- if(err != noErr && err != eventNotHandledErr)
- return err;
- CFMutableArrayRef attrs = 0;
- GetEventParameter(event, kEventParamAccessibleAttributeNames, typeCFMutableArrayRef, 0,
- sizeof(attrs), 0, &attrs);
-
- if (!attrs)
- return eventNotHandledErr;
-
- // Append attribute names that are always supported.
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXPositionAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXSizeAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXRoleAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXEnabledAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXWindowAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXTopLevelUIElementAttribute));
-
- // Append these names if the QInterafceItem returns any data for them.
- appendIfSupported(attrs, CFStringRef(QAXTitleAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXValueAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXDescriptionAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXLinkedUIElementsAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXHelpAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXTitleUIElementAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXChildrenAttribute), interface);
- appendIfSupported(attrs, CFStringRef(QAXSubroleAttribute), interface);
-
- // Append attribute names based on the interaface role.
- switch (interface.role()) {
- case QAccessible::Window:
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXMainAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXMinimizedAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXCloseButtonAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXZoomButtonAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXMinimizeButtonAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXToolbarButtonAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXGrowAreaAttribute));
- break;
- case QAccessible::RadioButton:
- case QAccessible::CheckBox:
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXMinValueAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXMaxValueAttribute));
- break;
- case QAccessible::ScrollBar:
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXOrientationAttribute));
- break;
- case QAccessible::Splitter:
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXSplittersAttribute));
- break;
- case QAccessible::Table:
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXRowsAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXVisibleRowsAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXSelectedRowsAttribute));
- break;
- default:
- break;
- }
-
- // Append attribute names based on the mac accessibility role.
- const QCFString mac_role = macRole(interface);
- if (mac_role == CFStringRef(QAXSplitterRole)) {
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXPreviousContentsAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXNextContentsAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXOrientationAttribute));
- } else if (mac_role == CFStringRef(QAXScrollAreaRole)) {
- if (scrollAreaHasScrollBar(interface, Qt::Horizontal))
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXHorizontalScrollBarAttribute));
- if (scrollAreaHasScrollBar(interface, Qt::Vertical))
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXVerticalScrollBarAttribute));
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXContentsAttribute));
- } else if (mac_role == CFStringRef(QAXTabGroupRole)) {
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXTabsAttribute));
- // Only tab widgets can have the contents attribute, there is no way of getting
- // the contents from a QTabBar.
- if (isTabWidget(interface))
- qt_mac_append_cf_uniq(attrs, CFStringRef(QAXContentsAttribute));
- }
-
- return noErr;
-}
-
-static void handleStringAttribute(EventRef event, QAccessible::Text text, const QAInterface &interface)
-{
- QString str = interface.text(text);
- if (str.isEmpty())
- return;
-
- // Remove any html markup from the text string, or VoiceOver will read the html tags.
- static QTextDocument document;
- document.setHtml(str);
- str = document.toPlainText();
-
- CFStringRef cfstr = QCFString::toCFStringRef(str);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFStringRef, sizeof(cfstr), &cfstr);
-}
-
-/*
- Handles the parent attribute for a interface.
- There are basically three cases here:
- 1. interface is a HIView and has only HIView children.
- 2. interface is a HIView but has children that is not a HIView
- 3. interface is not a HIView.
-*/
-static OSStatus handleChildrenAttribute(EventHandlerCallRef next_ref, EventRef event, QAInterface &interface)
-{
- // Add the children for this interface to the global QAccessibelHierachyManager.
- accessibleHierarchyManager()->registerChildren(interface);
-
- if (isTabWidget(interface)) {
- QList<QAElement> children = tabWidgetGetChildren(interface);
- const int childCount = children.count();
-
- CFMutableArrayRef array = 0;
- array = CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks);
- for (int i = 0; i < childCount; ++i) {
- qt_mac_append_cf_uniq(array, children.at(i).element());
- }
-
- OSStatus err;
- err = SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFArrayRef, sizeof(array), &array);
- if (err != noErr)
- qWarning("Qt:Internal error (%s:%d)", __FILE__, __LINE__);
-
- return noErr;
- }
-
- const QList<QAElement> children = lookup(interface.children());
- const int childCount = children.count();
-
- OSStatus err = eventNotHandledErr;
- if (interface.isHIView())
- err = CallNextEventHandler(next_ref, event);
-
- CFMutableArrayRef array = 0;
- int arraySize = 0;
- if (err == noErr) {
- CFTypeRef obj = 0;
- err = GetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef, NULL , sizeof(obj), NULL, &obj);
- if (err == noErr && obj != 0) {
- array = (CFMutableArrayRef)obj;
- arraySize = CFArrayGetCount(array);
- }
- }
-
- if (array) {
- CFArrayRemoveAllValues(array);
- for (int i = 0; i < childCount; ++i) {
- qt_mac_append_cf_uniq(array, children.at(i).element());
- }
- } else {
- array = CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks);
- for (int i = 0; i < childCount; ++i) {
- qt_mac_append_cf_uniq(array, children.at(i).element());
- }
-
- err = SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFArrayRef, sizeof(array), &array);
- if (err != noErr)
- qWarning("Qt:Internal error (%s:%d)", __FILE__, __LINE__);
- }
-
- return noErr;
-}
-
-/*
-
-*/
-static OSStatus handleParentAttribute(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface)
-{
- OSStatus err = eventNotHandledErr;
- if (interface.isHIView()) {
- err = CallNextEventHandler(next_ref, event);
- }
- if (err == noErr)
- return err;
-
- const QAInterface parentInterface = interface.navigate(QAccessible::Ancestor, 1);
- const QAElement parentElement = accessibleHierarchyManager()->lookup(parentInterface);
-
- if (parentElement.isValid() == false)
- return eventNotHandledErr;
-
- AXUIElementRef elementRef = parentElement.element();
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof(elementRef), &elementRef);
- return noErr;
-}
-#endif
-
-struct IsWindowTest
-{
- static inline bool test(const QAInterface &interface)
- {
- return (interface.role() == QAccessible::Window);
- }
-};
-
-struct IsWindowAndNotDrawerOrSheetTest
-{
- static inline bool test(const QAInterface &interface)
- {
- QWidget * const widget = qobject_cast<QWidget*>(interface.object());
- return (interface.role() == QAccessible::Window &&
- widget && widget->isWindow() &&
- !qt_mac_is_macdrawer(widget) &&
- !qt_mac_is_macsheet(widget));
- }
-};
-
-/*
- Navigates up the iterfaces ancestor hierachy until a QAccessibleInterface that
- passes the Test is found. If we reach a interface that is a HIView we stop the
- search and call AXUIElementCopyAttributeValue.
-*/
-template <typename TestType>
-OSStatus navigateAncestors(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface, CFStringRef attribute)
-{
- if (interface.isHIView())
- return CallNextEventHandler(next_ref, event);
-
- QAInterface current = interface;
- QAElement element;
- while (current.isValid()) {
- if (TestType::test(interface)) {
- element = accessibleHierarchyManager()->lookup(current);
- break;
- }
-
- // If we reach an InterfaceItem that is a HiView we can hand of the search to
- // the system event handler. This is the common case.
- if (current.isHIView()) {
- CFTypeRef value = 0;
- const QAElement currentElement = accessibleHierarchyManager()->lookup(current);
- AXError err = AXUIElementCopyAttributeValue(currentElement.element(), attribute, &value);
- AXUIElementRef newElement = (AXUIElementRef)value;
-
- if (err == noErr)
- element = QAElement(newElement);
-
- if (newElement != 0)
- CFRelease(newElement);
- break;
- }
-
- QAInterface next = current.parent();
- if (next.isValid() == false)
- break;
- if (next == current)
- break;
- current = next;
- }
-
- if (element.isValid() == false)
- return eventNotHandledErr;
-
-
- AXUIElementRef elementRef = element.element();
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef,
- sizeof(elementRef), &elementRef);
- return noErr;
-}
-
-/*
- Returns the top-level window for an interface, which is the closest ancestor interface that
- has the Window role, but is not a sheet or a drawer.
-*/
-#ifndef QT_MAC_USE_COCOA
-static OSStatus handleWindowAttribute(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface)
-{
- return navigateAncestors<IsWindowAndNotDrawerOrSheetTest>(next_ref, event, interface, CFStringRef(QAXWindowAttribute));
-}
-
-/*
- Returns the top-level window for an interface, which is the closest ancestor interface that
- has the Window role. (Can also be a sheet or a drawer)
-*/
-static OSStatus handleTopLevelUIElementAttribute(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface)
-{
- return navigateAncestors<IsWindowTest>(next_ref, event, interface, CFStringRef(QAXTopLevelUIElementAttribute));
-}
-
-/*
- Returns the tab buttons for an interface.
-*/
-static OSStatus handleTabsAttribute(EventHandlerCallRef next_ref, EventRef event, QAInterface &interface)
-{
- Q_UNUSED(next_ref);
- if (isTabWidget(interface))
- return setAttributeValue(event, tabWidgetGetTabs(interface));
- else
- return setAttributeValue(event, tabBarGetTabs(interface));
-}
-
-static OSStatus handlePositionAttribute(EventHandlerCallRef, EventRef event, const QAInterface &interface)
-{
- QPoint qpoint(interface.rect().topLeft());
- HIPoint point;
- point.x = qpoint.x();
- point.y = qpoint.y();
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeHIPoint, sizeof(point), &point);
- return noErr;
-}
-
-static OSStatus handleSizeAttribute(EventHandlerCallRef, EventRef event, const QAInterface &interface)
-{
- QSize qSize(interface.rect().size());
- HISize size;
- size.width = qSize.width();
- size.height = qSize.height();
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeHISize, sizeof(size), &size);
- return noErr;
-}
-
-static OSStatus handleSubroleAttribute(EventHandlerCallRef, EventRef event, const QAInterface &interface)
-{
- const QCFString role = subrole(interface);
- CFStringRef rolestr = (CFStringRef)role;
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof(rolestr), &rolestr);
- return noErr;
-}
-
-static OSStatus handleOrientationAttribute(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface)
-{
- QObject *const object = interface.object();
- Qt::Orientation orientation;
- if (interface.role() == QAccessible::ScrollBar) {
- orientation = scrollBarOrientation(interface);
- } else if (QSplitterHandle * const splitter = qobject_cast<QSplitterHandle * const>(object)) {
- // Qt reports the layout orientation, but we want the splitter handle orientation.
- orientation = (splitter->orientation() == Qt::Horizontal) ? Qt::Vertical : Qt::Horizontal;
- } else {
- return CallNextEventHandler(next_ref, event);
- }
- const CFStringRef orientationString = (orientation == Qt::Vertical)
- ? CFStringRef(QAXVerticalOrientationValue) : CFStringRef(QAXHorizontalOrientationValue);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFStringRef, sizeof(orientationString), &orientationString);
- return noErr;
-}
-
-/*
- Figures out the next or previous contents for a splitter.
-*/
-static OSStatus handleSplitterContentsAttribute(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface, QCFString nextOrPrev)
-{
- if (interface.isValid() == false || interface.role() != QAccessible::Grip)
- return eventNotHandledErr;
-
- const QAInterface parent = interface.parent();
- if (parent.isValid() == false)
- return CallNextEventHandler(next_ref, event);
-
- if (parent.role() != QAccessible::Splitter)
- return CallNextEventHandler(next_ref, event);
-
- const QSplitter * const splitter = qobject_cast<const QSplitter * const>(parent.object());
- if (splitter == 0)
- return CallNextEventHandler(next_ref, event);
-
- QWidget * const splitterHandle = qobject_cast<QWidget * const>(interface.object());
- const int splitterHandleIndex = splitter->indexOf(splitterHandle);
- const int widgetIndex = (nextOrPrev == QCFString(CFStringRef(QAXPreviousContentsAttribute))) ? splitterHandleIndex - 1 : splitterHandleIndex;
- const QAElement contentsElement = accessibleHierarchyManager()->lookup(splitter->widget(widgetIndex), 0);
- return setAttributeValue(event, QList<QAElement>() << contentsElement);
-}
-
-/*
- Creates a list of all splitter handles the splitter contains.
-*/
-static OSStatus handleSplittersAttribute(EventHandlerCallRef next_ref, EventRef event, QAInterface &interface)
-{
- const QSplitter * const splitter = qobject_cast<const QSplitter * const>(interface.object());
- if (splitter == 0)
- return CallNextEventHandler(next_ref, event);
-
- accessibleHierarchyManager()->registerChildren(interface);
-
- QList<QAElement> handles;
- const int visibleSplitterCount = splitter->count() -1; // skip first handle, it's always invisible.
- for (int i = 0; i < visibleSplitterCount; ++i)
- handles.append(accessibleHierarchyManager()->lookup(splitter->handle(i + 1), 0));
-
- return setAttributeValue(event, handles);
-}
-
-// This handler gets the scroll bars for a scroll area
-static OSStatus handleScrollBarAttribute(EventHandlerCallRef next_ref, EventRef event, QAInterface &scrollArea, Qt::Orientation orientation)
-{
- QAElement scrollBar = scrollAreaGetScrollBar(scrollArea, orientation);
- if (scrollBar.isValid() == false)
- return CallNextEventHandler(next_ref, event);
-
- AXUIElementRef elementRef = scrollBar.element();
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef, sizeof(elementRef), &elementRef);
- return noErr;
-}
-
-// This handler gets the contents for a scroll area or tab widget.
-static OSStatus handleContentsAttribute(EventHandlerCallRef next_ref, EventRef event, QAInterface &interface)
-{
- const QCFString mac_role = macRole(interface);
-
- QAElement contents;
-
- if (mac_role == kAXTabGroupRole) {
- contents = tabWidgetGetContents(interface);
- } else {
- contents = scrollAreaGetContents(interface);
- if (contents.isValid() == false)
- return CallNextEventHandler(next_ref, event);
- }
-
- return setAttributeValue(event, QList<QAElement>() << contents);
-}
-
-static OSStatus handleRowsAttribute(EventHandlerCallRef, EventRef event, QAInterface &tableView)
-{
- QList<QAElement> rows = lookup(tableView.children());
-
- // kill the first row which is the horizontal header.
- rows.removeAt(0);
-
- return setAttributeValue(event, rows);
-}
-
-static OSStatus handleVisibleRowsAttribute(EventHandlerCallRef, EventRef event, QAInterface &tableView)
-{
- QList<QAElement> visibleRows;
-
- QList<QAInterface> rows = tableView.children();
- // kill the first row which is the horizontal header.
- rows.removeAt(0);
-
- foreach (const QAInterface &interface, rows)
- if ((interface.state() & QAccessible::Invisible) == false)
- visibleRows.append(accessibleHierarchyManager()->lookup(interface));
-
- return setAttributeValue(event, visibleRows);
-}
-
-static OSStatus handleSelectedRowsAttribute(EventHandlerCallRef, EventRef event, QAInterface &tableView)
-{
- QList<QAElement> selectedRows;
- foreach (const QAInterface &interface, tableView.children())
- if ((interface.state() & QAccessible::Selected))
- selectedRows.append(accessibleHierarchyManager()->lookup(interface));
-
- return setAttributeValue(event, selectedRows);
-}
-
-static OSStatus getNamedAttribute(EventHandlerCallRef next_ref, EventRef event, QAInterface &interface)
-{
- CFStringRef var;
- GetEventParameter(event, kEventParamAccessibleAttributeName, typeCFStringRef, 0,
- sizeof(var), 0, &var);
-
- if (CFStringCompare(var, CFStringRef(QAXChildrenAttribute), 0) == kCFCompareEqualTo) {
- return handleChildrenAttribute(next_ref, event, interface);
- } else if(CFStringCompare(var, CFStringRef(QAXTopLevelUIElementAttribute), 0) == kCFCompareEqualTo) {
- return handleTopLevelUIElementAttribute(next_ref, event, interface);
- } else if(CFStringCompare(var, CFStringRef(QAXWindowAttribute), 0) == kCFCompareEqualTo) {
- return handleWindowAttribute(next_ref, event, interface);
- } else if(CFStringCompare(var, CFStringRef(QAXParentAttribute), 0) == kCFCompareEqualTo) {
- return handleParentAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXPositionAttribute), 0) == kCFCompareEqualTo) {
- return handlePositionAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXSizeAttribute), 0) == kCFCompareEqualTo) {
- return handleSizeAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXRoleAttribute), 0) == kCFCompareEqualTo) {
- CFStringRef role = macRole(interface);
-// ###
-// QWidget * const widget = qobject_cast<QWidget *>(interface.object());
-// if (role == CFStringRef(QAXUnknownRole) && widget && widget->isWindow())
-// role = CFStringRef(QAXWindowRole);
-
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFStringRef,
- sizeof(role), &role);
-
- } else if (CFStringCompare(var, CFStringRef(QAXEnabledAttribute), 0) == kCFCompareEqualTo) {
- Boolean val = !((interface.state() & QAccessible::Unavailable))
- && !((interface.state() & QAccessible::Invisible));
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- } else if (CFStringCompare(var, CFStringRef(QAXExpandedAttribute), 0) == kCFCompareEqualTo) {
- Boolean val = (interface.state() & QAccessible::Expanded);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- } else if (CFStringCompare(var, CFStringRef(QAXSelectedAttribute), 0) == kCFCompareEqualTo) {
- Boolean val = (interface.state() & QAccessible::Selection);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- } else if (CFStringCompare(var, CFStringRef(QAXFocusedAttribute), 0) == kCFCompareEqualTo) {
- Boolean val = (interface.state() & QAccessible::Focus);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- } else if (CFStringCompare(var, CFStringRef(QAXSelectedChildrenAttribute), 0) == kCFCompareEqualTo) {
- const int cc = interface.childCount();
- QList<QAElement> selected;
- for (int i = 1; i <= cc; ++i) {
- const QAInterface child_iface = interface.navigate(QAccessible::Child, i);
- if (child_iface.isValid() && child_iface.state() & QAccessible::Selected)
- selected.append(accessibleHierarchyManager()->lookup(child_iface));
- }
-
- return setAttributeValue(event, selected);
-
- } else if (CFStringCompare(var, CFStringRef(QAXCloseButtonAttribute), 0) == kCFCompareEqualTo) {
- if(interface.object() && interface.object()->isWidgetType()) {
- Boolean val = true; //do we want to add a WState for this?
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXZoomButtonAttribute), 0) == kCFCompareEqualTo) {
- if(interface.object() && interface.object()->isWidgetType()) {
- QWidget *widget = (QWidget*)interface.object();
- Boolean val = (widget->windowFlags() & Qt::WindowMaximizeButtonHint);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXMinimizeButtonAttribute), 0) == kCFCompareEqualTo) {
- if(interface.object() && interface.object()->isWidgetType()) {
- QWidget *widget = (QWidget*)interface.object();
- Boolean val = (widget->windowFlags() & Qt::WindowMinimizeButtonHint);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXToolbarButtonAttribute), 0) == kCFCompareEqualTo) {
- if(interface.object() && interface.object()->isWidgetType()) {
- QWidget *widget = (QWidget*)interface.object();
- Boolean val = qobject_cast<QMainWindow *>(widget) != 0;
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXGrowAreaAttribute), 0) == kCFCompareEqualTo) {
- if(interface.object() && interface.object()->isWidgetType()) {
- Boolean val = true; //do we want to add a WState for this?
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXMinimizedAttribute), 0) == kCFCompareEqualTo) {
- if (interface.object() && interface.object()->isWidgetType()) {
- QWidget *widget = (QWidget*)interface.object();
- Boolean val = (widget->windowState() & Qt::WindowMinimized);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeBoolean,
- sizeof(val), &val);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXSubroleAttribute), 0) == kCFCompareEqualTo) {
- return handleSubroleAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXRoleDescriptionAttribute), 0) == kCFCompareEqualTo) {
-#if !defined(QT_MAC_USE_COCOA)
- if (HICopyAccessibilityRoleDescription) {
- const CFStringRef roleDescription = HICopyAccessibilityRoleDescription(macRole(interface), 0);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFStringRef,
- sizeof(roleDescription), &roleDescription);
- } else
-#endif
- {
- // Just use Qt::Description on 10.3
- handleStringAttribute(event, QAccessible::Description, interface);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXTitleAttribute), 0) == kCFCompareEqualTo) {
- const QAccessible::Role role = interface.role();
- const QAccessible::Text text = (QAccessible::Text)textForRoleAndAttribute(role, var);
- handleStringAttribute(event, text, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXValueAttribute), 0) == kCFCompareEqualTo) {
- const QAccessible::Role role = interface.role();
- const QAccessible::Text text = (QAccessible::Text)textForRoleAndAttribute(role, var);
- if (role == QAccessible::CheckBox || role == QAccessible::RadioButton) {
- int value = buttonValue(interface);
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeUInt32, sizeof(value), &value);
- } else {
- handleStringAttribute(event, text, interface);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXDescriptionAttribute), 0) == kCFCompareEqualTo) {
- const QAccessible::Role role = interface.role();
- const QAccessible::Text text = (QAccessible::Text)textForRoleAndAttribute(role, var);
- handleStringAttribute(event, text, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXLinkedUIElementsAttribute), 0) == kCFCompareEqualTo) {
- return CallNextEventHandler(next_ref, event);
- } else if (CFStringCompare(var, CFStringRef(QAXHelpAttribute), 0) == kCFCompareEqualTo) {
- const QAccessible::Role role = interface.role();
- const QAccessible::Text text = (QAccessible::Text)textForRoleAndAttribute(role, var);
- handleStringAttribute(event, text, interface);
- } else if (CFStringCompare(var, kAXTitleUIElementAttribute, 0) == kCFCompareEqualTo) {
- return CallNextEventHandler(next_ref, event);
- } else if (CFStringCompare(var, CFStringRef(QAXTabsAttribute), 0) == kCFCompareEqualTo) {
- return handleTabsAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXMinValueAttribute), 0) == kCFCompareEqualTo) {
- // tabs we first go to the tab bar which is child #2.
- QAInterface tabBarInterface = interface.childAt(2);
- return handleTabsAttribute(next_ref, event, tabBarInterface);
- } else if (CFStringCompare(var, CFStringRef(QAXMinValueAttribute), 0) == kCFCompareEqualTo) {
- if (interface.role() == QAccessible::RadioButton || interface.role() == QAccessible::CheckBox) {
- uint value = 0;
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeUInt32, sizeof(value), &value);
- } else {
- return CallNextEventHandler(next_ref, event);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXMaxValueAttribute), 0) == kCFCompareEqualTo) {
- if (interface.role() == QAccessible::RadioButton || interface.role() == QAccessible::CheckBox) {
- uint value = 2;
- SetEventParameter(event, kEventParamAccessibleAttributeValue, typeUInt32, sizeof(value), &value);
- } else {
- return CallNextEventHandler(next_ref, event);
- }
- } else if (CFStringCompare(var, CFStringRef(QAXOrientationAttribute), 0) == kCFCompareEqualTo) {
- return handleOrientationAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXPreviousContentsAttribute), 0) == kCFCompareEqualTo) {
- return handleSplitterContentsAttribute(next_ref, event, interface, CFStringRef(QAXPreviousContentsAttribute));
- } else if (CFStringCompare(var, CFStringRef(QAXNextContentsAttribute), 0) == kCFCompareEqualTo) {
- return handleSplitterContentsAttribute(next_ref, event, interface, CFStringRef(QAXNextContentsAttribute));
- } else if (CFStringCompare(var, CFStringRef(QAXSplittersAttribute), 0) == kCFCompareEqualTo) {
- return handleSplittersAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXHorizontalScrollBarAttribute), 0) == kCFCompareEqualTo) {
- return handleScrollBarAttribute(next_ref, event, interface, Qt::Horizontal);
- } else if (CFStringCompare(var, CFStringRef(QAXVerticalScrollBarAttribute), 0) == kCFCompareEqualTo) {
- return handleScrollBarAttribute(next_ref, event, interface, Qt::Vertical);
- } else if (CFStringCompare(var, CFStringRef(QAXContentsAttribute), 0) == kCFCompareEqualTo) {
- return handleContentsAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXRowsAttribute), 0) == kCFCompareEqualTo) {
- return handleRowsAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXVisibleRowsAttribute), 0) == kCFCompareEqualTo) {
- return handleVisibleRowsAttribute(next_ref, event, interface);
- } else if (CFStringCompare(var, CFStringRef(QAXSelectedRowsAttribute), 0) == kCFCompareEqualTo) {
- return handleSelectedRowsAttribute(next_ref, event, interface);
- } else {
- return CallNextEventHandler(next_ref, event);
- }
- return noErr;
-}
-
-static OSStatus isNamedAttributeSettable(EventRef event, const QAInterface &interface)
-{
- CFStringRef var;
- GetEventParameter(event, kEventParamAccessibleAttributeName, typeCFStringRef, 0,
- sizeof(var), 0, &var);
- Boolean settable = false;
- if (CFStringCompare(var, CFStringRef(QAXFocusedAttribute), 0) == kCFCompareEqualTo) {
- settable = true;
- } else {
- for (int r = 0; text_bindings[r][0].qt != -1; r++) {
- if(interface.role() == (QAccessible::Role)text_bindings[r][0].qt) {
- for (int a = 1; text_bindings[r][a].qt != -1; a++) {
- if (CFStringCompare(var, CFStringRef(text_bindings[r][a].mac), 0) == kCFCompareEqualTo) {
- settable = text_bindings[r][a].settable;
- break;
- }
- }
- }
- }
- }
- SetEventParameter(event, kEventParamAccessibleAttributeSettable, typeBoolean,
- sizeof(settable), &settable);
- return noErr;
-}
-
-static OSStatus getChildAtPoint(EventHandlerCallRef next_ref, EventRef event, QAInterface &interface)
-{
- Q_UNUSED(next_ref);
- if (interface.isValid() == false)
- return eventNotHandledErr;
-
- // Add the children for this interface to the global QAccessibelHierachyManager.
- accessibleHierarchyManager()->registerChildren(interface);
-
- Point where;
- GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, 0, sizeof(where), 0, &where);
- const QAInterface childInterface = interface.childAt(where.h, where.v);
-
- if (childInterface.isValid() == false || childInterface == interface)
- return eventNotHandledErr;
-
- const QAElement element = accessibleHierarchyManager()->lookup(childInterface);
- if (element.isValid() == false)
- return eventNotHandledErr;
-
- AXUIElementRef elementRef = element.element();
- CFRetain(elementRef);
- SetEventParameter(event, kEventParamAccessibleChild, typeCFTypeRef,
- sizeof(elementRef), &elementRef);
-
- return noErr;
-}
-
-/*
- Returns a list of actions the given interface supports.
- Currently implemented by getting the interface role and deciding based on that.
-*/
-static QList<QAccessible::Action> supportedPredefinedActions(const QAInterface &interface)
-{
- QList<QAccessible::Action> actions;
- switch (interface.role()) {
- default:
- // Most things can be pressed.
- actions.append(QAccessible::Press);
- break;
- }
-
- return actions;
-}
-
-/*
- Translates a predefined QAccessible::Action to a Mac action constant.
- Returns an empty string if the Qt Action has no mac equivalent.
-*/
-static QCFString translateAction(const QAccessible::Action action)
-{
- switch (action) {
- case QAccessible::Press:
- return CFStringRef(QAXPressAction);
- break;
- case QAccessible::Increase:
- return CFStringRef(QAXIncrementAction);
- break;
- case QAccessible::Decrease:
- return CFStringRef(QAXDecrementAction);
- break;
- case QAccessible::Accept:
- return CFStringRef(QAXConfirmAction);
- break;
- case QAccessible::Select:
- return CFStringRef(QAXPickAction);
- break;
- case QAccessible::Cancel:
- return CFStringRef(QAXCancelAction);
- break;
- default:
- return QCFString();
- break;
- }
-}
-
-/*
- Translates between a Mac action constant and a QAccessible::Action.
- Returns QAccessible::Default action if there is no Qt predefined equivalent.
-*/
-static QAccessible::Action translateAction(const CFStringRef actionName)
-{
- if(CFStringCompare(actionName, CFStringRef(QAXPressAction), 0) == kCFCompareEqualTo) {
- return QAccessible::Press;
- } else if(CFStringCompare(actionName, CFStringRef(QAXIncrementAction), 0) == kCFCompareEqualTo) {
- return QAccessible::Increase;
- } else if(CFStringCompare(actionName, CFStringRef(QAXDecrementAction), 0) == kCFCompareEqualTo) {
- return QAccessible::Decrease;
- } else if(CFStringCompare(actionName, CFStringRef(QAXConfirmAction), 0) == kCFCompareEqualTo) {
- return QAccessible::Accept;
- } else if(CFStringCompare(actionName, CFStringRef(QAXPickAction), 0) == kCFCompareEqualTo) {
- return QAccessible::Select;
- } else if(CFStringCompare(actionName, CFStringRef(QAXCancelAction), 0) == kCFCompareEqualTo) {
- return QAccessible::Cancel;
- } else {
- return QAccessible::DefaultAction;
- }
-}
-#endif // QT_MAC_USE_COCOA
-
-/*
- Copies the translated names all supported actions for an interface into the kEventParamAccessibleActionNames
- event parameter.
-*/
-#ifndef QT_MAC_USE_COCOA
-static OSStatus getAllActionNames(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface)
-{
- Q_UNUSED(next_ref);
-
- CFMutableArrayRef actions = 0;
- GetEventParameter(event, kEventParamAccessibleActionNames, typeCFMutableArrayRef, 0,
- sizeof(actions), 0, &actions);
-
- // Add supported predefined actions.
- const QList<QAccessible::Action> predefinedActions = supportedPredefinedActions(interface);
- for (int i = 0; i < predefinedActions.count(); ++i) {
- const QCFString action = translateAction(predefinedActions.at(i));
- if (action != QCFString())
- qt_mac_append_cf_uniq(actions, action);
- }
-
- // Add user actions
- const int actionCount = interface.userActionCount();
- for (int i = 0; i < actionCount; ++i) {
- const QString actionName = interface.actionText(i, QAccessible::Name);
- qt_mac_append_cf_uniq(actions, QCFString::toCFStringRef(actionName));
- }
-
- return noErr;
-}
-#endif
-
-/*
- Handles the perforNamedAction event.
-*/
-#ifndef QT_MAC_USE_COCOA
-static OSStatus performNamedAction(EventHandlerCallRef next_ref, EventRef event, const QAInterface& interface)
-{
- Q_UNUSED(next_ref);
-
- CFStringRef act;
- GetEventParameter(event, kEventParamAccessibleActionName, typeCFStringRef, 0,
- sizeof(act), 0, &act);
-
- const QAccessible::Action action = translateAction(act);
-
- // Perform built-in action
- if (action != QAccessible::DefaultAction) {
- interface.doAction(action, QVariantList());
- return noErr;
- }
-
- // Search for user-defined actions and perform it if found.
- const int actCount = interface.userActionCount();
- const QString qAct = QCFString::toQString(act);
- for(int i = 0; i < actCount; i++) {
- if(interface.actionText(i, QAccessible::Name) == qAct) {
- interface.doAction(i, QVariantList());
- break;
- }
- }
- return noErr;
-}
-
-static OSStatus setNamedAttribute(EventHandlerCallRef next_ref, EventRef event, const QAInterface &interface)
-{
- Q_UNUSED(next_ref);
- Q_UNUSED(event);
-
- CFStringRef var;
- GetEventParameter(event, kEventParamAccessibleAttributeName, typeCFStringRef, 0,
- sizeof(var), 0, &var);
- if(CFStringCompare(var, CFStringRef(QAXFocusedAttribute), 0) == kCFCompareEqualTo) {
- CFTypeRef val;
- if(GetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef, 0,
- sizeof(val), 0, &val) == noErr) {
- if(CFGetTypeID(val) == CFBooleanGetTypeID() &&
- CFEqual(static_cast<CFBooleanRef>(val), kCFBooleanTrue)) {
- interface.doAction(QAccessible::SetFocus);
- }
- }
- } else {
- bool found = false;
- for(int r = 0; text_bindings[r][0].qt != -1; r++) {
- if(interface.role() == (QAccessible::Role)text_bindings[r][0].qt) {
- for(int a = 1; text_bindings[r][a].qt != -1; a++) {
- if(CFStringCompare(var, CFStringRef(text_bindings[r][a].mac), 0) == kCFCompareEqualTo) {
- if(!text_bindings[r][a].settable) {
- } else {
- CFTypeRef val;
- if(GetEventParameter(event, kEventParamAccessibleAttributeValue, typeCFTypeRef, 0,
- sizeof(val), 0, &val) == noErr) {
- if(CFGetTypeID(val) == CFStringGetTypeID())
- interface.setText((QAccessible::Text)text_bindings[r][a].qt,
- QCFString::toQString(static_cast<CFStringRef>(val)));
-
- }
- }
- found = true;
- break;
- }
- }
- break;
- }
- }
- }
- return noErr;
-}
-
-/*
- This is the main accessibility event handler.
-*/
-static OSStatus accessibilityEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data)
-{
- Q_UNUSED(data)
-
- // Return if this event is not a AccessibleGetNamedAttribute event.
- const UInt32 eclass = GetEventClass(event);
- if (eclass != kEventClassAccessibility)
- return eventNotHandledErr;
-
- // Get the AXUIElementRef and QAInterface pointer
- AXUIElementRef element = 0;
- GetEventParameter(event, kEventParamAccessibleObject, typeCFTypeRef, 0, sizeof(element), 0, &element);
- QAInterface interface = accessibleHierarchyManager()->lookup(element);
- if (interface.isValid() == false)
- return eventNotHandledErr;
-
- const UInt32 ekind = GetEventKind(event);
- OSStatus status = noErr;
- switch (ekind) {
- case kEventAccessibleGetAllAttributeNames:
- status = getAllAttributeNames(event, interface, next_ref);
- break;
- case kEventAccessibleGetNamedAttribute:
- status = getNamedAttribute(next_ref, event, interface);
- break;
- case kEventAccessibleIsNamedAttributeSettable:
- status = isNamedAttributeSettable(event, interface);
- break;
- case kEventAccessibleGetChildAtPoint:
- status = getChildAtPoint(next_ref, event, interface);
- break;
- case kEventAccessibleGetAllActionNames:
- status = getAllActionNames(next_ref, event, interface);
- break;
- case kEventAccessibleGetFocusedChild:
- status = CallNextEventHandler(next_ref, event);
- break;
- case kEventAccessibleSetNamedAttribute:
- status = setNamedAttribute(next_ref, event, interface);
- break;
- case kEventAccessiblePerformNamedAction:
- status = performNamedAction(next_ref, event, interface);
- break;
- default:
- status = CallNextEventHandler(next_ref, event);
- break;
- };
- return status;
-}
-#endif
-
-void QAccessible::initialize()
-{
-#ifndef QT_MAC_USE_COCOA
- registerQtAccessibilityHIObjectSubclass();
- installApplicationEventhandler();
-#endif
-}
-
-// Sets thre root object for the application
-void QAccessible::setRootObject(QObject *object)
-{
- // Call installed root object handler if we have one
- if (rootObjectHandler) {
- rootObjectHandler(object);
- return;
- }
-
- rootObject = object;
-}
-
-void QAccessible::cleanup()
-{
- accessibleHierarchyManager()->reset();
-#ifndef QT_MAC_USE_COCOA
- removeEventhandler(applicationEventHandlerUPP);
- removeEventhandler(objectCreateEventHandlerUPP);
- removeEventhandler(accessibilityEventHandlerUPP);
-#endif
-}
-
-void QAccessible::updateAccessibility(QObject *object, int child, Event reason)
-{
- // Call installed update handler if we have one.
- if (updateHandler) {
- updateHandler(object, child, reason);
- return;
- }
-
-#ifndef QT_MAC_USE_COCOA
- // Return if the mac accessibility is not enabled.
- if(!AXAPIEnabled())
- return;
-
- // Work around crash, disable accessiblity for focus frames.
- if (qstrcmp(object->metaObject()->className(), "QFocusFrame") == 0)
- return;
-
-// qDebug() << "updateAccessibility" << object << child << hex << reason;
-
- if (reason == ObjectShow) {
- QAInterface interface = QAInterface(QAccessible::queryAccessibleInterface(object), child);
- accessibleHierarchyManager()->registerInterface(interface);
- }
-
- const QAElement element = accessibleHierarchyManager()->lookup(object, child);
- if (element.isValid() == false)
- return;
-
-
- CFStringRef notification = 0;
- if(object && object->isWidgetType() && reason == ObjectCreated) {
- notification = CFStringRef(QAXWindowCreatedNotification);
- } else if(reason == ValueChanged) {
- notification = CFStringRef(QAXValueChangedNotification);
- } else if(reason == MenuStart) {
- notification = CFStringRef(QAXMenuOpenedNotification);
- } else if(reason == MenuEnd) {
- notification = CFStringRef(QAXMenuClosedNotification);
- } else if(reason == LocationChanged) {
- notification = CFStringRef(QAXWindowMovedNotification);
- } else if(reason == ObjectShow || reason == ObjectHide ) {
- // When a widget is deleted we get a ObjectHide before the destroyed(QObject *)
- // signal is emitted (which makes sense). However, at this point we are in the
- // middle of the QWidget destructor which means that we have to be careful when
- // using the widget pointer. Since we can't control what the accessibilty interfaces
- // does when navigate() is called below we ignore the hide update in this case.
- // (the widget will be deleted soon anyway.)
- extern QWidgetPrivate * qt_widget_private(QWidget *);
- if (QWidget *widget = qobject_cast<QWidget*>(object)) {
- if (qt_widget_private(widget)->data.in_destructor)
- return;
-
- // Check widget parent as well, special case for preventing crash
- // when the viewport() of an abstract scroll area is hidden when
- // the QWidget destructor hides all its children.
- QWidget *parentWidget = widget->parentWidget();
- if (parentWidget && qt_widget_private(parentWidget)->data.in_destructor)
- return;
- }
-
- // There is no equivalent Mac notification for ObjectShow/Hide, so we call HIObjectSetAccessibilityIgnored
- // and isItInteresting which will mark the HIObject accociated with the element as ignored if the
- // QAccessible::Invisible state bit is set.
- QAInterface interface = accessibleHierarchyManager()->lookup(element);
- if (interface.isValid()) {
- HIObjectSetAccessibilityIgnored(element.object(), !isItInteresting(interface));
- }
-
- // If the interface manages its own children, also check if we should ignore those.
- if (isItemView(interface) == false && managesChildren(interface)) {
- for (int i = 1; i <= interface.childCount(); ++i) {
- QAInterface childInterface = interface.navigate(QAccessible::Child, i);
- if (childInterface.isValid() && childInterface.isHIView() == false) {
- const QAElement element = accessibleHierarchyManager()->lookup(childInterface);
- if (element.isValid()) {
- HIObjectSetAccessibilityIgnored(element.object(), !isItInteresting(childInterface));
- }
- }
- }
- }
-
- } else if(reason == Focus) {
- if(object && object->isWidgetType()) {
- QWidget *w = static_cast<QWidget*>(object);
- if(w->isWindow())
- notification = CFStringRef(QAXFocusedWindowChangedNotification);
- else
- notification = CFStringRef(QAXFocusedUIElementChangedNotification);
- }
- }
-
- if (!notification)
- return;
-
- AXNotificationHIObjectNotify(notification, element.object(), element.id());
-#endif
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_ACCESSIBILITY
diff --git a/src/gui/accessible/qaccessible_mac_carbon.cpp b/src/gui/accessible/qaccessible_mac_carbon.cpp
deleted file mode 100644
index 32a242f274..0000000000
--- a/src/gui/accessible/qaccessible_mac_carbon.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-static OSStatus applicationEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data);
-static EventHandlerUPP applicationEventHandlerUPP = 0;
-static EventTypeSpec application_events[] = {
- { kEventClassAccessibility, kEventAccessibleGetChildAtPoint },
- { kEventClassAccessibility, kEventAccessibleGetNamedAttribute }
-};
-
-static CFStringRef kObjectQtAccessibility = CFSTR("com.trolltech.qt.accessibility");
-static EventHandlerUPP objectCreateEventHandlerUPP = 0;
-static EventTypeSpec objectCreateEvents[] = {
- { kEventClassHIObject, kEventHIObjectConstruct },
- { kEventClassHIObject, kEventHIObjectInitialize },
- { kEventClassHIObject, kEventHIObjectDestruct },
- { kEventClassHIObject, kEventHIObjectPrintDebugInfo }
-};
-
-static OSStatus accessibilityEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data);
-static EventHandlerUPP accessibilityEventHandlerUPP = 0;
-static EventTypeSpec accessibilityEvents[] = {
- { kEventClassAccessibility, kEventAccessibleGetChildAtPoint },
- { kEventClassAccessibility, kEventAccessibleGetFocusedChild },
- { kEventClassAccessibility, kEventAccessibleGetAllAttributeNames },
- { kEventClassAccessibility, kEventAccessibleGetNamedAttribute },
- { kEventClassAccessibility, kEventAccessibleSetNamedAttribute },
- { kEventClassAccessibility, kEventAccessibleIsNamedAttributeSettable },
- { kEventClassAccessibility, kEventAccessibleGetAllActionNames },
- { kEventClassAccessibility, kEventAccessiblePerformNamedAction },
- { kEventClassAccessibility, kEventAccessibleGetNamedActionDescription }
-};
-
-static void installAcessibilityEventHandler(HIObjectRef hiObject)
-{
- if (!accessibilityEventHandlerUPP)
- accessibilityEventHandlerUPP = NewEventHandlerUPP(accessibilityEventHandler);
-
- InstallHIObjectEventHandler(hiObject, accessibilityEventHandlerUPP,
- GetEventTypeCount(accessibilityEvents),
- accessibilityEvents, 0, 0);
-}
-
-static OSStatus objectCreateEventHandler(EventHandlerCallRef next_ref, EventRef event, void *data)
-{
- Q_UNUSED(data)
- Q_UNUSED(event)
- Q_UNUSED(next_ref)
- return noErr;
-}
-
-static void registerQtAccessibilityHIObjectSubclass()
-{
- if (!objectCreateEventHandlerUPP)
- objectCreateEventHandlerUPP = NewEventHandlerUPP(objectCreateEventHandler);
- OSStatus err = HIObjectRegisterSubclass(kObjectQtAccessibility, 0, 0, objectCreateEventHandlerUPP,
- GetEventTypeCount(objectCreateEvents), objectCreateEvents, 0, 0);
- if (err && err != hiObjectClassExistsErr)
- qWarning("qaccessible_mac internal error: Could not register accessibility HIObject subclass");
-}
-
-static void installApplicationEventhandler()
-{
- if (!applicationEventHandlerUPP)
- applicationEventHandlerUPP = NewEventHandlerUPP(applicationEventHandler);
-
- OSStatus err = InstallApplicationEventHandler(applicationEventHandlerUPP,
- GetEventTypeCount(application_events), application_events,
- 0, 0);
-
- if (err && err != eventHandlerAlreadyInstalledErr)
- qWarning("qaccessible_mac internal error: Could not install application accessibility event handler");
-}
-
-static void removeEventhandler(EventHandlerUPP eventHandler)
-{
- if (eventHandler) {
- DisposeEventHandlerUPP(eventHandler);
- eventHandler = 0;
- }
-}
diff --git a/src/gui/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm
deleted file mode 100644
index 461b61aacf..0000000000
--- a/src/gui/accessible/qaccessible_mac_cocoa.mm
+++ /dev/null
@@ -1,239 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include "qaccessible.h"
-#include "qaccessible_mac_p.h"
-#include "qdebug.h"
-#include "qtabwidget.h"
-
-#include <private/qt_mac_p.h>
-#include <private/qcocoaview_mac_p.h>
-#include <private/qwidget_p.h>
-
-
-#ifndef QT_NO_ACCESSIBILITY
-
-#ifdef QT_MAC_USE_COCOA
-
-QT_BEGIN_NAMESPACE
-
-//#define MAC_ACCESSIBILTY_DEVELOPER_MODE
-
-#ifndef QT_NO_DEBUG_STREAM
-#ifdef MAC_ACCESSIBILTY_DEVELOPER_MODE
-#define MAC_ACCESSIBILTY_DEBUG QT_PREPEND_NAMESPACE(qDebug)
-#else
-#define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(qDebug)
-#endif
-#else
-#define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(QNoDebug)
-#endif
-
-typedef QMap<QAccessible::Role, NSString *> QMacAccessibiltyRoleMap;
-Q_GLOBAL_STATIC(QMacAccessibiltyRoleMap, qMacAccessibiltyRoleMap);
-
-static QAInterface interfaceForView(QT_MANGLE_NAMESPACE(QCocoaView) *view)
-{
- return QAInterface(QAccessible::queryAccessibleInterface([view qt_qwidget]));
-}
-
-/*
- Set up mappings from Qt accessibilty roles to Mac accessibilty roles.
-*/
-static void populateRoleMap()
-{
- QMacAccessibiltyRoleMap &roleMap = *qMacAccessibiltyRoleMap();
- roleMap[QAccessible::MenuItem] = NSAccessibilityMenuItemRole;
- roleMap[QAccessible::MenuBar] = NSAccessibilityMenuBarRole;
- roleMap[QAccessible::ScrollBar] = NSAccessibilityScrollBarRole;
- roleMap[QAccessible::Grip] = NSAccessibilityGrowAreaRole;
- roleMap[QAccessible::Window] = NSAccessibilityWindowRole;
- roleMap[QAccessible::Dialog] = NSAccessibilityWindowRole;
- roleMap[QAccessible::AlertMessage] = NSAccessibilityWindowRole;
- roleMap[QAccessible::ToolTip] = NSAccessibilityWindowRole;
- roleMap[QAccessible::HelpBalloon] = NSAccessibilityWindowRole;
- roleMap[QAccessible::PopupMenu] = NSAccessibilityMenuRole;
- roleMap[QAccessible::Application] = NSAccessibilityApplicationRole;
- roleMap[QAccessible::Pane] = NSAccessibilityGroupRole;
- roleMap[QAccessible::Grouping] = NSAccessibilityGroupRole;
- roleMap[QAccessible::Separator] = NSAccessibilitySplitterRole;
- roleMap[QAccessible::ToolBar] = NSAccessibilityToolbarRole;
- roleMap[QAccessible::PageTab] = NSAccessibilityRadioButtonRole;
- roleMap[QAccessible::ButtonMenu] = NSAccessibilityMenuButtonRole;
- roleMap[QAccessible::ButtonDropDown] = NSAccessibilityPopUpButtonRole;
- roleMap[QAccessible::SpinBox] = NSAccessibilityIncrementorRole;
- roleMap[QAccessible::Slider] = NSAccessibilitySliderRole;
- roleMap[QAccessible::ProgressBar] = NSAccessibilityProgressIndicatorRole;
- roleMap[QAccessible::ComboBox] = NSAccessibilityPopUpButtonRole;
- roleMap[QAccessible::RadioButton] = NSAccessibilityRadioButtonRole;
- roleMap[QAccessible::CheckBox] = NSAccessibilityCheckBoxRole;
- roleMap[QAccessible::StaticText] = NSAccessibilityStaticTextRole;
- roleMap[QAccessible::Table] = NSAccessibilityTableRole;
- roleMap[QAccessible::StatusBar] = NSAccessibilityStaticTextRole;
- roleMap[QAccessible::Column] = NSAccessibilityColumnRole;
- roleMap[QAccessible::ColumnHeader] = NSAccessibilityColumnRole;
- roleMap[QAccessible::Row] = NSAccessibilityRowRole;
- roleMap[QAccessible::RowHeader] = NSAccessibilityRowRole;
- roleMap[QAccessible::Cell] = NSAccessibilityTextFieldRole;
- roleMap[QAccessible::PushButton] = NSAccessibilityButtonRole;
- roleMap[QAccessible::EditableText] = NSAccessibilityTextFieldRole;
- roleMap[QAccessible::Link] = NSAccessibilityTextFieldRole;
- roleMap[QAccessible::Indicator] = NSAccessibilityValueIndicatorRole;
- roleMap[QAccessible::Splitter] = NSAccessibilitySplitGroupRole;
- roleMap[QAccessible::List] = NSAccessibilityListRole;
- roleMap[QAccessible::ListItem] = NSAccessibilityStaticTextRole;
- roleMap[QAccessible::Cell] = NSAccessibilityStaticTextRole;
-}
-
-/*
- Returns a Mac accessibility role for the given interface, or
- NSAccessibilityUnknownRole if no role mapping is found.
-*/
-static NSString *macRoleForInterface(QAInterface interface)
-{
- const QAccessible::Role qtRole = interface.role();
- QMacAccessibiltyRoleMap &roleMap = *qMacAccessibiltyRoleMap();
-
- if (roleMap.isEmpty())
- populateRoleMap();
-
- MAC_ACCESSIBILTY_DEBUG() << "role for" << interface.object() << "interface role" << hex << qtRole;
-
- if (roleMap.contains(qtRole)) {
- MAC_ACCESSIBILTY_DEBUG() << "return" << roleMap[qtRole];
- return roleMap[qtRole];
- }
-
- MAC_ACCESSIBILTY_DEBUG() << "return NSAccessibilityUnknownRole";
- return NSAccessibilityUnknownRole;
-}
-
-/*
- Is the interface a QTabBar embedded in a QTabWidget?
- (as opposed to a stand-alone tab bar)
-*/
-static bool isEmbeddedTabBar(const QAInterface &interface)
-{
- QObject *object = interface.object();
- if (interface.role() == QAccessible::PageTabList && object)
- return (qobject_cast<QTabWidget *>(object->parent()));
-
- return false;
-}
-
-static bool isInterfaceIgnored(QAInterface interface)
-{
- // Mac accessibility does not have an attribute that corresponds to the
- // Invisible/Offscreen state. Use the ignore facility to disable them.
- const QAccessible::State state = interface.state();
- if (state & QAccessible::Invisible ||
- state & QAccessible::Offscreen )
- return false;
-
- // Hide QTabBars that has a QTabWidget parent (the QTabWidget handles the accessibility)
- if (isEmbeddedTabBar(interface))
- return false;
-
- if (QObject * const object = interface.object()) {
- const QString className = QLatin1String(object->metaObject()->className());
-
- // Prevent VoiceOver from focusing on tool tips by ignoring those
- // interfaces. Shifting VoiceOver focus to the tool tip is confusing
- // and the contents of the tool tip is avalible through the description
- // attribute anyway.
- if (className == QLatin1String("QTipLabel"))
- return false;
- }
-
- // Hide interfaces with an unknown role. When developing it's often useful to disable
- // this check to see all interfaces in the hierarchy.
-#ifndef MAC_ACCESSIBILTY_DEVELOPER_MODE
- return [macRoleForInterface(interface) isEqualToString: NSAccessibilityUnknownRole];
-#else
- return NO;
-#endif
-}
-
-QT_END_NAMESPACE
-
-@implementation QT_MANGLE_NAMESPACE(QCocoaView) (Accessibility)
-
-- (BOOL)accessibilityIsIgnored
-{
- QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
- return isInterfaceIgnored(interface);
-}
-
-- (NSArray *)accessibilityAttributeNames
-{
- QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
-
- static NSArray *attributes = nil;
- if (attributes == nil) {
- attributes = [super accessibilityAttributeNames];
-
- }
- return attributes;
-}
-
-- (id)accessibilityAttributeValue:(NSString *)attribute
-{
- MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self <<
- QT_PREPEND_NAMESPACE(QCFString)::toQString(reinterpret_cast<CFStringRef>(attribute));
-
- QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
-
- // Switch on the attribute name and call the appropriate handler function.
- // Pass the call on to the NSView class for attributes we don't handle.
- if ([attribute isEqualToString:@"AXRole"]) {
- return macRoleForInterface(interface);
- } else {
- return [super accessibilityAttributeValue:attribute];
- }
-}
-
-@end
-
-#endif // QT_MAC_USE_COCOA
-
-#endif // QT_NO_ACCESSIBILITY
-
diff --git a/src/gui/accessible/qaccessible_mac_p.h b/src/gui/accessible/qaccessible_mac_p.h
deleted file mode 100644
index 9b7d25a334..0000000000
--- a/src/gui/accessible/qaccessible_mac_p.h
+++ /dev/null
@@ -1,479 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QACCESSIBLE_MAC_P_H
-#define QACCESSIBLE_MAC_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-//
-
-#include <qglobal.h>
-#include <private/qt_mac_p.h>
-#include <qaccessible.h>
-#include <qwidget.h>
-#include <qdebug.h>
-
-//#define Q_ACCESSIBLE_MAC_DEBUG
-
-QT_BEGIN_NAMESPACE
-
-/*
- QAccessibleInterfaceWrapper wraps QAccessibleInterface and adds
- a ref count. QAccessibleInterfaceWrapper is a "by-value" class.
-*/
-class Q_AUTOTEST_EXPORT QAccessibleInterfaceWrapper
-{
-public:
- QAccessibleInterfaceWrapper()
- : interface(0), childrenIsRegistered(new bool(false)), refCount(new int(1)) { }
-
- QAccessibleInterfaceWrapper(QAccessibleInterface *interface)
- :interface(interface), childrenIsRegistered(new bool(false)), refCount(new int(1)) { }
-
- ~QAccessibleInterfaceWrapper()
- {
- if (--(*refCount) == 0) {
- delete interface;
- delete refCount;
- delete childrenIsRegistered;
- }
- }
-
- QAccessibleInterfaceWrapper(const QAccessibleInterfaceWrapper &other)
- :interface(other.interface), childrenIsRegistered(other.childrenIsRegistered), refCount(other.refCount)
- {
- ++(*refCount);
- }
-
- void operator=(const QAccessibleInterfaceWrapper &other)
- {
- if (other.interface == interface)
- return;
-
- if (--(*refCount) == 0) {
- delete interface;
- delete refCount;
- delete childrenIsRegistered;
- }
-
- interface = other.interface;
- childrenIsRegistered = other.childrenIsRegistered;
- refCount = other.refCount;
- ++(*refCount);
- }
-
- QAccessibleInterface *interface;
- bool *childrenIsRegistered;
-private:
- int *refCount;
-};
-
-/*
- QAInterface represents one accessiblity item. It hides the fact that
- one QAccessibleInterface may represent more than one item, and it also
- automates the memory management for QAccessibleInterfaces using the
- QAccessibleInterfaceWrapper wrapper class.
-
- It has the same API as QAccessibleInterface, minus the child parameter
- in the functions.
-*/
-class Q_AUTOTEST_EXPORT QAInterface : public QAccessible
-{
-public:
- QAInterface()
- : base(QAccessibleInterfaceWrapper())
- { }
-
- QAInterface(QAccessibleInterface *interface, int child = 0)
- {
- if (interface == 0 || child > interface->childCount()) {
- base = QAccessibleInterfaceWrapper();
- } else {
- base = QAccessibleInterfaceWrapper(interface);
- m_cachedObject = interface->object();
- this->child = child;
- }
- }
-
- QAInterface(QAccessibleInterfaceWrapper wrapper, int child = 0)
- :base(wrapper), m_cachedObject(wrapper.interface->object()), child(child)
- { }
-
- QAInterface(const QAInterface &other, int child)
- {
- if (other.isValid() == false || child > other.childCount()) {
- base = QAccessibleInterfaceWrapper();
- } else {
- base = other.base;
- m_cachedObject = other.m_cachedObject;
- this->child = child;
- }
- }
-
- bool operator==(const QAInterface &other) const;
- bool operator!=(const QAInterface &other) const;
-
- inline QString actionText (int action, Text text) const
- { return base.interface->actionText(action, text, child); }
-
- QAInterface childAt(int x, int y) const
- {
- if (!checkValid())
- return QAInterface();
-
- const int foundChild = base.interface->childAt(x, y);
-
- if (foundChild == -1)
- return QAInterface();
-
- if (child == 0)
- return navigate(QAccessible::Child, foundChild);
-
- if (foundChild == child)
- return *this;
- return QAInterface();
- }
-
- int indexOfChild(const QAInterface &child) const
- {
- if (!checkValid())
- return -1;
-
- if (*this != child.parent())
- return -1;
-
- if (object() == child.object())
- return child.id();
-
- return base.interface->indexOfChild(child.base.interface);
- }
-
- inline int childCount() const
- {
- if (!checkValid())
- return 0;
-
- if (child != 0)
- return 0;
- return base.interface->childCount();
- }
-
- QList<QAInterface> children() const
- {
- if (!checkValid())
- return QList<QAInterface>();
-
- QList<QAInterface> children;
- for (int i = 1; i <= childCount(); ++i) {
- children.append(navigate(QAccessible::Child, i));
- }
- return children;
- }
-
- QAInterface childAt(int index) const
- {
- return navigate(QAccessible::Child, index);
- }
-
- inline void doAction(int action, const QVariantList &params = QVariantList()) const
- {
- if (!checkValid())
- return;
-
- base.interface->doAction(action, child, params);
- }
-
- QAInterface navigate(RelationFlag relation, int entry) const;
-
- inline QObject * object() const
- {
- if (!checkValid())
- return 0;
-
- return base.interface->object();
- }
-
- QAInterface objectInterface() const
- {
- if (!checkValid())
- return QAInterface();
-
- QObject *obj = object();
- QAInterface current = *this;
- while (obj == 0)
- {
- QAInterface parent = current.parent();
- if (parent.isValid() == false)
- break;
- obj = parent.object();
- current = parent;
- }
- return current;
- }
-
- inline HIObjectRef hiObject() const
- {
- if (!checkValid())
- return 0;
- QWidget * const widget = qobject_cast<QWidget * const>(object());
- if (widget)
- return (HIObjectRef)widget->winId();
- else
- return 0;
- }
-
- inline QObject * cachedObject() const
- {
- if (!checkValid())
- return 0;
- return m_cachedObject;
- }
-
- inline QRect rect() const
- {
- if (!checkValid())
- return QRect();
- return base.interface->rect(child);
- }
-
- inline Role role() const
- {
- if (!checkValid())
- return QAccessible::NoRole;
- return base.interface->role(child);
- }
-
- inline void setText(Text t, const QString &text) const
- {
- if (!checkValid())
- return;
- base.interface->setText(t, child, text);
- }
-
- inline State state() const
- {
- if (!checkValid())
- return 0;
- return base.interface->state(child);
- }
-
- inline QString text (Text text) const
- {
- if (!checkValid())
- return QString();
- return base.interface->text(text, child);
- }
-
- inline QString value() const
- { return text(QAccessible::Value); }
-
- inline QString name() const
- { return text(QAccessible::Name); }
-
- inline int userActionCount() const
- {
- if (!checkValid())
- return 0;
- return base.interface->userActionCount(child);
- }
-
- inline QString className() const
- {
- if (!checkValid())
- return QString();
- return QLatin1String(base.interface->object()->metaObject()->className());
- }
-
- inline bool isHIView() const
- { return (child == 0 && object() != 0); }
-
- inline int id() const
- { return child; }
-
- inline bool isValid() const
- {
- return (base.interface != 0 && base.interface->isValid());
- }
-
- QAInterface parent() const
- { return navigate(QAccessible::Ancestor, 1); }
-
- QAccessibleInterfaceWrapper interfaceWrapper() const
- { return base; }
-
-protected:
- bool checkValid() const
- {
- const bool valid = isValid();
-#ifdef Q_ACCESSIBLE_MAC_DEBUG
- if (!valid)
- qFatal("QAccessible_mac: tried to use invalid interface.");
-#endif
- return valid;
- }
-
- QAccessibleInterfaceWrapper base;
- QObject *m_cachedObject;
- int child;
-};
-
-Q_AUTOTEST_EXPORT QDebug operator<<(QDebug debug, const QAInterface &interface);
-
-/*
- QAElement is a thin wrapper around an AXUIElementRef that automates
- the ref-counting.
-*/
-class Q_AUTOTEST_EXPORT QAElement
-{
-public:
- QAElement();
- explicit QAElement(AXUIElementRef elementRef);
- QAElement(const QAElement &element);
- QAElement(HIObjectRef, int child);
- ~QAElement();
-
- inline HIObjectRef object() const
- {
-#ifndef Q_WS_MAC64
- return AXUIElementGetHIObject(elementRef);
-#else
- return 0;
-#endif
- }
-
- inline int id() const
- {
- UInt64 theId;
-#ifndef QT_MAC_USE_COCOA
- AXUIElementGetIdentifier(elementRef, &theId);
-#else
- theId = 0;
-#endif
- return theId;
- }
-
- inline AXUIElementRef element() const
- {
- return elementRef;
- }
-
- inline bool isValid() const
- {
- return (elementRef != 0);
- }
-
- void operator=(const QAElement &other);
- bool operator==(const QAElement &other) const;
-private:
- AXUIElementRef elementRef;
-};
-
-
-class QInterfaceFactory
-{
-public:
- virtual QAInterface interface(UInt64 identifier) = 0;
- virtual QAElement element(int id) = 0;
- virtual QAElement element(const QAInterface &interface)
- {
- return element(interface.id());
- }
- virtual void registerChildren() = 0;
- virtual ~QInterfaceFactory() {}
-};
-
-/*
- QAccessibleHierarchyManager bridges the Mac and Qt accessibility hierarchies.
- There is a one-to-one relationship between QAElements on the Mac side
- and QAInterfaces on the Qt side, and this class provides lookup functions
- that translates between these to items.
-
- The identity of a QAInterface is determined by its QAccessibleInterface and
- child identifier, and the identity of a QAElement is determined by its
- HIObjectRef and identifier.
-
- QAccessibleHierarchyManager receives QObject::destroyed() signals and deletes
- the accessibility objects for destroyed objects.
-*/
-class Q_AUTOTEST_EXPORT QAccessibleHierarchyManager : public QObject
-{
-Q_OBJECT
-public:
- ~QAccessibleHierarchyManager() { reset(); }
- static QAccessibleHierarchyManager *instance();
- void reset();
-
- QAElement registerInterface(QObject *object, int child);
- QAElement registerInterface(const QAInterface &interface);
- void registerInterface(QObject *object, HIObjectRef hiobject, QInterfaceFactory *interfaceFactory);
-
- void registerChildren(const QAInterface &interface);
-
- QAInterface lookup(const AXUIElementRef &element);
- QAInterface lookup(const QAElement &element);
- QAElement lookup(const QAInterface &interface);
- QAElement lookup(QObject * const object, int id);
-private slots:
- void objectDestroyed(QObject *);
-private:
- typedef QHash<QObject *, QInterfaceFactory *> QObjectElementHash;
- typedef QHash<HIObjectRef, QInterfaceFactory *> HIObjectInterfaceHash;
- typedef QHash<QObject *, HIObjectRef> QObjectHIObjectHash;
-
- QObjectElementHash qobjectElementHash;
- HIObjectInterfaceHash hiobjectInterfaceHash;
- QObjectHIObjectHash qobjectHiobjectHash;
-};
-
-Q_AUTOTEST_EXPORT bool isItInteresting(const QAInterface &interface);
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/gui/accessible/qaccessiblebridge.cpp b/src/gui/accessible/qaccessiblebridge.cpp
index b08a2e83bf..d702972cd2 100644
--- a/src/gui/accessible/qaccessiblebridge.cpp
+++ b/src/gui/accessible/qaccessiblebridge.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/accessible/qaccessiblebridge.h b/src/gui/accessible/qaccessiblebridge.h
index 73edf51183..d0470f38e6 100644
--- a/src/gui/accessible/qaccessiblebridge.h
+++ b/src/gui/accessible/qaccessiblebridge.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp
index 18941437fe..e271df2a13 100644
--- a/src/gui/accessible/qaccessibleobject.cpp
+++ b/src/gui/accessible/qaccessibleobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -96,6 +96,8 @@ QList<QByteArray> QAccessibleObjectPrivate::actionList() const
\ingroup accessibility
\inmodule QtWidgets
+ This class is part of \l {Accessibility for QWidget Applications}.
+
This class is mainly provided for convenience. All subclasses of
the QAccessibleInterface that provide implementations of non-widget objects
should use this class as their base class.
@@ -154,6 +156,18 @@ void QAccessibleObject::setText(QAccessible::Text, const QString &)
{
}
+/*! \reimp */
+QAccessibleInterface *QAccessibleObject::childAt(int x, int y) const
+{
+ for (int i = 0; i < childCount(); ++i) {
+ QAccessibleInterface *childIface = child(i);
+ if (childIface->rect().contains(x,y)) {
+ return childIface;
+ }
+ }
+ return 0;
+}
+
/*!
\class QAccessibleApplication
\brief The QAccessibleApplication class implements the QAccessibleInterface for QApplication.
@@ -207,23 +221,7 @@ int QAccessibleApplication::childCount() const
int QAccessibleApplication::indexOfChild(const QAccessibleInterface *child) const
{
const QObjectList tlw(topLevelObjects());
- int index = tlw.indexOf(child->object());
- if (index != -1)
- ++index;
- return index;
-}
-
-/*! \reimp */
-int QAccessibleApplication::childAt(int x, int y) const
-{
- for (int i = 0; i < childCount(); ++i) {
- QAccessibleInterface *childIface = child(i);
- QRect geom = childIface->rect();
- if (geom.contains(x,y))
- return i+1;
- delete childIface;
- }
- return rect().contains(x,y) ? 0 : -1;
+ return tlw.indexOf(child->object());
}
/*! \reimp */
@@ -273,9 +271,6 @@ int QAccessibleApplication::navigate(QAccessible::RelationFlag relation, int,
return 0;
}
break;
- case QAccessible::Ancestor:
- *target = parent();
- return 0;
default:
break;
}
@@ -306,7 +301,7 @@ QAccessible::Role QAccessibleApplication::role() const
/*! \reimp */
QAccessible::State QAccessibleApplication::state() const
{
- return QGuiApplication::activeWindow() ? QAccessible::Focused : QAccessible::Normal;
+ return QAccessible::State();
}
diff --git a/src/gui/accessible/qaccessibleobject.h b/src/gui/accessible/qaccessibleobject.h
index f2a9fd0430..58b95baffa 100644
--- a/src/gui/accessible/qaccessibleobject.h
+++ b/src/gui/accessible/qaccessibleobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,6 +67,7 @@ public:
// properties
QRect rect() const;
void setText(QAccessible::Text t, const QString &text);
+ QAccessibleInterface *childAt(int x, int y) const;
protected:
virtual ~QAccessibleObject();
@@ -89,7 +90,6 @@ public:
// navigation
QAccessibleInterface *parent() const;
- int childAt(int x, int y) const;
QAccessibleInterface *child(int index) const;
int navigate(QAccessible::RelationFlag, int, QAccessibleInterface **) const;
diff --git a/src/gui/accessible/qaccessibleplugin.cpp b/src/gui/accessible/qaccessibleplugin.cpp
index 618a31ad5e..0d9d57b0ec 100644
--- a/src/gui/accessible/qaccessibleplugin.cpp
+++ b/src/gui/accessible/qaccessibleplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/accessible/qaccessibleplugin.h b/src/gui/accessible/qaccessibleplugin.h
index 4e09034dfd..d3610e40f6 100644
--- a/src/gui/accessible/qaccessibleplugin.h
+++ b/src/gui/accessible/qaccessibleplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/accessible/qplatformaccessibility_qpa.cpp b/src/gui/accessible/qplatformaccessibility_qpa.cpp
index 7df827552d..47c351921e 100644
--- a/src/gui/accessible/qplatformaccessibility_qpa.cpp
+++ b/src/gui/accessible/qplatformaccessibility_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -123,10 +123,7 @@ void QPlatformAccessibility::initialize()
if (isInit)
return;
isInit = true; // ### not atomic
-#ifdef Q_OS_UNIX
- if (qgetenv("QT_ACCESSIBILITY") != "1")
- return;
-#endif
+
#ifndef QT_NO_LIBRARY
const QStringList l = bridgeloader()->keys();
for (int i = 0; i < l.count(); ++i) {
diff --git a/src/gui/accessible/qplatformaccessibility_qpa.h b/src/gui/accessible/qplatformaccessibility_qpa.h
index 2931f4180a..15297110b8 100644
--- a/src/gui/accessible/qplatformaccessibility_qpa.h
+++ b/src/gui/accessible/qplatformaccessibility_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 4675533144..4ee656f777 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index db8d8b7a38..02712b4026 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qegl_qpa.cpp b/src/gui/egl/qegl_qpa.cpp
index c3eb044b22..2b7daf47b2 100644
--- a/src/gui/egl/qegl_qpa.cpp
+++ b/src/gui/egl/qegl_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qegl_stub.cpp b/src/gui/egl/qegl_stub.cpp
index 783393c148..3d9d72587e 100644
--- a/src/gui/egl/qegl_stub.cpp
+++ b/src/gui/egl/qegl_stub.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h
index 7ea18627d1..70cdfc72ac 100644
--- a/src/gui/egl/qeglcontext_p.h
+++ b/src/gui/egl/qeglcontext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 7f4785499d..29b1cd371d 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h
index ec596200fb..d7bc0893d4 100644
--- a/src/gui/egl/qeglproperties_p.h
+++ b/src/gui/egl/qeglproperties_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/egl/qeglproperties_stub.cpp b/src/gui/egl/qeglproperties_stub.cpp
index c04f6a1070..7be8a0a4b9 100644
--- a/src/gui/egl/qeglproperties_stub.cpp
+++ b/src/gui/egl/qeglproperties_stub.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index 4c03379550..6c1320e868 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h
index a3104f5083..5740b874db 100644
--- a/src/gui/image/qbitmap.h
+++ b/src/gui/image/qbitmap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 3011a6c130..3d9f8228f2 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h
index 373f8fbaaf..f2eb8f69b2 100644
--- a/src/gui/image/qbmphandler_p.h
+++ b/src/gui/image/qbmphandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
index 2708790947..6968ca6736 100644
--- a/src/gui/image/qgifhandler.cpp
+++ b/src/gui/image/qgifhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qgifhandler_p.h b/src/gui/image/qgifhandler_p.h
index ca82f3c979..0d9724a071 100644
--- a/src/gui/image/qgifhandler_p.h
+++ b/src/gui/image/qgifhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index c107fea919..564abd2af2 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -114,17 +114,6 @@ static QImage rotated90(const QImage &src);
static QImage rotated180(const QImage &src);
static QImage rotated270(const QImage &src);
-// ### Qt 5: remove
-Q_GUI_EXPORT qint64 qt_image_id(const QImage &image)
-{
- return image.cacheKey();
-}
-
-const QVector<QRgb> *qt_image_colortable(const QImage &image)
-{
- return &image.d->colortable;
-}
-
QBasicAtomicInt qimage_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
QImageData::QImageData()
@@ -5874,4 +5863,12 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
\internal
*/
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QImage &i)
+{
+ dbg.nospace() << "QImage(" << i.size() << ')';
+ return dbg.space();
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index a18d81068e..7a5a732c9a 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -295,8 +295,6 @@ private:
friend class QRasterPlatformPixmap;
friend class QBlittablePlatformPixmap;
friend class QPixmapCacheEntry;
- friend Q_GUI_EXPORT qint64 qt_image_id(const QImage &image);
- friend const QVector<QRgb> *qt_image_colortable(const QImage &image);
public:
typedef QImageData * DataPtr;
@@ -363,9 +361,9 @@ inline QString QImage::text(const QImageTextKeyLang&kl) const
{
if (!d)
return QString();
- QString k = QString::fromAscii(kl.key);
+ QString k = QString::fromAscii(kl.key.constData());
if (!kl.lang.isEmpty())
- k += QLatin1Char('/') + QString::fromAscii(kl.lang);
+ k += QLatin1Char('/') + QString::fromAscii(kl.lang.constData());
return text(k);
}
@@ -408,6 +406,11 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QImage &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QImage &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_GUI_EXPORT QDebug operator<<(QDebug, const QImage &);
+#endif
+
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/image/qimage_neon.cpp b/src/gui/image/qimage_neon.cpp
index a91bd94b03..cdf817b051 100644
--- a/src/gui/image/qimage_neon.cpp
+++ b/src/gui/image/qimage_neon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index 77b9a7d1a1..6e846fd0cf 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimage_sse2.cpp b/src/gui/image/qimage_sse2.cpp
index fe0bf8b303..872d1d6be7 100644
--- a/src/gui/image/qimage_sse2.cpp
+++ b/src/gui/image/qimage_sse2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
index fcdd4e5eb2..95cf694d2a 100644
--- a/src/gui/image/qimage_ssse3.cpp
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimageiohandler.cpp b/src/gui/image/qimageiohandler.cpp
index 80e8fec9d0..d9691563b1 100644
--- a/src/gui/image/qimageiohandler.cpp
+++ b/src/gui/image/qimageiohandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimageiohandler.h b/src/gui/image/qimageiohandler.h
index ace49c9be0..188b4ef1a8 100644
--- a/src/gui/image/qimageiohandler.h
+++ b/src/gui/image/qimageiohandler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp
index 7901045593..e83897aced 100644
--- a/src/gui/image/qimagepixmapcleanuphooks.cpp
+++ b/src/gui/image/qimagepixmapcleanuphooks.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimagepixmapcleanuphooks_p.h b/src/gui/image/qimagepixmapcleanuphooks_p.h
index c98da6110a..11abe173c4 100644
--- a/src/gui/image/qimagepixmapcleanuphooks_p.h
+++ b/src/gui/image/qimagepixmapcleanuphooks_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 4bf4b08349..b6345191d6 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimagereader.h b/src/gui/image/qimagereader.h
index b85ef2b61d..f132991d92 100644
--- a/src/gui/image/qimagereader.h
+++ b/src/gui/image/qimagereader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 82ae64593a..b7d57fa4d3 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qimagewriter.h b/src/gui/image/qimagewriter.h
index cc7fdd2871..5aac7e8599 100644
--- a/src/gui/image/qimagewriter.h
+++ b/src/gui/image/qimagewriter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index 673a6d63d9..f0f9368e22 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qjpeghandler_p.h b/src/gui/image/qjpeghandler_p.h
index c573b4944e..7827804959 100644
--- a/src/gui/image/qjpeghandler_p.h
+++ b/src/gui/image/qjpeghandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qmnghandler.cpp b/src/gui/image/qmnghandler.cpp
index 179fff8e93..6a6ee8d2cf 100644
--- a/src/gui/image/qmnghandler.cpp
+++ b/src/gui/image/qmnghandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qmnghandler_p.h b/src/gui/image/qmnghandler_p.h
index f217f0da7f..42b4fd06a8 100644
--- a/src/gui/image/qmnghandler_p.h
+++ b/src/gui/image/qmnghandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index ff00059f51..0be6833a87 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1017,15 +1017,6 @@ void QMovie::setCacheMode(CacheMode cacheMode)
d->cacheMode = cacheMode;
}
-/*!
- \internal
-*/
-QMovie::CacheMode QMovie::cacheMode()
-{
- Q_D(QMovie);
- return d->cacheMode;
-}
-
QT_END_NAMESPACE
#include "moc_qmovie.cpp"
diff --git a/src/gui/image/qmovie.h b/src/gui/image/qmovie.h
index 0278957091..eb2b81d0b5 100644
--- a/src/gui/image/qmovie.h
+++ b/src/gui/image/qmovie.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -125,8 +125,6 @@ public:
CacheMode cacheMode() const;
void setCacheMode(CacheMode mode);
- CacheMode cacheMode(); // ### Qt 5: remove me
-
Q_SIGNALS:
void started();
void resized(const QSize &size);
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 30c1c0621e..776a17857e 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h
index 433460b463..0d8834cad3 100644
--- a/src/gui/image/qnativeimage_p.h
+++ b/src/gui/image/qnativeimage_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp
index ec3a4a050a..cf9ecc17da 100644
--- a/src/gui/image/qpaintengine_pic.cpp
+++ b/src/gui/image/qpaintengine_pic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpaintengine_pic_p.h b/src/gui/image/qpaintengine_pic_p.h
index 4307e3ad69..830867d89d 100644
--- a/src/gui/image/qpaintengine_pic_p.h
+++ b/src/gui/image/qpaintengine_pic_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index dfc84c56d8..1ca34df356 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1008,17 +1008,6 @@ int QPicture::metric(PaintDeviceMetric m) const
\internal
*/
-/*! \internal
-### Qt 5 - remove me
- */
-void QPicture::detach_helper()
-{
- // QExplicitelySharedDataPointer takes care of cloning using
- // QPicturePrivate's copy constructor. Do not call detach_helper() anymore
- // and remove in Qt 5, please.
- Q_ASSERT_X(false, "QPicture::detach_helper()", "Do not call this function");
-}
-
/*!
Assigns picture \a p to this picture and returns a reference to
this picture.
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index 1c5d3a9c8f..e408d65cbc 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -107,7 +107,6 @@ protected:
private:
bool exec(QPainter *p, QDataStream &ds, int i);
- void detach_helper();
QExplicitlySharedDataPointer<QPicturePrivate> d_ptr;
friend class QPicturePaintEngine;
diff --git a/src/gui/image/qpicture_p.h b/src/gui/image/qpicture_p.h
index 097ba72e60..8c68d19558 100644
--- a/src/gui/image/qpicture_p.h
+++ b/src/gui/image/qpicture_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpictureformatplugin.cpp b/src/gui/image/qpictureformatplugin.cpp
index 175406e661..558d4febce 100644
--- a/src/gui/image/qpictureformatplugin.cpp
+++ b/src/gui/image/qpictureformatplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpictureformatplugin.h b/src/gui/image/qpictureformatplugin.h
index b030c05913..9fd79c001d 100644
--- a/src/gui/image/qpictureformatplugin.h
+++ b/src/gui/image/qpictureformatplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 2a2bd5d6fa..48d393cc24 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1631,4 +1631,12 @@ QPlatformPixmap* QPixmap::handle() const
return data.data();
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QPixmap &r)
+{
+ dbg.nospace() << "QPixmap(" << r.size() << ')';
+ return dbg.space();
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index ea73119538..5e8ef70828 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -238,6 +238,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPixmap &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPixmap &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_GUI_EXPORT QDebug operator<<(QDebug, const QPixmap &);
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index 2a47a891c7..041c11af3a 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h
index b0a9b7f848..42d649642f 100644
--- a/src/gui/image/qpixmap_blitter_p.h
+++ b/src/gui/image/qpixmap_blitter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,8 +72,11 @@ public:
void markRasterOverlay(const QRectF &);
void markRasterOverlay(const QPointF &, const QTextItem &);
void markRasterOverlay(const QVectorPath &);
+ void markRasterOverlay(const QPainterPath &);
void markRasterOverlay(const QRect *rects, int rectCount);
void markRasterOverlay(const QRectF *rects, int rectCount);
+ void markRasterOverlay(const QPointF *points, int pointCount);
+ void markRasterOverlay(const QPoint *points, int pointCount);
void unmarkRasterOverlay(const QRectF &);
#ifdef QT_BLITTER_RASTEROVERLAY
@@ -153,6 +156,35 @@ inline void QBlittablePlatformPixmap::markRasterOverlay(const QRectF *rects, int
#endif
}
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QPointF *points, int pointCount)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+#error "not ported yet"
+#else
+ Q_UNUSED(points);
+ Q_UNUSED(pointCount);
+#endif
+}
+
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QPoint *points, int pointCount)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+#error "not ported yet"
+#else
+ Q_UNUSED(points);
+ Q_UNUSED(pointCount);
+#endif
+}
+
+inline void QBlittablePlatformPixmap::markRasterOverlay(const QPainterPath& path)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+#error "not ported yet"
+#else
+ Q_UNUSED(path);
+#endif
+}
+
inline void QBlittablePlatformPixmap::unmarkRasterOverlay(const QRectF &rect)
{
#ifdef QT_BLITTER_RASTEROVERLAY
diff --git a/src/gui/image/qpixmap_qpa.cpp b/src/gui/image/qpixmap_qpa.cpp
index 4fe162efd8..7f2ff2e266 100644
--- a/src/gui/image/qpixmap_qpa.cpp
+++ b/src/gui/image/qpixmap_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 887074c7b7..424572ebd4 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h
index 91ed4cfdc5..de4d0e6f17 100644
--- a/src/gui/image/qpixmap_raster_p.h
+++ b/src/gui/image/qpixmap_raster_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index f46d503936..5ee7ca9eba 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 94f38347c1..0f874bee6c 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index e5c20c8e78..81f9f4b028 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
index 7b96f5a2cf..2f609a8471 100644
--- a/src/gui/image/qpixmapcache_p.h
+++ b/src/gui/image/qpixmapcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp
index e1bf944d9b..30f1f4819b 100644
--- a/src/gui/image/qplatformpixmap.cpp
+++ b/src/gui/image/qplatformpixmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qplatformpixmap_qpa.h b/src/gui/image/qplatformpixmap_qpa.h
index ad0a8dc69e..13c3bc2fe8 100644
--- a/src/gui/image/qplatformpixmap_qpa.h
+++ b/src/gui/image/qplatformpixmap_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 1714442eb6..a935ea3a28 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qpnghandler_p.h b/src/gui/image/qpnghandler_p.h
index 1ee22d73c9..8f17bd18a4 100644
--- a/src/gui/image/qpnghandler_p.h
+++ b/src/gui/image/qpnghandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index e4dbde8ece..b08f97a3ca 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qppmhandler_p.h b/src/gui/image/qppmhandler_p.h
index a1cd9594e9..43e9b09f70 100644
--- a/src/gui/image/qppmhandler_p.h
+++ b/src/gui/image/qppmhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp
index 4dc9775d46..475622021b 100644
--- a/src/gui/image/qtiffhandler.cpp
+++ b/src/gui/image/qtiffhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -496,13 +496,13 @@ bool QTiffHandler::write(const QImage &image)
}
//// write the color table
// allocate the color tables
- uint16 *redTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16)));
- uint16 *greenTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16)));
- uint16 *blueTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16)));
+ uint16 *redTable = static_cast<uint16 *>(malloc(256 * sizeof(uint16)));
+ uint16 *greenTable = static_cast<uint16 *>(malloc(256 * sizeof(uint16)));
+ uint16 *blueTable = static_cast<uint16 *>(malloc(256 * sizeof(uint16)));
if (!redTable || !greenTable || !blueTable) {
- qFree(redTable);
- qFree(greenTable);
- qFree(blueTable);
+ free(redTable);
+ free(greenTable);
+ free(blueTable);
TIFFClose(tiff);
return false;
}
@@ -519,9 +519,9 @@ bool QTiffHandler::write(const QImage &image)
const bool setColorTableSuccess = TIFFSetField(tiff, TIFFTAG_COLORMAP, redTable, greenTable, blueTable);
- qFree(redTable);
- qFree(greenTable);
- qFree(blueTable);
+ free(redTable);
+ free(greenTable);
+ free(blueTable);
if (!setColorTableSuccess) {
TIFFClose(tiff);
diff --git a/src/gui/image/qtiffhandler_p.h b/src/gui/image/qtiffhandler_p.h
index 4cbcfacaec..16e68b0ad6 100644
--- a/src/gui/image/qtiffhandler_p.h
+++ b/src/gui/image/qtiffhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qvolatileimage.cpp b/src/gui/image/qvolatileimage.cpp
index 8fd3620b4b..e675e4ca67 100644
--- a/src/gui/image/qvolatileimage.cpp
+++ b/src/gui/image/qvolatileimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qvolatileimage_p.h b/src/gui/image/qvolatileimage_p.h
index 91f8ce3598..8f1664c429 100644
--- a/src/gui/image/qvolatileimage_p.h
+++ b/src/gui/image/qvolatileimage_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qvolatileimagedata.cpp b/src/gui/image/qvolatileimagedata.cpp
index a2a7f71697..32f265e9d9 100644
--- a/src/gui/image/qvolatileimagedata.cpp
+++ b/src/gui/image/qvolatileimagedata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qvolatileimagedata_p.h b/src/gui/image/qvolatileimagedata_p.h
index 9f817874a4..2890530aaa 100644
--- a/src/gui/image/qvolatileimagedata_p.h
+++ b/src/gui/image/qvolatileimagedata_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qvolatileimagedata_symbian.cpp b/src/gui/image/qvolatileimagedata_symbian.cpp
index 6984722c0f..f438d96e68 100644
--- a/src/gui/image/qvolatileimagedata_symbian.cpp
+++ b/src/gui/image/qvolatileimagedata_symbian.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 04756ac351..dda57239cc 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qxbmhandler_p.h b/src/gui/image/qxbmhandler_p.h
index 8fc6bda3f9..13ab343f8b 100644
--- a/src/gui/image/qxbmhandler_p.h
+++ b/src/gui/image/qxbmhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index a3779fc041..48047d2d55 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/image/qxpmhandler_p.h b/src/gui/image/qxpmhandler_p.h
index 35cf142db5..092d9bb3f1 100644
--- a/src/gui/image/qxpmhandler_p.h
+++ b/src/gui/image/qxpmhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 57ed3a983a..bf552c9991 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -13,6 +13,7 @@ HEADERS += \
kernel/qplatformintegration_qpa.h \
kernel/qplatformdrag_qpa.h \
kernel/qplatformscreen_qpa.h \
+ kernel/qplatformscreen_qpa_p.h \
kernel/qplatforminputcontext_qpa.h \
kernel/qplatformintegrationfactory_qpa_p.h \
kernel/qplatformintegrationplugin_qpa.h \
@@ -50,6 +51,7 @@ HEADERS += \
kernel/qsessionmanager.h \
kernel/qwindowdefs.h \
kernel/qscreen.h \
+ kernel/qscreen_p.h \
kernel/qstylehints.h \
kernel/qtouchdevice.h \
kernel/qtouchdevice_p.h
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 970d365af8..341b042328 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qclipboard.h b/src/gui/kernel/qclipboard.h
index 6902a1362b..b909889815 100644
--- a/src/gui/kernel/qclipboard.h
+++ b/src/gui/kernel/qclipboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp
index 737b2131c0..edcf21babc 100644
--- a/src/gui/kernel/qclipboard_qpa.cpp
+++ b/src/gui/kernel/qclipboard_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index faa9500f9f..bd327e1eb1 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -49,6 +49,7 @@
#include <qdatastream.h>
#include <qvariant.h>
#include <private/qcursor_p.h>
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -564,6 +565,15 @@ QCursor::operator QVariant() const
{
return QVariant(QVariant::Cursor, this);
}
+
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QCursor &c)
+{
+ dbg.nospace() << "QCursor(Qt::CursorShape(" << c.shape() << "))";
+ return dbg.space();
+}
+#endif
+
QT_END_NAMESPACE
#endif // QT_NO_CURSOR
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 584aff42d3..7437da4aba 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -126,6 +126,11 @@ private:
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &outS, const QCursor &cursor);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &inS, QCursor &cursor);
#endif
+
+#ifndef QT_NO_DEBUG_STREAM
+Q_GUI_EXPORT QDebug operator<<(QDebug, const QCursor &);
+#endif
+
#endif // QT_NO_CURSOR
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qcursor_p.h b/src/gui/kernel/qcursor_p.h
index 71a07cca49..a904260388 100644
--- a/src/gui/kernel/qcursor_p.h
+++ b/src/gui/kernel/qcursor_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qcursor_qpa.cpp b/src/gui/kernel/qcursor_qpa.cpp
index 7b3059e1df..6a12f977d3 100644
--- a/src/gui/kernel/qcursor_qpa.cpp
+++ b/src/gui/kernel/qcursor_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp
index 4edcfa886f..4010fd73ff 100644
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index 548e3d2e77..47018edde8 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp
index 399c467643..284b1e5c1b 100644
--- a/src/gui/kernel/qdrag.cpp
+++ b/src/gui/kernel/qdrag.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qdrag.h b/src/gui/kernel/qdrag.h
index b590c4f015..ccadd8f1cc 100644
--- a/src/gui/kernel/qdrag.h
+++ b/src/gui/kernel/qdrag.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 035f1b2666..61ccaa5cfd 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -941,15 +941,6 @@ QFocusEvent::~QFocusEvent()
{
}
-// ### Qt 5: remove
-/*!
- \internal
- */
-Qt::FocusReason QFocusEvent::reason()
-{
- return m_reason;
-}
-
/*!
Returns the reason for this focus event.
*/
@@ -3232,13 +3223,6 @@ QClipboardEvent::~QClipboardEvent()
Returns the key sequence that triggered the event.
*/
-// ### Qt 5: remove
-/*!
- \fn const QKeySequence &QShortcutEvent::key()
-
- \internal
-*/
-
/*!
\fn int QShortcutEvent::shortcutId() const
@@ -3248,14 +3232,6 @@ QClipboardEvent::~QClipboardEvent()
\sa QShortcut::id()
*/
-// ### Qt 5: remove
-/*!
- \fn int QShortcutEvent::shortcutId()
- \overload
-
- \internal
-*/
-
/*!
\fn bool QShortcutEvent::isAmbiguous() const
@@ -3265,13 +3241,6 @@ QClipboardEvent::~QClipboardEvent()
\sa QShortcut::activatedAmbiguously()
*/
-// ### Qt 5: remove
-/*!
- \fn bool QShortcutEvent::isAmbiguous()
-
- \internal
-*/
-
/*!
\class QWindowStateChangeEvent
\ingroup events
@@ -3354,7 +3323,7 @@ QWindowStateChangeEvent::~QWindowStateChangeEvent()
\section1 Event Delivery and Propagation
- By default, QWidget::event() translates the first non-primary touch point in a QTouchEvent into
+ By default, QGuiApplication translates the first touch point in a QTouchEvent into
a QMouseEvent. This makes it possible to enable touch events on existing widgets that do not
normally handle QTouchEvent. See below for information on some special considerations needed
when doing this.
@@ -3392,17 +3361,12 @@ QWindowStateChangeEvent::~QWindowStateChangeEvent()
This makes it possible for sibling widgets to handle touch events independently while making
sure that the sequence of QTouchEvents is always correct.
- \section1 Mouse Events and the Primary Touch Point
+ \section1 Mouse Events and Touch Event synthesizing
- QTouchEvent delivery is independent from that of QMouseEvent. On some windowing systems, mouse
- events are also sent for the \l{QTouchEvent::TouchPoint::isPrimary()}{primary touch point}.
- This means it is possible for your widget to receive both QTouchEvent and QMouseEvent for the
- same user interaction point. You can use the QTouchEvent::TouchPoint::isPrimary() function to
- identify the primary touch point.
-
- Note that on some systems, it is possible to receive touch events without a primary touch
- point. All this means is that there will be no mouse event generated for the touch points in
- the QTouchEvent.
+ QTouchEvent delivery is independent from that of QMouseEvent. The application flags
+ Qt::AA_SynthesizeTouchForUnhandledMouseEvents and Qt::AA_SynthesizeMouseForUnhandledTouchEvents
+ can be used to enable or disable automatic synthesizing of touch events to mouse events and
+ mouse events to touch events.
\section1 Caveats
@@ -3441,9 +3405,6 @@ QWindowStateChangeEvent::~QWindowStateChangeEvent()
\value TouchPointMoved The touch point moved.
\value TouchPointStationary The touch point did not move.
\value TouchPointReleased The touch point was released.
-
- \omitvalue TouchPointStateMask
- \omitvalue TouchPointPrimary
*/
/*! \enum QTouchEvent::DeviceType
@@ -3467,7 +3428,8 @@ QTouchEvent::QTouchEvent(QEvent::Type eventType,
Qt::TouchPointStates touchPointStates,
const QList<QTouchEvent::TouchPoint> &touchPoints)
: QInputEvent(eventType, modifiers),
- _widget(0),
+ _window(0),
+ _target(0),
_device(device),
_touchPointStates(touchPointStates),
_touchPoints(touchPoints)
@@ -3479,11 +3441,6 @@ QTouchEvent::QTouchEvent(QEvent::Type eventType,
QTouchEvent::~QTouchEvent()
{ }
-/*! \fn QWidget *QTouchEvent::widget() const
-
- Returns the widget on which the event occurred.
-*/
-
/*! \fn QWindow *QTouchEvent::window() const
Returns the window on which the event occurred. Useful for doing
@@ -3492,6 +3449,12 @@ QTouchEvent::~QTouchEvent()
touch event.
*/
+/*! \fn QObject *QTouchEvent::target() const
+
+ Returns the target object within the window on which the event occurred.
+ This is typically a QWidget or a QQuickItem. May be 0 when no specific target is available.
+*/
+
/*! \fn QTouchEvent::DeviceType QTouchEvent::deviceType() const
Returns the touch device Type, which is of type \l {QTouchEvent::DeviceType} {DeviceType}.
@@ -3521,18 +3484,18 @@ QTouchEvent::~QTouchEvent()
Returns the touch device from which this touch event originates.
*/
-/*! \fn void QTouchEvent::setWidget(QWidget *widget)
+/*! \fn void QTouchEvent::setWindow(QWindow *window)
\internal
- Sets the widget for this event.
+ Sets the window for this event.
*/
-/*! \fn void QTouchEvent::setWindow(QWindow *window)
+/*! \fn void QTouchEvent::setTarget(QObject *target)
\internal
- Sets the window for this event.
+ Sets the target within the window (typically a widget) for this event.
*/
/*! \fn void QTouchEvent::setTouchPointStates(Qt::TouchPointStates touchPointStates)
@@ -3621,16 +3584,7 @@ int QTouchEvent::TouchPoint::id() const
*/
Qt::TouchPointState QTouchEvent::TouchPoint::state() const
{
- return Qt::TouchPointState(int(d->state) & Qt::TouchPointStateMask);
-}
-
-/*!
- Returns true if this touch point is the primary touch point. The primary touch point is the
- point for which the windowing system generates mouse events.
-*/
-bool QTouchEvent::TouchPoint::isPrimary() const
-{
- return (d->state & Qt::TouchPointPrimary) != 0;
+ return Qt::TouchPointState(int(d->state));
}
/*!
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 6a0442509c..a59b178cec 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -266,7 +266,6 @@ public:
inline bool gotFocus() const { return type() == FocusIn; }
inline bool lostFocus() const { return type() == FocusOut; }
- Qt::FocusReason reason();
Qt::FocusReason reason() const;
private:
@@ -639,11 +638,8 @@ public:
QShortcutEvent(const QKeySequence &key, int id, bool ambiguous = false);
~QShortcutEvent();
- inline const QKeySequence &key() { return sequence; }
inline const QKeySequence &key() const { return sequence; }
- inline int shortcutId() { return sid; }
inline int shortcutId() const { return sid; }
- inline bool isAmbiguous() { return ambig; }
inline bool isAmbiguous() const { return ambig; }
protected:
QKeySequence sequence;
@@ -694,7 +690,7 @@ public:
{
public:
enum InfoFlag {
- Pen = 0x0001
+ Pen = 0x0001
};
Q_DECLARE_FLAGS(InfoFlags, InfoFlag)
@@ -705,7 +701,6 @@ public:
int id() const;
Qt::TouchPointState state() const;
- bool isPrimary() const;
QPointF pos() const;
QPointF startPos() const;
@@ -776,23 +771,23 @@ public:
const QList<QTouchEvent::TouchPoint> &touchPoints = QList<QTouchEvent::TouchPoint>());
~QTouchEvent();
- inline QWidget *widget() const { return _widget; }
inline QWindow *window() const { return _window; }
+ inline QObject *target() const { return _target; }
QT_DEPRECATED inline QTouchEvent::DeviceType deviceType() const { return static_cast<DeviceType>(int(_device->type())); }
inline Qt::TouchPointStates touchPointStates() const { return _touchPointStates; }
inline const QList<QTouchEvent::TouchPoint> &touchPoints() const { return _touchPoints; }
inline QTouchDevice *device() const { return _device; }
// internal
- inline void setWidget(QWidget *awidget) { _widget = awidget; }
inline void setWindow(QWindow *awindow) { _window = awindow; }
+ inline void setTarget(QObject *atarget) { _target = atarget; }
inline void setTouchPointStates(Qt::TouchPointStates aTouchPointStates) { _touchPointStates = aTouchPointStates; }
inline void setTouchPoints(const QList<QTouchEvent::TouchPoint> &atouchPoints) { _touchPoints = atouchPoints; }
- inline void setDevice(QTouchDevice *device) { _device = device; }
+ inline void setDevice(QTouchDevice *adevice) { _device = adevice; }
protected:
- QWidget *_widget;
QWindow *_window;
+ QObject *_target;
QTouchDevice *_device;
Qt::TouchPointStates _touchPointStates;
QList<QTouchEvent::TouchPoint> _touchPoints;
diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h
index 1eee92d176..6dff55ca14 100644
--- a/src/gui/kernel/qevent_p.h
+++ b/src/gui/kernel/qevent_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qgenericplugin_qpa.cpp b/src/gui/kernel/qgenericplugin_qpa.cpp
index e7b65b730e..23733e3ea9 100644
--- a/src/gui/kernel/qgenericplugin_qpa.cpp
+++ b/src/gui/kernel/qgenericplugin_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qgenericplugin_qpa.h b/src/gui/kernel/qgenericplugin_qpa.h
index c4dd5a9df0..196304d2a4 100644
--- a/src/gui/kernel/qgenericplugin_qpa.h
+++ b/src/gui/kernel/qgenericplugin_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qgenericpluginfactory_qpa.cpp b/src/gui/kernel/qgenericpluginfactory_qpa.cpp
index 7c0975ac1d..4735604837 100644
--- a/src/gui/kernel/qgenericpluginfactory_qpa.cpp
+++ b/src/gui/kernel/qgenericpluginfactory_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qgenericpluginfactory_qpa.h b/src/gui/kernel/qgenericpluginfactory_qpa.h
index 2359de9aa9..2d1550ffac 100644
--- a/src/gui/kernel/qgenericpluginfactory_qpa.h
+++ b/src/gui/kernel/qgenericpluginfactory_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 6d5e210e82..f92e66b38e 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,6 +57,7 @@
#include <QtDebug>
#include <qpalette.h>
#include <qscreen.h>
+#include <private/qscreen_p.h>
#include <QtGui/QPlatformIntegration>
#include <QtGui/QGenericPluginFactory>
@@ -68,7 +69,6 @@
#include <QWindowSystemInterface>
#include "private/qwindowsysteminterface_qpa_p.h"
#include "private/qwindow_p.h"
-#include "private/qkeymapper_p.h"
#include "private/qcursor_p.h"
#include "private/qdnd_p.h"
#include <private/qplatformthemefactory_qpa_p.h>
@@ -113,6 +113,7 @@ static Qt::LayoutDirection layout_direction = Qt::LeftToRight;
static bool force_reverse = false;
QGuiApplicationPrivate *QGuiApplicationPrivate::self = 0;
+QTouchDevice *QGuiApplicationPrivate::m_fakeTouchDevice = 0;
#ifndef QT_NO_CLIPBOARD
QClipboard *QGuiApplicationPrivate::qt_clipboard = 0;
@@ -186,6 +187,7 @@ QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags
inputPanel(0)
{
self = this;
+ application_type = QCoreApplication::GuiClient;
}
QWindow *QGuiApplication::focusWindow()
@@ -333,6 +335,16 @@ void QGuiApplicationPrivate::createPlatformIntegration()
// Load the platform integration
QString platformPluginPath = QLatin1String(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH"));
+
+ // On Mac, look inside the application bundle for the platform plugin.
+ // TODO (msorvig): Create proper cross-platform solution for loading
+ // deployed platform plugins
+#ifdef Q_OS_MAC
+ if (platformPluginPath.isEmpty()) {
+ platformPluginPath = QCoreApplication::applicationDirPath() + QLatin1String("../Plugins/");
+ }
+#endif
+
QByteArray platformName;
#ifdef QT_QPA_DEFAULT_PLATFORM_NAME
platformName = QT_QPA_DEFAULT_PLATFORM_NAME;
@@ -678,7 +690,38 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
cursors.at(i).data()->pointerEvent(ev);
#endif
QGuiApplication::sendSpontaneousEvent(window, &ev);
- return;
+ if (!e->synthetic && !ev.isAccepted() && qApp->testAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents)) {
+ if (!m_fakeTouchDevice) {
+ m_fakeTouchDevice = new QTouchDevice;
+ QWindowSystemInterface::registerTouchDevice(m_fakeTouchDevice);
+ }
+ QList<QWindowSystemInterface::TouchPoint> points;
+ QWindowSystemInterface::TouchPoint point;
+ point.id = 1;
+ point.area = QRectF(globalPoint.x() - 2, globalPoint.y() - 2, 4, 4);
+
+ // only translate left button related events to
+ // avoid strange touch event sequences when several
+ // buttons are pressed
+ if (type == QEvent::MouseButtonPress && button == Qt::LeftButton) {
+ point.state = Qt::TouchPointPressed;
+ } else if (type == QEvent::MouseButtonRelease && button == Qt::LeftButton) {
+ point.state = Qt::TouchPointReleased;
+ } else if (type == QEvent::MouseMove && (buttons & Qt::LeftButton)) {
+ point.state = Qt::TouchPointMoved;
+ } else {
+ return;
+ }
+
+ points << point;
+
+ QEvent::Type type;
+ QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::convertTouchPoints(points, &type);
+
+ QWindowSystemInterfacePrivate::TouchEvent fake(window, e->timestamp, type, m_fakeTouchDevice, touchPoints, e->modifiers);
+ fake.synthetic = true;
+ processTouchEvent(&fake);
+ }
}
}
@@ -742,9 +785,6 @@ void QGuiApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Le
void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e)
{
- if (!e->activated)
- return;
-
QWindow *previous = QGuiApplicationPrivate::focus_window;
QGuiApplicationPrivate::focus_window = e->activated.data();
@@ -754,10 +794,18 @@ void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate
if (previous) {
QFocusEvent focusOut(QEvent::FocusOut);
QCoreApplication::sendSpontaneousEvent(previous, &focusOut);
+ } else {
+ QEvent appActivate(QEvent::ApplicationActivate);
+ qApp->sendSpontaneousEvent(qApp, &appActivate);
}
- QFocusEvent focusIn(QEvent::FocusIn);
- QCoreApplication::sendSpontaneousEvent(QGuiApplicationPrivate::focus_window, &focusIn);
+ if (QGuiApplicationPrivate::focus_window) {
+ QFocusEvent focusIn(QEvent::FocusIn);
+ QCoreApplication::sendSpontaneousEvent(QGuiApplicationPrivate::focus_window, &focusIn);
+ } else {
+ QEvent appActivate(QEvent::ApplicationDeactivate);
+ qApp->sendSpontaneousEvent(qApp, &appActivate);
+ }
if (self)
self->notifyActiveWindowChange(previous);
@@ -822,6 +870,18 @@ void QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::Cl
QGuiApplication::sendSpontaneousEvent(e->window.data(), &event);
}
+Q_GUI_EXPORT uint qHash(const QGuiApplicationPrivate::ActiveTouchPointsKey &k)
+{
+ return qHash(k.device) + k.touchPointId;
+}
+
+Q_GUI_EXPORT bool operator==(const QGuiApplicationPrivate::ActiveTouchPointsKey &a,
+ const QGuiApplicationPrivate::ActiveTouchPointsKey &b)
+{
+ return a.device == b.device
+ && a.touchPointId == b.touchPointId;
+}
+
void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e)
{
QWindow *window = e->window.data();
@@ -839,13 +899,15 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
// update state
QWeakPointer<QWindow> w;
QTouchEvent::TouchPoint previousTouchPoint;
+ ActiveTouchPointsKey touchInfoKey(e->device, touchPoint.id());
+ ActiveTouchPointsValue &touchInfo = d->activeTouchPoints[touchInfoKey];
switch (touchPoint.state()) {
case Qt::TouchPointPressed:
if (e->device->type() == QTouchDevice::TouchPad) {
// on touch-pads, send all touch points to the same widget
- w = d->windowForTouchPointId.isEmpty()
+ w = d->activeTouchPoints.isEmpty()
? QWeakPointer<QWindow>()
- : d->windowForTouchPointId.constBegin().value();
+ : d->activeTouchPoints.constBegin().value().window;
}
if (!w) {
@@ -857,7 +919,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
w = window;
}
- d->windowForTouchPointId[touchPoint.id()] = w;
+ touchInfo.window = w;
touchPoint.d->startScreenPos = touchPoint.screenPos();
touchPoint.d->lastScreenPos = touchPoint.screenPos();
touchPoint.d->startNormalizedPos = touchPoint.normalizedPos();
@@ -865,14 +927,15 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
if (touchPoint.pressure() < qreal(0.))
touchPoint.d->pressure = qreal(1.);
- d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint);
+ touchInfo.touchPoint = touchPoint;
break;
case Qt::TouchPointReleased:
- w = d->windowForTouchPointId.take(touchPoint.id());
+ w = touchInfo.window;
if (!w)
continue;
- previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id());
+
+ previousTouchPoint = touchInfo.touchPoint;
touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
touchPoint.d->startPos = previousTouchPoint.startPos();
@@ -881,14 +944,15 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
touchPoint.d->pressure = qreal(0.);
+
break;
default:
- w = d->windowForTouchPointId.value(touchPoint.id());
+ w = touchInfo.window;
if (!w)
continue;
- Q_ASSERT(d->appCurrentTouchPoints.contains(touchPoint.id()));
- previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id());
+
+ previousTouchPoint = touchInfo.touchPoint;
touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
touchPoint.d->startPos = previousTouchPoint.startPos();
@@ -901,7 +965,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
// Stationary points might not be delivered down to the receiving item
// and get their position transformed, keep the old values instead.
if (touchPoint.state() != Qt::TouchPointStationary)
- d->appCurrentTouchPoints[touchPoint.id()] = touchPoint;
+ touchInfo.touchPoint = touchPoint;
break;
}
@@ -914,8 +978,6 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
StatesAndTouchPoints &maskAndPoints = windowsNeedingEvents[w.data()];
maskAndPoints.first |= touchPoint.state();
- if (touchPoint.isPrimary())
- maskAndPoints.first |= Qt::TouchPointPrimary;
maskAndPoints.second.append(touchPoint);
}
@@ -928,7 +990,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
QWindow *w = it.key();
QEvent::Type eventType;
- switch (it.value().first & Qt::TouchPointStateMask) {
+ switch (it.value().first) {
case Qt::TouchPointPressed:
eventType = QEvent::TouchBegin;
break;
@@ -969,6 +1031,28 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
}
QGuiApplication::sendSpontaneousEvent(w, &touchEvent);
+ if (!e->synthetic && !touchEvent.isAccepted() && qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)) {
+ // exclude touchpads as those generate their own mouse events
+ if (touchEvent.device()->type() != QTouchDevice::TouchPad) {
+ Qt::MouseButtons b = eventType == QEvent::TouchEnd ? Qt::NoButton : Qt::LeftButton;
+
+ const QTouchEvent::TouchPoint &touchPoint = touchEvent.touchPoints().first();
+
+ QWindowSystemInterfacePrivate::MouseEvent fake(w, e->timestamp, touchPoint.pos(), touchPoint.screenPos(), b, e->modifiers);
+ fake.synthetic = true;
+ processMouseEvent(&fake);
+ }
+ }
+ }
+
+ // Remove released points from the hash table only after the event is
+ // delivered. When the receiver is a widget, QApplication will access
+ // activeTouchPoints during delivery and therefore nothing can be removed
+ // before sending the event.
+ for (int i = 0; i < e->points.count(); ++i) {
+ QTouchEvent::TouchPoint touchPoint = e->points.at(i);
+ if (touchPoint.state() == Qt::TouchPointReleased)
+ d->activeTouchPoints.remove(ActiveTouchPointsKey(e->device, touchPoint.id()));
}
}
@@ -982,6 +1066,8 @@ void QGuiApplicationPrivate::reportScreenOrientationChange(QWindowSystemInterfac
return;
QScreen *s = e->screen.data();
+ s->d_func()->currentOrientation = e->orientation;
+
emit s->currentOrientationChanged(s->currentOrientation());
QScreenOrientationChangeEvent event(s, s->currentOrientation());
@@ -998,6 +1084,7 @@ void QGuiApplicationPrivate::reportGeometryChange(QWindowSystemInterfacePrivate:
return;
QScreen *s = e->screen.data();
+ s->d_func()->geometry = e->geometry;
emit s->sizeChanged(s->size());
emit s->geometryChanged(s->geometry());
@@ -1019,6 +1106,7 @@ void QGuiApplicationPrivate::reportAvailableGeometryChange(
return;
QScreen *s = e->screen.data();
+ s->d_func()->availableGeometry = e->availableGeometry;
emit s->availableSizeChanged(s->availableSize());
emit s->availableGeometryChanged(s->availableGeometry());
@@ -1034,6 +1122,7 @@ void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfa
return;
QScreen *s = e->screen.data();
+ s->d_func()->logicalDpi = QDpi(e->dpiX, e->dpiY);
emit s->logicalDotsPerInchXChanged(s->logicalDotsPerInchX());
emit s->logicalDotsPerInchYChanged(s->logicalDotsPerInchY());
@@ -1140,6 +1229,16 @@ QPalette QGuiApplication::palette()
return *QGuiApplicationPrivate::app_pal;
}
+void QGuiApplication::setPalette(const QPalette &pal)
+{
+ if (QGuiApplicationPrivate::app_pal && pal.isCopyOf(*QGuiApplicationPrivate::app_pal))
+ return;
+ if (!QGuiApplicationPrivate::app_pal)
+ QGuiApplicationPrivate::app_pal = new QPalette(pal);
+ else
+ *QGuiApplicationPrivate::app_pal = pal;
+}
+
QFont QGuiApplication::font()
{
QMutexLocker locker(applicationFontMutex());
@@ -1423,26 +1522,24 @@ uint QGuiApplicationPrivate::currentKeyPlatform()
/*!
\since 4.2
+ \obsolete
- Returns the current keyboard input locale.
+ Returns the current keyboard input locale. Replaced with QInputPanel::locale()
*/
QLocale QGuiApplication::keyboardInputLocale()
{
- if (!QGuiApplicationPrivate::checkInstance("keyboardInputLocale"))
- return QLocale::c();
- return qt_keymapper_private()->keyboardInputLocale;
+ return qApp ? qApp->inputPanel()->locale() : QLocale::c();
}
/*!
\since 4.2
+ \obsolete
- Returns the current keyboard input direction.
+ Returns the current keyboard input direction. Replaced with QInputPanel::inputDirection()
*/
Qt::LayoutDirection QGuiApplication::keyboardInputDirection()
{
- if (!QGuiApplicationPrivate::checkInstance("keyboardInputDirection"))
- return Qt::LeftToRight;
- return qt_keymapper_private()->keyboardInputDirection;
+ return qApp ? qApp->inputPanel()->inputDirection() : Qt::LeftToRight;
}
/*!
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 1afbf17cf7..dd7b1f8806 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -108,6 +108,7 @@ public:
#endif
static QPalette palette();
+ static void setPalette(const QPalette &pal);
static Qt::KeyboardModifiers keyboardModifiers();
static Qt::MouseButtons mouseButtons();
@@ -118,9 +119,8 @@ public:
static inline bool isRightToLeft() { return layoutDirection() == Qt::RightToLeft; }
static inline bool isLeftToRight() { return layoutDirection() == Qt::LeftToRight; }
- // ### move to QInputPanel
- static QLocale keyboardInputLocale();
- static Qt::LayoutDirection keyboardInputDirection();
+ QT_DEPRECATED static QLocale keyboardInputLocale();
+ QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection();
QStyleHints *styleHints() const;
QInputPanel *inputPanel() const;
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 9c8a2ca642..9c965cd109 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -189,15 +189,30 @@ public:
QShortcutMap shortcutMap;
#endif
+ struct ActiveTouchPointsKey {
+ ActiveTouchPointsKey(QTouchDevice *dev, int id) : device(dev), touchPointId(id) { }
+ QTouchDevice *device;
+ int touchPointId;
+ };
+ struct ActiveTouchPointsValue {
+ QWeakPointer<QWindow> window;
+ QWeakPointer<QObject> target;
+ QTouchEvent::TouchPoint touchPoint;
+ };
+ QHash<ActiveTouchPointsKey, ActiveTouchPointsValue> activeTouchPoints;
+
private:
void init();
static QGuiApplicationPrivate *self;
-
- QMap<int, QWeakPointer<QWindow> > windowForTouchPointId;
- QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints;
+ static QTouchDevice *m_fakeTouchDevice;
};
+Q_GUI_EXPORT uint qHash(const QGuiApplicationPrivate::ActiveTouchPointsKey &k);
+
+Q_GUI_EXPORT bool operator==(const QGuiApplicationPrivate::ActiveTouchPointsKey &a,
+ const QGuiApplicationPrivate::ActiveTouchPointsKey &b);
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp
index 3b60f29e83..532a5353e2 100644
--- a/src/gui/kernel/qguivariant.cpp
+++ b/src/gui/kernel/qguivariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -79,6 +79,7 @@
#include "qstringlist.h"
#include "qurl.h"
#include "qlocale.h"
+#include "quuid.h"
#ifndef QT_NO_GEOM_VARIANT
#include "qsize.h"
@@ -94,8 +95,6 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT const QVariant::Handler *qt_widgets_variant_handler = 0;
-
Q_CORE_EXPORT const QVariant::Handler *qcoreVariantHandler();
namespace {
@@ -136,53 +135,35 @@ template<> struct TypeDefiniton<QVector4D> { static const bool IsAvailable = fal
template<> struct TypeDefiniton<QQuaternion> { static const bool IsAvailable = false; };
#endif
-struct CoreAndGuiTypesFilter {
+struct GuiTypesFilter {
template<typename T>
struct Acceptor {
- static const bool IsAccepted = (QTypeModuleInfo<T>::IsCore || QTypeModuleInfo<T>::IsGui) && TypeDefiniton<T>::IsAvailable;
+ static const bool IsAccepted = QTypeModuleInfo<T>::IsGui && TypeDefiniton<T>::IsAvailable;
};
};
-} // namespace
+} // namespace used to hide TypeDefinition
+namespace {
static void construct(QVariant::Private *x, const void *copy)
{
const int type = x->type;
- QVariantConstructor<CoreAndGuiTypesFilter> constructor(x, copy);
- QMetaTypeSwitcher::switcher<void>(constructor, type, 0);
-
- // FIXME This is an ugly hack if QVariantConstructor fails to build a value it constructs an invalid type
- if (Q_UNLIKELY(x->type == QVariant::Invalid)) {
- if (type == 62) {
- // small 'trick' to let a QVariant(Qt::blue) create a variant
- // of type QColor
- // TODO Get rid of this hack.
- x->type = QVariant::Color;
- QColor color(*reinterpret_cast<const Qt::GlobalColor *>(copy));
- v_construct<QColor>(x, &color);
- return;
- }
- if (type == QVariant::Icon || type == QVariant::SizePolicy) {
- // TODO we need to clean up variant handlers, so they are replacament, not extension
- x->type = type;
- if (qt_widgets_variant_handler) {
- qt_widgets_variant_handler->construct(x, copy);
- }
- }
+ if (Q_UNLIKELY(type == 62)) {
+ // small 'trick' to let a QVariant(Qt::blue) create a variant
+ // of type QColor
+ // TODO Get rid of this hack.
+ x->type = QVariant::Color;
+ QColor color(*reinterpret_cast<const Qt::GlobalColor *>(copy));
+ v_construct<QColor>(x, &color);
+ return;
}
+ QVariantConstructor<GuiTypesFilter> constructor(x, copy);
+ QMetaTypeSwitcher::switcher<void>(constructor, type, 0);
}
static void clear(QVariant::Private *d)
{
- const int type = d->type;
- if (type == QVariant::Icon || type == QVariant::SizePolicy) {
- // TODO we need to clean up variant handlers, so they are replacament, not extension
- if (qt_widgets_variant_handler) {
- qt_widgets_variant_handler->clear(d);
- return;
- }
- }
- QVariantDestructor<CoreAndGuiTypesFilter> destructor(d);
- QMetaTypeSwitcher::switcher<void>(destructor, type, 0);
+ QVariantDestructor<GuiTypesFilter> destructor(d);
+ QMetaTypeSwitcher::switcher<void>(destructor, d->type, 0);
}
// This class is a hack that customizes access to QPolygon
@@ -200,7 +181,7 @@ public:
};
static bool isNull(const QVariant::Private *d)
{
- QGuiVariantIsNull<CoreAndGuiTypesFilter> isNull(d);
+ QGuiVariantIsNull<GuiTypesFilter> isNull(d);
return QMetaTypeSwitcher::switcher<bool>(isNull, d->type, 0);
}
@@ -215,11 +196,6 @@ public:
template<typename T>
bool delegate(const T *p)
{
- if (Q_UNLIKELY(Base::m_a->type == QVariant::Icon || Base::m_a->type == QVariant::SizePolicy)) {
- // TODO we need to clean up variant handlers, so they are replacament, not extension
- if (Q_LIKELY(qt_widgets_variant_handler))
- return qt_widgets_variant_handler->compare(Base::m_a, Base::m_b);
- }
return Base::delegate(p);
}
bool delegate(const QPixmap*)
@@ -241,7 +217,7 @@ public:
static bool compare(const QVariant::Private *a, const QVariant::Private *b)
{
- QGuiVariantComparator<CoreAndGuiTypesFilter> comparator(a, b);
+ QGuiVariantComparator<GuiTypesFilter> comparator(a, b);
return QMetaTypeSwitcher::switcher<bool>(comparator, a->type, 0);
}
@@ -369,90 +345,9 @@ static bool convert(const QVariant::Private *d, QVariant::Type t,
#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
static void streamDebug(QDebug dbg, const QVariant &v)
{
- switch(v.type()) {
- case QVariant::Cursor:
-#ifndef QT_NO_CURSOR
-// dbg.nospace() << qvariant_cast<QCursor>(v); //FIXME
-#endif
- break;
- case QVariant::Bitmap:
-// dbg.nospace() << qvariant_cast<QBitmap>(v); //FIXME
- break;
- case QVariant::Polygon:
- dbg.nospace() << qvariant_cast<QPolygon>(v);
- break;
- case QVariant::Region:
- dbg.nospace() << qvariant_cast<QRegion>(v);
- break;
- case QVariant::Font:
-// dbg.nospace() << qvariant_cast<QFont>(v); //FIXME
- break;
- case QVariant::Matrix:
- dbg.nospace() << qvariant_cast<QMatrix>(v);
- break;
- case QVariant::Transform:
- dbg.nospace() << qvariant_cast<QTransform>(v);
- break;
- case QVariant::Pixmap:
-// dbg.nospace() << qvariant_cast<QPixmap>(v); //FIXME
- break;
- case QVariant::Image:
-// dbg.nospace() << qvariant_cast<QImage>(v); //FIXME
- break;
- case QVariant::Brush:
- dbg.nospace() << qvariant_cast<QBrush>(v);
- break;
- case QVariant::Color:
- dbg.nospace() << qvariant_cast<QColor>(v);
- break;
- case QVariant::Palette:
-// dbg.nospace() << qvariant_cast<QPalette>(v); //FIXME
- break;
-#ifndef QT_NO_ICON
- case QVariant::Icon:
-// dbg.nospace() << qvariant_cast<QIcon>(v); // FIXME
- break;
-#endif
- case QVariant::SizePolicy:
-// dbg.nospace() << qvariant_cast<QSizePolicy>(v); //FIXME
- break;
-#ifndef QT_NO_SHORTCUT
- case QVariant::KeySequence:
- dbg.nospace() << qvariant_cast<QKeySequence>(v);
- break;
-#endif
- case QVariant::Pen:
- dbg.nospace() << qvariant_cast<QPen>(v);
- break;
-#ifndef QT_NO_MATRIX4X4
- case QVariant::Matrix4x4:
- dbg.nospace() << qvariant_cast<QMatrix4x4>(v);
- break;
-#endif
-#ifndef QT_NO_VECTOR2D
- case QVariant::Vector2D:
- dbg.nospace() << qvariant_cast<QVector2D>(v);
- break;
-#endif
-#ifndef QT_NO_VECTOR3D
- case QVariant::Vector3D:
- dbg.nospace() << qvariant_cast<QVector3D>(v);
- break;
-#endif
-#ifndef QT_NO_VECTOR4D
- case QVariant::Vector4D:
- dbg.nospace() << qvariant_cast<QVector4D>(v);
- break;
-#endif
-#ifndef QT_NO_QUATERNION
- case QVariant::Quaternion:
- dbg.nospace() << qvariant_cast<QQuaternion>(v);
- break;
-#endif
- default:
- qcoreVariantHandler()->debugStream(dbg, v);
- break;
- }
+ QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr());
+ QVariantDebugStream<GuiTypesFilter> stream(dbg, d);
+ QMetaTypeSwitcher::switcher<void>(stream, d->type, 0);
}
#endif
@@ -474,29 +369,28 @@ const QVariant::Handler qt_gui_variant_handler = {
#endif
};
-extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeGuiHelper;
-
#define QT_IMPL_METATYPEINTERFACE_GUI_TYPES(MetaTypeName, MetaTypeId, RealName) \
- QMetaTypeInterface(static_cast<RealName*>(0)),
+ QT_METATYPE_INTERFACE_INIT(RealName),
static const QMetaTypeInterface qVariantGuiHelper[] = {
QT_FOR_EACH_STATIC_GUI_CLASS(QT_IMPL_METATYPEINTERFACE_GUI_TYPES)
};
#undef QT_IMPL_METATYPEINTERFACE_GUI_TYPES
+} // namespace used to hide QVariant handler
+
+extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeGuiHelper;
-static const QVariant::Handler *qt_guivariant_last_handler = 0;
void qRegisterGuiVariant()
{
- qt_guivariant_last_handler = QVariant::handler;
- QVariant::handler = &qt_gui_variant_handler;
+ QVariantPrivate::registerHandler(QModulesPrivate::Gui, &qt_gui_variant_handler);
qMetaTypeGuiHelper = qVariantGuiHelper;
}
Q_CONSTRUCTOR_FUNCTION(qRegisterGuiVariant)
void qUnregisterGuiVariant()
{
- QVariant::handler = qt_guivariant_last_handler;
+ QVariantPrivate::unregisterHandler(QModulesPrivate::Gui);
qMetaTypeGuiHelper = 0;
}
Q_DESTRUCTOR_FUNCTION(qUnregisterGuiVariant)
diff --git a/src/gui/kernel/qinputpanel.cpp b/src/gui/kernel/qinputpanel.cpp
index d6d58bf1c5..d6dd55b651 100644
--- a/src/gui/kernel/qinputpanel.cpp
+++ b/src/gui/kernel/qinputpanel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -158,9 +158,9 @@ QRectF QInputPanel::cursorRectangle() const
\property QInputPanel::keyboardRectangle
\brief Virtual keyboard's geometry in window coordinates.
*/
-QRectF QInputPanel::keyboardRectangle()
+QRectF QInputPanel::keyboardRectangle() const
{
- Q_D(QInputPanel);
+ Q_D(const QInputPanel);
QPlatformInputContext *ic = d->platformInputContext();
if (ic)
return ic->keyboardRect();
@@ -248,6 +248,32 @@ bool QInputPanel::isAnimating() const
}
/*!
+ \property QInputPanel::locale
+ \brief Current input locale.
+*/
+QLocale QInputPanel::locale() const
+{
+ Q_D(const QInputPanel);
+ QPlatformInputContext *ic = d->platformInputContext();
+ if (ic)
+ return ic->locale();
+ return QLocale::c();
+}
+
+/*!
+ \property QInputPanel::inputDirection
+ \brief Current input direction.
+*/
+Qt::LayoutDirection QInputPanel::inputDirection() const
+{
+ Q_D(const QInputPanel);
+ QPlatformInputContext *ic = d->platformInputContext();
+ if (ic)
+ return ic->inputDirection();
+ return Qt::LeftToRight;
+}
+
+/*!
Called by the input item to inform the platform input methods when there has been
state changes in editor's input method query attributes. When calling the function
\a queries parameter has to be used to tell what has changes, which input method
diff --git a/src/gui/kernel/qinputpanel.h b/src/gui/kernel/qinputpanel.h
index 4edc902104..c33bd13451 100644
--- a/src/gui/kernel/qinputpanel.h
+++ b/src/gui/kernel/qinputpanel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -64,6 +64,8 @@ class Q_GUI_EXPORT QInputPanel : public QObject
Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged)
Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged)
+ Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged)
+ Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged)
Q_ENUMS(Action)
public:
@@ -80,7 +82,7 @@ public:
QRectF cursorRectangle() const; // ### what if we have rotations for the item?
// keyboard geometry in window coords
- QRectF keyboardRectangle();
+ QRectF keyboardRectangle() const;
enum Action {
Click,
@@ -92,6 +94,9 @@ public:
bool isAnimating() const;
+ QLocale locale() const;
+ Qt::LayoutDirection inputDirection() const;
+
public Q_SLOTS:
void show();
void hide();
@@ -108,6 +113,8 @@ Q_SIGNALS:
void keyboardRectangleChanged();
void visibleChanged();
void animatingChanged();
+ void localeChanged();
+ void inputDirectionChanged(Qt::LayoutDirection newDirection);
private:
friend class QGuiApplication;
diff --git a/src/gui/kernel/qinputpanel_p.h b/src/gui/kernel/qinputpanel_p.h
index 6fcf2d7243..f30c8a1b80 100644
--- a/src/gui/kernel/qinputpanel_p.h
+++ b/src/gui/kernel/qinputpanel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qkeymapper.cpp b/src/gui/kernel/qkeymapper.cpp
index 4ee7d66dd8..a411ee5904 100644
--- a/src/gui/kernel/qkeymapper.cpp
+++ b/src/gui/kernel/qkeymapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h
index 1fada6f59a..bf19f1d80a 100644
--- a/src/gui/kernel/qkeymapper_p.h
+++ b/src/gui/kernel/qkeymapper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qkeymapper_qpa.cpp b/src/gui/kernel/qkeymapper_qpa.cpp
index 13c6d6c28b..fd04ff234c 100644
--- a/src/gui/kernel/qkeymapper_qpa.cpp
+++ b/src/gui/kernel/qkeymapper_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 6ea502b70b..986701bd7b 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1259,13 +1259,20 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
// Rational: A modifier will contain the name AND +, so longer than 1, a length of 1 is just
// the remaining part of the shortcut (ei. The 'C' in "Ctrl+C"), so no need to check that.
if (sub.length() > 1) {
+ bool validModifier = false;
for (int j = 0; j < modifs.size(); ++j) {
const QModifKeyName &mkf = modifs.at(j);
if (sub == mkf.name) {
ret |= mkf.qt_key;
+ validModifier = true;
break; // Shortcut, since if we find an other it would/should just be a dup
}
}
+ // We couldn't match the string with a modifier. This is only
+ // possible if this part is the key. The key is never followed by a
+ // '+'. And if the key is '+' the if() above would have skipped it.
+ if (!validModifier)
+ return Qt::Key_unknown;
}
lastI = i + 1;
}
@@ -1309,6 +1316,9 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
if (found)
break;
}
+ // We couldn't translate the key.
+ if (!found)
+ return Qt::Key_unknown;
}
return ret;
}
@@ -1335,6 +1345,11 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
{
bool nativeText = (format == QKeySequence::NativeText);
QString s;
+
+ // Handle -1 (Invalid Key) and Qt::Key_unknown gracefully
+ if (key == -1 || key == Qt::Key_unknown)
+ return s;
+
#if defined(Q_OS_MAC)
if (nativeText) {
// On Mac OS X the order (by default) is Meta, Alt, Shift, Control.
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 31cec17fb1..1127e8afca 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qkeysequence_p.h b/src/gui/kernel/qkeysequence_p.h
index 7fa98dd5eb..57f6e1927f 100644
--- a/src/gui/kernel/qkeysequence_p.h
+++ b/src/gui/kernel/qkeysequence_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 6a9cb43028..93a4b3582b 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -174,6 +174,8 @@ bool QOpenGLContext::create()
void QOpenGLContext::destroy()
{
Q_D(QOpenGLContext);
+ if (d->platformGLContext)
+ emit aboutToBeDestroyed();
if (QOpenGLContext::currentContext() == this)
doneCurrent();
if (d->shareGroup)
@@ -186,6 +188,17 @@ void QOpenGLContext::destroy()
}
/*!
+ \fn void QOpenGLContext::aboutToBeDestroyed()
+
+ This signal is emitted before the underlying native OpenGL context is
+ destroyed, such that users may clean up OpenGL resources that might otherwise
+ be left dangling in the case of shared OpenGL contexts.
+
+ If you wish to make the context current in order to do clean-up, make sure to
+ only connect to the signal using a direct connection.
+*/
+
+/*!
If this is the current context for the thread, doneCurrent is called
*/
QOpenGLContext::~QOpenGLContext()
@@ -297,7 +310,7 @@ void QOpenGLContext::swapBuffers(QSurface *surface)
d->platformGLContext->swapBuffers(surfaceHandle);
}
-void (*QOpenGLContext::getProcAddress(const QByteArray &procName)) ()
+QFunctionPointer QOpenGLContext::getProcAddress(const QByteArray &procName)
{
Q_D(QOpenGLContext);
if (!d->platformGLContext)
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index b5a19a0ebc..a8ac39c7d5 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -106,7 +106,7 @@ public:
void doneCurrent();
void swapBuffers(QSurface *surface);
- void (*getProcAddress(const QByteArray &procName)) ();
+ QFunctionPointer getProcAddress(const QByteArray &procName);
QSurface *surface() const;
@@ -118,6 +118,9 @@ public:
QOpenGLFunctions *functions() const;
+Q_SIGNALS:
+ void aboutToBeDestroyed();
+
private:
friend class QGLContext;
friend class QOpenGLContextResourceBase;
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index aff1042c5b..7040b883bf 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 893cc5eff6..2dd2ef00c5 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,7 @@
#include "qguiapplication.h"
#include "qdatastream.h"
#include "qvariant.h"
+#include "qdebug.h"
QT_BEGIN_NAMESPACE
@@ -1081,4 +1082,12 @@ void QPalette::setColorGroup(ColorGroup cg, const QBrush &foreground, const QBru
setBrush(cg, ToolTipText, toolTipText);
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QPalette &)
+{
+ dbg.nospace() << "QPalette()";
+ return dbg.space();
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index dd59d121a0..d47854df07 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -190,6 +190,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &ds, const QPalette &p);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &ds, QPalette &p);
#endif // QT_NO_DATASTREAM
+#ifndef QT_NO_DEBUG_STREAM
+Q_GUI_EXPORT QDebug operator<<(QDebug, const QPalette &);
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/kernel/qplatformclipboard_qpa.cpp b/src/gui/kernel/qplatformclipboard_qpa.cpp
index c7c779e4eb..4d8d65de0a 100644
--- a/src/gui/kernel/qplatformclipboard_qpa.cpp
+++ b/src/gui/kernel/qplatformclipboard_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformclipboard_qpa.h b/src/gui/kernel/qplatformclipboard_qpa.h
index fc0505b87e..643733fdf7 100644
--- a/src/gui/kernel/qplatformclipboard_qpa.h
+++ b/src/gui/kernel/qplatformclipboard_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp
index 752de18969..a3824381d3 100644
--- a/src/gui/kernel/qplatformcursor_qpa.cpp
+++ b/src/gui/kernel/qplatformcursor_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformcursor_qpa.h b/src/gui/kernel/qplatformcursor_qpa.h
index da3c4752a0..a2026425db 100644
--- a/src/gui/kernel/qplatformcursor_qpa.h
+++ b/src/gui/kernel/qplatformcursor_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformdrag_qpa.h b/src/gui/kernel/qplatformdrag_qpa.h
index 0b65174f71..fb71f29de9 100644
--- a/src/gui/kernel/qplatformdrag_qpa.h
+++ b/src/gui/kernel/qplatformdrag_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatforminputcontext_qpa.cpp b/src/gui/kernel/qplatforminputcontext_qpa.cpp
index bc0bcf8f4f..1e82507653 100644
--- a/src/gui/kernel/qplatforminputcontext_qpa.cpp
+++ b/src/gui/kernel/qplatforminputcontext_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,7 @@
#include <qplatforminputcontext_qpa.h>
#include <qguiapplication.h>
#include <QRect>
+#include "private/qkeymapper_p.h"
QT_BEGIN_NAMESPACE
@@ -207,4 +208,25 @@ void QPlatformInputContext::emitInputPanelVisibleChanged()
emit qApp->inputPanel()->visibleChanged();
}
+QLocale QPlatformInputContext::locale() const
+{
+ return qt_keymapper_private()->keyboardInputLocale;
+}
+
+void QPlatformInputContext::emitLocaleChanged()
+{
+ emit qApp->inputPanel()->localeChanged();
+}
+
+Qt::LayoutDirection QPlatformInputContext::inputDirection() const
+{
+ return qt_keymapper_private()->keyboardInputDirection;
+}
+
+void QPlatformInputContext::emitInputDirectionChanged(Qt::LayoutDirection newDirection)
+{
+ emit qApp->inputPanel()->inputDirectionChanged(newDirection);
+}
+
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatforminputcontext_qpa.h b/src/gui/kernel/qplatforminputcontext_qpa.h
index 76aa122720..463238f336 100644
--- a/src/gui/kernel/qplatforminputcontext_qpa.h
+++ b/src/gui/kernel/qplatforminputcontext_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -77,6 +77,11 @@ public:
virtual void hideInputPanel();
virtual bool isInputPanelVisible() const;
void emitInputPanelVisibleChanged();
+
+ virtual QLocale locale() const;
+ void emitLocaleChanged();
+ virtual Qt::LayoutDirection inputDirection() const;
+ void emitInputDirectionChanged(Qt::LayoutDirection newDirection);
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp
index 956180c728..23ecf3add4 100644
--- a/src/gui/kernel/qplatformintegration_qpa.cpp
+++ b/src/gui/kernel/qplatformintegration_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,6 +46,7 @@
#include <QtGui/QPlatformAccessibility>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qpixmap_raster_p.h>
+#include <QtGui/private/qplatformscreen_qpa_p.h>
#include <private/qdnd_p.h>
QT_BEGIN_NAMESPACE
@@ -227,12 +228,16 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const
return 1000;
case KeyboardInputInterval:
return 400;
+ case KeyboardAutoRepeatRate:
+ return 30;
case MouseDoubleClickInterval:
return 400;
case StartDragDistance:
return 10;
case StartDragTime:
return 500;
+ case ShowIsFullScreen:
+ return false;
}
return 0;
@@ -251,11 +256,10 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const
*/
void QPlatformIntegration::screenAdded(QPlatformScreen *ps)
{
- QScreen *screen = ps ? ps->screen() : 0;
- if (screen && !QGuiApplicationPrivate::screen_list.contains(screen)) {
- QGuiApplicationPrivate::screen_list << screen;
- emit qGuiApp->screenAdded(screen);
- }
+ QScreen *screen = new QScreen(ps);
+ ps->d_func()->screen = screen;
+ QGuiApplicationPrivate::screen_list << screen;
+ emit qGuiApp->screenAdded(screen);
}
class QPlatformTheme *QPlatformIntegration::platformTheme() const
diff --git a/src/gui/kernel/qplatformintegration_qpa.h b/src/gui/kernel/qplatformintegration_qpa.h
index d5eb14bc50..3975d82288 100644
--- a/src/gui/kernel/qplatformintegration_qpa.h
+++ b/src/gui/kernel/qplatformintegration_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -106,7 +106,9 @@ public:
KeyboardInputInterval,
MouseDoubleClickInterval,
StartDragDistance,
- StartDragTime
+ StartDragTime,
+ KeyboardAutoRepeatRate,
+ ShowIsFullScreen
};
virtual QVariant styleHint(StyleHint hint) const;
diff --git a/src/gui/kernel/qplatformintegrationfactory_qpa.cpp b/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
index c40494c408..7f2260b5f6 100644
--- a/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
+++ b/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformintegrationfactory_qpa_p.h b/src/gui/kernel/qplatformintegrationfactory_qpa_p.h
index 5ffdf85425..189b352139 100644
--- a/src/gui/kernel/qplatformintegrationfactory_qpa_p.h
+++ b/src/gui/kernel/qplatformintegrationfactory_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformintegrationplugin_qpa.cpp b/src/gui/kernel/qplatformintegrationplugin_qpa.cpp
index 0181b98ad7..a57b980ea3 100644
--- a/src/gui/kernel/qplatformintegrationplugin_qpa.cpp
+++ b/src/gui/kernel/qplatformintegrationplugin_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformintegrationplugin_qpa.h b/src/gui/kernel/qplatformintegrationplugin_qpa.h
index b397f56d7c..f53d66d1c8 100644
--- a/src/gui/kernel/qplatformintegrationplugin_qpa.h
+++ b/src/gui/kernel/qplatformintegrationplugin_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformnativeinterface_qpa.cpp b/src/gui/kernel/qplatformnativeinterface_qpa.cpp
index 5c1f8458db..f9ddd1f72a 100644
--- a/src/gui/kernel/qplatformnativeinterface_qpa.cpp
+++ b/src/gui/kernel/qplatformnativeinterface_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformnativeinterface_qpa.h b/src/gui/kernel/qplatformnativeinterface_qpa.h
index bfcf78813b..47e2f82810 100644
--- a/src/gui/kernel/qplatformnativeinterface_qpa.h
+++ b/src/gui/kernel/qplatformnativeinterface_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformopenglcontext_qpa.cpp b/src/gui/kernel/qplatformopenglcontext_qpa.cpp
index e764419825..7c5e8245df 100644
--- a/src/gui/kernel/qplatformopenglcontext_qpa.cpp
+++ b/src/gui/kernel/qplatformopenglcontext_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformopenglcontext_qpa.h b/src/gui/kernel/qplatformopenglcontext_qpa.h
index 1b3bfc9a34..ac5cf969d9 100644
--- a/src/gui/kernel/qplatformopenglcontext_qpa.h
+++ b/src/gui/kernel/qplatformopenglcontext_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformscreen_qpa.cpp b/src/gui/kernel/qplatformscreen_qpa.cpp
index 3fdb809137..26c685ff1a 100644
--- a/src/gui/kernel/qplatformscreen_qpa.cpp
+++ b/src/gui/kernel/qplatformscreen_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,23 +42,18 @@
#include "qplatformscreen_qpa.h"
#include <QtGui/qguiapplication.h>
#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/private/qplatformscreen_qpa_p.h>
#include <QtGui/qplatformintegration_qpa.h>
#include <QtGui/qscreen.h>
#include <QtGui/qwindow.h>
QT_BEGIN_NAMESPACE
-class QPlatformScreenPrivate
-{
-public:
- QScreen *screen;
-};
-
QPlatformScreen::QPlatformScreen()
: d_ptr(new QPlatformScreenPrivate)
{
Q_D(QPlatformScreen);
- d->screen = new QScreen(this);
+ d->screen = 0;
}
QPlatformScreen::~QPlatformScreen()
diff --git a/src/gui/kernel/qplatformscreen_qpa.h b/src/gui/kernel/qplatformscreen_qpa.h
index 64115a6cd5..586a29279c 100644
--- a/src/gui/kernel/qplatformscreen_qpa.h
+++ b/src/gui/kernel/qplatformscreen_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -120,6 +120,8 @@ protected:
private:
Q_DISABLE_COPY(QPlatformScreen)
+
+ friend class QPlatformIntegration;
};
QT_END_NAMESPACE
diff --git a/src/plugins/bearer/icd/iapmonitor.h b/src/gui/kernel/qplatformscreen_qpa_p.h
index 9f7c3b2cef..67c222bdf3 100644
--- a/src/plugins/bearer/icd/iapmonitor.h
+++ b/src/gui/kernel/qplatformscreen_qpa_p.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
@@ -39,30 +39,36 @@
**
****************************************************************************/
+#ifndef QPLATFORMSCREEN_QPA_P_H
+#define QPLATFORMSCREEN_QPA_P_H
-#ifndef IAPMONITOR_H
-#define IAPMONITOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
-#include <QString>
+QT_BEGIN_HEADER
-namespace Maemo {
+QT_BEGIN_NAMESPACE
-class IAPMonitorPrivate;
-class IAPMonitor {
-public:
- IAPMonitor();
- ~IAPMonitor();
+QT_MODULE(Gui)
-protected:
- virtual void iapAdded(const QString &id);
- virtual void iapRemoved(const QString &id);
+class QScreen;
-private:
- IAPMonitorPrivate *d_ptr;
- Q_DECLARE_PRIVATE(IAPMonitor);
+class QPlatformScreenPrivate
+{
+public:
+ QScreen *screen;
};
-} // namespace Maemo
+QT_END_NAMESPACE
-#endif // IAPMONITOR_H
+QT_END_HEADER
+#endif // QPLATFORMSCREEN_QPA_P_H
diff --git a/src/gui/kernel/qplatformsurface_qpa.cpp b/src/gui/kernel/qplatformsurface_qpa.cpp
index dcfd201ea3..3347f7984f 100644
--- a/src/gui/kernel/qplatformsurface_qpa.cpp
+++ b/src/gui/kernel/qplatformsurface_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformsurface_qpa.h b/src/gui/kernel/qplatformsurface_qpa.h
index 76b564de25..7ceb39f049 100644
--- a/src/gui/kernel/qplatformsurface_qpa.h
+++ b/src/gui/kernel/qplatformsurface_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp
index c887d78edb..22d4452f4e 100644
--- a/src/gui/kernel/qplatformtheme_qpa.cpp
+++ b/src/gui/kernel/qplatformtheme_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,8 +41,36 @@
#include "qplatformtheme_qpa.h"
+#include <QtCore/QVariant>
+
QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformTheme
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+ \brief The QPlatformTheme class allows customizing the UI based on themes.
+
+*/
+
+/*!
+ \enum QPlatformTheme::ThemeHint
+
+ This enum describes the available theme hints.
+
+ \value TextCursorWidth (int) Determines the width of the text cursor.
+
+ \value DropShadow (bool) Determines whether the drop shadow effect for
+ tooltips or whatsthis is enabled.
+
+ \value MaximumScrollBarDragDistance (int) Determines the value returned by
+ QStyle::pixelMetric(PM_MaximumDragDistance)
+
+ \sa themeHint(), QStyle::pixelMetric()
+*/
+
QPlatformMenu *QPlatformTheme::createPlatformMenu(QMenu *menu) const
{
Q_UNUSED(menu);
@@ -67,4 +95,17 @@ QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(QDialog *dialo
return 0;
}
+QVariant QPlatformTheme::themeHint(ThemeHint hint) const
+{
+ switch (hint) {
+ case TextCursorWidth:
+ return QVariant(1);
+ case DropShadow:
+ return QVariant(false);
+ case MaximumScrollBarDragDistance:
+ return QVariant(-1);
+ }
+ return QVariant();
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformtheme_qpa.h b/src/gui/kernel/qplatformtheme_qpa.h
index 2090ce37e1..c3e5b677a2 100644
--- a/src/gui/kernel/qplatformtheme_qpa.h
+++ b/src/gui/kernel/qplatformtheme_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,15 +56,24 @@ class QPlatformMenu;
class QPlatformMenuBar;
class QPlatformDialogHelper;
class QDialog;
+class QVariant;
class Q_GUI_EXPORT QPlatformTheme
{
public:
+ enum ThemeHint {
+ TextCursorWidth,
+ DropShadow,
+ MaximumScrollBarDragDistance
+ };
+
virtual QPlatformMenu *createPlatformMenu(QMenu *menu = 0) const;
virtual QPlatformMenuBar *createPlatformMenuBar(QMenuBar *menuBar = 0) const;
virtual bool usePlatformNativeDialog(const QDialog *dialog = 0) const;
virtual QPlatformDialogHelper *createPlatformDialogHelper(QDialog *dialog = 0) const;
+
+ virtual QVariant themeHint(ThemeHint hint) const;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformthemefactory_qpa.cpp b/src/gui/kernel/qplatformthemefactory_qpa.cpp
index 87f96762c2..c278f41411 100644
--- a/src/gui/kernel/qplatformthemefactory_qpa.cpp
+++ b/src/gui/kernel/qplatformthemefactory_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformthemefactory_qpa_p.h b/src/gui/kernel/qplatformthemefactory_qpa_p.h
index b65e6e197a..71987aa723 100644
--- a/src/gui/kernel/qplatformthemefactory_qpa_p.h
+++ b/src/gui/kernel/qplatformthemefactory_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformthemeplugin_qpa.cpp b/src/gui/kernel/qplatformthemeplugin_qpa.cpp
index e17e36fc3d..c51d4e9fc5 100644
--- a/src/gui/kernel/qplatformthemeplugin_qpa.cpp
+++ b/src/gui/kernel/qplatformthemeplugin_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformthemeplugin_qpa.h b/src/gui/kernel/qplatformthemeplugin_qpa.h
index 0df9a8842d..89348deae0 100644
--- a/src/gui/kernel/qplatformthemeplugin_qpa.h
+++ b/src/gui/kernel/qplatformthemeplugin_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index 90fdec69f0..d69cb0e64e 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qplatformwindow_qpa.h b/src/gui/kernel/qplatformwindow_qpa.h
index c6b5bb80ea..7605a5a4aa 100644
--- a/src/gui/kernel/qplatformwindow_qpa.h
+++ b/src/gui/kernel/qplatformwindow_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index 8a35ce6b8f..a1ed3014d0 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,23 +40,13 @@
****************************************************************************/
#include "qscreen.h"
+#include "qscreen_p.h"
#include "qplatformscreen_qpa.h"
#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
-class QScreenPrivate : public QObjectPrivate
-{
-public:
- QScreenPrivate(QPlatformScreen *screen)
- : platformScreen(screen)
- {
- }
-
- QPlatformScreen *platformScreen;
-};
-
/*!
\class QScreen
\brief The QScreen class is used to query screen properties.
@@ -119,7 +109,7 @@ int QScreen::depth() const
QSize QScreen::size() const
{
Q_D(const QScreen);
- return d->platformScreen->geometry().size();
+ return d->geometry.size();
}
/*!
@@ -184,7 +174,7 @@ qreal QScreen::physicalDotsPerInch() const
qreal QScreen::logicalDotsPerInchX() const
{
Q_D(const QScreen);
- return d->platformScreen->logicalDpi().first;
+ return d->logicalDpi.first;
}
/*!
@@ -198,7 +188,7 @@ qreal QScreen::logicalDotsPerInchX() const
qreal QScreen::logicalDotsPerInchY() const
{
Q_D(const QScreen);
- return d->platformScreen->logicalDpi().second;
+ return d->logicalDpi.second;
}
/*!
@@ -216,7 +206,7 @@ qreal QScreen::logicalDotsPerInchY() const
qreal QScreen::logicalDotsPerInch() const
{
Q_D(const QScreen);
- QDpi dpi = d->platformScreen->logicalDpi();
+ QDpi dpi = d->logicalDpi;
return (dpi.first + dpi.second) * qreal(0.5);
}
@@ -246,7 +236,7 @@ QSizeF QScreen::physicalSize() const
QSize QScreen::availableSize() const
{
Q_D(const QScreen);
- return d->platformScreen->availableGeometry().size();
+ return d->availableGeometry.size();
}
/*!
@@ -259,7 +249,7 @@ QSize QScreen::availableSize() const
QRect QScreen::geometry() const
{
Q_D(const QScreen);
- return d->platformScreen->geometry();
+ return d->geometry;
}
/*!
@@ -272,7 +262,7 @@ QRect QScreen::geometry() const
QRect QScreen::availableGeometry() const
{
Q_D(const QScreen);
- return d->platformScreen->availableGeometry();
+ return d->availableGeometry;
}
/*!
@@ -315,10 +305,9 @@ QSize QScreen::virtualSize() const
*/
QRect QScreen::virtualGeometry() const
{
- Q_D(const QScreen);
QRect result;
- foreach (QPlatformScreen *platformScreen, d->platformScreen->virtualSiblings())
- result |= platformScreen->geometry();
+ foreach (QScreen *screen, virtualSiblings())
+ result |= screen->geometry();
return result;
}
@@ -347,10 +336,9 @@ QSize QScreen::availableVirtualSize() const
*/
QRect QScreen::availableVirtualGeometry() const
{
- Q_D(const QScreen);
QRect result;
- foreach (QPlatformScreen *platformScreen, d->platformScreen->virtualSiblings())
- result |= platformScreen->availableGeometry();
+ foreach (QScreen *screen, virtualSiblings())
+ result |= screen->availableGeometry();
return result;
}
@@ -383,7 +371,7 @@ Qt::ScreenOrientation QScreen::primaryOrientation() const
Qt::ScreenOrientation QScreen::currentOrientation() const
{
Q_D(const QScreen);
- return d->platformScreen->currentOrientation();
+ return d->currentOrientation;
}
// i must be power of two
diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h
index 6fc97c1799..7291e2ad7b 100644
--- a/src/gui/kernel/qscreen.h
+++ b/src/gui/kernel/qscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -140,6 +140,7 @@ private:
Q_DISABLE_COPY(QScreen)
friend class QGuiApplicationPrivate;
+ friend class QPlatformIntegration;
friend class QPlatformScreen;
};
diff --git a/src/plugins/bearer/icd/main.cpp b/src/gui/kernel/qscreen_p.h
index 0b52d25e60..50742c9f6b 100644
--- a/src/plugins/bearer/icd/main.cpp
+++ b/src/gui/kernel/qscreen_p.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
@@ -39,50 +39,42 @@
**
****************************************************************************/
-#include "qicdengine.h"
+#ifndef QSCREEN_P_H
+#define QSCREEN_P_H
-#include <QtNetwork/private/qbearerplugin_p.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qplatformscreen_qpa.h>
-#include <QtCore/qdebug.h>
+#include <QtCore/private/qobject_p.h>
-#ifndef QT_NO_BEARERMANAGEMENT
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QIcdEnginePlugin : public QBearerEnginePlugin
-{
-public:
- QIcdEnginePlugin();
- ~QIcdEnginePlugin();
-
- QStringList keys() const;
- QBearerEngine *create(const QString &key) const;
-};
-
-QIcdEnginePlugin::QIcdEnginePlugin()
-{
-}
+QT_MODULE(Gui)
-QIcdEnginePlugin::~QIcdEnginePlugin()
+class QScreenPrivate : public QObjectPrivate
{
-}
-
-QStringList QIcdEnginePlugin::keys() const
-{
- return QStringList() << QLatin1String("icd");
-}
+public:
+ QScreenPrivate(QPlatformScreen *screen)
+ : platformScreen(screen)
+ {
+ currentOrientation = screen->currentOrientation();
+ geometry = screen->geometry();
+ availableGeometry = screen->availableGeometry();
+ logicalDpi = screen->logicalDpi();
+ }
-QBearerEngine *QIcdEnginePlugin::create(const QString &key) const
-{
- if (key == QLatin1String("icd"))
- return new QIcdEngine;
- else
- return 0;
-}
+ Qt::ScreenOrientation currentOrientation;
+ QRect geometry;
+ QRect availableGeometry;
+ QDpi logicalDpi;
-Q_EXPORT_STATIC_PLUGIN(QIcdEnginePlugin)
-Q_EXPORT_PLUGIN2(qicdbearer, QIcdEnginePlugin)
+ QPlatformScreen *platformScreen;
+};
QT_END_NAMESPACE
-#endif
+QT_END_HEADER
+
+#endif // QSCREEN_P_H
diff --git a/src/gui/kernel/qsessionmanager.h b/src/gui/kernel/qsessionmanager.h
index 31a26c1582..89c5cf47b6 100644
--- a/src/gui/kernel/qsessionmanager.h
+++ b/src/gui/kernel/qsessionmanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qsessionmanager_qpa.cpp b/src/gui/kernel/qsessionmanager_qpa.cpp
index 7ade0df3a8..9b6ec26ff4 100644
--- a/src/gui/kernel/qsessionmanager_qpa.cpp
+++ b/src/gui/kernel/qsessionmanager_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 64b0aa1741..2bacac9598 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qshortcutmap_p.h b/src/gui/kernel/qshortcutmap_p.h
index 28c37f9a2e..e447507b87 100644
--- a/src/gui/kernel/qshortcutmap_p.h
+++ b/src/gui/kernel/qshortcutmap_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 7585d23558..eb0f055270 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,9 +76,19 @@ int QStyleHints::keyboardInputInterval() const
return hint(QPlatformIntegration::KeyboardInputInterval).toInt();
}
+int QStyleHints::keyboardAutoRepeatRate() const
+{
+ return hint(QPlatformIntegration::KeyboardAutoRepeatRate).toInt();
+}
+
int QStyleHints::cursorFlashTime() const
{
return hint(QPlatformIntegration::CursorFlashTime).toInt();
}
+bool QStyleHints::showIsFullScreen() const
+{
+ return hint(QPlatformIntegration::ShowIsFullScreen).toBool();
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h
index bcc9b589e2..6fa72110fb 100644
--- a/src/gui/kernel/qstylehints.h
+++ b/src/gui/kernel/qstylehints.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,9 @@ public:
int startDragDistance() const;
int startDragTime() const;
int keyboardInputInterval() const;
+ int keyboardAutoRepeatRate() const;
int cursorFlashTime() const;
+ bool showIsFullScreen() const;
private:
friend class QGuiApplication;
QStyleHints();
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index 871b765bfd..bfdb772cfb 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qsurface.h b/src/gui/kernel/qsurface.h
index a6c8745a7a..fba1690af4 100644
--- a/src/gui/kernel/qsurface.h
+++ b/src/gui/kernel/qsurface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index b200cdb113..39b2d491a3 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h
index cdbd50740b..3d3bfeb30b 100644
--- a/src/gui/kernel/qsurfaceformat.h
+++ b/src/gui/kernel/qsurfaceformat.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qt_gui_pch.h b/src/gui/kernel/qt_gui_pch.h
index 3cb527d0b1..98a516f54e 100644
--- a/src/gui/kernel/qt_gui_pch.h
+++ b/src/gui/kernel/qt_gui_pch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qtouchdevice.cpp b/src/gui/kernel/qtouchdevice.cpp
index abf1acc310..b8d4d01655 100644
--- a/src/gui/kernel/qtouchdevice.cpp
+++ b/src/gui/kernel/qtouchdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qtouchdevice.h b/src/gui/kernel/qtouchdevice.h
index 496bb7a522..6efa7814c9 100644
--- a/src/gui/kernel/qtouchdevice.h
+++ b/src/gui/kernel/qtouchdevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qtouchdevice_p.h b/src/gui/kernel/qtouchdevice_p.h
index f782d1585d..c37e4a8bf5 100644
--- a/src/gui/kernel/qtouchdevice_p.h
+++ b/src/gui/kernel/qtouchdevice_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 55329f56bd..97c6b0cbc9 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,6 +54,8 @@
#include <QtCore/QDebug>
+#include <QStyleHints>
+
QT_BEGIN_NAMESPACE
/*!
@@ -741,30 +743,42 @@ QObject *QWindow::focusObject() const
return const_cast<QWindow *>(this);
}
+void QWindow::show()
+{
+ if (qApp->styleHints()->showIsFullScreen())
+ showFullScreen();
+ else
+ showNormal();
+}
+
+void QWindow::hide()
+{
+ setVisible(false);
+}
void QWindow::showMinimized()
{
setWindowState(Qt::WindowMinimized);
- show();
+ setVisible(true);
}
void QWindow::showMaximized()
{
setWindowState(Qt::WindowMaximized);
- show();
+ setVisible(true);
}
void QWindow::showFullScreen()
{
setWindowState(Qt::WindowFullScreen);
- show();
+ setVisible(true);
requestActivateWindow();
}
void QWindow::showNormal()
{
setWindowState(Qt::WindowNoState);
- show();
+ setVisible(true);
}
bool QWindow::close()
@@ -774,72 +788,83 @@ bool QWindow::close()
return true;
}
-void QWindow::exposeEvent(QExposeEvent *)
+void QWindow::exposeEvent(QExposeEvent *ev)
{
+ ev->ignore();
}
-void QWindow::moveEvent(QMoveEvent *)
+void QWindow::moveEvent(QMoveEvent *ev)
{
+ ev->ignore();
}
-void QWindow::resizeEvent(QResizeEvent *)
+void QWindow::resizeEvent(QResizeEvent *ev)
{
+ ev->ignore();
}
-void QWindow::showEvent(QShowEvent *)
+void QWindow::showEvent(QShowEvent *ev)
{
+ ev->ignore();
}
-void QWindow::hideEvent(QHideEvent *)
+void QWindow::hideEvent(QHideEvent *ev)
{
+ ev->ignore();
}
-bool QWindow::event(QEvent *event)
+bool QWindow::event(QEvent *ev)
{
- switch (event->type()) {
+ switch (ev->type()) {
case QEvent::MouseMove:
- mouseMoveEvent(static_cast<QMouseEvent*>(event));
+ mouseMoveEvent(static_cast<QMouseEvent*>(ev));
break;
case QEvent::MouseButtonPress:
- mousePressEvent(static_cast<QMouseEvent*>(event));
+ mousePressEvent(static_cast<QMouseEvent*>(ev));
break;
case QEvent::MouseButtonRelease:
- mouseReleaseEvent(static_cast<QMouseEvent*>(event));
+ mouseReleaseEvent(static_cast<QMouseEvent*>(ev));
break;
case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast<QMouseEvent*>(event));
+ mouseDoubleClickEvent(static_cast<QMouseEvent*>(ev));
+ break;
+
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
+ touchEvent(static_cast<QTouchEvent *>(ev));
break;
case QEvent::Move:
- moveEvent(static_cast<QMoveEvent*>(event));
+ moveEvent(static_cast<QMoveEvent*>(ev));
break;
case QEvent::Resize:
- resizeEvent(static_cast<QResizeEvent*>(event));
+ resizeEvent(static_cast<QResizeEvent*>(ev));
break;
case QEvent::KeyPress:
- keyPressEvent(static_cast<QKeyEvent *>(event));
+ keyPressEvent(static_cast<QKeyEvent *>(ev));
break;
case QEvent::KeyRelease:
- keyReleaseEvent(static_cast<QKeyEvent *>(event));
+ keyReleaseEvent(static_cast<QKeyEvent *>(ev));
break;
case QEvent::FocusIn:
- focusInEvent(static_cast<QFocusEvent *>(event));
+ focusInEvent(static_cast<QFocusEvent *>(ev));
break;
case QEvent::FocusOut:
- focusOutEvent(static_cast<QFocusEvent *>(event));
+ focusOutEvent(static_cast<QFocusEvent *>(ev));
break;
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
- wheelEvent(static_cast<QWheelEvent*>(event));
+ wheelEvent(static_cast<QWheelEvent*>(ev));
break;
#endif
@@ -852,62 +877,74 @@ bool QWindow::event(QEvent *event)
break; }
case QEvent::Expose:
- exposeEvent(static_cast<QExposeEvent *>(event));
+ exposeEvent(static_cast<QExposeEvent *>(ev));
break;
case QEvent::Show:
- showEvent(static_cast<QShowEvent *>(event));
+ showEvent(static_cast<QShowEvent *>(ev));
break;
case QEvent::Hide:
- hideEvent(static_cast<QHideEvent *>(event));
+ hideEvent(static_cast<QHideEvent *>(ev));
break;
default:
- return QObject::event(event);
+ return QObject::event(ev);
}
return true;
}
-void QWindow::keyPressEvent(QKeyEvent *)
+void QWindow::keyPressEvent(QKeyEvent *ev)
{
+ ev->ignore();
}
-void QWindow::keyReleaseEvent(QKeyEvent *)
+void QWindow::keyReleaseEvent(QKeyEvent *ev)
{
+ ev->ignore();
}
-void QWindow::focusInEvent(QFocusEvent *)
+void QWindow::focusInEvent(QFocusEvent *ev)
{
+ ev->ignore();
}
-void QWindow::focusOutEvent(QFocusEvent *)
+void QWindow::focusOutEvent(QFocusEvent *ev)
{
+ ev->ignore();
}
-void QWindow::mousePressEvent(QMouseEvent *)
+void QWindow::mousePressEvent(QMouseEvent *ev)
{
+ ev->ignore();
}
-void QWindow::mouseReleaseEvent(QMouseEvent *)
+void QWindow::mouseReleaseEvent(QMouseEvent *ev)
{
+ ev->ignore();
}
-void QWindow::mouseDoubleClickEvent(QMouseEvent *)
+void QWindow::mouseDoubleClickEvent(QMouseEvent *ev)
{
+ ev->ignore();
}
-void QWindow::mouseMoveEvent(QMouseEvent *)
+void QWindow::mouseMoveEvent(QMouseEvent *ev)
{
+ ev->ignore();
}
#ifndef QT_NO_WHEELEVENT
-void QWindow::wheelEvent(QWheelEvent *)
+void QWindow::wheelEvent(QWheelEvent *ev)
{
+ ev->ignore();
}
#endif //QT_NO_WHEELEVENT
-
+void QWindow::touchEvent(QTouchEvent *ev)
+{
+ ev->ignore();
+}
/*!
\fn QPoint QWindow::mapToGlobal(const QPoint &pos) const
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 11ff6b101d..4d161658c6 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,6 +72,7 @@ class QMouseEvent;
#ifndef QT_NO_WHEELEVENT
class QWheelEvent;
#endif
+class QTouchEvent;
class QPlatformSurface;
class QPlatformWindow;
@@ -208,8 +209,8 @@ public:
public Q_SLOTS:
void setVisible(bool visible);
- inline void show() { setVisible(true); }
- inline void hide() { setVisible(false); }
+ void show();
+ void hide();
void showMinimized();
void showMaximized();
@@ -285,6 +286,7 @@ protected:
#ifndef QT_NO_WHEELEVENT
virtual void wheelEvent(QWheelEvent *);
#endif
+ virtual void touchEvent(QTouchEvent *);
QWindow(QWindowPrivate &dd, QWindow *parent);
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index ee91b61cf1..d3b6868aa5 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qwindowdefs.h b/src/gui/kernel/qwindowdefs.h
index b77ec0b2f3..3366606036 100644
--- a/src/gui/kernel/qwindowdefs.h
+++ b/src/gui/kernel/qwindowdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qwindowdefs_win.h b/src/gui/kernel/qwindowdefs_win.h
index 2bf9c8e672..2db1a4649f 100644
--- a/src/gui/kernel/qwindowdefs_win.h
+++ b/src/gui/kernel/qwindowdefs_win.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index 016446780b..4a7ebd1c0c 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -219,38 +219,26 @@ void QWindowSystemInterface::registerTouchDevice(QTouchDevice *device)
QTouchDevicePrivate::registerDevice(device);
}
-void QWindowSystemInterface::handleTouchEvent(QWindow *w, QEvent::Type type, QTouchDevice *device,
- const QList<struct TouchPoint> &points, Qt::KeyboardModifiers mods)
+void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device,
+ const QList<TouchPoint> &points, Qt::KeyboardModifiers mods)
{
unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
- handleTouchEvent(w, time, type, device, points, mods);
+ handleTouchEvent(w, time, device, points, mods);
}
-void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QEvent::Type type,
- QTouchDevice *device,
- const QList<struct TouchPoint> &points, Qt::KeyboardModifiers mods)
+QList<QTouchEvent::TouchPoint> QWindowSystemInterfacePrivate::convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type)
{
- if (!points.size()) // Touch events must have at least one point
- return;
-
- if (!QTouchDevicePrivate::isRegistered(device)) // Disallow passing bogus, non-registered devices.
- return;
-
QList<QTouchEvent::TouchPoint> touchPoints;
Qt::TouchPointStates states;
QTouchEvent::TouchPoint p;
- QList<struct TouchPoint>::const_iterator point = points.constBegin();
- QList<struct TouchPoint>::const_iterator end = points.constEnd();
+ QList<QWindowSystemInterface::TouchPoint>::const_iterator point = points.constBegin();
+ QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd();
while (point != end) {
p.setId(point->id);
p.setPressure(point->pressure);
states |= point->state;
- Qt::TouchPointStates state = point->state;
- if (point->isPrimary) {
- state |= Qt::TouchPointPrimary;
- }
- p.setState(state);
+ p.setState(point->state);
const QPointF screenPos = point->area.center();
p.setScreenPos(screenPos);
@@ -268,36 +256,60 @@ void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QEv
++point;
}
+ // Determine the event type based on the combined point states.
+ if (type) {
+ *type = QEvent::TouchUpdate;
+ if (states == Qt::TouchPointPressed)
+ *type = QEvent::TouchBegin;
+ else if (states == Qt::TouchPointReleased)
+ *type = QEvent::TouchEnd;
+ }
+
+ return touchPoints;
+}
+
+void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QTouchDevice *device,
+ const QList<TouchPoint> &points, Qt::KeyboardModifiers mods)
+{
+ if (!points.size()) // Touch events must have at least one point
+ return;
+
+ if (!QTouchDevicePrivate::isRegistered(device)) // Disallow passing bogus, non-registered devices.
+ return;
+
+ QEvent::Type type;
+ QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::convertTouchPoints(points, &type);
+
QWindowSystemInterfacePrivate::TouchEvent *e =
new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, device, touchPoints, mods);
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
-void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen)
+void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation orientation)
{
QWindowSystemInterfacePrivate::ScreenOrientationEvent *e =
- new QWindowSystemInterfacePrivate::ScreenOrientationEvent(screen);
+ new QWindowSystemInterfacePrivate::ScreenOrientationEvent(screen, orientation);
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
-void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen)
+void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const QRect &geometry)
{
QWindowSystemInterfacePrivate::ScreenGeometryEvent *e =
- new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen);
+ new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, geometry);
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
-void QWindowSystemInterface::handleScreenAvailableGeometryChange(QScreen *screen)
+void QWindowSystemInterface::handleScreenAvailableGeometryChange(QScreen *screen, const QRect &availableGeometry)
{
QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e =
- new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screen);
+ new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screen, availableGeometry);
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
-void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *screen)
+void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal dpiX, qreal dpiY)
{
QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e =
- new QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent(screen);
+ new QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent(screen, dpiX, dpiY);
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface_qpa.h
index 423281955c..4a17fb9035 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.h
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -86,9 +86,8 @@ public:
static void handleWheelEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods = Qt::NoModifier);
struct TouchPoint {
- TouchPoint() : id(0), isPrimary(false), pressure(0), state(Qt::TouchPointStationary), flags(0) { }
+ TouchPoint() : id(0), pressure(0), state(Qt::TouchPointStationary), flags(0) { }
int id; // for application use
- bool isPrimary; // for application use
QPointF normalPosition; // touch device coordinates, (0 to 1, 0 to 1)
QRectF area; // the touched area, centered at position in screen coordinates
qreal pressure; // 0 to 1
@@ -99,9 +98,9 @@ public:
};
static void registerTouchDevice(QTouchDevice *device);
- static void handleTouchEvent(QWindow *w, QEvent::Type type, QTouchDevice *device,
+ static void handleTouchEvent(QWindow *w, QTouchDevice *device,
const QList<struct TouchPoint> &points, Qt::KeyboardModifiers mods = Qt::NoModifier);
- static void handleTouchEvent(QWindow *w, ulong timestamp, QEvent::Type type, QTouchDevice *device,
+ static void handleTouchEvent(QWindow *w, ulong timestamp, QTouchDevice *device,
const QList<struct TouchPoint> &points, Qt::KeyboardModifiers mods = Qt::NoModifier);
static void handleGeometryChange(QWindow *w, const QRect &newRect);
@@ -123,10 +122,10 @@ public:
static Qt::DropAction handleDrop(QWindow *w, QMimeData *dropData, const QPoint &p);
// Changes to the screen
- static void handleScreenOrientationChange(QScreen *screen);
- static void handleScreenGeometryChange(QScreen *screen);
- static void handleScreenAvailableGeometryChange(QScreen *screen);
- static void handleScreenLogicalDotsPerInchChange(QScreen *screen);
+ static void handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation newOrientation);
+ static void handleScreenGeometryChange(QScreen *screen, const QRect &newGeometry);
+ static void handleScreenAvailableGeometryChange(QScreen *screen, const QRect &newAvailableGeometry);
+ static void handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal newDpiX, qreal newDpiY);
// For event dispatcher implementations
static bool sendWindowSystemEvents(QAbstractEventDispatcher *eventDispatcher, QEventLoop::ProcessEventsFlags flags);
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_qpa_p.h
index 5580104c3b..b5614eb38e 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,8 +72,9 @@ public:
class WindowSystemEvent {
public:
explicit WindowSystemEvent(EventType t)
- : type(t) { }
+ : type(t), synthetic(false) { }
EventType type;
+ bool synthetic;
};
class CloseEvent : public WindowSystemEvent {
@@ -197,30 +198,35 @@ public:
class ScreenOrientationEvent : public WindowSystemEvent {
public:
- ScreenOrientationEvent(QScreen *s)
- : WindowSystemEvent(ScreenOrientation), screen(s) { }
+ ScreenOrientationEvent(QScreen *s, Qt::ScreenOrientation o)
+ : WindowSystemEvent(ScreenOrientation), screen(s), orientation(o) { }
QWeakPointer<QScreen> screen;
+ Qt::ScreenOrientation orientation;
};
class ScreenGeometryEvent : public WindowSystemEvent {
public:
- ScreenGeometryEvent(QScreen *s)
- : WindowSystemEvent(ScreenGeometry), screen(s) { }
+ ScreenGeometryEvent(QScreen *s, const QRect &g)
+ : WindowSystemEvent(ScreenGeometry), screen(s), geometry(g) { }
QWeakPointer<QScreen> screen;
+ QRect geometry;
};
class ScreenAvailableGeometryEvent : public WindowSystemEvent {
public:
- ScreenAvailableGeometryEvent(QScreen *s)
- : WindowSystemEvent(ScreenAvailableGeometry), screen(s) { }
+ ScreenAvailableGeometryEvent(QScreen *s, const QRect &g)
+ : WindowSystemEvent(ScreenAvailableGeometry), screen(s), availableGeometry(g) { }
QWeakPointer<QScreen> screen;
+ QRect availableGeometry;
};
class ScreenLogicalDotsPerInchEvent : public WindowSystemEvent {
public:
- ScreenLogicalDotsPerInchEvent(QScreen *s)
- : WindowSystemEvent(ScreenLogicalDotsPerInch), screen(s) { }
+ ScreenLogicalDotsPerInchEvent(QScreen *s, qreal dx, qreal dy)
+ : WindowSystemEvent(ScreenLogicalDotsPerInch), screen(s), dpiX(dx), dpiY(dy) { }
QWeakPointer<QScreen> screen;
+ qreal dpiX;
+ qreal dpiY;
};
class MapEvent : public WindowSystemEvent {
@@ -256,6 +262,8 @@ public:
static void queueWindowSystemEvent(WindowSystemEvent *ev);
static QTime eventTime;
+
+ static QList<QTouchEvent::TouchPoint> convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type);
};
QT_END_HEADER
diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp
index c1e1d92935..88682702de 100644
--- a/src/gui/math3d/qgenericmatrix.cpp
+++ b/src/gui/math3d/qgenericmatrix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index a90d32a2b6..c992415426 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 1797564a98..b6b60e7072 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 2c98dd03e3..98f967f63c 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index ef1b545e10..53e01323d9 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index 802de8b3b7..78b2d91d13 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index cd94007aad..a1c7ac048f 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index f771ce34d0..df435bcf49 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 4e8a62fea3..096d14223c 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index 17785a6c7c..55c0e36ca2 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index 41c7b296be..ce3d410b39 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index 64b8079b76..ceff21163f 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 3233fcfa5b..246d4dfa24 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index cc64804efd..a3ec59cef1 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengl2pexvertexarray.cpp b/src/gui/opengl/qopengl2pexvertexarray.cpp
index ec26fdbf5b..1db2223667 100644
--- a/src/gui/opengl/qopengl2pexvertexarray.cpp
+++ b/src/gui/opengl/qopengl2pexvertexarray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengl2pexvertexarray_p.h b/src/gui/opengl/qopengl2pexvertexarray_p.h
index 5ad4f7a237..779fa5a545 100644
--- a/src/gui/opengl/qopengl2pexvertexarray_p.h
+++ b/src/gui/opengl/qopengl2pexvertexarray_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengl_p.h b/src/gui/opengl/qopengl_p.h
index b09f9447db..5323604ce5 100644
--- a/src/gui/opengl/qopengl_p.h
+++ b/src/gui/opengl/qopengl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index bdd38018fa..6bf4fedc8e 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglbuffer.h b/src/gui/opengl/qopenglbuffer.h
index 52a2c4d640..83ad5cda51 100644
--- a/src/gui/opengl/qopenglbuffer.h
+++ b/src/gui/opengl/qopenglbuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglcustomshaderstage.cpp b/src/gui/opengl/qopenglcustomshaderstage.cpp
index 6cedf66df1..25a07b2a4c 100644
--- a/src/gui/opengl/qopenglcustomshaderstage.cpp
+++ b/src/gui/opengl/qopenglcustomshaderstage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglcustomshaderstage_p.h b/src/gui/opengl/qopenglcustomshaderstage_p.h
index de459c0050..35c59a9e9b 100644
--- a/src/gui/opengl/qopenglcustomshaderstage_p.h
+++ b/src/gui/opengl/qopenglcustomshaderstage_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp
index aaca6ad89c..9520f07fcc 100644
--- a/src/gui/opengl/qopenglengineshadermanager.cpp
+++ b/src/gui/opengl/qopenglengineshadermanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -247,8 +247,7 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
if (!inCache)
simpleShaderCache.store(simpleShaderProg, context);
} else {
- qCritical() << "Errors linking simple shader:"
- << simpleShaderProg->log();
+ qCritical("Errors linking simple shader: %s", qPrintable(simpleShaderProg->log()));
}
// Compile the blit shader:
@@ -289,8 +288,7 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
if (!inCache)
blitShaderCache.store(blitShaderProg, context);
} else {
- qCritical() << "Errors linking blit shader:"
- << blitShaderProg->log();
+ qCritical("Errors linking blit shader: %s", qPrintable(blitShaderProg->log()));
}
#ifdef QT_GL_SHARED_SHADER_DEBUG
diff --git a/src/gui/opengl/qopenglengineshadermanager_p.h b/src/gui/opengl/qopenglengineshadermanager_p.h
index 1dcc4fe7a7..39cd2e4d70 100644
--- a/src/gui/opengl/qopenglengineshadermanager_p.h
+++ b/src/gui/opengl/qopenglengineshadermanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglengineshadersource_p.h b/src/gui/opengl/qopenglengineshadersource_p.h
index cb85212308..65e3fc54a5 100644
--- a/src/gui/opengl/qopenglengineshadersource_p.h
+++ b/src/gui/opengl/qopenglengineshadersource_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglextensions_p.h b/src/gui/opengl/qopenglextensions_p.h
index 65d92e3a65..b66af217a6 100644
--- a/src/gui/opengl/qopenglextensions_p.h
+++ b/src/gui/opengl/qopenglextensions_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index bd2f1fd5dc..261a6df27d 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/gui/opengl/qopenglframebufferobject.h
index 8a57784f4f..acce7d7391 100644
--- a/src/gui/opengl/qopenglframebufferobject.h
+++ b/src/gui/opengl/qopenglframebufferobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h
index 93a8bbf32f..aeaa2a0e7d 100644
--- a/src/gui/opengl/qopenglframebufferobject_p.h
+++ b/src/gui/opengl/qopenglframebufferobject_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 24cf858a7c..a34dfc193c 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 7d9e34740e..2f4b5b18cb 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglgradientcache.cpp b/src/gui/opengl/qopenglgradientcache.cpp
index f8d61cd620..dde5eaf93e 100644
--- a/src/gui/opengl/qopenglgradientcache.cpp
+++ b/src/gui/opengl/qopenglgradientcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglgradientcache_p.h b/src/gui/opengl/qopenglgradientcache_p.h
index 53abf221d2..055798fcd8 100644
--- a/src/gui/opengl/qopenglgradientcache_p.h
+++ b/src/gui/opengl/qopenglgradientcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
index 4e5c2703dc..35ef609529 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/gui/opengl/qopenglpaintdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/gui/opengl/qopenglpaintdevice.h
index 9edc347b32..0a7bb3c9f3 100644
--- a/src/gui/opengl/qopenglpaintdevice.h
+++ b/src/gui/opengl/qopenglpaintdevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index c1bde757a2..834beda977 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -673,8 +673,8 @@ void QOpenGL2PaintEngineExPrivate::cleanupVectorPath(QPaintEngineEx *engine, voi
d->unusedIBOSToClean << c->ibo;
#else
Q_UNUSED(engine);
- qFree(c->vertices);
- qFree(c->indices);
+ free(c->vertices);
+ free(c->indices);
#endif
delete c;
}
@@ -719,7 +719,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
cache->vbo = 0;
Q_ASSERT(cache->ibo == 0);
#else
- qFree(cache->vertices);
+ free(cache->vertices);
Q_ASSERT(cache->indices == 0);
#endif
updateCache = true;
@@ -747,7 +747,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW);
cache->ibo = 0;
#else
- cache->vertices = (float *) qMalloc(floatSizeInBytes);
+ cache->vertices = (float *) malloc(floatSizeInBytes);
memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes);
cache->indices = 0;
#endif
@@ -799,8 +799,8 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
glDeleteBuffers(1, &cache->vbo);
glDeleteBuffers(1, &cache->ibo);
#else
- qFree(cache->vertices);
- qFree(cache->indices);
+ free(cache->vertices);
+ free(cache->indices);
#endif
updateCache = true;
}
@@ -835,12 +835,12 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
vertices[i] = float(inverseScale * polys.vertices.at(i));
funcs.glBufferData(GL_ARRAY_BUFFER, sizeof(float) * vertices.size(), vertices.data(), GL_STATIC_DRAW);
#else
- cache->vertices = (float *) qMalloc(sizeof(float) * polys.vertices.size());
+ cache->vertices = (float *) malloc(sizeof(float) * polys.vertices.size());
if (polys.indices.type() == QVertexIndexVector::UnsignedInt) {
- cache->indices = (quint32 *) qMalloc(sizeof(quint32) * polys.indices.size());
+ cache->indices = (quint32 *) malloc(sizeof(quint32) * polys.indices.size());
memcpy(cache->indices, polys.indices.data(), sizeof(quint32) * polys.indices.size());
} else {
- cache->indices = (quint16 *) qMalloc(sizeof(quint16) * polys.indices.size());
+ cache->indices = (quint16 *) malloc(sizeof(quint16) * polys.indices.size());
memcpy(cache->indices, polys.indices.data(), sizeof(quint16) * polys.indices.size());
}
for (int i = 0; i < polys.vertices.size(); ++i)
diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/gui/opengl/qopenglpaintengine_p.h
index 1ce04eb5a7..9f125eb616 100644
--- a/src/gui/opengl/qopenglpaintengine_p.h
+++ b/src/gui/opengl/qopenglpaintengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglshadercache_meego_p.h b/src/gui/opengl/qopenglshadercache_meego_p.h
index 86a8a861da..02a1c84336 100644
--- a/src/gui/opengl/qopenglshadercache_meego_p.h
+++ b/src/gui/opengl/qopenglshadercache_meego_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglshadercache_p.h b/src/gui/opengl/qopenglshadercache_p.h
index 05a058050c..64435eb1c2 100644
--- a/src/gui/opengl/qopenglshadercache_p.h
+++ b/src/gui/opengl/qopenglshadercache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index 70f9b042c7..fab764ed6e 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -265,7 +265,6 @@ bool QOpenGLShaderPrivate::compile(QOpenGLShader *q)
glfuncs->glGetShaderSource(shader, sourceCodeLength, &temp, sourceCodeBuffer);
}
- QString log;
if (logBuffer)
log = QString::fromLatin1(logBuffer);
else
diff --git a/src/gui/opengl/qopenglshaderprogram.h b/src/gui/opengl/qopenglshaderprogram.h
index 4c123749a2..f6244cd12c 100644
--- a/src/gui/opengl/qopenglshaderprogram.h
+++ b/src/gui/opengl/qopenglshaderprogram.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengltexturecache.cpp b/src/gui/opengl/qopengltexturecache.cpp
index 067b7a9e20..a93ae91354 100644
--- a/src/gui/opengl/qopengltexturecache.cpp
+++ b/src/gui/opengl/qopengltexturecache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -107,6 +107,8 @@ QOpenGLTextureCache::~QOpenGLTextureCache()
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QPixmap &pixmap)
{
+ if (pixmap.isNull())
+ return 0;
QMutexLocker locker(&m_mutex);
qint64 key = pixmap.cacheKey();
@@ -128,6 +130,8 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QPixmap &
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &image)
{
+ if (image.isNull())
+ return 0;
QMutexLocker locker(&m_mutex);
qint64 key = image.cacheKey();
diff --git a/src/gui/opengl/qopengltexturecache_p.h b/src/gui/opengl/qopengltexturecache_p.h
index bdee9f4e83..c6e46dd6cb 100644
--- a/src/gui/opengl/qopengltexturecache_p.h
+++ b/src/gui/opengl/qopengltexturecache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,7 +73,7 @@ private:
QOpenGLSharedResourceGuard *m_resource;
};
-class QOpenGLTextureCache : public QOpenGLSharedResource
+class Q_GUI_EXPORT QOpenGLTextureCache : public QOpenGLSharedResource
{
public:
static QOpenGLTextureCache *cacheForContext(QOpenGLContext *context);
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index 55acdb39b9..9f5ce46854 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengltextureglyphcache_p.h b/src/gui/opengl/qopengltextureglyphcache_p.h
index 97f9ac3c64..5da8d1ce4b 100644
--- a/src/gui/opengl/qopengltextureglyphcache_p.h
+++ b/src/gui/opengl/qopengltextureglyphcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengltriangulatingstroker.cpp b/src/gui/opengl/qopengltriangulatingstroker.cpp
index 4d1a8f86b2..65ee8753c4 100644
--- a/src/gui/opengl/qopengltriangulatingstroker.cpp
+++ b/src/gui/opengl/qopengltriangulatingstroker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qopengltriangulatingstroker_p.h b/src/gui/opengl/qopengltriangulatingstroker_p.h
index abb10957c0..965fce6157 100644
--- a/src/gui/opengl/qopengltriangulatingstroker_p.h
+++ b/src/gui/opengl/qopengltriangulatingstroker_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qrbtree_p.h b/src/gui/opengl/qrbtree_p.h
index ac464a3fbe..dbcf037193 100644
--- a/src/gui/opengl/qrbtree_p.h
+++ b/src/gui/opengl/qrbtree_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/opengl/qtriangulator.cpp b/src/gui/opengl/qtriangulator.cpp
index 67c2a6494e..c4b8aba9a7 100644
--- a/src/gui/opengl/qtriangulator.cpp
+++ b/src/gui/opengl/qtriangulator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,7 +41,6 @@
#include "qtriangulator_p.h"
-#include <QtWidgets/qdialog.h>
#include <QtGui/qevent.h>
#include <QtGui/qpainter.h>
#include <QtGui/qpainterpath.h>
@@ -721,78 +720,6 @@ inline void QInt64Set::clear()
}
//============================================================================//
-// QRingBuffer //
-//============================================================================//
-
-// T must be POD.
-template <class T>
-class QRingBuffer
-{
-public:
- inline QRingBuffer() : m_array(0), m_head(0), m_size(0), m_capacity(0) { }
- inline ~QRingBuffer() {if (m_array) delete[] m_array;}
- bool reallocate(int capacity);
- inline const T &head() const {Q_ASSERT(m_size > 0); return m_array[m_head];}
- inline const T &dequeue();
- inline void enqueue(const T &x);
- inline bool isEmpty() const {return m_size == 0;}
-private:
- T *m_array;
- int m_head;
- int m_size;
- int m_capacity;
-};
-
-template <class T>
-bool QRingBuffer<T>::reallocate(int capacity)
-{
- T *oldArray = m_array;
- m_array = new T[capacity];
- if (m_array) {
- if (oldArray) {
- if (m_head + m_size > m_capacity) {
- memcpy(m_array, oldArray + m_head, (m_capacity - m_head) * sizeof(T));
- memcpy(m_array + (m_capacity - m_head), oldArray, (m_head + m_size - m_capacity) * sizeof(T));
- } else {
- memcpy(m_array, oldArray + m_head, m_size * sizeof(T));
- }
- delete[] oldArray;
- }
- m_capacity = capacity;
- m_head = 0;
- return true;
- } else {
- m_array = oldArray;
- return false;
- }
-}
-
-template <class T>
-inline const T &QRingBuffer<T>::dequeue()
-{
- Q_ASSERT(m_size > 0);
- Q_ASSERT(m_array);
- Q_ASSERT(m_capacity >= m_size);
- int index = m_head;
- if (++m_head >= m_capacity)
- m_head -= m_capacity;
- --m_size;
- return m_array[index];
-}
-
-template <class T>
-inline void QRingBuffer<T>::enqueue(const T &x)
-{
- if (m_size == m_capacity)
- reallocate(qMax(2 * m_capacity, 64));
- int index = m_head + m_size;
- if (index >= m_capacity)
- index -= m_capacity;
- m_array[index] = x;
- ++m_size;
-}
-
-//============================================================================//
// QTriangulator //
//============================================================================//
template<typename T>
diff --git a/src/gui/opengl/qtriangulator_p.h b/src/gui/opengl/qtriangulator_p.h
index 8f95d58e23..96dedd5eca 100644
--- a/src/gui/opengl/qtriangulator_p.h
+++ b/src/gui/opengl/qtriangulator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index fa29589508..08f809ed88 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qbackingstore.h b/src/gui/painting/qbackingstore.h
index d5ec3b31d3..0172a78d85 100644
--- a/src/gui/painting/qbackingstore.h
+++ b/src/gui/painting/qbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index 9d204f9a39..75a75ead7d 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -190,9 +190,12 @@ static inline bool findInflections(qreal a, qreal b, qreal c,
void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold) const
{
- QBezier beziers[32];
+ QBezier beziers[10];
+ int levels[10];
beziers[0] = *this;
+ levels[0] = 9;
QBezier *b = beziers;
+ int *lvl = levels;
while (b >= beziers) {
// check if we can pop the top bezier curve from the stack
@@ -208,14 +211,55 @@ void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold
qAbs(b->x1 - b->x3) + qAbs(b->y1 - b->y3);
l = 1.;
}
- if (d < bezier_flattening_threshold*l || b == beziers + 31) {
+ if (d < bezier_flattening_threshold*l || *lvl == 0) {
// good enough, we pop it off and add the endpoint
polygon->append(QPointF(b->x4, b->y4));
--b;
+ --lvl;
+ } else {
+ // split, second half of the polygon goes lower into the stack
+ b->split(b+1, b);
+ lvl[1] = --lvl[0];
+ ++b;
+ ++lvl;
+ }
+ }
+}
+
+void QBezier::addToPolygon(QDataBuffer<QPointF> &polygon, qreal bezier_flattening_threshold) const
+{
+ QBezier beziers[10];
+ int levels[10];
+ beziers[0] = *this;
+ levels[0] = 9;
+ QBezier *b = beziers;
+ int *lvl = levels;
+
+ while (b >= beziers) {
+ // check if we can pop the top bezier curve from the stack
+ qreal y4y1 = b->y4 - b->y1;
+ qreal x4x1 = b->x4 - b->x1;
+ qreal l = qAbs(x4x1) + qAbs(y4y1);
+ qreal d;
+ if (l > 1.) {
+ d = qAbs( (x4x1)*(b->y1 - b->y2) - (y4y1)*(b->x1 - b->x2) )
+ + qAbs( (x4x1)*(b->y1 - b->y3) - (y4y1)*(b->x1 - b->x3) );
+ } else {
+ d = qAbs(b->x1 - b->x2) + qAbs(b->y1 - b->y2) +
+ qAbs(b->x1 - b->x3) + qAbs(b->y1 - b->y3);
+ l = 1.;
+ }
+ if (d < bezier_flattening_threshold*l || *lvl == 0) {
+ // good enough, we pop it off and add the endpoint
+ polygon.add(QPointF(b->x4, b->y4));
+ --b;
+ --lvl;
} else {
// split, second half of the polygon goes lower into the stack
b->split(b+1, b);
+ lvl[1] = --lvl[0];
++b;
+ ++lvl;
}
}
}
diff --git a/src/gui/painting/qbezier_p.h b/src/gui/painting/qbezier_p.h
index f1f7eb155a..368ae7e483 100644
--- a/src/gui/painting/qbezier_p.h
+++ b/src/gui/painting/qbezier_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,6 +60,7 @@
#include "QtCore/qlist.h"
#include "QtCore/qpair.h"
#include "QtGui/qtransform.h"
+#include <private/qdatabuffer_p.h>
QT_BEGIN_NAMESPACE
@@ -81,6 +82,7 @@ public:
QPolygonF toPolygon(qreal bezier_flattening_threshold = 0.5) const;
void addToPolygon(QPolygonF *p, qreal bezier_flattening_threshold = 0.5) const;
+ void addToPolygon(QDataBuffer<QPointF> &polygon, qreal bezier_flattening_threshold) const;
QRectF bounds() const;
qreal length(qreal error = 0.01) const;
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index fd3a8fce52..40047d8c94 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h
index 76e71b9d2f..412be40d67 100644
--- a/src/gui/painting/qblendfunctions_p.h
+++ b/src/gui/painting/qblendfunctions_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qblittable.cpp b/src/gui/painting/qblittable.cpp
index 11058582ef..020eba0235 100644
--- a/src/gui/painting/qblittable.cpp
+++ b/src/gui/painting/qblittable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -100,6 +100,12 @@ void QBlittable::unlock()
}
}
+bool QBlittable::isLocked() const
+{
+ Q_D(const QBlittable);
+ return d->locked;
+}
+
QT_END_NAMESPACE
#endif //QT_NO_BLITTABLE
diff --git a/src/gui/painting/qblittable_p.h b/src/gui/painting/qblittable_p.h
index a843733a56..c704c86452 100644
--- a/src/gui/painting/qblittable_p.h
+++ b/src/gui/painting/qblittable_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -80,6 +80,8 @@ public:
QImage *lock();
void unlock();
+ bool isLocked() const;
+
protected:
virtual QImage *doLock() = 0;
virtual void doUnlock() = 0;
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index b4aa27db2f..66f0395582 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index daad47cb19..060d11fd79 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index df2aa1ffe8..5f15ccbc63 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 460a43183f..ac525cb068 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcolor_p.cpp b/src/gui/painting/qcolor_p.cpp
index 454fe82cfe..14b984978c 100644
--- a/src/gui/painting/qcolor_p.cpp
+++ b/src/gui/painting/qcolor_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcolor_p.h b/src/gui/painting/qcolor_p.h
index 8aec184ee2..f1a4d313e3 100644
--- a/src/gui/painting/qcolor_p.h
+++ b/src/gui/painting/qcolor_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index eb00ec87d8..c59399c905 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h
index 53cdf2c0ac..a7742769bd 100644
--- a/src/gui/painting/qcosmeticstroker_p.h
+++ b/src/gui/painting/qcosmeticstroker_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcssutil.cpp b/src/gui/painting/qcssutil.cpp
index f670258e46..4758a1362c 100644
--- a/src/gui/painting/qcssutil.cpp
+++ b/src/gui/painting/qcssutil.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qcssutil_p.h b/src/gui/painting/qcssutil_p.h
index fe5b7057b9..e555788343 100644
--- a/src/gui/painting/qcssutil_p.h
+++ b/src/gui/painting/qcssutil_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h
index 8247e4233b..6c0f5d57c6 100644
--- a/src/gui/painting/qdatabuffer_p.h
+++ b/src/gui/painting/qdatabuffer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index cf899b986d..26fe6df3d4 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_arm_simd.cpp b/src/gui/painting/qdrawhelper_arm_simd.cpp
index 48b67f4020..e1784e049f 100644
--- a/src/gui/painting/qdrawhelper_arm_simd.cpp
+++ b/src/gui/painting/qdrawhelper_arm_simd.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_arm_simd_p.h b/src/gui/painting/qdrawhelper_arm_simd_p.h
index a9def32b6c..e920456d45 100644
--- a/src/gui/painting/qdrawhelper_arm_simd_p.h
+++ b/src/gui/painting/qdrawhelper_arm_simd_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_iwmmxt.cpp b/src/gui/painting/qdrawhelper_iwmmxt.cpp
index 95266eeceb..59b9f28dcd 100644
--- a/src/gui/painting/qdrawhelper_iwmmxt.cpp
+++ b/src/gui/painting/qdrawhelper_iwmmxt.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_mmx.cpp b/src/gui/painting/qdrawhelper_mmx.cpp
index 45cfcd32a0..261cf06a42 100644
--- a/src/gui/painting/qdrawhelper_mmx.cpp
+++ b/src/gui/painting/qdrawhelper_mmx.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_mmx3dnow.cpp b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
index 204f061e1a..7bec5ec336 100644
--- a/src/gui/painting/qdrawhelper_mmx3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_mmx_p.h b/src/gui/painting/qdrawhelper_mmx_p.h
index e2205a89a5..d6f7056669 100644
--- a/src/gui/painting/qdrawhelper_mmx_p.h
+++ b/src/gui/painting/qdrawhelper_mmx_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index a7e510e0ac..09eba9103b 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_neon_asm.S b/src/gui/painting/qdrawhelper_neon_asm.S
index 0c0c6a4b1e..d1e6e585c4 100644
--- a/src/gui/painting/qdrawhelper_neon_asm.S
+++ b/src/gui/painting/qdrawhelper_neon_asm.S
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_neon_p.h b/src/gui/painting/qdrawhelper_neon_p.h
index 97ef8ce4e6..6ce1d5e59e 100644
--- a/src/gui/painting/qdrawhelper_neon_p.h
+++ b/src/gui/painting/qdrawhelper_neon_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 3d83ba8587..52f50240a4 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_sse.cpp b/src/gui/painting/qdrawhelper_sse.cpp
index a03ceee02a..4e17c32c17 100644
--- a/src/gui/painting/qdrawhelper_sse.cpp
+++ b/src/gui/painting/qdrawhelper_sse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 3bbdae00bd..f974b586d0 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_sse3dnow.cpp b/src/gui/painting/qdrawhelper_sse3dnow.cpp
index 513ed7d713..42061feac3 100644
--- a/src/gui/painting/qdrawhelper_sse3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_sse3dnow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_sse_p.h b/src/gui/painting/qdrawhelper_sse_p.h
index 3f2419578d..99ef917e71 100644
--- a/src/gui/painting/qdrawhelper_sse_p.h
+++ b/src/gui/painting/qdrawhelper_sse_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index ef6e33bc1e..1281d4d526 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawhelper_x86_p.h b/src/gui/painting/qdrawhelper_x86_p.h
index ac671ccc51..20d0f7a36b 100644
--- a/src/gui/painting/qdrawhelper_x86_p.h
+++ b/src/gui/painting/qdrawhelper_x86_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index dad8f6cb5d..28b9ceee8a 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index 903ab1f605..3e40d25ec8 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qemulationpaintengine_p.h b/src/gui/painting/qemulationpaintengine_p.h
index fdc3688876..b49ce2bdaf 100644
--- a/src/gui/painting/qemulationpaintengine_p.h
+++ b/src/gui/painting/qemulationpaintengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h
index df5a685053..dba52f75b4 100644
--- a/src/gui/painting/qfixed_p.h
+++ b/src/gui/painting/qfixed_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 5334f97782..50ec22e73a 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1090,37 +1090,6 @@
return 0;
}
-
- static int
- gray_line_to( const QT_FT_Vector* to,
- PWorker worker )
- {
- gray_render_line( worker, UPSCALE( to->x ), UPSCALE( to->y ) );
- return 0;
- }
-
-
- static int
- gray_conic_to( const QT_FT_Vector* control,
- const QT_FT_Vector* to,
- PWorker worker )
- {
- gray_render_conic( worker, control, to );
- return 0;
- }
-
-
- static int
- gray_cubic_to( const QT_FT_Vector* control1,
- const QT_FT_Vector* control2,
- const QT_FT_Vector* to,
- PWorker worker )
- {
- gray_render_cubic( worker, control1, control2, to );
- return 0;
- }
-
-
static void
gray_render_span( int count,
const QT_FT_Span* spans,
@@ -1464,9 +1433,7 @@
vec.x = SCALED( point->x );
vec.y = SCALED( point->y );
- error = gray_line_to( &vec, user );
- if ( error )
- goto Exit;
+ gray_render_line(user, UPSCALE(vec.x), UPSCALE(vec.y));
continue;
}
@@ -1491,10 +1458,7 @@
if ( tag == QT_FT_CURVE_TAG_ON )
{
- error = gray_conic_to( &v_control, &vec,
- user );
- if ( error )
- goto Exit;
+ gray_render_conic(user, &v_control, &vec);
continue;
}
@@ -1504,17 +1468,12 @@
v_middle.x = ( v_control.x + vec.x ) / 2;
v_middle.y = ( v_control.y + vec.y ) / 2;
- error = gray_conic_to( &v_control, &v_middle,
- user );
- if ( error )
- goto Exit;
-
+ gray_render_conic(user, &v_control, &v_middle);
v_control = vec;
goto Do_Conic;
}
- error = gray_conic_to( &v_control, &v_start,
- user );
+ gray_render_conic(user, &v_control, &v_start);
goto Close;
}
@@ -1544,25 +1503,20 @@
vec.x = SCALED( point->x );
vec.y = SCALED( point->y );
- error = gray_cubic_to( &vec1, &vec2, &vec, user );
- if ( error )
- goto Exit;
+ gray_render_cubic(user, &vec1, &vec2, &vec);
continue;
}
- error = gray_cubic_to( &vec1, &vec2, &v_start, user );
+ gray_render_cubic(user, &vec1, &vec2, &v_start);
goto Close;
}
}
}
/* close the contour with a line segment */
- error = gray_line_to( &v_start, user );
+ gray_render_line(user, UPSCALE(v_start.x), UPSCALE(v_start.y));
Close:
- if ( error )
- goto Exit;
-
first = last + 1;
}
diff --git a/src/gui/painting/qgrayraster_p.h b/src/gui/painting/qgrayraster_p.h
index d5932982db..11470ab279 100644
--- a/src/gui/painting/qgrayraster_p.h
+++ b/src/gui/painting/qgrayraster_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp
index 46e09ddc49..83cd9ad970 100644
--- a/src/gui/painting/qimagescale.cpp
+++ b/src/gui/painting/qimagescale.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qimagescale_p.h b/src/gui/painting/qimagescale_p.h
index 4efe75df60..654602cefe 100644
--- a/src/gui/painting/qimagescale_p.h
+++ b/src/gui/painting/qimagescale_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qmath_p.h b/src/gui/painting/qmath_p.h
index ea46aa7902..21bbeeeaed 100644
--- a/src/gui/painting/qmath_p.h
+++ b/src/gui/painting/qmath_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 41278920cb..cf99e31b90 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 830a0a734f..e963b90a44 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index 857621df6e..478d6470b2 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h
index a8c2c6bfbd..d9793b2404 100644
--- a/src/gui/painting/qmemrotate_p.h
+++ b/src/gui/painting/qmemrotate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index 8b607b28b8..da77722491 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,7 @@
#include "qoutlinemapper_p.h"
#include <private/qpainterpath_p.h>
#include "qmath.h"
+#include <private/qbezier_p.h>
#include <stdlib.h>
@@ -74,6 +75,19 @@ static const QRectF boundingRect(const QPointF *points, int pointCount)
return QRectF(QPointF(minx, miny), QPointF(maxx, maxy));
}
+void QOutlineMapper::curveTo(const QPointF &cp1, const QPointF &cp2, const QPointF &ep) {
+#ifdef QT_DEBUG_CONVERT
+ printf("QOutlineMapper::curveTo() (%f, %f)\n", ep.x(), ep.y());
+#endif
+
+ QBezier bezier = QBezier::fromPoints(m_elements.last(), cp1, cp2, ep);
+ bezier.addToPolygon(m_elements, m_curve_threshold);
+ m_element_types.reserve(m_elements.size());
+ for (int i = m_elements.size() - m_element_types.size(); i; --i)
+ m_element_types << QPainterPath::LineToElement;
+ Q_ASSERT(m_elements.size() == m_element_types.size());
+}
+
QT_FT_Outline *QOutlineMapper::convertPath(const QPainterPath &path)
{
@@ -169,51 +183,47 @@ void QOutlineMapper::endOutline()
{
closeSubpath();
- int element_count = m_elements.size();
-
- if (element_count == 0) {
+ if (m_elements.isEmpty()) {
memset(&m_outline, 0, sizeof(m_outline));
return;
}
- QPointF *elements;
+ QPointF *elements = m_elements.data();
// Transform the outline
if (m_txop == QTransform::TxNone) {
- elements = m_elements.data();
- } else {
- if (m_txop == QTransform::TxTranslate) {
- for (int i=0; i<m_elements.size(); ++i) {
- const QPointF &e = m_elements.at(i);
- m_elements_dev << QPointF(e.x() + m_dx, e.y() + m_dy);
- }
- } else if (m_txop == QTransform::TxScale) {
- for (int i=0; i<m_elements.size(); ++i) {
- const QPointF &e = m_elements.at(i);
- m_elements_dev << QPointF(m_m11 * e.x() + m_dx, m_m22 * e.y() + m_dy);
- }
- } else if (m_txop < QTransform::TxProject) {
- for (int i=0; i<m_elements.size(); ++i) {
- const QPointF &e = m_elements.at(i);
- m_elements_dev << QPointF(m_m11 * e.x() + m_m21 * e.y() + m_dx,
- m_m22 * e.y() + m_m12 * e.x() + m_dy);
- }
- } else {
- const QVectorPath vp((qreal *)m_elements.data(), m_elements.size(), m_element_types.size() ? m_element_types.data() : 0);
- QPainterPath path = vp.convertToPainterPath();
- path = QTransform(m_m11, m_m12, m_m13, m_m21, m_m22, m_m23, m_dx, m_dy, m_m33).map(path);
- if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL))
- path.setFillRule(Qt::WindingFill);
- uint old_txop = m_txop;
- m_txop = QTransform::TxNone;
- if (path.isEmpty())
- m_valid = false;
- else
- convertPath(path);
- m_txop = old_txop;
- return;
+ // Nothing to do.
+ } else if (m_txop == QTransform::TxTranslate) {
+ for (int i = 0; i < m_elements.size(); ++i) {
+ QPointF &e = elements[i];
+ e = QPointF(e.x() + m_dx, e.y() + m_dy);
+ }
+ } else if (m_txop == QTransform::TxScale) {
+ for (int i = 0; i < m_elements.size(); ++i) {
+ QPointF &e = elements[i];
+ e = QPointF(m_m11 * e.x() + m_dx, m_m22 * e.y() + m_dy);
}
- elements = m_elements_dev.data();
+ } else if (m_txop < QTransform::TxProject) {
+ for (int i = 0; i < m_elements.size(); ++i) {
+ QPointF &e = elements[i];
+ e = QPointF(m_m11 * e.x() + m_m21 * e.y() + m_dx,
+ m_m22 * e.y() + m_m12 * e.x() + m_dy);
+ }
+ } else {
+ const QVectorPath vp((qreal *)elements, m_elements.size(),
+ m_element_types.size() ? m_element_types.data() : 0);
+ QPainterPath path = vp.convertToPainterPath();
+ path = QTransform(m_m11, m_m12, m_m13, m_m21, m_m22, m_m23, m_dx, m_dy, m_m33).map(path);
+ if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL))
+ path.setFillRule(Qt::WindingFill);
+ uint old_txop = m_txop;
+ m_txop = QTransform::TxNone;
+ if (path.isEmpty())
+ m_valid = false;
+ else
+ convertPath(path);
+ m_txop = old_txop;
+ return;
}
if (m_round_coords) {
@@ -223,7 +233,7 @@ void QOutlineMapper::endOutline()
qFloor(elements[i].y() + aliasedCoordinateDelta));
}
- controlPointRect = boundingRect(elements, element_count);
+ controlPointRect = boundingRect(elements, m_elements.size());
#ifdef QT_DEBUG_CONVERT
printf(" - control point rect (%.2f, %.2f) %.2f x %.2f, clip=(%d,%d, %dx%d)\n",
@@ -242,9 +252,9 @@ void QOutlineMapper::endOutline()
|| controlPointRect.height() > QT_RASTER_COORD_LIMIT));
if (do_clip) {
- clipElements(elements, elementTypes(), element_count);
+ clipElements(elements, elementTypes(), m_elements.size());
} else {
- convertElements(elements, elementTypes(), element_count);
+ convertElements(elements, elementTypes(), m_elements.size());
}
}
diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h
index 388858ca44..ceb70f1a7b 100644
--- a/src/gui/painting/qoutlinemapper_p.h
+++ b/src/gui/painting/qoutlinemapper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,6 +73,8 @@ const int QT_RASTER_COORD_LIMIT = 32767;
//#define QT_DEBUG_CONVERT
+Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
+
/********************************************************************************
* class QOutlineMapper
*
@@ -90,11 +92,9 @@ public:
QOutlineMapper() :
m_element_types(0),
m_elements(0),
- m_elements_dev(0),
m_points(0),
m_tags(0),
m_contours(0),
- m_polygon_dev(0),
m_in_clip_elements(false),
m_round_coords(false)
{
@@ -117,6 +117,10 @@ public:
m_dx = m.dx();
m_dy = m.dy();
m_txop = m.type();
+
+ qreal scale;
+ qt_scaleForTransform(m, &scale);
+ m_curve_threshold = scale == 0 ? qreal(0.25) : (qreal(0.25) / scale);
}
void beginOutline(Qt::FillRule fillRule)
@@ -126,7 +130,6 @@ public:
#endif
m_valid = true;
m_elements.reset();
- m_elements_dev.reset();
m_element_types.reset();
m_points.reset();
m_tags.reset();
@@ -161,15 +164,7 @@ public:
m_element_types << QPainterPath::LineToElement;
}
- inline void curveTo(const QPointF &cp1, const QPointF &cp2, const QPointF &ep) {
-#ifdef QT_DEBUG_CONVERT
- printf("QOutlineMapper::curveTo() (%f, %f)\n", ep.x(), ep.y());
-#endif
- m_elements << cp1 << cp2 << ep;
- m_element_types << QPainterPath::CurveToElement
- << QPainterPath::CurveToDataElement
- << QPainterPath::CurveToDataElement;
- }
+ void curveTo(const QPointF &cp1, const QPointF &cp2, const QPointF &ep);
inline void closeSubpath() {
int element_count = m_elements.size();
@@ -209,14 +204,11 @@ public:
public:
QDataBuffer<QPainterPath::ElementType> m_element_types;
QDataBuffer<QPointF> m_elements;
- QDataBuffer<QPointF> m_elements_dev;
QDataBuffer<QT_FT_Vector> m_points;
QDataBuffer<char> m_tags;
QDataBuffer<int> m_contours;
QRect m_clip_rect;
- QDataBuffer<QPointF> m_polygon_dev;
-
QRectF controlPointRect; // only valid after endOutline()
QT_FT_Outline m_outline;
@@ -235,6 +227,8 @@ public:
qreal m_dx;
qreal m_dy;
+ qreal m_curve_threshold;
+
bool m_valid;
bool m_in_clip_elements;
diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp
index b7b882e93a..038852a842 100644
--- a/src/gui/painting/qpagedpaintdevice.cpp
+++ b/src/gui/painting/qpagedpaintdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpagedpaintdevice.h b/src/gui/painting/qpagedpaintdevice.h
index 9f06fc923a..f113534956 100644
--- a/src/gui/painting/qpagedpaintdevice.h
+++ b/src/gui/painting/qpagedpaintdevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpagedpaintdevice_p.h b/src/gui/painting/qpagedpaintdevice_p.h
index 55f78d54c5..28a2c80b94 100644
--- a/src/gui/painting/qpagedpaintdevice_p.h
+++ b/src/gui/painting/qpagedpaintdevice_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
index f9e8432a8c..a4edba9299 100644
--- a/src/gui/painting/qpaintbuffer.cpp
+++ b/src/gui/painting/qpaintbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
index 7cb743e585..536d5c8a61 100644
--- a/src/gui/painting/qpaintbuffer_p.h
+++ b/src/gui/painting/qpaintbuffer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp
index 857f147231..b094019c84 100644
--- a/src/gui/painting/qpaintdevice.cpp
+++ b/src/gui/painting/qpaintdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintdevice.h b/src/gui/painting/qpaintdevice.h
index 476f883645..fdceaa1886 100644
--- a/src/gui/painting/qpaintdevice.h
+++ b/src/gui/painting/qpaintdevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc
index 8d7e86f424..747047d53a 100644
--- a/src/gui/painting/qpaintdevice.qdoc
+++ b/src/gui/painting/qpaintdevice.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintdevice_qpa.cpp b/src/gui/painting/qpaintdevice_qpa.cpp
index 65eeaaa7e8..eb7408dbff 100644
--- a/src/gui/painting/qpaintdevice_qpa.cpp
+++ b/src/gui/painting/qpaintdevice_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index da97116c6f..8364218b6e 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintengine.h b/src/gui/painting/qpaintengine.h
index 5d5424dfae..ee08ef1fbd 100644
--- a/src/gui/painting/qpaintengine.h
+++ b/src/gui/painting/qpaintengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index 1ed6dea161..37c158a3d9 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -65,75 +65,69 @@ QT_BEGIN_NAMESPACE
#define STATE_CLIP_COMPLEX 0x00020000
-static inline void updateStateBits(uint *state, uint mask, bool on)
-{
- *state = on ? (*state | mask) : (*state & ~mask);
-}
-
-static inline bool checkStateAgainstMask(uint state, uint mask)
-{
- return !state || (state & mask && !(state & ~mask));
-}
-
class CapabilitiesToStateMask
{
public:
CapabilitiesToStateMask(QBlittable::Capabilities capabilities)
- : m_capabilities(capabilities),
- fillRectMask(0),
- drawRectMask(0),
- drawPixmapMask(0),
- capabillitiesState(0)
+ : m_capabilities(capabilities)
+ , fillRectMask(0)
+ , drawRectMask(0)
+ , drawPixmapMask(0)
+ , capabillitiesState(0)
{
- if (capabilities & QBlittable::SolidRectCapability) {
+ if (capabilities & QBlittable::SolidRectCapability)
setFillRectMask();
- }
- if (capabilities & QBlittable::SourcePixmapCapability) {
+ if (capabilities & QBlittable::SourcePixmapCapability)
setSourcePixmapMask();
- }
- if (capabilities & QBlittable::SourceOverPixmapCapability) {
+ if (capabilities & QBlittable::SourceOverPixmapCapability)
setSourceOverPixmapMask();
- }
- if (capabilities & QBlittable::SourceOverScaledPixmapCapability) {
+ if (capabilities & QBlittable::SourceOverScaledPixmapCapability)
setSourceOverScaledPixmapMask();
- }
}
inline bool canBlitterFillRect() const
{
- return checkStateAgainstMask(capabillitiesState,fillRectMask);
+ return checkStateAgainstMask(capabillitiesState, fillRectMask);
}
inline bool canBlitterDrawRectMask() const
{
- return checkStateAgainstMask(capabillitiesState,drawRectMask);
+ return checkStateAgainstMask(capabillitiesState, drawRectMask);
}
bool canBlitterDrawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) const
{
if (pm.handle()->classId() != QPlatformPixmap::BlitterClass)
return false;
- if (checkStateAgainstMask(capabillitiesState,drawPixmapMask)) {
+ if (checkStateAgainstMask(capabillitiesState, drawPixmapMask)) {
if (m_capabilities & (QBlittable::SourceOverPixmapCapability
| QBlittable::SourceOverScaledPixmapCapability)) {
- if (r.size() != sr.size()) {
+ if (r.size() != sr.size())
return m_capabilities & QBlittable::SourceOverScaledPixmapCapability;
- } else {
+ else
return m_capabilities & QBlittable::SourceOverPixmapCapability;
- }
}
- if ((m_capabilities & QBlittable::SourcePixmapCapability) && r.size() == sr.size() && !pm.hasAlphaChannel()) {
+ if ((m_capabilities & QBlittable::SourcePixmapCapability) && r.size() == sr.size() && !pm.hasAlphaChannel())
return m_capabilities & QBlittable::SourcePixmapCapability;
- }
}
return false;
}
inline void updateState(uint mask, bool on) {
- updateStateBits(&capabillitiesState,mask,on);
+ updateStateBits(&capabillitiesState, mask, on);
}
-public:
+private:
+
+ static inline void updateStateBits(uint *state, uint mask, bool on)
+ {
+ *state = on ? (*state | mask) : (*state & ~mask);
+ }
+
+ static inline bool checkStateAgainstMask(uint state, uint mask)
+ {
+ return !state || (state & mask && !(state & ~mask));
+ }
void setFillRectMask() {
updateStateBits(&fillRectMask, STATE_XFORM_SCALE, false);
@@ -186,148 +180,258 @@ public:
uint capabillitiesState;
};
-class QBlitterPaintEnginePrivate : public QPaintEngineExPrivate
+class QBlitterPaintEnginePrivate : public QRasterPaintEnginePrivate
{
Q_DECLARE_PUBLIC(QBlitterPaintEngine);
public:
QBlitterPaintEnginePrivate(QBlittablePlatformPixmap *p)
- : QPaintEngineExPrivate(),
- pmData(p),
- isBlitterLocked(false),
- hasXForm(false)
+ : QRasterPaintEnginePrivate()
+ , pmData(p)
+ , caps(pmData->blittable()->capabilities())
+ , hasXForm(false)
- {
- raster.reset(new QRasterPaintEngine(p->buffer()));
- capabillities.reset(new CapabilitiesToStateMask(pmData->blittable()->capabilities()));
- }
+ {}
- inline void lock() {
- if (!isBlitterLocked) {
- raster->d_func()->rasterBuffer->prepare(pmData->blittable()->lock());
- isBlitterLocked = true;
- }
- }
+ void lock();
+ void unlock();
+ void fillRect(const QRectF &rect, const QColor &color);
+ void clipAndDrawPixmap(const QRectF &clip, const QRectF &target, const QPixmap &pm, const QRectF &sr);
- inline void unlock() {
- if (isBlitterLocked) {
- pmData->blittable()->unlock();
- isBlitterLocked = false;
- }
- }
- void fillRect(const QRectF &rect, const QColor &color) {
- Q_Q(QBlitterPaintEngine);
- pmData->unmarkRasterOverlay(rect);
- QRectF targetRect = rect;
- if (hasXForm) {
- targetRect = q->state()->matrix.mapRect(rect);
- }
- const QClipData *clipData = q->clip();
- if (clipData) {
- if (clipData->hasRectClip) {
- unlock();
- pmData->blittable()->fillRect(targetRect & clipData->clipRect, color);
- } else if (clipData->hasRegionClip) {
- QVector<QRect> rects = clipData->clipRegion.rects();
- for ( int i = 0; i < rects.size(); i++ ) {
- QRect intersectRect = rects.at(i).intersected(targetRect.toRect());
- if (!intersectRect.isEmpty()) {
- unlock();
- pmData->blittable()->fillRect(intersectRect,color);
- }
+ void updateCompleteState(QPainterState *s);
+ void updatePenState(QPainterState *s);
+ void updateBrushState(QPainterState *s);
+ void updateOpacityState(QPainterState *s);
+ void updateCompositionModeState(QPainterState *s);
+ void updateRenderHintsState(QPainterState *s);
+ void updateTransformState(QPainterState *s);
+ void updateClipState(QPainterState *s);
+
+ QBlittablePlatformPixmap *pmData;
+ CapabilitiesToStateMask caps;
+ uint hasXForm;
+};
+
+
+inline void QBlitterPaintEnginePrivate::lock()
+{
+ if (!pmData->blittable()->isLocked())
+ rasterBuffer->prepare(pmData->buffer());
+}
+
+inline void QBlitterPaintEnginePrivate::unlock()
+{
+ pmData->blittable()->unlock();
+}
+
+// State tracking to make decisions
+void QBlitterPaintEnginePrivate::updateCompleteState(QPainterState *s)
+{
+ updatePenState(s);
+ updateBrushState(s);
+ updateOpacityState(s);
+ updateCompositionModeState(s);
+ updateRenderHintsState(s);
+ updateTransformState(s);
+ updateClipState(s);
+}
+
+void QBlitterPaintEnginePrivate::updatePenState(QPainterState *s)
+{
+ caps.updateState(STATE_PEN_ENABLED, qpen_style(s->pen) != Qt::NoPen);
+}
+
+void QBlitterPaintEnginePrivate::updateBrushState(QPainterState *s)
+{
+ Qt::BrushStyle style = qbrush_style(s->brush);
+
+ caps.updateState(STATE_BRUSH_PATTERN, style > Qt::SolidPattern);
+ caps.updateState(STATE_BRUSH_ALPHA,
+ qbrush_color(s->brush).alpha() < 255);
+}
+
+void QBlitterPaintEnginePrivate::updateOpacityState(QPainterState *s)
+{
+ bool translucent = s->opacity < 1;
+ caps.updateState(STATE_ALPHA, translucent);
+}
+
+void QBlitterPaintEnginePrivate::updateCompositionModeState(QPainterState *s)
+{
+ bool nonTrivial = s->composition_mode != QPainter::CompositionMode_SourceOver
+ && s->composition_mode != QPainter::CompositionMode_Source;
+
+ caps.updateState(STATE_BLENDING_COMPLEX, nonTrivial);
+}
+
+void QBlitterPaintEnginePrivate::updateRenderHintsState(QPainterState *s)
+{
+ bool aa = s->renderHints & QPainter::Antialiasing;
+ caps.updateState(STATE_ANTIALIASING, aa);
+}
+
+void QBlitterPaintEnginePrivate::updateTransformState(QPainterState *s)
+{
+ QTransform::TransformationType type = s->matrix.type();
+
+ caps.updateState(STATE_XFORM_COMPLEX, type > QTransform::TxScale);
+ caps.updateState(STATE_XFORM_SCALE, type > QTransform::TxTranslate);
+
+ hasXForm = type >= QTransform::TxTranslate;
+}
+
+void QBlitterPaintEnginePrivate::updateClipState(QPainterState *)
+{
+ const QClipData *clipData = clip();
+ bool complexClip = clipData && !(clipData->hasRectClip || clipData->hasRegionClip);
+ caps.updateState(STATE_CLIP_COMPLEX, complexClip);
+}
+
+void QBlitterPaintEnginePrivate::fillRect(const QRectF &rect, const QColor &color)
+{
+ Q_Q(QBlitterPaintEngine);
+ pmData->unmarkRasterOverlay(rect);
+ QRectF targetRect = rect;
+ if (hasXForm)
+ targetRect = q->state()->matrix.mapRect(rect);
+ const QClipData *clipData = clip();
+ if (clipData) {
+ if (clipData->hasRectClip) {
+ unlock();
+ pmData->blittable()->fillRect(targetRect & clipData->clipRect, color);
+ } else if (clipData->hasRegionClip) {
+ QVector<QRect> rects = clipData->clipRegion.rects();
+ for (int i = 0; i < rects.size(); ++i) {
+ QRect intersectRect = rects.at(i).intersected(targetRect.toRect());
+ if (!intersectRect.isEmpty()) {
+ unlock();
+ pmData->blittable()->fillRect(intersectRect, color);
}
}
+ }
+ } else {
+ if (targetRect.x() >= 0 && targetRect.y() >= 0
+ && targetRect.width() <= q->paintDevice()->width()
+ && targetRect.height() <= q->paintDevice()->height()) {
+ unlock();
+ pmData->blittable()->fillRect(targetRect, color);
} else {
- if (targetRect.x() >= 0 && targetRect.y() >= 0
- && targetRect.width() <= raster->paintDevice()->width()
- && targetRect.height() <= raster->paintDevice()->height()) {
- unlock();
- pmData->blittable()->fillRect(targetRect,color);
- } else {
- QRectF deviceRect(0,0,raster->paintDevice()->width(), raster->paintDevice()->height());
- unlock();
- pmData->blittable()->fillRect(deviceRect&targetRect,color);
- }
+ QRectF deviceRect(0, 0, q->paintDevice()->width(), q->paintDevice()->height());
+ unlock();
+ pmData->blittable()->fillRect(deviceRect & targetRect, color);
}
}
+}
- void clipAndDrawPixmap(const QRectF &clip, const QRectF &target, const QPixmap &pm, const QRectF &sr) {
- QRectF intersectedRect = clip.intersected(target);
- if (intersectedRect.isEmpty())
- return;
- QRectF source = sr;
- if(intersectedRect.size() != target.size()) {
- qreal deltaTop = target.top() - intersectedRect.top();
- qreal deltaLeft = target.left() - intersectedRect.left();
- qreal deltaBottom = target.bottom() - intersectedRect.bottom();
- qreal deltaRight = target.right() - intersectedRect.right();
- source.adjust(-deltaLeft,-deltaTop,-deltaRight,-deltaBottom);
- }
- pmData->unmarkRasterOverlay(intersectedRect);
- pmData->blittable()->drawPixmap(intersectedRect, pm, source);
+void QBlitterPaintEnginePrivate::clipAndDrawPixmap(const QRectF &clip,
+ const QRectF &target,
+ const QPixmap &pm,
+ const QRectF &sr)
+{
+ QRectF intersectedRect = clip.intersected(target);
+ if (intersectedRect.isEmpty())
+ return;
+ QRectF source = sr;
+ if (intersectedRect.size() != target.size()) {
+ qreal deltaTop = target.top() - intersectedRect.top();
+ qreal deltaLeft = target.left() - intersectedRect.left();
+ qreal deltaBottom = target.bottom() - intersectedRect.bottom();
+ qreal deltaRight = target.right() - intersectedRect.right();
+ source.adjust(-deltaLeft, -deltaTop, -deltaRight, -deltaBottom);
}
+ pmData->unmarkRasterOverlay(intersectedRect);
+ pmData->blittable()->drawPixmap(intersectedRect, pm, source);
+}
- void updateClip() {
- Q_Q(QBlitterPaintEngine);
- const QClipData *clip = q->clip();
- bool complex = clip && !(clip->hasRectClip || clip->hasRegionClip);
- capabillities->updateState(STATE_CLIP_COMPLEX, complex);
- }
+QBlitterPaintEngine::QBlitterPaintEngine(QBlittablePlatformPixmap *p)
+ : QRasterPaintEngine(*(new QBlitterPaintEnginePrivate(p)), p->buffer())
+{}
- void systemStateChanged() {
- raster->d_func()->systemStateChanged();
- }
+// State tracking
+void QBlitterPaintEngine::penChanged()
+{
+ Q_D(QBlitterPaintEngine);
- QScopedPointer<QRasterPaintEngine> raster;
+ QRasterPaintEngine::penChanged();
+ d->updatePenState(state());
+}
- QBlittablePlatformPixmap *pmData;
- bool isBlitterLocked;
+void QBlitterPaintEngine::brushChanged()
+{
+ Q_D(QBlitterPaintEngine);
- QScopedPointer<CapabilitiesToStateMask> capabillities;
+ QRasterPaintEngine::brushChanged();
+ d->updateBrushState(state());
+}
- uint hasXForm;
-};
+void QBlitterPaintEngine::opacityChanged()
+{
+ Q_D(QBlitterPaintEngine);
-QBlitterPaintEngine::QBlitterPaintEngine(QBlittablePlatformPixmap *p)
- : QPaintEngineEx(*(new QBlitterPaintEnginePrivate(p)))
+ QRasterPaintEngine::opacityChanged();
+ d->updateOpacityState(state());
+}
+
+void QBlitterPaintEngine::compositionModeChanged()
{
+ Q_D(QBlitterPaintEngine);
+
+ QRasterPaintEngine::compositionModeChanged();
+ d->updateCompositionModeState(state());
}
-QBlitterPaintEngine::~QBlitterPaintEngine()
+void QBlitterPaintEngine::renderHintsChanged()
{
+ Q_D(QBlitterPaintEngine);
+
+ QRasterPaintEngine::renderHintsChanged();
+ d->updateRenderHintsState(state());
}
-QPainterState *QBlitterPaintEngine::createState(QPainterState *orig) const
+void QBlitterPaintEngine::transformChanged()
{
- Q_D(const QBlitterPaintEngine);
- return d->raster->createState(orig);
+ Q_D(QBlitterPaintEngine);
+
+ QRasterPaintEngine::transformChanged();
+ d->updateTransformState(state());
}
-bool QBlitterPaintEngine::begin(QPaintDevice *pdev)
+void QBlitterPaintEngine::clipEnabledChanged()
{
Q_D(QBlitterPaintEngine);
+ QRasterPaintEngine::clipEnabledChanged();
+ d->updateClipState(state());
+}
- setActive(true);
- bool ok = d->raster->begin(pdev);
+bool QBlitterPaintEngine::begin(QPaintDevice *pdev)
+{
+ bool ok = QRasterPaintEngine::begin(pdev);
#ifdef QT_BLITTER_RASTEROVERLAY
+ Q_D(QBlitterPaintEngine);
d->pmData->unmergeOverlay();
#endif
return ok;
}
-
bool QBlitterPaintEngine::end()
{
- Q_D(QBlitterPaintEngine);
-
- setActive(false);
#ifdef QT_BLITTER_RASTEROVERLAY
+ Q_D(QBlitterPaintEngine);
d->pmData->mergeOverlay();
#endif
- return d->raster->end();
+
+ return QRasterPaintEngine::end();
}
+void QBlitterPaintEngine::setState(QPainterState *s)
+{
+ Q_D(QBlitterPaintEngine);
+
+ QRasterPaintEngine::setState(s);
+ d->updateCompleteState(s);
+}
+// Accelerated paths
void QBlitterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
{
Q_D(QBlitterPaintEngine);
@@ -337,37 +441,35 @@ void QBlitterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
} else {
d->lock();
d->pmData->markRasterOverlay(path);
- d->raster->fill(path, brush);
+ QRasterPaintEngine::fill(path, brush);
}
}
void QBlitterPaintEngine::fillRect(const QRectF &rect, const QColor &color)
{
Q_D(QBlitterPaintEngine);
- if (d->capabillities->canBlitterFillRect() && color.alpha() == 0xff) {
+ if (d->caps.canBlitterFillRect() && color.alpha() == 0xff) {
d->fillRect(rect, color);
} else {
d->lock();
d->pmData->markRasterOverlay(rect);
- d->raster->fillRect(rect, color);
+ QRasterPaintEngine::fillRect(rect, color);
}
}
void QBlitterPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
{
- if(rect.size().isEmpty())
+ if (rect.size().isEmpty())
return;
Q_D(QBlitterPaintEngine);
if (qbrush_style(brush) == Qt::SolidPattern
&& qbrush_color(brush).alpha() == 0xff
- && d->capabillities->canBlitterFillRect())
- {
+ && d->caps.canBlitterFillRect()) {
d->fillRect(rect, qbrush_color(brush));
- }else if (brush.style() == Qt::TexturePattern
- && d->capabillities->canBlitterDrawPixmap(rect,brush.texture(),rect))
- {
+ } else if (brush.style() == Qt::TexturePattern
+ && d->caps.canBlitterDrawPixmap(rect, brush.texture(), rect)) {
bool rectIsFilled = false;
QRectF transformedRect = state()->matrix.mapRect(rect);
qreal x = transformedRect.x();
@@ -388,37 +490,37 @@ void QBlitterPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
blitWidth = transformedRect.right() -x;
if (y + blitHeight > transformedRect.bottom())
blitHeight = transformedRect.bottom() - y;
- const QClipData *clipData = clip();
+ const QClipData *clipData = d->clip();
if (clipData->hasRectClip) {
- QRect targetRect = QRect(x,y,blitWidth,blitHeight).intersected(clipData->clipRect);
+ QRect targetRect = QRect(x, y, blitWidth, blitHeight).intersected(clipData->clipRect);
if (targetRect.isValid()) {
int tmpSrcX = srcX + (targetRect.x() - x);
int tmpSrcY = srcY + (targetRect.y() - y);
- QRect srcRect(tmpSrcX,tmpSrcY,targetRect.width(),targetRect.height());
- d->pmData->blittable()->drawPixmap(targetRect,pm,srcRect);
+ QRect srcRect(tmpSrcX, tmpSrcY, targetRect.width(), targetRect.height());
+ d->pmData->blittable()->drawPixmap(targetRect, pm, srcRect);
}
} else if (clipData->hasRegionClip) {
QVector<QRect> clipRects = clipData->clipRegion.rects();
- QRect unclippedTargetRect(x,y,blitWidth,blitHeight);
+ QRect unclippedTargetRect(x, y, blitWidth, blitHeight);
QRegion intersectedRects = clipData->clipRegion.intersected(unclippedTargetRect);
- for ( int i = 0; i < intersectedRects.rects().size(); i++ ) {
+ for (int i = 0; i < intersectedRects.rects().size(); ++i) {
QRect targetRect = intersectedRects.rects().at(i);
if (!targetRect.isValid() || targetRect.isEmpty())
continue;
int tmpSrcX = srcX + (targetRect.x() - x);
int tmpSrcY = srcY + (targetRect.y() - y);
- QRect srcRect(tmpSrcX,tmpSrcY,targetRect.width(),targetRect.height());
- d->pmData->blittable()->drawPixmap(targetRect,pm,srcRect);
+ QRect srcRect(tmpSrcX, tmpSrcY, targetRect.width(), targetRect.height());
+ d->pmData->blittable()->drawPixmap(targetRect, pm, srcRect);
}
}
x+=blitWidth;
- if (x>=transformedRect.right()) {
+ if (x >= transformedRect.right()) {
x = transformedRect.x();
srcX = startX;
srcY = 0;
- y+=blitHeight;
- if (y>=transformedRect.bottom())
+ y += blitHeight;
+ if (y >= transformedRect.bottom())
rectIsFilled = true;
} else
srcX = 0;
@@ -426,235 +528,174 @@ void QBlitterPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
} else {
d->lock();
d->pmData->markRasterOverlay(rect);
- d->raster->fillRect(rect, brush);
+ QRasterPaintEngine::fillRect(rect, brush);
}
}
-void QBlitterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
-{
- Q_D(QBlitterPaintEngine);
- d->lock();
- d->pmData->markRasterOverlay(path);
- d->raster->stroke(path, pen);
-}
-
-void QBlitterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
-{
- Q_D(QBlitterPaintEngine);
- d->lock();
- d->raster->clip(path, op);
- d->updateClip();
-}
-void QBlitterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op){
- Q_D(QBlitterPaintEngine);
- d->lock();
- d->raster->clip(rect,op);
- d->updateClip();
-}
-void QBlitterPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
+void QBlitterPaintEngine::drawRects(const QRect *rects, int rectCount)
{
Q_D(QBlitterPaintEngine);
- d->lock();
- d->raster->clip(region,op);
- d->updateClip();
+ if (d->caps.canBlitterDrawRectMask()) {
+ for (int i=0; i<rectCount; ++i)
+ d->fillRect(rects[i], qbrush_color(state()->brush));
+ } else {
+ d->pmData->markRasterOverlay(rects, rectCount);
+ QRasterPaintEngine::drawRects(rects, rectCount);
+ }
}
-void QBlitterPaintEngine::clipEnabledChanged()
+void QBlitterPaintEngine::drawRects(const QRectF *rects, int rectCount)
{
Q_D(QBlitterPaintEngine);
- d->lock();
- d->raster->clipEnabledChanged();
+ if (d->caps.canBlitterDrawRectMask()) {
+ for (int i = 0; i < rectCount; ++i)
+ d->fillRect(rects[i], qbrush_color(state()->brush));
+ } else {
+ d->pmData->markRasterOverlay(rects, rectCount);
+ QRasterPaintEngine::drawRects(rects, rectCount);
+ }
}
-void QBlitterPaintEngine::penChanged()
+void QBlitterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
{
- Q_D(QBlitterPaintEngine);
- d->lock();
- d->raster->penChanged();
- d->capabillities->updateState(STATE_PEN_ENABLED,qpen_style(state()->pen) != Qt::NoPen);
+ drawPixmap(QRectF(pos, pm.size()), pm, pm.rect());
}
-void QBlitterPaintEngine::brushChanged()
+void QBlitterPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
{
Q_D(QBlitterPaintEngine);
- d->raster->brushChanged();
-
- bool solid = qbrush_style(state()->brush) == Qt::SolidPattern;
-
- d->capabillities->updateState(STATE_BRUSH_PATTERN, !solid);
- d->capabillities->updateState(STATE_BRUSH_ALPHA,
- qbrush_color(state()->brush).alpha() < 255);
-}
+ if (d->caps.canBlitterDrawPixmap(r, pm, sr)) {
-void QBlitterPaintEngine::brushOriginChanged()
-{
- Q_D(QBlitterPaintEngine);
- d->raster->brushOriginChanged();
+ d->unlock();
+ QRectF targetRect = r;
+ if (d->hasXForm)
+ targetRect = state()->matrix.mapRect(r);
+ const QClipData *clipData = d->clip();
+ if (clipData) {
+ if (clipData->hasRectClip) {
+ d->clipAndDrawPixmap(clipData->clipRect, targetRect, pm, sr);
+ } else if (clipData->hasRegionClip) {
+ QVector<QRect>rects = clipData->clipRegion.rects();
+ for (int i = 0; i<rects.size(); ++i)
+ d->clipAndDrawPixmap(rects.at(i), targetRect, pm, sr);
+ }
+ } else {
+ QRectF deviceRect(0, 0, paintDevice()->width(), paintDevice()->height());
+ d->clipAndDrawPixmap(deviceRect, targetRect, pm, sr);
+ }
+ }else {
+ d->lock();
+ d->pmData->markRasterOverlay(r);
+ QRasterPaintEngine::drawPixmap(r, pm, sr);
+ }
}
-void QBlitterPaintEngine::opacityChanged()
+// Overriden methods to lock the graphics memory
+void QBlitterPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
{
Q_D(QBlitterPaintEngine);
- d->raster->opacityChanged();
-
- bool translucent = state()->opacity < 1;
- d->capabillities->updateState(STATE_ALPHA,translucent);
+ d->lock();
+ d->pmData->markRasterOverlay(points, pointCount);
+ QRasterPaintEngine::drawPolygon(points, pointCount, mode);
}
-void QBlitterPaintEngine::compositionModeChanged()
+void QBlitterPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
{
Q_D(QBlitterPaintEngine);
- d->raster->compositionModeChanged();
-
- bool nonTrivial = state()->composition_mode != QPainter::CompositionMode_SourceOver
- && state()->composition_mode != QPainter::CompositionMode_Source;
-
- d->capabillities->updateState(STATE_BLENDING_COMPLEX,nonTrivial);
+ d->lock();
+ d->pmData->markRasterOverlay(points, pointCount);
+ QRasterPaintEngine::drawPolygon(points, pointCount, mode);
}
-void QBlitterPaintEngine::renderHintsChanged()
+void QBlitterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData)
{
Q_D(QBlitterPaintEngine);
- d->raster->renderHintsChanged();
-
- bool aa = state()->renderHints & QPainter::Antialiasing;
- d->capabillities->updateState(STATE_ANTIALIASING, aa);
-
+ d->lock();
+ d->pmData->markRasterOverlay(path);
+ QRasterPaintEngine::fillPath(path, fillData);
}
-void QBlitterPaintEngine::transformChanged()
+void QBlitterPaintEngine::fillPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
{
Q_D(QBlitterPaintEngine);
- d->raster->transformChanged();
-
- QTransform::TransformationType type = state()->matrix.type();
-
- d->capabillities->updateState(STATE_XFORM_COMPLEX, type > QTransform::TxScale);
- d->capabillities->updateState(STATE_XFORM_SCALE, type > QTransform::TxTranslate);
-
- d->hasXForm = type >= QTransform::TxTranslate;
-
+ d->lock();
+ d->pmData->markRasterOverlay(points, pointCount);
+ QRasterPaintEngine::fillPolygon(points, pointCount, mode);
}
-void QBlitterPaintEngine::drawRects(const QRect *rects, int rectCount)
+void QBlitterPaintEngine::drawEllipse(const QRectF &r)
{
Q_D(QBlitterPaintEngine);
- if (d->capabillities->canBlitterDrawRectMask()) {
- for (int i=0; i<rectCount; ++i) {
- d->fillRect(rects[i], qbrush_color(state()->brush));
- }
- } else {
- d->pmData->markRasterOverlay(rects,rectCount);
- QPaintEngineEx::drawRects(rects, rectCount);
- }
+ d->lock();
+ d->pmData->markRasterOverlay(r);
+ QRasterPaintEngine::drawEllipse(r);
}
-void QBlitterPaintEngine::drawRects(const QRectF *rects, int rectCount)
+void QBlitterPaintEngine::drawImage(const QPointF &pos, const QImage &image)
{
- Q_D(QBlitterPaintEngine);
- if (d->capabillities->canBlitterDrawRectMask()) {
- for (int i=0; i<rectCount; ++i) {
- d->fillRect(rects[i], qbrush_color(state()->brush));
- }
- } else {
- d->pmData->markRasterOverlay(rects,rectCount);
- QPaintEngineEx::drawRects(rects, rectCount);
- }
+ drawImage(QRectF(pos, image.size()), image, image.rect());
}
-void QBlitterPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
+void QBlitterPaintEngine::drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
+ Qt::ImageConversionFlags flags)
{
Q_D(QBlitterPaintEngine);
- if (d->capabillities->canBlitterDrawPixmap(r,pm,sr)) {
-
- d->unlock();
- QRectF targetRect = r;
- if (d->hasXForm) {
- targetRect = state()->matrix.mapRect(r);
- }
- const QClipData *clipData = clip();
- if (clipData) {
- if (clipData->hasRectClip) {
- d->clipAndDrawPixmap(clipData->clipRect,targetRect,pm,sr);
- }else if (clipData->hasRegionClip) {
- QVector<QRect>rects = clipData->clipRegion.rects();
- for (int i = 0; i<rects.size(); i++) {
- d->clipAndDrawPixmap(rects.at(i),targetRect,pm,sr);
- }
- }
- } else {
- QRectF deviceRect(0,0,d->raster->paintDevice()->width(), d->raster->paintDevice()->height());
- d->clipAndDrawPixmap(deviceRect,targetRect,pm,sr);
- }
- }else {
- d->lock();
- d->pmData->markRasterOverlay(r);
- d->raster->drawPixmap(r, pm, sr);
- }
+ d->lock();
+ d->pmData->markRasterOverlay(r);
+ QRasterPaintEngine::drawImage(r, pm, sr, flags);
}
-void QBlitterPaintEngine::drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags flags)
+void QBlitterPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr)
{
Q_D(QBlitterPaintEngine);
d->lock();
d->pmData->markRasterOverlay(r);
- d->raster->drawImage(r, pm, sr, flags);
+ QRasterPaintEngine::drawTiledPixmap(r, pm, sr);
}
-
void QBlitterPaintEngine::drawTextItem(const QPointF &pos, const QTextItem &ti)
{
Q_D(QBlitterPaintEngine);
d->lock();
- d->raster->drawTextItem(pos, ti);
- d->pmData->markRasterOverlay(pos,ti);
+ d->pmData->markRasterOverlay(pos, ti);
+ QRasterPaintEngine::drawTextItem(pos, ti);
}
-void QBlitterPaintEngine::drawStaticTextItem(QStaticTextItem *sti)
+void QBlitterPaintEngine::drawPoints(const QPointF *points, int pointCount)
{
Q_D(QBlitterPaintEngine);
d->lock();
- d->raster->drawStaticTextItem(sti);
-
-//#### d->pmData->markRasterOverlay(sti);
- qWarning("not implemented: markRasterOverlay for QStaticTextItem");
-
+ d->pmData->markRasterOverlay(points, pointCount);
+ QRasterPaintEngine::drawPoints(points, pointCount);
}
-
-void QBlitterPaintEngine::drawEllipse(const QRectF &r)
+void QBlitterPaintEngine::drawPoints(const QPoint *points, int pointCount)
{
Q_D(QBlitterPaintEngine);
d->lock();
- d->pmData->markRasterOverlay(r);
- d->raster->drawEllipse(r);
+ d->pmData->markRasterOverlay(points, pointCount);
+ QRasterPaintEngine::drawPoints(points, pointCount);
}
-void QBlitterPaintEngine::setState(QPainterState *s)
+void QBlitterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
{
Q_D(QBlitterPaintEngine);
d->lock();
- QPaintEngineEx::setState(s);
- d->raster->setState(s);
-
- clipEnabledChanged();
- penChanged();
- brushChanged();
- brushOriginChanged();
- opacityChanged();
- compositionModeChanged();
- renderHintsChanged();
- transformChanged();
-
- d->updateClip();
+ d->pmData->markRasterOverlay(path);
+ QRasterPaintEngine::stroke(path, pen);
}
-inline QRasterPaintEngine *QBlitterPaintEngine::raster() const
+void QBlitterPaintEngine::drawStaticTextItem(QStaticTextItem *sti)
{
- Q_D(const QBlitterPaintEngine);
- return d->raster.data();
+ Q_D(QBlitterPaintEngine);
+ d->lock();
+ QRasterPaintEngine::drawStaticTextItem(sti);
+
+#ifdef QT_BLITTER_RASTEROVERLAY
+//#### d->pmData->markRasterOverlay(sti);
+ qWarning("not implemented: markRasterOverlay for QStaticTextItem");
+#endif
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintengine_blitter_p.h b/src/gui/painting/qpaintengine_blitter_p.h
index 1acc647fbe..dba0bad9ef 100644
--- a/src/gui/painting/qpaintengine_blitter_p.h
+++ b/src/gui/painting/qpaintengine_blitter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,6 @@
#ifndef QPAINTENGINE_BLITTER_P_H
#define QPAINTENGINE_BLITTER_P_H
-#include "private/qpaintengineex_p.h"
#include "private/qpaintengine_raster_p.h"
#ifndef QT_NO_BLITTABLE
@@ -52,59 +51,51 @@ class QBlitterPaintEnginePrivate;
class QBlittablePlatformPixmap;
class QBlittable;
-class Q_GUI_EXPORT QBlitterPaintEngine : public QPaintEngineEx
+class Q_GUI_EXPORT QBlitterPaintEngine : public QRasterPaintEngine
{
Q_DECLARE_PRIVATE(QBlitterPaintEngine);
public:
QBlitterPaintEngine(QBlittablePlatformPixmap *p);
- ~QBlitterPaintEngine();
-
- virtual QPainterState *createState(QPainterState *orig) const;
virtual QPaintEngine::Type type() const { return Blitter; }
virtual bool begin(QPaintDevice *pdev);
virtual bool end();
+ // Call down into QBlittable
virtual void fill(const QVectorPath &path, const QBrush &brush);
- virtual void stroke(const QVectorPath &path, const QPen &pen);
-
- virtual void clip(const QVectorPath &path, Qt::ClipOperation op);
- virtual void clip(const QRect &rect, Qt::ClipOperation op);
- virtual void clip(const QRegion &region, Qt::ClipOperation op);
+ virtual void fillRect(const QRectF &rect, const QBrush &brush);
+ virtual void fillRect(const QRectF &rect, const QColor &color);
+ virtual void drawRects(const QRect *rects, int rectCount);
+ virtual void drawRects(const QRectF *rects, int rectCount);
+ void drawPixmap(const QPointF &p, const QPixmap &pm);
+ void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
+ // State tracking
+ void setState(QPainterState *s);
virtual void clipEnabledChanged();
virtual void penChanged();
virtual void brushChanged();
- virtual void brushOriginChanged();
virtual void opacityChanged();
virtual void compositionModeChanged();
virtual void renderHintsChanged();
virtual void transformChanged();
- virtual void fillRect(const QRectF &rect, const QBrush &brush);
- virtual void fillRect(const QRectF &rect, const QColor &color);
-
- virtual void drawRects(const QRect *rects, int rectCount);
- virtual void drawRects(const QRectF *rects, int rectCount);
-
- virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
-
- virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags);
-
- virtual void drawTextItem(const QPointF &pos, const QTextItem &ti);
- virtual void drawStaticTextItem(QStaticTextItem *);
-
- virtual void drawEllipse(const QRectF &r);
-
- virtual void setState(QPainterState *s);
-
- inline QPainterState *state() { return raster()->state(); }
- inline const QPainterState *state() const { const QPainterState *state = raster()->state(); return state;}
- inline const QClipData *clip(){return raster()->d_func()->clip();}
-
-private:
- QRasterPaintEngine *raster() const;
+ // Override to lock the QBlittable before using raster
+ void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
+ void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode);
+ void fillPath(const QPainterPath &path, QSpanData *fillData);
+ void fillPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
+ void drawEllipse(const QRectF &rect);
+ void drawImage(const QPointF &p, const QImage &img);
+ void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
+ Qt::ImageConversionFlags flags = Qt::AutoColor);
+ void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr);
+ void drawTextItem(const QPointF &p, const QTextItem &textItem);
+ void drawPoints(const QPointF *points, int pointCount);
+ void drawPoints(const QPoint *points, int pointCount);
+ void stroke(const QVectorPath &path, const QPen &pen);
+ void drawStaticTextItem(QStaticTextItem *);
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintengine_p.h b/src/gui/painting/qpaintengine_p.h
index 5d540bd11b..57075fed90 100644
--- a/src/gui/painting/qpaintengine_p.h
+++ b/src/gui/painting/qpaintengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index d5449a7eb5..5100393c69 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -733,7 +733,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen)
s->stroker = 0;
}
- ensureState(); // needed because of tx_noshear...
+ ensureRasterState(); // needed because of tx_noshear...
s->flags.fast_pen = pen_style > Qt::NoPen
&& s->penData.blend
&& ((pen.isCosmetic() && penWidth <= 1)
@@ -801,7 +801,7 @@ void QRasterPaintEngine::updateOutlineMapper()
d->outlineMapper->setMatrix(state()->matrix);
}
-void QRasterPaintEngine::updateState()
+void QRasterPaintEngine::updateRasterState()
{
QRasterPaintEngineState *s = state();
@@ -1434,7 +1434,7 @@ void QRasterPaintEngine::drawRects(const QRect *rects, int rectCount)
qDebug(" - QRasterPaintEngine::drawRect(), rectCount=%d", rectCount);
#endif
Q_D(QRasterPaintEngine);
- ensureState();
+ ensureRasterState();
QRasterPaintEngineState *s = state();
// Fill
@@ -1489,7 +1489,7 @@ void QRasterPaintEngine::drawRects(const QRectF *rects, int rectCount)
#endif
#ifdef QT_FAST_SPANS
Q_D(QRasterPaintEngine);
- ensureState();
+ ensureRasterState();
QRasterPaintEngineState *s = state();
@@ -1645,7 +1645,7 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
fillRect_normalized(toNormalizedFillRect(QRectF(tl, br)), &s->brushData, d);
return;
}
- ensureState();
+ ensureRasterState();
if (s->flags.tx_noshear) {
d->initializeRasterizer(&s->brushData);
// ### Is normalizing really necessary here?
@@ -1702,7 +1702,7 @@ void QRasterPaintEngine::fillRect(const QRectF &r, QSpanData *data)
return;
}
}
- ensureState();
+ ensureRasterState();
if (s->flags.tx_noshear) {
d->initializeRasterizer(data);
QRectF nr = r.normalized();
@@ -2330,7 +2330,7 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
}
#ifdef QT_FAST_SPANS
- ensureState();
+ ensureRasterState();
if (s->flags.tx_noshear || s->matrix.type() == QTransform::TxScale) {
d->initializeRasterizer(&d->image_filler_xform);
d->rasterizer->setAntialiased(s->flags.antialiased);
@@ -2425,7 +2425,7 @@ void QRasterPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap,
d->image_filler_xform.setupMatrix(copy, s->flags.bilinear);
#ifdef QT_FAST_SPANS
- ensureState();
+ ensureRasterState();
if (s->flags.tx_noshear || s->matrix.type() == QTransform::TxScale) {
d->initializeRasterizer(&d->image_filler_xform);
d->rasterizer->setAntialiased(s->flags.antialiased);
@@ -2878,18 +2878,68 @@ QRasterPaintEnginePrivate::getPenFunc(const QRectF &rect,
return isUnclipped(rect, penWidth) ? data->unclipped_blend : data->blend;
}
+static QPair<int, int> visibleGlyphRange(const QRectF &clip, QFontEngine *fontEngine,
+ glyph_t *glyphs, QFixedPoint *positions, int numGlyphs)
+{
+ QFixed clipLeft = QFixed::fromReal(clip.left());
+ QFixed clipRight = QFixed::fromReal(clip.right());
+ QFixed clipTop = QFixed::fromReal(clip.top());
+ QFixed clipBottom = QFixed::fromReal(clip.bottom());
+
+ int first = 0;
+ while (first < numGlyphs) {
+ glyph_metrics_t metrics = fontEngine->boundingBox(glyphs[first]);
+ QFixed left = metrics.x + positions[first].x;
+ QFixed top = metrics.y + positions[first].y;
+ QFixed right = left + metrics.width;
+ QFixed bottom = top + metrics.height;
+ if (left < clipRight && right > clipLeft && top < clipBottom && bottom > clipTop)
+ break;
+ ++first;
+ }
+ int last = numGlyphs - 1;
+ while (last > first) {
+ glyph_metrics_t metrics = fontEngine->boundingBox(glyphs[last]);
+ QFixed left = metrics.x + positions[last].x;
+ QFixed top = metrics.y + positions[last].y;
+ QFixed right = left + metrics.width;
+ QFixed bottom = top + metrics.height;
+ if (left < clipRight && right > clipLeft && top < clipBottom && bottom > clipTop)
+ break;
+ --last;
+ }
+ return QPair<int, int>(first, last + 1);
+}
+
/*!
\reimp
*/
void QRasterPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
{
+ if (textItem->numGlyphs == 0)
+ return;
+
ensurePen();
- ensureState();
+ ensureRasterState();
QFontEngine *fontEngine = textItem->fontEngine();
if (shouldDrawCachedGlyphs(fontEngine->fontDef.pixelSize, state()->matrix)) {
drawCachedGlyphs(textItem->numGlyphs, textItem->glyphs, textItem->glyphPositions,
fontEngine);
+ } else if (state()->matrix.type() < QTransform::TxProject) {
+ bool invertible;
+ QTransform invMat = state()->matrix.inverted(&invertible);
+ if (!invertible)
+ return;
+
+ QPair<int, int> range = visibleGlyphRange(invMat.mapRect(clipBoundingRect()),
+ textItem->fontEngine(), textItem->glyphs,
+ textItem->glyphPositions, textItem->numGlyphs);
+ QStaticTextItem copy = *textItem;
+ copy.glyphs += range.first;
+ copy.glyphPositions += range.first;
+ copy.numGlyphs = range.second - range.first;
+ QPaintEngineEx::drawStaticTextItem(&copy);
} else {
QPaintEngineEx::drawStaticTextItem(textItem);
}
@@ -2901,7 +2951,6 @@ void QRasterPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
{
const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
- QRasterPaintEngineState *s = state();
#ifdef QT_DEBUG_DRAW
Q_D(QRasterPaintEngine);
@@ -2910,25 +2959,51 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
d->glyphCacheType);
#endif
+ if (ti.glyphs.numGlyphs == 0)
+ return;
ensurePen();
- ensureState();
+ ensureRasterState();
+ QRasterPaintEngineState *s = state();
+ QTransform matrix = s->matrix;
if (!supportsTransformations(ti.fontEngine)) {
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
- QTransform matrix = s->matrix;
matrix.translate(p.x(), p.y());
-
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
drawCachedGlyphs(glyphs.size(), glyphs.constData(), positions.constData(), ti.fontEngine);
- return;
- }
+ } else if (matrix.type() < QTransform::TxProject) {
+ bool invertible;
+ QTransform invMat = matrix.inverted(&invertible);
+ if (!invertible)
+ return;
+ QVarLengthArray<QFixedPoint> positions;
+ QVarLengthArray<glyph_t> glyphs;
- QPaintEngineEx::drawTextItem(p, ti);
+ ti.fontEngine->getGlyphPositions(ti.glyphs, QTransform::fromTranslate(p.x(), p.y()),
+ ti.flags, glyphs, positions);
+ QPair<int, int> range = visibleGlyphRange(invMat.mapRect(clipBoundingRect()),
+ ti.fontEngine, glyphs.data(), positions.data(),
+ glyphs.size());
+
+ if (range.first >= range.second)
+ return;
+
+ QStaticTextItem staticTextItem;
+ staticTextItem.color = s->pen.color();
+ staticTextItem.font = s->font;
+ staticTextItem.setFontEngine(ti.fontEngine);
+ staticTextItem.numGlyphs = range.second - range.first;
+ staticTextItem.glyphs = glyphs.data() + range.first;
+ staticTextItem.glyphPositions = positions.data() + range.first;
+ QPaintEngineEx::drawStaticTextItem(&staticTextItem);
+ } else {
+ QPaintEngineEx::drawTextItem(p, ti);
+ }
}
/*!
@@ -4426,8 +4501,6 @@ void QSpanData::setupMatrix(const QTransform &matrix, int bilin)
adjustSpanMethods();
}
-extern const QVector<QRgb> *qt_image_colortable(const QImage &image);
-
void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _type, const QRect &sourceRect)
{
const QImageData *d = const_cast<QImage *>(image)->data_ptr();
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index d9cc428337..aa454c0509 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -178,7 +178,7 @@ public:
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
void drawImage(const QPointF &p, const QImage &img);
void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags falgs = Qt::AutoColor);
+ Qt::ImageConversionFlags flags = Qt::AutoColor);
void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr);
void drawTextItem(const QPointF &p, const QTextItem &textItem);
@@ -268,10 +268,10 @@ private:
void updateOutlineMapper();
inline void ensureOutlineMapper();
- void updateState();
- inline void ensureState() {
+ void updateRasterState();
+ inline void ensureRasterState() {
if (state()->dirty)
- updateState();
+ updateRasterState();
}
};
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 5c39a5fca2..e5e14c9135 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1072,7 +1072,7 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem)
changedHints = true;
}
- fill(qtVectorPathForPath(path), s->pen.color());
+ fill(qtVectorPathForPath(path), s->pen.brush());
if (changedHints) {
s->renderHints = oldHints;
diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h
index 9674f04ba1..33a6081570 100644
--- a/src/gui/painting/qpaintengineex_p.h
+++ b/src/gui/painting/qpaintengineex_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 416fe5adbf..77c3fc183f 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -2201,7 +2201,7 @@ void QPainter::setBrushOrigin(const QPointF &p)
source defines the translucency of the pixel.
When the paint device is a QImage, the image format must be set to
- \l {QImage::Format}{Format_ARGB32Premultiplied} or
+ \l {QImage::Format}{Format_ARGB32_Premultiplied} or
\l {QImage::Format}{Format_ARGB32} for the composition modes to have
any effect. For performance the premultiplied version is the preferred
format.
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index fd40111368..ba9a9fbb97 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 79d4b4bbe0..0fb3069ee0 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 5b70f4b22a..9c69644033 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index a558abca3d..46af341df3 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h
index 738c2d382d..1cf00bbae3 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index f739198be0..03f48d8fda 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index fe4a97ad4c..daf97884c0 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 8f21663ffc..62f4b9b3f6 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index 6df5052c06..32b59e92e8 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index a0f8df2061..23be05c49c 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h
index 005d8e640b..dfe49b403a 100644
--- a/src/gui/painting/qpdfwriter.h
+++ b/src/gui/painting/qpdfwriter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 5358239014..3654c6f007 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpen.h b/src/gui/painting/qpen.h
index a751c2fdd3..708f131ece 100644
--- a/src/gui/painting/qpen.h
+++ b/src/gui/painting/qpen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpen_p.h b/src/gui/painting/qpen_p.h
index d91566664d..4610026e2f 100644
--- a/src/gui/painting/qpen_p.h
+++ b/src/gui/painting/qpen_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qplatformbackingstore_qpa.cpp b/src/gui/painting/qplatformbackingstore_qpa.cpp
index 2c0053af86..9d855735f4 100644
--- a/src/gui/painting/qplatformbackingstore_qpa.cpp
+++ b/src/gui/painting/qplatformbackingstore_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qplatformbackingstore_qpa.h b/src/gui/painting/qplatformbackingstore_qpa.h
index d5a2536ea6..a47106771e 100644
--- a/src/gui/painting/qplatformbackingstore_qpa.h
+++ b/src/gui/painting/qplatformbackingstore_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index fc22aed392..b745e1a6ee 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index cf3bf472f6..348cf9eef7 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qpolygonclipper_p.h b/src/gui/painting/qpolygonclipper_p.h
index df0bfccc3f..6512a3a0ed 100644
--- a/src/gui/painting/qpolygonclipper_p.h
+++ b/src/gui/painting/qpolygonclipper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qrasterdefs_p.h b/src/gui/painting/qrasterdefs_p.h
index 8d9d4e9277..a113ab0abf 100644
--- a/src/gui/painting/qrasterdefs_p.h
+++ b/src/gui/painting/qrasterdefs_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 1d3f581b88..5a46d1ba48 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qrasterizer_p.h b/src/gui/painting/qrasterizer_p.h
index 913e2d3229..ed7d4eb957 100644
--- a/src/gui/painting/qrasterizer_p.h
+++ b/src/gui/painting/qrasterizer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 66b12e5034..68338602e2 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index a5ea88b8bd..834a015ceb 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h
index 1f9c922bf2..b982707344 100644
--- a/src/gui/painting/qrgb.h
+++ b/src/gui/painting/qrgb.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index bbb951eb9b..f7e50c82c0 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h
index 58d4f5da40..b6cae1d2a0 100644
--- a/src/gui/painting/qstroker_p.h
+++ b/src/gui/painting/qstroker_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 1e0ed0f798..0743804319 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index d9d57f41ab..d29a31f4f3 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index e42eec6f96..f9948bf8d1 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 3289bf4d26..08a4861100 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h
index 6a061a405b..8a54e65aed 100644
--- a/src/gui/painting/qvectorpath_p.h
+++ b/src/gui/painting/qvectorpath_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qabstractfontengine_p.h b/src/gui/text/qabstractfontengine_p.h
index b744d6664c..7d0eaa7b42 100644
--- a/src/gui/text/qabstractfontengine_p.h
+++ b/src/gui/text/qabstractfontengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index c392b54520..5dd29e6548 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qabstracttextdocumentlayout.h b/src/gui/text/qabstracttextdocumentlayout.h
index 8e792e9b80..1362640b4f 100644
--- a/src/gui/text/qabstracttextdocumentlayout.h
+++ b/src/gui/text/qabstracttextdocumentlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qabstracttextdocumentlayout_p.h b/src/gui/text/qabstracttextdocumentlayout_p.h
index 692b535991..6f8f113bff 100644
--- a/src/gui/text/qabstracttextdocumentlayout_p.h
+++ b/src/gui/text/qabstracttextdocumentlayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 6a28ff2d74..06a88f02ee 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index 171085b800..fa60a3fd2e 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qcssscanner.cpp b/src/gui/text/qcssscanner.cpp
index 375f211d9f..07928a62af 100644
--- a/src/gui/text/qcssscanner.cpp
+++ b/src/gui/text/qcssscanner.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 804d3f9e66..1ac398967d 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -138,36 +138,32 @@ extern bool qt_is_gui_used;
Q_GUI_EXPORT int qt_defaultDpiX()
{
+ if (qApp->testAttribute(Qt::AA_Use96Dpi))
+ return 96;
+
if (!qt_is_gui_used)
return 75;
- int dpi;
- QScreen *screen = QGuiApplication::primaryScreen();
- if (screen) {
- dpi = qRound(screen->logicalDotsPerInchX());
- } else {
- //PI has not been initialised, or it is being initialised. Give a default dpi
- dpi = 100;
- }
+ if (const QScreen *screen = QGuiApplication::primaryScreen())
+ return qRound(screen->logicalDotsPerInchX());
- return dpi;
+ //PI has not been initialised, or it is being initialised. Give a default dpi
+ return 100;
}
Q_GUI_EXPORT int qt_defaultDpiY()
{
+ if (qApp->testAttribute(Qt::AA_Use96Dpi))
+ return 96;
+
if (!qt_is_gui_used)
return 75;
- int dpi;
- QScreen *screen = QGuiApplication::primaryScreen();
- if (screen) {
- dpi = qRound(screen->logicalDotsPerInchY());
- } else {
- //PI has not been initialised, or it is being initialised. Give a default dpi
- dpi = 100;
- }
+ if (const QScreen *screen = QGuiApplication::primaryScreen())
+ return qRound(screen->logicalDotsPerInchY());
- return dpi;
+ //PI has not been initialised, or it is being initialised. Give a default dpi
+ return 100;
}
Q_GUI_EXPORT int qt_defaultDpi()
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 326dc9d63e..afeea3ce65 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index 2d4f3de7e7..b57af5f213 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfont_qpa.cpp b/src/gui/text/qfont_qpa.cpp
index 28fd77df56..2f5b6f7660 100644
--- a/src/gui/text/qfont_qpa.cpp
+++ b/src/gui/text/qfont_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index c80ded6e7b..e7cbe2a8a8 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index 873d00946c..3bfc07fbfd 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 55b9023c7c..a5cb923460 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 5c6c8d186a..d569cb58b9 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index b2bff92b76..e41c0a93c7 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index edc2457687..c84c11163a 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 4caf91e735..02523ada82 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp
index c25ed43fdc..3408d3a2a8 100644
--- a/src/gui/text/qfontengine_qpa.cpp
+++ b/src/gui/text/qfontengine_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_qpa_p.h b/src/gui/text/qfontengine_qpa_p.h
index a88c1bc3cc..d09692bc57 100644
--- a/src/gui/text/qfontengine_qpa_p.h
+++ b/src/gui/text/qfontengine_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 8bdaa46524..bedc54f92a 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengine_qpf_p.h b/src/gui/text/qfontengine_qpf_p.h
index 9473e6b6b7..8a79f65814 100644
--- a/src/gui/text/qfontengine_qpf_p.h
+++ b/src/gui/text/qfontengine_qpf_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontenginedirectwrite.cpp b/src/gui/text/qfontenginedirectwrite.cpp
index 952e06d151..438d30a913 100644
--- a/src/gui/text/qfontenginedirectwrite.cpp
+++ b/src/gui/text/qfontenginedirectwrite.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontenginedirectwrite_p.h b/src/gui/text/qfontenginedirectwrite_p.h
index edf1e6a182..26198e64ee 100644
--- a/src/gui/text/qfontenginedirectwrite_p.h
+++ b/src/gui/text/qfontenginedirectwrite_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontengineglyphcache_p.h b/src/gui/text/qfontengineglyphcache_p.h
index 6b633d615c..855c4a0aa0 100644
--- a/src/gui/text/qfontengineglyphcache_p.h
+++ b/src/gui/text/qfontengineglyphcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontinfo.h b/src/gui/text/qfontinfo.h
index 37a724ec7c..88e1d9f65d 100644
--- a/src/gui/text/qfontinfo.h
+++ b/src/gui/text/qfontinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 1d80e316fd..11e41ad685 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index 21e211a4a7..f5184aacba 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp
index de945e129b..91d8264f76 100644
--- a/src/gui/text/qfontsubset.cpp
+++ b/src/gui/text/qfontsubset.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfontsubset_p.h b/src/gui/text/qfontsubset_p.h
index a99236f4cc..3dabec5f0b 100644
--- a/src/gui/text/qfontsubset_p.h
+++ b/src/gui/text/qfontsubset_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfragmentmap.cpp b/src/gui/text/qfragmentmap.cpp
index 134293194b..ac923bb639 100644
--- a/src/gui/text/qfragmentmap.cpp
+++ b/src/gui/text/qfragmentmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qfragmentmap_p.h b/src/gui/text/qfragmentmap_p.h
index d05438ab5b..e6da236552 100644
--- a/src/gui/text/qfragmentmap_p.h
+++ b/src/gui/text/qfragmentmap_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp
index 2e7097f88c..3f9989090a 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h
index 826156fe11..0c47c6f4bc 100644
--- a/src/gui/text/qglyphrun.h
+++ b/src/gui/text/qglyphrun.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qglyphrun_p.h b/src/gui/text/qglyphrun_p.h
index 863b9d883e..c3b6cf40be 100644
--- a/src/gui/text/qglyphrun_p.h
+++ b/src/gui/text/qglyphrun_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qharfbuzz_copy_p.h b/src/gui/text/qharfbuzz_copy_p.h
index 10356e4aea..aa48667e2e 100644
--- a/src/gui/text/qharfbuzz_copy_p.h
+++ b/src/gui/text/qharfbuzz_copy_p.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2007 Red Hat, Inc.
*
* This code is a modified version of some part of HarfBuzz,
diff --git a/src/gui/text/qlinecontrol.cpp b/src/gui/text/qlinecontrol.cpp
index 62f4515fcc..fc8bcafed4 100644
--- a/src/gui/text/qlinecontrol.cpp
+++ b/src/gui/text/qlinecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qlinecontrol_p.h b/src/gui/text/qlinecontrol_p.h
index 4970a8c05e..fb14df27bb 100644
--- a/src/gui/text/qlinecontrol_p.h
+++ b/src/gui/text/qlinecontrol_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -277,7 +277,7 @@ public:
Qt::LayoutDirection layoutDirection() const {
if (m_layoutDirection == Qt::LayoutDirectionAuto) {
if (m_text.isEmpty())
- return QGuiApplication::keyboardInputDirection();
+ return qApp->inputPanel()->inputDirection();
return m_text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight;
}
return m_layoutDirection;
diff --git a/src/gui/text/qpfutil.cpp b/src/gui/text/qpfutil.cpp
index 8e69a4b67f..f60b358dbe 100644
--- a/src/gui/text/qpfutil.cpp
+++ b/src/gui/text/qpfutil.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp
index 8d5a9201d9..fbd9cb09cf 100644
--- a/src/gui/text/qplatformfontdatabase_qpa.cpp
+++ b/src/gui/text/qplatformfontdatabase_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -233,6 +233,13 @@ bool QSupportedWritingSystems::supported(QFontDatabase::WritingSystem writingSys
*/
/*!
+ \internal
+ */
+QPlatformFontDatabase::~QPlatformFontDatabase()
+{
+}
+
+/*!
This function is called once at startup by Qt's internal font database.
Reimplement this function in a subclass for a convenient place to initialize
the internal font database.
diff --git a/src/gui/text/qplatformfontdatabase_qpa.h b/src/gui/text/qplatformfontdatabase_qpa.h
index 901d8c2e6e..9ee2bfd76a 100644
--- a/src/gui/text/qplatformfontdatabase_qpa.h
+++ b/src/gui/text/qplatformfontdatabase_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -87,6 +87,7 @@ class QFontRequestPrivate;
class Q_GUI_EXPORT QPlatformFontDatabase
{
public:
+ virtual ~QPlatformFontDatabase();
virtual void populateFontDatabase();
virtual QFontEngine *fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle);
virtual QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const;
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 8fccd9b0ca..65d9797374 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h
index b66bc04eab..87f4a75bc7 100644
--- a/src/gui/text/qrawfont.h
+++ b/src/gui/text/qrawfont.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qrawfont_ft.cpp b/src/gui/text/qrawfont_ft.cpp
index c941b98694..f0251b28f6 100644
--- a/src/gui/text/qrawfont_ft.cpp
+++ b/src/gui/text/qrawfont_ft.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qrawfont_p.h b/src/gui/text/qrawfont_p.h
index 992cb2f720..b1a71d96ab 100644
--- a/src/gui/text/qrawfont_p.h
+++ b/src/gui/text/qrawfont_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qrawfont_qpa.cpp b/src/gui/text/qrawfont_qpa.cpp
index 47815baf06..444efd0a0b 100644
--- a/src/gui/text/qrawfont_qpa.cpp
+++ b/src/gui/text/qrawfont_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index a52cf25a98..c356aa7e99 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index 61a590c798..ad55c6a05d 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 5f9410c31d..2607bcfe8a 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index 5f1a53b556..d9bdeeddfe 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qsyntaxhighlighter.h b/src/gui/text/qsyntaxhighlighter.h
index 1c421d1c26..bd64de34bb 100644
--- a/src/gui/text/qsyntaxhighlighter.h
+++ b/src/gui/text/qsyntaxhighlighter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index f74d67cf6d..b21dae5298 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h
index f80c4c81b6..e00ffd4042 100644
--- a/src/gui/text/qtextcontrol_p.h
+++ b/src/gui/text/qtextcontrol_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextcontrol_p_p.h b/src/gui/text/qtextcontrol_p_p.h
index 9c7ab56395..12dfbafb69 100644
--- a/src/gui/text/qtextcontrol_p_p.h
+++ b/src/gui/text/qtextcontrol_p_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 2bebf4c861..766d9792cd 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -269,25 +269,7 @@ void QTextCursorPrivate::adjustCursor(QTextCursor::MoveOperation m)
QTextTableCell c_position = table->cellAt(position);
QTextTableCell c_anchor = table->cellAt(adjusted_anchor);
if (c_position != c_anchor) {
- bool before;
- int col_position = c_position.column();
- int col_anchor = c_anchor.column();
- if (col_position == col_anchor) {
- before = c_position.row() < c_anchor.row();
- } else {
- before = col_position < col_anchor;
- }
-
- // adjust to cell boundaries
- if (m <= QTextCursor::WordLeft) {
- position = c_position.firstPosition();
- if (!before)
- --position;
- } else {
- position = c_position.lastPosition();
- if (before)
- ++position;
- }
+ position = c_position.firstPosition();
if (position < adjusted_anchor)
adjusted_anchor = c_anchor.lastPosition();
else
@@ -391,6 +373,17 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
int newPosition = position;
+ if (mode == QTextCursor::KeepAnchor && complexSelectionTable() != 0) {
+ if ((op >= QTextCursor::EndOfLine && op <= QTextCursor::NextWord)
+ || (op >= QTextCursor::Right && op <= QTextCursor::WordRight)) {
+ QTextTable *t = qobject_cast<QTextTable *>(priv->frameAt(position));
+ Q_ASSERT(t); // as we have already made sure we have a complex selection
+ QTextTableCell cell_pos = t->cellAt(position);
+ if (cell_pos.column() + cell_pos.columnSpan() != t->columns())
+ op = QTextCursor::NextCell;
+ }
+ }
+
if (x == -1 && !priv->isInEditBlock() && (op == QTextCursor::Up || op == QTextCursor::Down))
setX();
@@ -495,6 +488,8 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
break;
}
newPosition = blockIt.position() + line.textStart() + line.textLength();
+ if (newPosition >= priv->length())
+ newPosition = priv->length() - 1;
if (line.lineNumber() < layout->lineCount() - 1) {
const QString text = blockIt.text();
// ###### this relies on spaces being the cause for linebreaks.
diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h
index bc4cdb5fb6..32ded45137 100644
--- a/src/gui/text/qtextcursor.h
+++ b/src/gui/text/qtextcursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextcursor_p.h b/src/gui/text/qtextcursor_p.h
index c612169acf..d64498a7ac 100644
--- a/src/gui/text/qtextcursor_p.h
+++ b/src/gui/text/qtextcursor_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 8d9a8c405a..3038504591 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1925,8 +1925,12 @@ QVariant QTextDocument::loadResource(int type, const QUrl &name)
#endif
// handle data: URLs
- if (r.isNull() && name.scheme().compare(QLatin1String("data"), Qt::CaseInsensitive) == 0)
- r = qDecodeDataUrl(name).second;
+ if (r.isNull() && name.scheme().compare(QLatin1String("data"), Qt::CaseInsensitive) == 0) {
+ QString mimetype;
+ QByteArray payload;
+ if (qDecodeDataUrl(name, mimetype, payload))
+ r = payload;
+ }
// if resource was not loaded try to load it here
if (!doc && r.isNull() && name.isRelative()) {
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index 9d9af2b5bb..b7c77c2c54 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 901375d8c8..9e410b40af 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index fbf91bfc0e..07a5230ec5 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 0c8860e98e..a42a4ce39a 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -372,18 +372,8 @@ QString QTextDocumentFragment::toPlainText() const
return d->doc->toPlainText();
}
-// #### Qt 5: merge with other overload
-/*!
- \overload
-*/
-
#ifndef QT_NO_TEXTHTMLPARSER
-QString QTextDocumentFragment::toHtml() const
-{
- return toHtml(QByteArray());
-}
-
/*!
\since 4.2
diff --git a/src/gui/text/qtextdocumentfragment.h b/src/gui/text/qtextdocumentfragment.h
index 151a1a1ba5..cc7dd293f2 100644
--- a/src/gui/text/qtextdocumentfragment.h
+++ b/src/gui/text/qtextdocumentfragment.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -69,8 +69,7 @@ public:
QString toPlainText() const;
#ifndef QT_NO_TEXTHTMLPARSER
- QString toHtml() const;
- QString toHtml(const QByteArray &encoding) const;
+ QString toHtml(const QByteArray &encoding = QByteArray()) const;
#endif // QT_NO_TEXTHTMLPARSER
static QTextDocumentFragment fromPlainText(const QString &plainText);
diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h
index 227123ed80..44276d3629 100644
--- a/src/gui/text/qtextdocumentfragment_p.h
+++ b/src/gui/text/qtextdocumentfragment_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 5138aa3e70..80975f928b 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocumentlayout_p.h b/src/gui/text/qtextdocumentlayout_p.h
index bef4c844f6..e5f8cc19a8 100644
--- a/src/gui/text/qtextdocumentlayout_p.h
+++ b/src/gui/text/qtextdocumentlayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp
index 11bf3fcb08..a371471b76 100644
--- a/src/gui/text/qtextdocumentwriter.cpp
+++ b/src/gui/text/qtextdocumentwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextdocumentwriter.h b/src/gui/text/qtextdocumentwriter.h
index 0b3f11042b..7dc903c412 100644
--- a/src/gui/text/qtextdocumentwriter.h
+++ b/src/gui/text/qtextdocumentwriter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index d223b2ec37..0dd8d0bef3 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,6 +54,7 @@
#include <private/qunicodetables_p.h>
#include "qtextdocument_p.h"
#include <qguiapplication.h>
+#include <qinputpanel.h>
#include <stdlib.h>
@@ -1408,7 +1409,7 @@ bool QTextEngine::isRightToLeft() const
itemize();
// this places the cursor in the right position depending on the keyboard layout
if (layoutData->string.isEmpty())
- return QGuiApplication::keyboardInputDirection() == Qt::RightToLeft;
+ return qApp ? qApp->inputPanel()->inputDirection() == Qt::RightToLeft : false;
return layoutData->string.isRightToLeft();
}
@@ -2692,7 +2693,7 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end,
closestItem--;
int pos = si->position + clusterStart + closestItem;
// Jump to the next charStop
- while (!attrs[pos].charStop && pos < end)
+ while (pos < end && !attrs[pos].charStop)
pos++;
return pos;
}
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index d821fa50cb..368ad3763d 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 833414f79f..9ce45fdaf3 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -394,6 +394,9 @@ void QTextFormatPrivate::recalcFont() const
case QTextFormat::FontStrikeOut:
f.setStrikeOut(props.at(i).value.toBool());
break;
+ case QTextFormat::FontAbsoluteLetterSpacing:
+ f.setLetterSpacing(QFont::AbsoluteSpacing, props.at(i).value.toReal());
+ break;
case QTextFormat::FontLetterSpacing:
f.setLetterSpacing(QFont::PercentageSpacing, props.at(i).value.toReal());
break;
@@ -408,6 +411,9 @@ void QTextFormatPrivate::recalcFont() const
if (f.fixedPitch() != value)
f.setFixedPitch(value);
break; }
+ case QTextFormat::FontStretch:
+ f.setStretch(props.at(i).value.toInt());
+ break;
case QTextFormat::FontStyleHint:
f.setStyleHint(static_cast<QFont::StyleHint>(props.at(i).value.toInt()), f.styleStrategy());
break;
@@ -564,10 +570,12 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
\value FontOverline
\value FontStrikeOut
\value FontCapitalization Specifies the capitalization type that is to be applied to the text.
+ \value FontAbsoluteLetterSpacing If true FontLetterSpacing is absolute
\value FontLetterSpacing Changes the default spacing between individual letters in the font. The value is
specified in percentage, with 100 as the default value.
\value FontWordSpacing Changes the default spacing between individual words. A positive value increases the word spacing
by the corresponding pixels; a negative value decreases the spacing.
+ \value FontStretch Corresponds to the QFont::Stretch property
\value FontStyleHint Corresponds to the QFont::StyleHint property
\value FontStyleStrategy Corresponds to the QFont::StyleStrategy property
\value FontKerning Specifies whether the font has kerning turned on.
@@ -1853,8 +1861,12 @@ void QTextCharFormat::setFont(const QFont &font)
setFontFixedPitch(font.fixedPitch());
setFontCapitalization(font.capitalization());
setFontWordSpacing(font.wordSpacing());
- if (font.letterSpacingType() == QFont::PercentageSpacing)
+ if (font.letterSpacingType() == QFont::AbsoluteSpacing) {
+ setFontAbsoluteLetterSpacing(font.letterSpacing());
+ } else {
setFontLetterSpacing(font.letterSpacing());
+ }
+ setFontStretch(font.stretch());
setFontStyleHint(font.styleHint());
setFontStyleStrategy(font.styleStrategy());
setFontKerning(font.kerning());
@@ -3045,14 +3057,37 @@ QTextImageFormat::QTextImageFormat(const QTextFormat &fmt)
*/
/*!
+ \fn void QTextCharFormat::setFontAbsoluteLetterSpacing(bool absolute)
+ \since 5.0
+
+ Sets the letter spacing type of this format to absolute.
+ \sa fontAbsoluteLetterSpacing()
+ \sa setFontLetterSpacing()
+ \sa fontLetterSpacing()
+*/
+
+/*!
+ \fn bool QTextCharFormat::fontAbsoluteLetterSpacing() const
+ \since 5.0
+
+ Returns if the current letter spacing is absolute (or percentage).
+ \sa setFontAbsoluteLetterSpacing()
+ \sa setFontLetterSpacing()
+ \sa fontLetterSpacing()
+*/
+
+/*!
\fn void QTextCharFormat::setFontLetterSpacing(qreal spacing)
\since 4.4
- Sets the letter spacing of this format to the given \a spacing, in percent.
- A value of 100 indicates default spacing; a value of 200 doubles the amount
+ Sets the letter spacing of this format to the given \a spacing.
+ Depending on fontAbsoluteLetterSpacing the value is given in absolutes or in percent.
+ For percent a value of 100 indicates default spacing; a value of 200 doubles the amount
of space a letter takes.
\sa fontLetterSpacing()
+ \sa setFontAbsoluteLetterSpacing()
+ \sa fontAbsoluteLetterSpacing()
*/
/*!
@@ -3079,6 +3114,28 @@ QTextImageFormat::QTextImageFormat(const QTextFormat &fmt)
*/
/*!
+ \fn void QTextCharFormat::setFontStretch(int factor)
+ \since 5.0
+
+ Sets the stretch factor for the font.
+
+ The stretch factor changes the width of all characters in the font by factor percent. For example, setting factor to 150 results in all characters in the font being 1.5 times (ie. 150%) wider. The default stretch factor is 100. The minimum stretch factor is 1, and the maximum stretch factor is 4000.
+
+ The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts.
+
+ NOTE: QFont cannot stretch XLFD fonts. When loading XLFD fonts on X11, the stretch factor is matched against a predefined set of values for the SETWIDTH_NAME field of the XLFD.
+ \sa fontStretch()
+*/
+
+/*!
+ \fn int QTextCharFormat::fontStretch() const
+ \since 5.0
+
+ Returns the current font stretching.
+ \sa setFontStretch()
+*/
+
+/*!
\fn qreal QTextTableCellFormat::topPadding() const
\since 4.4
@@ -3321,4 +3378,19 @@ void QTextFormatCollection::setDefaultFont(const QFont &f)
formats[i].d->resolveFont(defaultFnt);
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QTextLength &l)
+{
+ dbg.nospace() << "QTextLength(QTextLength::Type(" << l.type() << "))";
+ return dbg.space();
+}
+
+QDebug operator<<(QDebug dbg, const QTextFormat &f)
+{
+ dbg.nospace() << "QTextFormat(QTextFormat::FormatType(" << f.type() << "))";
+ return dbg.space();
+}
+
+#endif
+
QT_END_NAMESPACE
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index a7bc15eb74..5c9d6fe20e 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -81,6 +81,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextLength &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextLength &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextLength &);
+#endif
+
class Q_GUI_EXPORT QTextLength
{
public:
@@ -126,6 +130,10 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextFormat &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextFormat &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextFormat &);
+#endif
+
class Q_GUI_EXPORT QTextFormat
{
Q_GADGET
@@ -172,8 +180,10 @@ public:
// character properties
FirstFontProperty = 0x1FE0,
FontCapitalization = FirstFontProperty,
+ FontAbsoluteLetterSpacing = 0x2033, // if true FontLetterSpacing is absolute
FontLetterSpacing = 0x1FE1,
FontWordSpacing = 0x1FE2,
+ FontStretch = 0x2034,
FontStyleHint = 0x1FE3,
FontStyleStrategy = 0x1FE4,
FontKerning = 0x1FE5,
@@ -420,8 +430,14 @@ public:
{ setProperty(FontCapitalization, capitalization); }
inline QFont::Capitalization fontCapitalization() const
{ return static_cast<QFont::Capitalization>(intProperty(FontCapitalization)); }
+ inline void setFontAbsoluteLetterSpacing(qreal absoluteSpacing)
+ { setProperty(FontAbsoluteLetterSpacing, absoluteSpacing);
+ clearProperty(FontLetterSpacing); }
+ inline qreal fontAbsoluteLetterSpacing() const
+ { return doubleProperty(FontAbsoluteLetterSpacing); }
inline void setFontLetterSpacing(qreal spacing)
- { setProperty(FontLetterSpacing, spacing); }
+ { setProperty(FontLetterSpacing, spacing);
+ clearProperty(FontAbsoluteLetterSpacing); }
inline qreal fontLetterSpacing() const
{ return doubleProperty(FontLetterSpacing); }
inline void setFontWordSpacing(qreal spacing)
@@ -453,6 +469,11 @@ public:
inline bool fontFixedPitch() const
{ return boolProperty(FontFixedPitch); }
+ inline void setFontStretch(qreal factor)
+ { setProperty(FontStretch, factor); }
+ inline int fontStretch() const
+ { return intProperty(FontStretch); }
+
inline void setFontStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy = QFont::PreferDefault)
{ setProperty(FontStyleHint, hint); setProperty(FontStyleStrategy, strategy); }
inline void setFontStyleStrategy(QFont::StyleStrategy strategy)
diff --git a/src/gui/text/qtextformat_p.h b/src/gui/text/qtextformat_p.h
index d7d082c39b..61e3e1f253 100644
--- a/src/gui/text/qtextformat_p.h
+++ b/src/gui/text/qtextformat_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index ced71f5c60..4ee282c46e 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtexthtmlparser_p.h b/src/gui/text/qtexthtmlparser_p.h
index 9019942304..f1a90ee0a3 100644
--- a/src/gui/text/qtexthtmlparser_p.h
+++ b/src/gui/text/qtexthtmlparser_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextimagehandler.cpp b/src/gui/text/qtextimagehandler.cpp
index 138fb1a168..c7cf2df903 100644
--- a/src/gui/text/qtextimagehandler.cpp
+++ b/src/gui/text/qtextimagehandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,9 +52,6 @@
QT_BEGIN_NAMESPACE
-// set by the mime source factory in Qt3Compat
-QTextImageHandler::ExternalImageLoaderFunction QTextImageHandler::externalLoader = 0;
-
static QPixmap getPixmap(QTextDocument *doc, const QTextImageFormat &format)
{
QPixmap pm;
@@ -79,9 +76,6 @@ static QPixmap getPixmap(QTextDocument *doc, const QTextImageFormat &format)
context = browser->source().toString();
#endif
QImage img;
- if (QTextImageHandler::externalLoader)
- img = QTextImageHandler::externalLoader(name, context);
-
if (img.isNull()) { // try direct loading
name = format.name(); // remove qrc:/ prefix again
if (name.isEmpty() || !img.load(name))
@@ -157,9 +151,6 @@ static QImage getImage(QTextDocument *doc, const QTextImageFormat &format)
if (browser)
context = browser->source().toString();
#endif
- if (QTextImageHandler::externalLoader)
- image = QTextImageHandler::externalLoader(name, context);
-
if (image.isNull()) { // try direct loading
name = format.name(); // remove qrc:/ prefix again
if (name.isEmpty() || !image.load(name))
diff --git a/src/gui/text/qtextimagehandler_p.h b/src/gui/text/qtextimagehandler_p.h
index 8a14a46d5f..ce1d481eba 100644
--- a/src/gui/text/qtextimagehandler_p.h
+++ b/src/gui/text/qtextimagehandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -71,9 +71,6 @@ public:
virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
QImage image(QTextDocument *doc, const QTextImageFormat &imageFormat);
-
- typedef QImage (*ExternalImageLoaderFunction)(const QString &name, const QString &context);
- static ExternalImageLoaderFunction externalLoader; //this is needed by Qt3Support
};
QT_END_NAMESPACE
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index f2622a7b20..1e8cb9e478 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -836,7 +836,7 @@ int QTextLayout::lineCount() const
*/
QTextLine QTextLayout::lineAt(int i) const
{
- return QTextLine(i, d);
+ return i < lineCount() ? QTextLine(i, d) : QTextLine();
}
/*!
@@ -2264,11 +2264,12 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, int length) const
QFontEngine *mainFontEngine = font.d->engineForScript(si.analysis.script);
if (mainFontEngine->type() == QFontEngine::Multi) {
QFontEngineMulti *multiFontEngine = static_cast<QFontEngineMulti *>(mainFontEngine);
- int start = 0;
- int end;
- int which = glyphLayout.glyphs[0] >> 24;
- for (end = 0; end < glyphLayout.numGlyphs; ++end) {
- const int e = glyphLayout.glyphs[end] >> 24;
+ int end = rtl ? glyphLayout.numGlyphs : 0;
+ int start = rtl ? end : 0;
+ int which = glyphLayout.glyphs[rtl ? start - 1 : end] >> 24;
+ for (; (rtl && start > 0) || (!rtl && end < glyphLayout.numGlyphs);
+ rtl ? --start : ++end) {
+ const int e = glyphLayout.glyphs[rtl ? start - 1 : end] >> 24;
if (e == which)
continue;
@@ -2286,7 +2287,10 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, int length) const
subLayout.advances_y[i].toReal());
}
- start = end;
+ if (rtl)
+ end = start;
+ else
+ start = end;
which = e;
}
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h
index f1bfdc75db..e698625d9b 100644
--- a/src/gui/text/qtextlayout.h
+++ b/src/gui/text/qtextlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp
index 92e509d8d9..97ad9dc82b 100644
--- a/src/gui/text/qtextlist.cpp
+++ b/src/gui/text/qtextlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextlist.h b/src/gui/text/qtextlist.h
index 83d10834c7..5a470f4582 100644
--- a/src/gui/text/qtextlist.h
+++ b/src/gui/text/qtextlist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index d641266367..e49b0d3ad8 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h
index c2b46e4d12..f56a38b366 100644
--- a/src/gui/text/qtextobject.h
+++ b/src/gui/text/qtextobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextobject_p.h b/src/gui/text/qtextobject_p.h
index 798b9d1340..0ca2f87f0d 100644
--- a/src/gui/text/qtextobject_p.h
+++ b/src/gui/text/qtextobject_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 8776b926c5..0fe2efdd5f 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -376,9 +376,6 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
if (image.isNull()) {
QString context;
- if (QTextImageHandler::externalLoader)
- image = QTextImageHandler::externalLoader(name, context);
-
if (image.isNull()) { // try direct loading
name = imageFormat.name(); // remove qrc:/ prefix again
image.load(name);
diff --git a/src/gui/text/qtextodfwriter_p.h b/src/gui/text/qtextodfwriter_p.h
index 377c7fdeea..5108175291 100644
--- a/src/gui/text/qtextodfwriter_p.h
+++ b/src/gui/text/qtextodfwriter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index fe58583d04..2fe6284592 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtextoption.h b/src/gui/text/qtextoption.h
index 3c04c76933..8b7b006921 100644
--- a/src/gui/text/qtextoption.h
+++ b/src/gui/text/qtextoption.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 6935ffc6f4..64b28811e5 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtexttable.h b/src/gui/text/qtexttable.h
index b275a5783a..e5ea7609dd 100644
--- a/src/gui/text/qtexttable.h
+++ b/src/gui/text/qtexttable.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qtexttable_p.h b/src/gui/text/qtexttable_p.h
index cd16f50a62..237a1a883c 100644
--- a/src/gui/text/qtexttable_p.h
+++ b/src/gui/text/qtexttable_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 0ffcade591..b82e679d8b 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h
index b1df316cab..a569b584cf 100644
--- a/src/gui/text/qzipreader_p.h
+++ b/src/gui/text/qzipreader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h
index 1ba93b88d7..0860c004f9 100644
--- a/src/gui/text/qzipwriter_p.h
+++ b/src/gui/text/qzipwriter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 4fbf0a59f3..0bb233c82f 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qdesktopservices.h b/src/gui/util/qdesktopservices.h
index ba7702f0d7..af9aa7bec7 100644
--- a/src/gui/util/qdesktopservices.h
+++ b/src/gui/util/qdesktopservices.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qdesktopservices_mac.cpp b/src/gui/util/qdesktopservices_mac.cpp
index f4b5263f62..d822455886 100644
--- a/src/gui/util/qdesktopservices_mac.cpp
+++ b/src/gui/util/qdesktopservices_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qdesktopservices_qpa.cpp b/src/gui/util/qdesktopservices_qpa.cpp
index c60cec8422..9e517a0166 100644
--- a/src/gui/util/qdesktopservices_qpa.cpp
+++ b/src/gui/util/qdesktopservices_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp
index 8b120b4bf1..fe6d65994a 100644
--- a/src/gui/util/qdesktopservices_win.cpp
+++ b/src/gui/util/qdesktopservices_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp
index cf8dce3734..e64833a20c 100644
--- a/src/gui/util/qdesktopservices_x11.cpp
+++ b/src/gui/util/qdesktopservices_x11.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qhexstring_p.h b/src/gui/util/qhexstring_p.h
index 7cebce0650..7579e4ff78 100644
--- a/src/gui/util/qhexstring_p.h
+++ b/src/gui/util/qhexstring_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp
index 37997c0359..5b637e4383 100644
--- a/src/gui/util/qvalidator.cpp
+++ b/src/gui/util/qvalidator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/util/qvalidator.h b/src/gui/util/qvalidator.h
index 5ea7fef4fc..3e15b48c1c 100644
--- a/src/gui/util/qvalidator.h
+++ b/src/gui/util/qvalidator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -180,7 +180,7 @@ public:
virtual QValidator::State validate(QString& input, int& pos) const;
void setRegExp(const QRegExp& rx);
- const QRegExp& regExp() const { return r; } // ### make inline for 5.0
+ const QRegExp& regExp() const { return r; }
Q_SIGNALS:
void regExpChanged(const QRegExp& regExp);
diff --git a/src/modules/qt_v8.pri b/src/modules/qt_v8.pri
deleted file mode 100644
index 89d6c263e8..0000000000
--- a/src/modules/qt_v8.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-QT.v8.VERSION = 5.0.0
-QT.v8.MAJOR_VERSION = 5
-QT.v8.MINOR_VERSION = 0
-QT.v8.PATCH_VERSION = 0
-
-QT.v8.name = QtV8
-QT.v8.bins = $$QT_MODULE_BIN_BASE
-QT.v8.includes = $$QT_MODULE_INCLUDE_BASE/QtV8
-QT.v8.private_includes = $$QT_MODULE_INCLUDE_BASE/QtV8/$$QT.v8.VERSION
-QT.v8.sources = $$QT_MODULE_BASE/src/v8
-QT.v8.libs = $$QT_MODULE_LIB_BASE
-QT.v8.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.v8.imports = $$QT_MODULE_IMPORT_BASE
-QT.v8.depends =
-QT.v8.DEFINES =
-!contains(QT_CONFIG, static): QT.v8.DEFINES += V8_SHARED USING_V8_SHARED
diff --git a/src/network/access/access.pri b/src/network/access/access.pri
index 3d5558d334..0047084eb1 100644
--- a/src/network/access/access.pri
+++ b/src/network/access/access.pri
@@ -1,8 +1,8 @@
# Qt network access module
HEADERS += \
- access/qftp.h \
- access/qhttp.h \
+ access/qftp_p.h \
+ access/qhttpheader_p.h \
access/qhttpnetworkheader_p.h \
access/qhttpnetworkrequest_p.h \
access/qhttpnetworkreply_p.h \
@@ -39,7 +39,7 @@ HEADERS += \
SOURCES += \
access/qftp.cpp \
- access/qhttp.cpp \
+ access/qhttpheader.cpp \
access/qhttpnetworkheader.cpp \
access/qhttpnetworkrequest.cpp \
access/qhttpnetworkreply.cpp \
diff --git a/src/network/access/qabstractnetworkcache.cpp b/src/network/access/qabstractnetworkcache.cpp
index c15337a0e5..638e93be53 100644
--- a/src/network/access/qabstractnetworkcache.cpp
+++ b/src/network/access/qabstractnetworkcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qabstractnetworkcache.h b/src/network/access/qabstractnetworkcache.h
index 3fff74cb5b..5d03756957 100644
--- a/src/network/access/qabstractnetworkcache.h
+++ b/src/network/access/qabstractnetworkcache.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qabstractnetworkcache_p.h b/src/network/access/qabstractnetworkcache_p.h
index 9b0628f829..162422f8c0 100644
--- a/src/network/access/qabstractnetworkcache_p.h
+++ b/src/network/access/qabstractnetworkcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index eaed4dff5a..6fafff0f56 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,7 @@
//#define QFTPPI_DEBUG
//#define QFTPDTP_DEBUG
-#include "qftp.h"
+#include "private/qftp_p.h"
#include "qabstractsocket.h"
#ifndef QT_NO_FTP
@@ -825,6 +825,8 @@ void QFtpPI::connectToHost(const QString &host, quint16 port)
}
/*
+ \internal
+
Sends the sequence of commands \a cmds to the FTP server. When the commands
are all done the finished() signal is emitted. When an error occurs, the
error() signal is emitted.
@@ -970,6 +972,8 @@ void QFtpPI::readyRead()
}
/*
+ \internal
+
Process a reply from the FTP server.
Returns true if the reply was processed or false if the reply has to be
@@ -1150,6 +1154,8 @@ bool QFtpPI::processReply()
}
/*
+ \internal
+
Starts next pending command. Returns false if there are no pending commands,
otherwise it returns true.
*/
@@ -1306,6 +1312,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
*
*********************************************************************/
/*!
+ \internal
\class QFtp
\brief The QFtp class provides an implementation of the client side of FTP protocol.
@@ -1409,6 +1416,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
/*!
+ \internal
Constructs a QFtp object with the given \a parent.
*/
QFtp::QFtp(QObject *parent)
@@ -1435,6 +1443,7 @@ QFtp::QFtp(QObject *parent)
}
/*!
+ \internal
\enum QFtp::State
This enum defines the connection state:
@@ -1451,6 +1460,7 @@ QFtp::QFtp(QObject *parent)
\sa stateChanged() state()
*/
/*!
+ \internal
\enum QFtp::TransferMode
FTP works with two socket connections; one for commands and
@@ -1468,6 +1478,7 @@ QFtp::QFtp(QObject *parent)
data.
*/
/*!
+ \internal
\enum QFtp::TransferType
This enum identifies the data transfer type used with get and
@@ -1479,6 +1490,7 @@ QFtp::QFtp(QObject *parent)
characters will be converted to the local format.
*/
/*!
+ \internal
\enum QFtp::Error
This enum identifies the error that occurred.
@@ -1495,6 +1507,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\enum QFtp::Command
This enum is used as the return value for the currentCommand() function.
@@ -1524,6 +1537,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::stateChanged(int state)
This signal is emitted when the state of the connection changes.
@@ -1538,6 +1552,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::listInfo(const QUrlInfo &i);
This signal is emitted for each directory entry the list() command
@@ -1547,6 +1562,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::commandStarted(int id)
This signal is emitted when processing the command identified by
@@ -1556,6 +1572,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::commandFinished(int id, bool error)
This signal is emitted when processing the command identified by
@@ -1566,6 +1583,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::done(bool error)
This signal is emitted when the last pending command has finished;
@@ -1577,6 +1595,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::readyRead()
This signal is emitted in response to a get() command when there
@@ -1597,6 +1616,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::dataTransferProgress(qint64 done, qint64 total)
This signal is emitted in response to a get() or put() request to
@@ -1617,6 +1637,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
\fn void QFtp::rawCommandReply(int replyCode, const QString &detail);
This signal is emitted in response to the rawCommand() function.
@@ -1627,6 +1648,7 @@ QFtp::QFtp(QObject *parent)
*/
/*!
+ \internal
Connects to the FTP server \a host using port \a port.
The stateChanged() signal is emitted when the state of the
@@ -1655,6 +1677,7 @@ int QFtp::connectToHost(const QString &host, quint16 port)
}
/*!
+ \internal
Logs in to the FTP server with the username \a user and the
password \a password.
@@ -1681,6 +1704,7 @@ int QFtp::login(const QString &user, const QString &password)
}
/*!
+ \internal
Closes the connection to the FTP server.
The stateChanged() signal is emitted when the state of the
@@ -1704,6 +1728,7 @@ int QFtp::close()
}
/*!
+ \internal
Sets the current FTP transfer mode to \a mode. The default is QFtp::Passive.
\sa QFtp::TransferMode
@@ -1717,6 +1742,7 @@ int QFtp::setTransferMode(TransferMode mode)
}
/*!
+ \internal
Enables use of the FTP proxy on host \a host and port \a
port. Calling this function with \a host empty disables proxying.
@@ -1731,6 +1757,7 @@ int QFtp::setProxy(const QString &host, quint16 port)
}
/*!
+ \internal
Lists the contents of directory \a dir on the FTP server. If \a
dir is empty, it lists the contents of the current directory.
@@ -1760,6 +1787,7 @@ int QFtp::list(const QString &dir)
}
/*!
+ \internal
Changes the working directory of the server to \a dir.
The function does not block and returns immediately. The command
@@ -1779,6 +1807,7 @@ int QFtp::cd(const QString &dir)
}
/*!
+ \internal
Downloads the file \a file from the server.
If \a dev is 0, then the readyRead() signal is emitted when there
@@ -1832,6 +1861,7 @@ int QFtp::get(const QString &file, QIODevice *dev, TransferType type)
}
/*!
+ \internal
\overload
Writes a copy of the given \a data to the file called \a file on
@@ -1869,6 +1899,7 @@ int QFtp::put(const QByteArray &data, const QString &file, TransferType type)
}
/*!
+ \internal
Reads the data from the IO device \a dev, and writes it to the
file called \a file on the server. The data is read in chunks from
the IO device, so this overload allows you to transmit large
@@ -1897,6 +1928,7 @@ int QFtp::put(QIODevice *dev, const QString &file, TransferType type)
}
/*!
+ \internal
Deletes the file called \a file from the server.
The function does not block and returns immediately. The command
@@ -1916,6 +1948,7 @@ int QFtp::remove(const QString &file)
}
/*!
+ \internal
Creates a directory called \a dir on the server.
The function does not block and returns immediately. The command
@@ -1935,6 +1968,7 @@ int QFtp::mkdir(const QString &dir)
}
/*!
+ \internal
Removes the directory called \a dir from the server.
The function does not block and returns immediately. The command
@@ -1954,6 +1988,7 @@ int QFtp::rmdir(const QString &dir)
}
/*!
+ \internal
Renames the file called \a oldname to \a newname on the server.
The function does not block and returns immediately. The command
@@ -1976,6 +2011,7 @@ int QFtp::rename(const QString &oldname, const QString &newname)
}
/*!
+ \internal
Sends the raw FTP command \a command to the FTP server. This is
useful for low-level FTP access. If the operation you wish to
perform has an equivalent QFtp function, we recommend using the
@@ -2000,6 +2036,7 @@ int QFtp::rawCommand(const QString &command)
}
/*!
+ \internal
Returns the number of bytes that can be read from the data socket
at the moment.
@@ -2011,6 +2048,7 @@ qint64 QFtp::bytesAvailable() const
}
/*!
+ \internal
Reads \a maxlen bytes from the data socket into \a data and
returns the number of bytes read. Returns -1 if an error occurred.
@@ -2022,6 +2060,7 @@ qint64 QFtp::read(char *data, qint64 maxlen)
}
/*!
+ \internal
Reads all the bytes available from the data socket and returns
them.
@@ -2033,6 +2072,7 @@ QByteArray QFtp::readAll()
}
/*!
+ \internal
Aborts the current command and deletes all scheduled commands.
If there is an unfinished command (i.e. a command for which the
@@ -2071,6 +2111,7 @@ void QFtp::abort()
}
/*!
+ \internal
Returns the identifier of the FTP command that is being executed
or 0 if there is no command being executed.
@@ -2084,6 +2125,7 @@ int QFtp::currentId() const
}
/*!
+ \internal
Returns the command type of the FTP command being executed or \c
None if there is no command being executed.
@@ -2097,6 +2139,7 @@ QFtp::Command QFtp::currentCommand() const
}
/*!
+ \internal
Returns the QIODevice pointer that is used by the FTP command to read data
from or store data to. If there is no current FTP command being executed or
if the command does not use an IO device, this function returns 0.
@@ -2117,6 +2160,7 @@ QIODevice* QFtp::currentDevice() const
}
/*!
+ \internal
Returns true if there are any commands scheduled that have not yet
been executed; otherwise returns false.
@@ -2131,6 +2175,7 @@ bool QFtp::hasPendingCommands() const
}
/*!
+ \internal
Deletes all pending commands from the list of scheduled commands.
This does not affect the command that is being executed. If you
want to stop this as well, use abort().
@@ -2145,6 +2190,7 @@ void QFtp::clearPendingCommands()
}
/*!
+ \internal
Returns the current state of the object. When the state changes,
the stateChanged() signal is emitted.
@@ -2156,6 +2202,7 @@ QFtp::State QFtp::state() const
}
/*!
+ \internal
Returns the last error that occurred. This is useful to find out
what went wrong when receiving a commandFinished() or a done()
signal with the \c error argument set to \c true.
@@ -2168,6 +2215,7 @@ QFtp::Error QFtp::error() const
}
/*!
+ \internal
Returns a human-readable description of the last error that
occurred. This is useful for presenting a error message to the
user when receiving a commandFinished() or a done() signal with
@@ -2385,6 +2433,7 @@ void QFtpPrivate::_q_piFtpReply(int code, const QString &text)
}
/*!
+ \internal
Destructor.
*/
QFtp::~QFtp()
@@ -2397,6 +2446,6 @@ QT_END_NAMESPACE
#include "qftp.moc"
-#include "moc_qftp.cpp"
+#include "moc_qftp_p.cpp"
#endif // QT_NO_FTP
diff --git a/src/network/access/qftp.h b/src/network/access/qftp_p.h
index 671b9ba7c7..0dc6a2006f 100644
--- a/src/network/access/qftp.h
+++ b/src/network/access/qftp_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,6 +39,17 @@
**
****************************************************************************/
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the Network Access API. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
#ifndef QFTP_H
#define QFTP_H
@@ -56,7 +67,7 @@ QT_MODULE(Network)
class QFtpPrivate;
-class Q_NETWORK_EXPORT QFtp : public QObject
+class Q_AUTOTEST_EXPORT QFtp : public QObject
{
Q_OBJECT
diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp
deleted file mode 100644
index f2b24221fe..0000000000
--- a/src/network/access/qhttp.cpp
+++ /dev/null
@@ -1,3150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtNetwork module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//#define QHTTP_DEBUG
-
-#include <qplatformdefs.h>
-#include "qhttp.h"
-
-#ifndef QT_NO_HTTP
-# include "private/qobject_p.h"
-# include "qtcpsocket.h"
-# include "qsslsocket.h"
-# include "qtextstream.h"
-# include "qmap.h"
-# include "qlist.h"
-# include "qstring.h"
-# include "qstringlist.h"
-# include "qbuffer.h"
-# include "private/qringbuffer_p.h"
-# include "qcoreevent.h"
-# include "qurl.h"
-# include "qnetworkproxy.h"
-# include "qauthenticator.h"
-# include "qauthenticator_p.h"
-# include "qdebug.h"
-# include "qtimer.h"
-#endif
-
-#ifndef QT_NO_HTTP
-
-QT_BEGIN_NAMESPACE
-
-class QHttpNormalRequest;
-class QHttpRequest
-{
-public:
- QHttpRequest() : finished(false)
- { id = idCounter.fetchAndAddRelaxed(1); }
- virtual ~QHttpRequest()
- { }
-
- virtual void start(QHttp *) = 0;
- virtual bool hasRequestHeader();
- virtual QHttpRequestHeader requestHeader();
-
- virtual QIODevice *sourceDevice() = 0;
- virtual QIODevice *destinationDevice() = 0;
-
- int id;
- bool finished;
-
-private:
- static QBasicAtomicInt idCounter;
-};
-
-class QHttpPrivate : public QObjectPrivate
-{
-public:
- Q_DECLARE_PUBLIC(QHttp)
-
- inline QHttpPrivate()
- : socket(0), reconnectAttempts(2),
- deleteSocket(0), state(QHttp::Unconnected),
- error(QHttp::NoError), port(0), mode(QHttp::ConnectionModeHttp),
- toDevice(0), postDevice(0), bytesDone(0), chunkedSize(-1),
- repost(false), pendingPost(false)
- {
- }
-
- inline ~QHttpPrivate()
- {
- while (!pending.isEmpty())
- delete pending.takeFirst();
-
- if (deleteSocket)
- delete socket;
- }
-
- // private slots
- void _q_startNextRequest();
- void _q_slotReadyRead();
- void _q_slotConnected();
- void _q_slotError(QAbstractSocket::SocketError);
- void _q_slotClosed();
- void _q_slotBytesWritten(qint64 numBytes);
-#ifndef QT_NO_OPENSSL
- void _q_slotEncryptedBytesWritten(qint64 numBytes);
-#endif
- void _q_slotDoFinished();
- void _q_slotSendRequest();
- void _q_continuePost();
-
- int addRequest(QHttpNormalRequest *);
- int addRequest(QHttpRequest *);
- void finishedWithSuccess();
- void finishedWithError(const QString &detail, int errorCode);
-
- void init();
- void setState(int);
- void closeConn();
- void setSock(QTcpSocket *sock);
-
- void postMoreData();
-
- QTcpSocket *socket;
- int reconnectAttempts;
- bool deleteSocket;
- QList<QHttpRequest *> pending;
-
- QHttp::State state;
- QHttp::Error error;
- QString errorString;
-
- QString hostName;
- quint16 port;
- QHttp::ConnectionMode mode;
-
- QByteArray buffer;
- QIODevice *toDevice;
- QIODevice *postDevice;
-
- qint64 bytesDone;
- qint64 bytesTotal;
- qint64 chunkedSize;
-
- QHttpRequestHeader header;
-
- bool readHeader;
- QString headerStr;
- QHttpResponseHeader response;
-
- QRingBuffer rba;
-
-#ifndef QT_NO_NETWORKPROXY
- QNetworkProxy proxy;
- QAuthenticator proxyAuthenticator;
-#endif
- QAuthenticator authenticator;
- bool repost;
- bool hasFinishedWithError;
- bool pendingPost;
- QTimer post100ContinueTimer;
-};
-
-QBasicAtomicInt QHttpRequest::idCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
-
-bool QHttpRequest::hasRequestHeader()
-{
- return false;
-}
-
-QHttpRequestHeader QHttpRequest::requestHeader()
-{
- return QHttpRequestHeader();
-}
-
-/****************************************************
- *
- * QHttpNormalRequest
- *
- ****************************************************/
-
-class QHttpNormalRequest : public QHttpRequest
-{
-public:
- QHttpNormalRequest(const QHttpRequestHeader &h, QIODevice *d, QIODevice *t) :
- header(h), to(t)
- {
- is_ba = false;
- data.dev = d;
- }
-
- QHttpNormalRequest(const QHttpRequestHeader &h, QByteArray *d, QIODevice *t) :
- header(h), to(t)
- {
- is_ba = true;
- data.ba = d;
- }
-
- ~QHttpNormalRequest()
- {
- if (is_ba)
- delete data.ba;
- }
-
- void start(QHttp *);
- bool hasRequestHeader();
- QHttpRequestHeader requestHeader();
- inline void setRequestHeader(const QHttpRequestHeader &h) { header = h; }
-
- QIODevice *sourceDevice();
- QIODevice *destinationDevice();
-
-protected:
- QHttpRequestHeader header;
-
-private:
- union {
- QByteArray *ba;
- QIODevice *dev;
- } data;
- bool is_ba;
- QIODevice *to;
-};
-
-void QHttpNormalRequest::start(QHttp *http)
-{
- if (!http->d_func()->socket)
- http->d_func()->setSock(0);
- http->d_func()->header = header;
-
- if (is_ba) {
- http->d_func()->buffer = *data.ba;
- if (http->d_func()->buffer.size() >= 0)
- http->d_func()->header.setContentLength(http->d_func()->buffer.size());
-
- http->d_func()->postDevice = 0;
- } else {
- http->d_func()->buffer = QByteArray();
-
- if (data.dev && (data.dev->isOpen() || data.dev->open(QIODevice::ReadOnly))) {
- http->d_func()->postDevice = data.dev;
- if (http->d_func()->postDevice->size() >= 0)
- http->d_func()->header.setContentLength(http->d_func()->postDevice->size());
- } else {
- http->d_func()->postDevice = 0;
- }
- }
-
- if (to && (to->isOpen() || to->open(QIODevice::WriteOnly)))
- http->d_func()->toDevice = to;
- else
- http->d_func()->toDevice = 0;
-
- http->d_func()->reconnectAttempts = 2;
- http->d_func()->_q_slotSendRequest();
-}
-
-bool QHttpNormalRequest::hasRequestHeader()
-{
- return true;
-}
-
-QHttpRequestHeader QHttpNormalRequest::requestHeader()
-{
- return header;
-}
-
-QIODevice *QHttpNormalRequest::sourceDevice()
-{
- if (is_ba)
- return 0;
- return data.dev;
-}
-
-QIODevice *QHttpNormalRequest::destinationDevice()
-{
- return to;
-}
-
-/****************************************************
- *
- * QHttpPGHRequest
- * (like a QHttpNormalRequest, but for the convenience
- * functions put(), get() and head() -- i.e. set the
- * host header field correctly before sending the
- * request)
- *
- ****************************************************/
-
-class QHttpPGHRequest : public QHttpNormalRequest
-{
-public:
- QHttpPGHRequest(const QHttpRequestHeader &h, QIODevice *d, QIODevice *t) :
- QHttpNormalRequest(h, d, t)
- { }
-
- QHttpPGHRequest(const QHttpRequestHeader &h, QByteArray *d, QIODevice *t) :
- QHttpNormalRequest(h, d, t)
- { }
-
- ~QHttpPGHRequest()
- { }
-
- void start(QHttp *);
-};
-
-void QHttpPGHRequest::start(QHttp *http)
-{
- if (http->d_func()->port && http->d_func()->port != 80)
- header.setValue(QLatin1String("Host"), http->d_func()->hostName + QLatin1Char(':') + QString::number(http->d_func()->port));
- else
- header.setValue(QLatin1String("Host"), http->d_func()->hostName);
- QHttpNormalRequest::start(http);
-}
-
-/****************************************************
- *
- * QHttpSetHostRequest
- *
- ****************************************************/
-
-class QHttpSetHostRequest : public QHttpRequest
-{
-public:
- QHttpSetHostRequest(const QString &h, quint16 p, QHttp::ConnectionMode m)
- : hostName(h), port(p), mode(m)
- { }
-
- void start(QHttp *);
-
- QIODevice *sourceDevice()
- { return 0; }
- QIODevice *destinationDevice()
- { return 0; }
-
-private:
- QString hostName;
- quint16 port;
- QHttp::ConnectionMode mode;
-};
-
-void QHttpSetHostRequest::start(QHttp *http)
-{
- http->d_func()->hostName = hostName;
- http->d_func()->port = port;
- http->d_func()->mode = mode;
-
-#ifdef QT_NO_OPENSSL
- if (mode == QHttp::ConnectionModeHttps) {
- // SSL requested but no SSL support compiled in
- http->d_func()->finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "HTTPS connection requested but SSL support not compiled in")),
- QHttp::UnknownError);
- return;
- }
-#endif
-
- http->d_func()->finishedWithSuccess();
-}
-
-/****************************************************
- *
- * QHttpSetUserRequest
- *
- ****************************************************/
-
-class QHttpSetUserRequest : public QHttpRequest
-{
-public:
- QHttpSetUserRequest(const QString &userName, const QString &password) :
- user(userName), pass(password)
- { }
-
- void start(QHttp *);
-
- QIODevice *sourceDevice()
- { return 0; }
- QIODevice *destinationDevice()
- { return 0; }
-
-private:
- QString user;
- QString pass;
-};
-
-void QHttpSetUserRequest::start(QHttp *http)
-{
- http->d_func()->authenticator.setUser(user);
- http->d_func()->authenticator.setPassword(pass);
- http->d_func()->finishedWithSuccess();
-}
-
-#ifndef QT_NO_NETWORKPROXY
-
-/****************************************************
- *
- * QHttpSetProxyRequest
- *
- ****************************************************/
-
-class QHttpSetProxyRequest : public QHttpRequest
-{
-public:
- inline QHttpSetProxyRequest(const QNetworkProxy &proxy)
- {
- this->proxy = proxy;
- }
-
- inline void start(QHttp *http)
- {
- http->d_func()->proxy = proxy;
- QString user = proxy.user();
- if (!user.isEmpty())
- http->d_func()->proxyAuthenticator.setUser(user);
- QString password = proxy.password();
- if (!password.isEmpty())
- http->d_func()->proxyAuthenticator.setPassword(password);
- http->d_func()->finishedWithSuccess();
- }
-
- inline QIODevice *sourceDevice()
- { return 0; }
- inline QIODevice *destinationDevice()
- { return 0; }
-private:
- QNetworkProxy proxy;
-};
-
-#endif // QT_NO_NETWORKPROXY
-
-/****************************************************
- *
- * QHttpSetSocketRequest
- *
- ****************************************************/
-
-class QHttpSetSocketRequest : public QHttpRequest
-{
-public:
- QHttpSetSocketRequest(QTcpSocket *s) : socket(s)
- { }
-
- void start(QHttp *);
-
- QIODevice *sourceDevice()
- { return 0; }
- QIODevice *destinationDevice()
- { return 0; }
-
-private:
- QTcpSocket *socket;
-};
-
-void QHttpSetSocketRequest::start(QHttp *http)
-{
- http->d_func()->setSock(socket);
- http->d_func()->finishedWithSuccess();
-}
-
-/****************************************************
- *
- * QHttpCloseRequest
- *
- ****************************************************/
-
-class QHttpCloseRequest : public QHttpRequest
-{
-public:
- QHttpCloseRequest()
- { }
- void start(QHttp *);
-
- QIODevice *sourceDevice()
- { return 0; }
- QIODevice *destinationDevice()
- { return 0; }
-};
-
-void QHttpCloseRequest::start(QHttp *http)
-{
- http->d_func()->closeConn();
-}
-
-class QHttpHeaderPrivate
-{
- Q_DECLARE_PUBLIC(QHttpHeader)
-public:
- inline virtual ~QHttpHeaderPrivate() {}
-
- QList<QPair<QString, QString> > values;
- bool valid;
- QHttpHeader *q_ptr;
-};
-
-/****************************************************
- *
- * QHttpHeader
- *
- ****************************************************/
-
-/*!
- \class QHttpHeader
- \obsolete
- \brief The QHttpHeader class contains header information for HTTP.
-
- \ingroup network
- \inmodule QtNetwork
-
- In most cases you should use the more specialized derivatives of
- this class, QHttpResponseHeader and QHttpRequestHeader, rather
- than directly using QHttpHeader.
-
- QHttpHeader provides the HTTP header fields. A HTTP header field
- consists of a name followed by a colon, a single space, and the
- field value. (See RFC 1945.) Field names are case-insensitive. A
- typical header field looks like this:
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 0
-
- In the API the header field name is called the "key" and the
- content is called the "value". You can get and set a header
- field's value by using its key with value() and setValue(), e.g.
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 1
-
- Some fields are so common that getters and setters are provided
- for them as a convenient alternative to using \l value() and
- \l setValue(), e.g. contentLength() and contentType(),
- setContentLength() and setContentType().
-
- Each header key has a \e single value associated with it. If you
- set the value for a key which already exists the previous value
- will be discarded.
-
- \sa QHttpRequestHeader QHttpResponseHeader
-*/
-
-/*!
- \fn int QHttpHeader::majorVersion() const
-
- Returns the major protocol-version of the HTTP header.
-*/
-
-/*!
- \fn int QHttpHeader::minorVersion() const
-
- Returns the minor protocol-version of the HTTP header.
-*/
-
-/*!
- Constructs an empty HTTP header.
-*/
-QHttpHeader::QHttpHeader()
- : d_ptr(new QHttpHeaderPrivate)
-{
- Q_D(QHttpHeader);
- d->q_ptr = this;
- d->valid = true;
-}
-
-/*!
- Constructs a copy of \a header.
-*/
-QHttpHeader::QHttpHeader(const QHttpHeader &header)
- : d_ptr(new QHttpHeaderPrivate)
-{
- Q_D(QHttpHeader);
- d->q_ptr = this;
- d->valid = header.d_func()->valid;
- d->values = header.d_func()->values;
-}
-
-/*!
- Constructs a HTTP header for \a str.
-
- This constructor parses the string \a str for header fields and
- adds this information. The \a str should consist of one or more
- "\r\n" delimited lines; each of these lines should have the format
- key, colon, space, value.
-*/
-QHttpHeader::QHttpHeader(const QString &str)
- : d_ptr(new QHttpHeaderPrivate)
-{
- Q_D(QHttpHeader);
- d->q_ptr = this;
- d->valid = true;
- parse(str);
-}
-
-/*! \internal
- */
-QHttpHeader::QHttpHeader(QHttpHeaderPrivate &dd, const QString &str)
- : d_ptr(&dd)
-{
- Q_D(QHttpHeader);
- d->q_ptr = this;
- d->valid = true;
- if (!str.isEmpty())
- parse(str);
-}
-
-/*! \internal
- */
-QHttpHeader::QHttpHeader(QHttpHeaderPrivate &dd, const QHttpHeader &header)
- : d_ptr(&dd)
-{
- Q_D(QHttpHeader);
- d->q_ptr = this;
- d->valid = header.d_func()->valid;
- d->values = header.d_func()->values;
-}
-/*!
- Destructor.
-*/
-QHttpHeader::~QHttpHeader()
-{
-}
-
-/*!
- Assigns \a h and returns a reference to this http header.
-*/
-QHttpHeader &QHttpHeader::operator=(const QHttpHeader &h)
-{
- Q_D(QHttpHeader);
- d->values = h.d_func()->values;
- d->valid = h.d_func()->valid;
- return *this;
-}
-
-/*!
- Returns true if the HTTP header is valid; otherwise returns false.
-
- A QHttpHeader is invalid if it was created by parsing a malformed string.
-*/
-bool QHttpHeader::isValid() const
-{
- Q_D(const QHttpHeader);
- return d->valid;
-}
-
-/*! \internal
- Parses the HTTP header string \a str for header fields and adds
- the keys/values it finds. If the string is not parsed successfully
- the QHttpHeader becomes \link isValid() invalid\endlink.
-
- Returns true if \a str was successfully parsed; otherwise returns false.
-
- \sa toString()
-*/
-bool QHttpHeader::parse(const QString &str)
-{
- Q_D(QHttpHeader);
- QStringList lst;
- int pos = str.indexOf(QLatin1Char('\n'));
- if (pos > 0 && str.at(pos - 1) == QLatin1Char('\r'))
- lst = str.trimmed().split(QLatin1String("\r\n"));
- else
- lst = str.trimmed().split(QLatin1String("\n"));
- lst.removeAll(QString()); // No empties
-
- if (lst.isEmpty())
- return true;
-
- QStringList lines;
- QStringList::Iterator it = lst.begin();
- for (; it != lst.end(); ++it) {
- if (!(*it).isEmpty()) {
- if ((*it)[0].isSpace()) {
- if (!lines.isEmpty()) {
- lines.last() += QLatin1Char(' ');
- lines.last() += (*it).trimmed();
- }
- } else {
- lines.append((*it));
- }
- }
- }
-
- int number = 0;
- it = lines.begin();
- for (; it != lines.end(); ++it) {
- if (!parseLine(*it, number++)) {
- d->valid = false;
- return false;
- }
- }
- return true;
-}
-
-/*! \internal
-*/
-void QHttpHeader::setValid(bool v)
-{
- Q_D(QHttpHeader);
- d->valid = v;
-}
-
-/*!
- Returns the first value for the entry with the given \a key. If no entry
- has this \a key, an empty string is returned.
-
- \sa setValue() removeValue() hasKey() keys()
-*/
-QString QHttpHeader::value(const QString &key) const
-{
- Q_D(const QHttpHeader);
- QString lowercaseKey = key.toLower();
- QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
- while (it != d->values.constEnd()) {
- if ((*it).first.toLower() == lowercaseKey)
- return (*it).second;
- ++it;
- }
- return QString();
-}
-
-/*!
- Returns all the entries with the given \a key. If no entry
- has this \a key, an empty string list is returned.
-*/
-QStringList QHttpHeader::allValues(const QString &key) const
-{
- Q_D(const QHttpHeader);
- QString lowercaseKey = key.toLower();
- QStringList valueList;
- QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
- while (it != d->values.constEnd()) {
- if ((*it).first.toLower() == lowercaseKey)
- valueList.append((*it).second);
- ++it;
- }
- return valueList;
-}
-
-/*!
- Returns a list of the keys in the HTTP header.
-
- \sa hasKey()
-*/
-QStringList QHttpHeader::keys() const
-{
- Q_D(const QHttpHeader);
- QStringList keyList;
- QSet<QString> seenKeys;
- QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
- while (it != d->values.constEnd()) {
- const QString &key = (*it).first;
- QString lowercaseKey = key.toLower();
- if (!seenKeys.contains(lowercaseKey)) {
- keyList.append(key);
- seenKeys.insert(lowercaseKey);
- }
- ++it;
- }
- return keyList;
-}
-
-/*!
- Returns true if the HTTP header has an entry with the given \a
- key; otherwise returns false.
-
- \sa value() setValue() keys()
-*/
-bool QHttpHeader::hasKey(const QString &key) const
-{
- Q_D(const QHttpHeader);
- QString lowercaseKey = key.toLower();
- QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
- while (it != d->values.constEnd()) {
- if ((*it).first.toLower() == lowercaseKey)
- return true;
- ++it;
- }
- return false;
-}
-
-/*!
- Sets the value of the entry with the \a key to \a value.
-
- If no entry with \a key exists, a new entry with the given \a key
- and \a value is created. If an entry with the \a key already
- exists, the first value is discarded and replaced with the given
- \a value.
-
- \sa value() hasKey() removeValue()
-*/
-void QHttpHeader::setValue(const QString &key, const QString &value)
-{
- Q_D(QHttpHeader);
- QString lowercaseKey = key.toLower();
- QList<QPair<QString, QString> >::Iterator it = d->values.begin();
- while (it != d->values.end()) {
- if ((*it).first.toLower() == lowercaseKey) {
- (*it).second = value;
- return;
- }
- ++it;
- }
- // not found so add
- addValue(key, value);
-}
-
-/*!
- Sets the header entries to be the list of key value pairs in \a values.
-*/
-void QHttpHeader::setValues(const QList<QPair<QString, QString> > &values)
-{
- Q_D(QHttpHeader);
- d->values = values;
-}
-
-/*!
- Adds a new entry with the \a key and \a value.
-*/
-void QHttpHeader::addValue(const QString &key, const QString &value)
-{
- Q_D(QHttpHeader);
- d->values.append(qMakePair(key, value));
-}
-
-/*!
- Returns all the entries in the header.
-*/
-QList<QPair<QString, QString> > QHttpHeader::values() const
-{
- Q_D(const QHttpHeader);
- return d->values;
-}
-
-/*!
- Removes the entry with the key \a key from the HTTP header.
-
- \sa value() setValue()
-*/
-void QHttpHeader::removeValue(const QString &key)
-{
- Q_D(QHttpHeader);
- QString lowercaseKey = key.toLower();
- QList<QPair<QString, QString> >::Iterator it = d->values.begin();
- while (it != d->values.end()) {
- if ((*it).first.toLower() == lowercaseKey) {
- d->values.erase(it);
- return;
- }
- ++it;
- }
-}
-
-/*!
- Removes all the entries with the key \a key from the HTTP header.
-*/
-void QHttpHeader::removeAllValues(const QString &key)
-{
- Q_D(QHttpHeader);
- QString lowercaseKey = key.toLower();
- QList<QPair<QString, QString> >::Iterator it = d->values.begin();
- while (it != d->values.end()) {
- if ((*it).first.toLower() == lowercaseKey) {
- it = d->values.erase(it);
- continue;
- }
- ++it;
- }
-}
-
-/*! \internal
- Parses the single HTTP header line \a line which has the format
- key, colon, space, value, and adds key/value to the headers. The
- linenumber is \a number. Returns true if the line was successfully
- parsed and the key/value added; otherwise returns false.
-
- \sa parse()
-*/
-bool QHttpHeader::parseLine(const QString &line, int)
-{
- int i = line.indexOf(QLatin1Char(':'));
- if (i == -1)
- return false;
-
- addValue(line.left(i).trimmed(), line.mid(i + 1).trimmed());
-
- return true;
-}
-
-/*!
- Returns a string representation of the HTTP header.
-
- The string is suitable for use by the constructor that takes a
- QString. It consists of lines with the format: key, colon, space,
- value, "\r\n".
-*/
-QString QHttpHeader::toString() const
-{
- Q_D(const QHttpHeader);
- if (!isValid())
- return QLatin1String("");
-
- QString ret = QLatin1String("");
-
- QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
- while (it != d->values.constEnd()) {
- ret += (*it).first + QLatin1String(": ") + (*it).second + QLatin1String("\r\n");
- ++it;
- }
- return ret;
-}
-
-/*!
- Returns true if the header has an entry for the special HTTP
- header field \c content-length; otherwise returns false.
-
- \sa contentLength() setContentLength()
-*/
-bool QHttpHeader::hasContentLength() const
-{
- return hasKey(QLatin1String("content-length"));
-}
-
-/*!
- Returns the value of the special HTTP header field \c
- content-length.
-
- \sa setContentLength() hasContentLength()
-*/
-uint QHttpHeader::contentLength() const
-{
- return value(QLatin1String("content-length")).toUInt();
-}
-
-/*!
- Sets the value of the special HTTP header field \c content-length
- to \a len.
-
- \sa contentLength() hasContentLength()
-*/
-void QHttpHeader::setContentLength(int len)
-{
- setValue(QLatin1String("content-length"), QString::number(len));
-}
-
-/*!
- Returns true if the header has an entry for the special HTTP
- header field \c content-type; otherwise returns false.
-
- \sa contentType() setContentType()
-*/
-bool QHttpHeader::hasContentType() const
-{
- return hasKey(QLatin1String("content-type"));
-}
-
-/*!
- Returns the value of the special HTTP header field \c content-type.
-
- \sa setContentType() hasContentType()
-*/
-QString QHttpHeader::contentType() const
-{
- QString type = value(QLatin1String("content-type"));
- if (type.isEmpty())
- return QString();
-
- int pos = type.indexOf(QLatin1Char(';'));
- if (pos == -1)
- return type;
-
- return type.left(pos).trimmed();
-}
-
-/*!
- Sets the value of the special HTTP header field \c content-type to
- \a type.
-
- \sa contentType() hasContentType()
-*/
-void QHttpHeader::setContentType(const QString &type)
-{
- setValue(QLatin1String("content-type"), type);
-}
-
-class QHttpResponseHeaderPrivate : public QHttpHeaderPrivate
-{
- Q_DECLARE_PUBLIC(QHttpResponseHeader)
-public:
- int statCode;
- QString reasonPhr;
- int majVer;
- int minVer;
-};
-
-/****************************************************
- *
- * QHttpResponseHeader
- *
- ****************************************************/
-
-/*!
- \class QHttpResponseHeader
- \obsolete
- \brief The QHttpResponseHeader class contains response header information for HTTP.
-
- \ingroup network
- \inmodule QtNetwork
-
- This class is used by the QHttp class to report the header
- information that the client received from the server.
-
- HTTP responses have a status code that indicates the status of the
- response. This code is a 3-digit integer result code (for details
- see to RFC 1945). In addition to the status code, you can also
- specify a human-readable text that describes the reason for the
- code ("reason phrase"). This class allows you to get the status
- code and the reason phrase.
-
- \sa QHttpRequestHeader, QHttp, {HTTP Example}
-*/
-
-/*!
- Constructs an empty HTTP response header.
-*/
-QHttpResponseHeader::QHttpResponseHeader()
- : QHttpHeader(*new QHttpResponseHeaderPrivate)
-{
- setValid(false);
-}
-
-/*!
- Constructs a copy of \a header.
-*/
-QHttpResponseHeader::QHttpResponseHeader(const QHttpResponseHeader &header)
- : QHttpHeader(*new QHttpResponseHeaderPrivate, header)
-{
- Q_D(QHttpResponseHeader);
- d->statCode = header.d_func()->statCode;
- d->reasonPhr = header.d_func()->reasonPhr;
- d->majVer = header.d_func()->majVer;
- d->minVer = header.d_func()->minVer;
-}
-
-/*!
- Copies the contents of \a header into this QHttpResponseHeader.
-*/
-QHttpResponseHeader &QHttpResponseHeader::operator=(const QHttpResponseHeader &header)
-{
- Q_D(QHttpResponseHeader);
- QHttpHeader::operator=(header);
- d->statCode = header.d_func()->statCode;
- d->reasonPhr = header.d_func()->reasonPhr;
- d->majVer = header.d_func()->majVer;
- d->minVer = header.d_func()->minVer;
- return *this;
-}
-
-/*!
- Constructs a HTTP response header from the string \a str. The
- string is parsed and the information is set. The \a str should
- consist of one or more "\r\n" delimited lines; the first line should be the
- status-line (format: HTTP-version, space, status-code, space,
- reason-phrase); each of remaining lines should have the format key, colon,
- space, value.
-*/
-QHttpResponseHeader::QHttpResponseHeader(const QString &str)
- : QHttpHeader(*new QHttpResponseHeaderPrivate)
-{
- parse(str);
-}
-
-/*!
- \since 4.1
-
- Constructs a QHttpResponseHeader, setting the status code to \a code, the
- reason phrase to \a text and the protocol-version to \a majorVer and \a
- minorVer.
-
- \sa statusCode() reasonPhrase() majorVersion() minorVersion()
-*/
-QHttpResponseHeader::QHttpResponseHeader(int code, const QString &text, int majorVer, int minorVer)
- : QHttpHeader(*new QHttpResponseHeaderPrivate)
-{
- setStatusLine(code, text, majorVer, minorVer);
-}
-
-/*!
- \since 4.1
-
- Sets the status code to \a code, the reason phrase to \a text and
- the protocol-version to \a majorVer and \a minorVer.
-
- \sa statusCode() reasonPhrase() majorVersion() minorVersion()
-*/
-void QHttpResponseHeader::setStatusLine(int code, const QString &text, int majorVer, int minorVer)
-{
- Q_D(QHttpResponseHeader);
- setValid(true);
- d->statCode = code;
- d->reasonPhr = text;
- d->majVer = majorVer;
- d->minVer = minorVer;
-}
-
-/*!
- Returns the status code of the HTTP response header.
-
- \sa reasonPhrase() majorVersion() minorVersion()
-*/
-int QHttpResponseHeader::statusCode() const
-{
- Q_D(const QHttpResponseHeader);
- return d->statCode;
-}
-
-/*!
- Returns the reason phrase of the HTTP response header.
-
- \sa statusCode() majorVersion() minorVersion()
-*/
-QString QHttpResponseHeader::reasonPhrase() const
-{
- Q_D(const QHttpResponseHeader);
- return d->reasonPhr;
-}
-
-/*!
- Returns the major protocol-version of the HTTP response header.
-
- \sa minorVersion() statusCode() reasonPhrase()
-*/
-int QHttpResponseHeader::majorVersion() const
-{
- Q_D(const QHttpResponseHeader);
- return d->majVer;
-}
-
-/*!
- Returns the minor protocol-version of the HTTP response header.
-
- \sa majorVersion() statusCode() reasonPhrase()
-*/
-int QHttpResponseHeader::minorVersion() const
-{
- Q_D(const QHttpResponseHeader);
- return d->minVer;
-}
-
-/*! \internal
-*/
-bool QHttpResponseHeader::parseLine(const QString &line, int number)
-{
- Q_D(QHttpResponseHeader);
- if (number != 0)
- return QHttpHeader::parseLine(line, number);
-
- QString l = line.simplified();
- if (l.length() < 10)
- return false;
-
- if (l.left(5) == QLatin1String("HTTP/") && l[5].isDigit() && l[6] == QLatin1Char('.') &&
- l[7].isDigit() && l[8] == QLatin1Char(' ') && l[9].isDigit()) {
- d->majVer = l[5].toLatin1() - '0';
- d->minVer = l[7].toLatin1() - '0';
-
- int pos = l.indexOf(QLatin1Char(' '), 9);
- if (pos != -1) {
- d->reasonPhr = l.mid(pos + 1);
- d->statCode = l.mid(9, pos - 9).toInt();
- } else {
- d->statCode = l.mid(9).toInt();
- d->reasonPhr.clear();
- }
- } else {
- return false;
- }
-
- return true;
-}
-
-/*! \reimp
-*/
-QString QHttpResponseHeader::toString() const
-{
- Q_D(const QHttpResponseHeader);
- QString ret(QLatin1String("HTTP/%1.%2 %3 %4\r\n%5\r\n"));
- return ret.arg(d->majVer).arg(d->minVer).arg(d->statCode).arg(d->reasonPhr).arg(QHttpHeader::toString());
-}
-
-class QHttpRequestHeaderPrivate : public QHttpHeaderPrivate
-{
- Q_DECLARE_PUBLIC(QHttpRequestHeader)
-public:
- QString m;
- QString p;
- int majVer;
- int minVer;
-};
-
-/****************************************************
- *
- * QHttpRequestHeader
- *
- ****************************************************/
-
-/*!
- \class QHttpRequestHeader
- \obsolete
- \brief The QHttpRequestHeader class contains request header information for HTTP.
-
- \ingroup network
- \inmodule QtNetwork
-
- This class is used in the QHttp class to report the header
- information if the client requests something from the server.
-
- HTTP requests have a method which describes the request's action.
- The most common requests are "GET" and "POST". In addition to the
- request method the header also includes a request-URI to specify
- the location for the method to use.
-
- The method, request-URI and protocol-version can be set using a
- constructor or later using setRequest(). The values can be
- obtained using method(), path(), majorVersion() and
- minorVersion().
-
- Note that the request-URI must be in the format expected by the
- HTTP server. That is, all reserved characters must be encoded in
- %HH (where HH are two hexadecimal digits). See
- QUrl::toPercentEncoding() for more information.
-
- Important inherited functions: setValue() and value().
-
- \sa QHttpResponseHeader QHttp
-*/
-
-/*!
- Constructs an empty HTTP request header.
-*/
-QHttpRequestHeader::QHttpRequestHeader()
- : QHttpHeader(*new QHttpRequestHeaderPrivate)
-{
- setValid(false);
-}
-
-/*!
- Constructs a HTTP request header for the method \a method, the
- request-URI \a path and the protocol-version \a majorVer and \a
- minorVer. The \a path argument must be properly encoded for an
- HTTP request.
-*/
-QHttpRequestHeader::QHttpRequestHeader(const QString &method, const QString &path, int majorVer, int minorVer)
- : QHttpHeader(*new QHttpRequestHeaderPrivate)
-{
- Q_D(QHttpRequestHeader);
- d->m = method;
- d->p = path;
- d->majVer = majorVer;
- d->minVer = minorVer;
-}
-
-/*!
- Constructs a copy of \a header.
-*/
-QHttpRequestHeader::QHttpRequestHeader(const QHttpRequestHeader &header)
- : QHttpHeader(*new QHttpRequestHeaderPrivate, header)
-{
- Q_D(QHttpRequestHeader);
- d->m = header.d_func()->m;
- d->p = header.d_func()->p;
- d->majVer = header.d_func()->majVer;
- d->minVer = header.d_func()->minVer;
-}
-
-/*!
- Copies the content of \a header into this QHttpRequestHeader
-*/
-QHttpRequestHeader &QHttpRequestHeader::operator=(const QHttpRequestHeader &header)
-{
- Q_D(QHttpRequestHeader);
- QHttpHeader::operator=(header);
- d->m = header.d_func()->m;
- d->p = header.d_func()->p;
- d->majVer = header.d_func()->majVer;
- d->minVer = header.d_func()->minVer;
- return *this;
-}
-
-/*!
- Constructs a HTTP request header from the string \a str. The \a
- str should consist of one or more "\r\n" delimited lines; the first line
- should be the request-line (format: method, space, request-URI, space
- HTTP-version); each of the remaining lines should have the format key,
- colon, space, value.
-*/
-QHttpRequestHeader::QHttpRequestHeader(const QString &str)
- : QHttpHeader(*new QHttpRequestHeaderPrivate)
-{
- parse(str);
-}
-
-/*!
- This function sets the request method to \a method, the
- request-URI to \a path and the protocol-version to \a majorVer and
- \a minorVer. The \a path argument must be properly encoded for an
- HTTP request.
-
- \sa method() path() majorVersion() minorVersion()
-*/
-void QHttpRequestHeader::setRequest(const QString &method, const QString &path, int majorVer, int minorVer)
-{
- Q_D(QHttpRequestHeader);
- setValid(true);
- d->m = method;
- d->p = path;
- d->majVer = majorVer;
- d->minVer = minorVer;
-}
-
-/*!
- Returns the method of the HTTP request header.
-
- \sa path() majorVersion() minorVersion() setRequest()
-*/
-QString QHttpRequestHeader::method() const
-{
- Q_D(const QHttpRequestHeader);
- return d->m;
-}
-
-/*!
- Returns the request-URI of the HTTP request header.
-
- \sa method() majorVersion() minorVersion() setRequest()
-*/
-QString QHttpRequestHeader::path() const
-{
- Q_D(const QHttpRequestHeader);
- return d->p;
-}
-
-/*!
- Returns the major protocol-version of the HTTP request header.
-
- \sa minorVersion() method() path() setRequest()
-*/
-int QHttpRequestHeader::majorVersion() const
-{
- Q_D(const QHttpRequestHeader);
- return d->majVer;
-}
-
-/*!
- Returns the minor protocol-version of the HTTP request header.
-
- \sa majorVersion() method() path() setRequest()
-*/
-int QHttpRequestHeader::minorVersion() const
-{
- Q_D(const QHttpRequestHeader);
- return d->minVer;
-}
-
-/*! \internal
-*/
-bool QHttpRequestHeader::parseLine(const QString &line, int number)
-{
- Q_D(QHttpRequestHeader);
- if (number != 0)
- return QHttpHeader::parseLine(line, number);
-
- QStringList lst = line.simplified().split(QLatin1String(" "));
- if (lst.count() > 0) {
- d->m = lst[0];
- if (lst.count() > 1) {
- d->p = lst[1];
- if (lst.count() > 2) {
- QString v = lst[2];
- if (v.length() >= 8 && v.left(5) == QLatin1String("HTTP/") &&
- v[5].isDigit() && v[6] == QLatin1Char('.') && v[7].isDigit()) {
- d->majVer = v[5].toLatin1() - '0';
- d->minVer = v[7].toLatin1() - '0';
- return true;
- }
- }
- }
- }
-
- return false;
-}
-
-/*! \reimp
-*/
-QString QHttpRequestHeader::toString() const
-{
- Q_D(const QHttpRequestHeader);
- QString first(QLatin1String("%1 %2"));
- QString last(QLatin1String(" HTTP/%3.%4\r\n%5\r\n"));
- return first.arg(d->m).arg(d->p) +
- last.arg(d->majVer).arg(d->minVer).arg(QHttpHeader::toString());
-}
-
-
-/****************************************************
- *
- * QHttp
- *
- ****************************************************/
-/*!
- \class QHttp
- \obsolete
- \reentrant
-
- \brief The QHttp class provides an implementation of the HTTP protocol.
-
- \ingroup network
- \inmodule QtNetwork
-
-
- This class provides a direct interface to HTTP that allows you to
- download and upload data with the HTTP protocol.
- However, for new applications, it is
- recommended to use QNetworkAccessManager and QNetworkReply, as
- those classes possess a simpler, yet more powerful API
- and a more modern protocol implementation.
-
- The class works asynchronously, so there are no blocking
- functions. If an operation cannot be executed immediately, the
- function will still return straight away and the operation will be
- scheduled for later execution. The results of scheduled operations
- are reported via signals. This approach depends on the event loop
- being in operation.
-
- The operations that can be scheduled (they are called "requests"
- in the rest of the documentation) are the following: setHost(),
- get(), post(), head() and request().
-
- All of these requests return a unique identifier that allows you
- to keep track of the request that is currently executed. When the
- execution of a request starts, the requestStarted() signal with
- the identifier is emitted and when the request is finished, the
- requestFinished() signal is emitted with the identifier and a bool
- that indicates if the request finished with an error.
-
- To make an HTTP request you must set up suitable HTTP headers. The
- following example demonstrates how to request the main HTML page
- from the Qt website (i.e., the URL \c http://qt.nokia.com/index.html):
-
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 2
-
- For the common HTTP requests \c GET, \c POST and \c HEAD, QHttp
- provides the convenience functions get(), post() and head(). They
- already use a reasonable header and if you don't have to set
- special header fields, they are easier to use. The above example
- can also be written as:
-
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 3
-
- For this example the following sequence of signals is emitted
- (with small variations, depending on network traffic, etc.):
-
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 4
-
- The dataSendProgress() and dataReadProgress() signals in the above
- example are useful if you want to show a \link QProgressBar
- progress bar\endlink to inform the user about the progress of the
- download. The second argument is the total size of data. In
- certain cases it is not possible to know the total amount in
- advance, in which case the second argument is 0. (If you connect
- to a QProgressBar a total of 0 results in a busy indicator.)
-
- When the response header is read, it is reported with the
- responseHeaderReceived() signal.
-
- The readyRead() signal tells you that there is data ready to be
- read. The amount of data can then be queried with the
- bytesAvailable() function and it can be read with the read()
- or readAll() functions.
-
- If an error occurs during the execution of one of the commands in
- a sequence of commands, all the pending commands (i.e. scheduled,
- but not yet executed commands) are cleared and no signals are
- emitted for them.
-
- For example, if you have the following sequence of requests
-
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 5
-
- and the get() request fails because the host lookup fails, then
- the post() request is never executed and the signals would look
- like this:
-
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 6
-
- You can then get details about the error with the error() and
- errorString() functions. Note that only unexpected behavior, like
- network failure is considered as an error. If the server response
- contains an error status, like a 404 response, this is reported as
- a normal response case. So you should always check the \link
- QHttpResponseHeader::statusCode() status code \endlink of the
- response header.
-
- The functions currentId() and currentRequest() provide more
- information about the currently executing request.
-
- The functions hasPendingRequests() and clearPendingRequests()
- allow you to query and clear the list of pending requests.
-
- \sa QFtp, QNetworkAccessManager, QNetworkRequest, QNetworkReply,
- {HTTP Example}, {Torrent Example}
-*/
-
-/*!
- Constructs a QHttp object. The \a parent parameter is passed on
- to the QObject constructor.
-*/
-QHttp::QHttp(QObject *parent)
- : QObject(*new QHttpPrivate, parent)
-{
- Q_D(QHttp);
- d->init();
-}
-
-/*!
- Constructs a QHttp object. Subsequent requests are done by
- connecting to the server \a hostName on port \a port.
-
- The \a parent parameter is passed on to the QObject constructor.
-
- \sa setHost()
-*/
-QHttp::QHttp(const QString &hostName, quint16 port, QObject *parent)
- : QObject(*new QHttpPrivate, parent)
-{
- Q_D(QHttp);
- d->init();
-
- d->hostName = hostName;
- d->port = port;
-}
-
-/*!
- Constructs a QHttp object. Subsequent requests are done by
- connecting to the server \a hostName on port \a port using the
- connection mode \a mode.
-
- If port is 0, it will use the default port for the \a mode used
- (80 for Http and 443 for Https).
-
- The \a parent parameter is passed on to the QObject constructor.
-
- \sa setHost()
-*/
-QHttp::QHttp(const QString &hostName, ConnectionMode mode, quint16 port, QObject *parent)
- : QObject(*new QHttpPrivate, parent)
-{
- Q_D(QHttp);
- d->init();
-
- d->hostName = hostName;
- if (port == 0)
- port = (mode == ConnectionModeHttp) ? 80 : 443;
- d->port = port;
- d->mode = mode;
-}
-
-void QHttpPrivate::init()
-{
- Q_Q(QHttp);
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Unknown error"));
- QMetaObject::invokeMethod(q, "_q_slotDoFinished", Qt::QueuedConnection);
- post100ContinueTimer.setSingleShot(true);
- QObject::connect(&post100ContinueTimer, SIGNAL(timeout()), q, SLOT(_q_continuePost()));
-}
-
-/*!
- Destroys the QHttp object. If there is an open connection, it is
- closed.
-*/
-QHttp::~QHttp()
-{
- abort();
-}
-
-/*!
- \enum QHttp::ConnectionMode
- \since 4.3
-
- This enum is used to specify the mode of connection to use:
-
- \value ConnectionModeHttp The connection is a regular HTTP connection to the server
- \value ConnectionModeHttps The HTTPS protocol is used and the connection is encrypted using SSL.
-
- When using the HTTPS mode, care should be taken to connect to the sslErrors signal, and
- handle possible SSL errors.
-
- \sa QSslSocket
-*/
-
-/*!
- \enum QHttp::State
-
- This enum is used to specify the state the client is in:
-
- \value Unconnected There is no connection to the host.
- \value HostLookup A host name lookup is in progress.
- \value Connecting An attempt to connect to the host is in progress.
- \value Sending The client is sending its request to the server.
- \value Reading The client's request has been sent and the client
- is reading the server's response.
- \value Connected The connection to the host is open, but the client is
- neither sending a request, nor waiting for a response.
- \value Closing The connection is closing down, but is not yet
- closed. (The state will be \c Unconnected when the connection is
- closed.)
-
- \sa stateChanged() state()
-*/
-
-/*! \enum QHttp::Error
-
- This enum identifies the error that occurred.
-
- \value NoError No error occurred.
- \value HostNotFound The host name lookup failed.
- \value ConnectionRefused The server refused the connection.
- \value UnexpectedClose The server closed the connection unexpectedly.
- \value InvalidResponseHeader The server sent an invalid response header.
- \value WrongContentLength The client could not read the content correctly
- because an error with respect to the content length occurred.
- \value Aborted The request was aborted with abort().
- \value ProxyAuthenticationRequiredError QHttp is using a proxy, and the
- proxy server requires authentication to establish a connection.
- \value AuthenticationRequiredError The web server requires authentication
- to complete the request.
- \value UnknownError An error other than those specified above
- occurred.
-
- \sa error()
-*/
-
-/*!
- \fn void QHttp::stateChanged(int state)
-
- This signal is emitted when the state of the QHttp object changes.
- The argument \a state is the new state of the connection; it is
- one of the \l State values.
-
- This usually happens when a request is started, but it can also
- happen when the server closes the connection or when a call to
- close() succeeded.
-
- \sa get() post() head() request() close() state() State
-*/
-
-/*!
- \fn void QHttp::responseHeaderReceived(const QHttpResponseHeader &resp);
-
- This signal is emitted when the HTTP header of a server response
- is available. The header is passed in \a resp.
-
- \sa get() post() head() request() readyRead()
-*/
-
-/*!
- \fn void QHttp::readyRead(const QHttpResponseHeader &resp)
-
- This signal is emitted when there is new response data to read.
-
- If you specified a device in the request where the data should be
- written to, then this signal is \e not emitted; instead the data
- is written directly to the device.
-
- The response header is passed in \a resp.
-
- You can read the data with the readAll() or read() functions
-
- This signal is useful if you want to process the data in chunks as
- soon as it becomes available. If you are only interested in the
- complete data, just connect to the requestFinished() signal and
- read the data then instead.
-
- \sa get() post() request() readAll() read() bytesAvailable()
-*/
-
-/*!
- \fn void QHttp::dataSendProgress(int done, int total)
-
- This signal is emitted when this object sends data to a HTTP
- server to inform it about the progress of the upload.
-
- \a done is the amount of data that has already arrived and \a
- total is the total amount of data. It is possible that the total
- amount of data that should be transferred cannot be determined, in
- which case \a total is 0.(If you connect to a QProgressBar, the
- progress bar shows a busy indicator if the total is 0).
-
- \warning \a done and \a total are not necessarily the size in
- bytes, since for large files these values might need to be
- "scaled" to avoid overflow.
-
- \sa dataReadProgress(), post(), request(), QProgressBar
-*/
-
-/*!
- \fn void QHttp::dataReadProgress(int done, int total)
-
- This signal is emitted when this object reads data from a HTTP
- server to indicate the current progress of the download.
-
- \a done is the amount of data that has already arrived and \a
- total is the total amount of data. It is possible that the total
- amount of data that should be transferred cannot be determined, in
- which case \a total is 0.(If you connect to a QProgressBar, the
- progress bar shows a busy indicator if the total is 0).
-
- \warning \a done and \a total are not necessarily the size in
- bytes, since for large files these values might need to be
- "scaled" to avoid overflow.
-
- \sa dataSendProgress() get() post() request() QProgressBar
-*/
-
-/*!
- \fn void QHttp::requestStarted(int id)
-
- This signal is emitted when processing the request identified by
- \a id starts.
-
- \sa requestFinished() done()
-*/
-
-/*!
- \fn void QHttp::requestFinished(int id, bool error)
-
- This signal is emitted when processing the request identified by
- \a id has finished. \a error is true if an error occurred during
- the processing; otherwise \a error is false.
-
- \sa requestStarted() done() error() errorString()
-*/
-
-/*!
- \fn void QHttp::done(bool error)
-
- This signal is emitted when the last pending request has finished;
- (it is emitted after the last request's requestFinished() signal).
- \a error is true if an error occurred during the processing;
- otherwise \a error is false.
-
- \sa requestFinished() error() errorString()
-*/
-
-#ifndef QT_NO_NETWORKPROXY
-
-/*!
- \fn void QHttp::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator)
- \since 4.3
-
- This signal can be emitted when a \a proxy that requires
- authentication is used. The \a authenticator object can then be
- filled in with the required details to allow authentication and
- continue the connection.
-
- \note It is not possible to use a QueuedConnection to connect to
- this signal, as the connection will fail if the authenticator has
- not been filled in with new information when the signal returns.
-
- \sa QAuthenticator, QNetworkProxy
-*/
-
-#endif
-
-/*!
- \fn void QHttp::authenticationRequired(const QString &hostname, quint16 port, QAuthenticator *authenticator)
- \since 4.3
-
- This signal can be emitted when a web server on a given \a hostname and \a
- port requires authentication. The \a authenticator object can then be
- filled in with the required details to allow authentication and continue
- the connection.
-
- \note It is not possible to use a QueuedConnection to connect to
- this signal, as the connection will fail if the authenticator has
- not been filled in with new information when the signal returns.
-
- \sa QAuthenticator, QNetworkProxy
-*/
-
-/*!
- \fn void QHttp::sslErrors(const QList<QSslError> &errors)
- \since 4.3
-
- Forwards the sslErrors signal from the QSslSocket used in QHttp. \a errors
- is the list of errors that occurred during the SSL handshake. Unless you
- call ignoreSslErrors() from within a slot connected to this signal when an
- error occurs, QHttp will tear down the connection immediately after
- emitting the signal.
-
- \sa QSslSocket QSslSocket::ignoreSslErrors()
-*/
-
-/*!
- Aborts the current request and deletes all scheduled requests.
-
- For the current request, the requestFinished() signal with the \c
- error argument \c true is emitted. For all other requests that are
- affected by the abort(), no signals are emitted.
-
- Since this slot also deletes the scheduled requests, there are no
- requests left and the done() signal is emitted (with the \c error
- argument \c true).
-
- \sa clearPendingRequests()
-*/
-void QHttp::abort()
-{
- Q_D(QHttp);
- if (d->pending.isEmpty())
- return;
-
- d->finishedWithError(tr("Request aborted"), Aborted);
- clearPendingRequests();
- if (d->socket)
- d->socket->abort();
- d->closeConn();
-}
-
-/*!
- Returns the number of bytes that can be read from the response
- content at the moment.
-
- \sa get() post() request() readyRead() read() readAll()
-*/
-qint64 QHttp::bytesAvailable() const
-{
- Q_D(const QHttp);
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp::bytesAvailable(): %d bytes", (int)d->rba.size());
-#endif
- return qint64(d->rba.size());
-}
-
-/*!
- Reads \a maxlen bytes from the response content into \a data and
- returns the number of bytes read. Returns -1 if an error occurred.
-
- \sa get() post() request() readyRead() bytesAvailable() readAll()
-*/
-qint64 QHttp::read(char *data, qint64 maxlen)
-{
- Q_D(QHttp);
- if (data == 0 && maxlen != 0) {
- qWarning("QHttp::read: Null pointer error");
- return -1;
- }
- if (maxlen >= d->rba.size())
- maxlen = d->rba.size();
- int readSoFar = 0;
- while (!d->rba.isEmpty() && readSoFar < maxlen) {
- int nextBlockSize = d->rba.nextDataBlockSize();
- int bytesToRead = qMin<qint64>(maxlen - readSoFar, nextBlockSize);
- memcpy(data + readSoFar, d->rba.readPointer(), bytesToRead);
- d->rba.free(bytesToRead);
- readSoFar += bytesToRead;
- }
-
- d->bytesDone += maxlen;
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp::read(): read %lld bytes (%lld bytes done)", maxlen, d->bytesDone);
-#endif
- return maxlen;
-}
-
-/*!
- Reads all the bytes from the response content and returns them.
-
- \sa get() post() request() readyRead() bytesAvailable() read()
-*/
-QByteArray QHttp::readAll()
-{
- qint64 avail = bytesAvailable();
- QByteArray tmp;
- tmp.resize(int(avail));
- qint64 got = read(tmp.data(), int(avail));
- tmp.resize(got);
- return tmp;
-}
-
-/*!
- Returns the identifier of the HTTP request being executed or 0 if
- there is no request being executed (i.e. they've all finished).
-
- \sa currentRequest()
-*/
-int QHttp::currentId() const
-{
- Q_D(const QHttp);
- if (d->pending.isEmpty())
- return 0;
- return d->pending.first()->id;
-}
-
-/*!
- Returns the request header of the HTTP request being executed. If
- the request is one issued by setHost() or close(), it
- returns an invalid request header, i.e.
- QHttpRequestHeader::isValid() returns false.
-
- \sa currentId()
-*/
-QHttpRequestHeader QHttp::currentRequest() const
-{
- Q_D(const QHttp);
- if (!d->pending.isEmpty()) {
- QHttpRequest *r = d->pending.first();
- if (r->hasRequestHeader())
- return r->requestHeader();
- }
- return QHttpRequestHeader();
-}
-
-/*!
- Returns the received response header of the most recently finished HTTP
- request. If no response has yet been received
- QHttpResponseHeader::isValid() will return false.
-
- \sa currentRequest()
-*/
-QHttpResponseHeader QHttp::lastResponse() const
-{
- Q_D(const QHttp);
- return d->response;
-}
-
-/*!
- Returns the QIODevice pointer that is used as the data source of the HTTP
- request being executed. If there is no current request or if the request
- does not use an IO device as the data source, this function returns 0.
-
- This function can be used to delete the QIODevice in the slot connected to
- the requestFinished() signal.
-
- \sa currentDestinationDevice() post() request()
-*/
-QIODevice *QHttp::currentSourceDevice() const
-{
- Q_D(const QHttp);
- if (d->pending.isEmpty())
- return 0;
- return d->pending.first()->sourceDevice();
-}
-
-/*!
- Returns the QIODevice pointer that is used as to store the data of the HTTP
- request being executed. If there is no current request or if the request
- does not store the data to an IO device, this function returns 0.
-
- This function can be used to delete the QIODevice in the slot connected to
- the requestFinished() signal.
-
- \sa currentSourceDevice() get() post() request()
-*/
-QIODevice *QHttp::currentDestinationDevice() const
-{
- Q_D(const QHttp);
- if (d->pending.isEmpty())
- return 0;
- return d->pending.first()->destinationDevice();
-}
-
-/*!
- Returns true if there are any requests scheduled that have not yet
- been executed; otherwise returns false.
-
- The request that is being executed is \e not considered as a
- scheduled request.
-
- \sa clearPendingRequests() currentId() currentRequest()
-*/
-bool QHttp::hasPendingRequests() const
-{
- Q_D(const QHttp);
- return d->pending.count() > 1;
-}
-
-/*!
- Deletes all pending requests from the list of scheduled requests.
- This does not affect the request that is being executed. If
- you want to stop this as well, use abort().
-
- \sa hasPendingRequests() abort()
-*/
-void QHttp::clearPendingRequests()
-{
- Q_D(QHttp);
- // delete all entires except the first one
- while (d->pending.count() > 1)
- delete d->pending.takeLast();
-}
-
-/*!
- Sets the HTTP server that is used for requests to \a hostName on
- port \a port.
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- \sa get() post() head() request() requestStarted() requestFinished() done()
-*/
-int QHttp::setHost(const QString &hostName, quint16 port)
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpSetHostRequest(hostName, port, ConnectionModeHttp));
-}
-
-/*!
- Sets the HTTP server that is used for requests to \a hostName on
- port \a port using the connection mode \a mode.
-
- If port is 0, it will use the default port for the \a mode used
- (80 for HTTP and 443 for HTTPS).
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- \sa get() post() head() request() requestStarted() requestFinished() done()
-*/
-int QHttp::setHost(const QString &hostName, ConnectionMode mode, quint16 port)
-{
-#ifdef QT_NO_OPENSSL
- if (mode == ConnectionModeHttps)
- qWarning("QHttp::setHost: HTTPS connection requested but SSL support not compiled in");
-#endif
- Q_D(QHttp);
- if (port == 0)
- port = (mode == ConnectionModeHttp) ? 80 : 443;
- return d->addRequest(new QHttpSetHostRequest(hostName, port, mode));
-}
-
-/*!
- Replaces the internal QTcpSocket that QHttp uses with \a
- socket. This is useful if you want to use your own custom QTcpSocket
- subclass instead of the plain QTcpSocket that QHttp uses by default.
- QHttp does not take ownership of the socket, and will not delete \a
- socket when destroyed.
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- Note: If QHttp is used in a non-GUI thread that runs its own event
- loop, you must move \a socket to that thread before calling setSocket().
-
- \sa QObject::moveToThread(), {Thread Support in Qt}
-*/
-int QHttp::setSocket(QTcpSocket *socket)
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpSetSocketRequest(socket));
-}
-
-/*!
- This function sets the user name \a userName and password \a
- password for web pages that require authentication.
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-*/
-int QHttp::setUser(const QString &userName, const QString &password)
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpSetUserRequest(userName, password));
-}
-
-#ifndef QT_NO_NETWORKPROXY
-
-/*!
- Enables HTTP proxy support, using the proxy server \a host on port \a
- port. \a username and \a password can be provided if the proxy server
- requires authentication.
-
- Example:
-
- \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 7
-
- QHttp supports non-transparent web proxy servers only, such as the Squid
- Web proxy cache server (from \l http://www.squid.org/). For transparent
- proxying, such as SOCKS5, use QNetworkProxy instead.
-
- \note setProxy() has to be called before setHost() for it to take effect.
- If setProxy() is called after setHost(), then it will not apply until after
- setHost() is called again.
-
- \sa QFtp::setProxy()
-*/
-int QHttp::setProxy(const QString &host, int port,
- const QString &username, const QString &password)
-{
- Q_D(QHttp);
- QNetworkProxy proxy(QNetworkProxy::HttpProxy, host, port, username, password);
- return d->addRequest(new QHttpSetProxyRequest(proxy));
-}
-
-/*!
- \overload
-
- Enables HTTP proxy support using the proxy settings from \a
- proxy. If \a proxy is a transparent proxy, QHttp will call
- QAbstractSocket::setProxy() on the underlying socket. If the type
- is QNetworkProxy::HttpCachingProxy, QHttp will behave like the
- previous function.
-
- \note for compatibility with Qt 4.3, if the proxy type is
- QNetworkProxy::HttpProxy and the request type is unencrypted (that
- is, ConnectionModeHttp), QHttp will treat the proxy as a caching
- proxy.
-*/
-int QHttp::setProxy(const QNetworkProxy &proxy)
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpSetProxyRequest(proxy));
-}
-
-#endif
-
-/*!
- Sends a get request for \a path to the server set by setHost() or
- as specified in the constructor.
-
- \a path must be a absolute path like \c /index.html or an
- absolute URI like \c http://example.com/index.html and
- must be encoded with either QUrl::toPercentEncoding() or
- QUrl::encodedPath().
-
- If the IO device \a to is 0 the readyRead() signal is emitted
- every time new content data is available to read.
-
- If the IO device \a to is not 0, the content data of the response
- is written directly to the device. Make sure that the \a to
- pointer is valid for the duration of the operation (it is safe to
- delete it when the requestFinished() signal is emitted).
-
- \section1 Request Processing
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- \sa setHost(), post(), head(), request(), requestStarted(),
- requestFinished(), done()
-*/
-int QHttp::get(const QString &path, QIODevice *to)
-{
- Q_D(QHttp);
- QHttpRequestHeader header(QLatin1String("GET"), path);
- header.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
- return d->addRequest(new QHttpPGHRequest(header, (QIODevice *) 0, to));
-}
-
-/*!
- Sends a post request for \a path to the server set by setHost() or
- as specified in the constructor.
-
- \a path must be an absolute path like \c /index.html or an
- absolute URI like \c http://example.com/index.html and
- must be encoded with either QUrl::toPercentEncoding() or
- QUrl::encodedPath().
-
- The incoming data comes via the \a data IO device.
-
- If the IO device \a to is 0 the readyRead() signal is emitted
- every time new content data is available to read.
-
- If the IO device \a to is not 0, the content data of the response
- is written directly to the device. Make sure that the \a to
- pointer is valid for the duration of the operation (it is safe to
- delete it when the requestFinished() signal is emitted).
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- \sa setHost() get() head() request() requestStarted() requestFinished() done()
-*/
-int QHttp::post(const QString &path, QIODevice *data, QIODevice *to )
-{
- Q_D(QHttp);
- QHttpRequestHeader header(QLatin1String("POST"), path);
- header.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
- return d->addRequest(new QHttpPGHRequest(header, data, to));
-}
-
-/*!
- \overload
-
- \a data is used as the content data of the HTTP request.
-*/
-int QHttp::post(const QString &path, const QByteArray &data, QIODevice *to)
-{
- Q_D(QHttp);
- QHttpRequestHeader header(QLatin1String("POST"), path);
- header.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
- return d->addRequest(new QHttpPGHRequest(header, new QByteArray(data), to));
-}
-
-/*!
- Sends a header request for \a path to the server set by setHost()
- or as specified in the constructor.
-
- \a path must be an absolute path like \c /index.html or an
- absolute URI like \c http://example.com/index.html.
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- \sa setHost() get() post() request() requestStarted() requestFinished() done()
-*/
-int QHttp::head(const QString &path)
-{
- Q_D(QHttp);
- QHttpRequestHeader header(QLatin1String("HEAD"), path);
- header.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
- return d->addRequest(new QHttpPGHRequest(header, (QIODevice*)0, 0));
-}
-
-/*!
- Sends a request to the server set by setHost() or as specified in
- the constructor. Uses the \a header as the HTTP request header.
- You are responsible for setting up a header that is appropriate
- for your request.
-
- The incoming data comes via the \a data IO device.
-
- If the IO device \a to is 0 the readyRead() signal is emitted
- every time new content data is available to read.
-
- If the IO device \a to is not 0, the content data of the response
- is written directly to the device. Make sure that the \a to
- pointer is valid for the duration of the operation (it is safe to
- delete it when the requestFinished() signal is emitted).
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- \sa setHost() get() post() head() requestStarted() requestFinished() done()
-*/
-int QHttp::request(const QHttpRequestHeader &header, QIODevice *data, QIODevice *to)
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpNormalRequest(header, data, to));
-}
-
-/*!
- \overload
-
- \a data is used as the content data of the HTTP request.
-*/
-int QHttp::request(const QHttpRequestHeader &header, const QByteArray &data, QIODevice *to )
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpNormalRequest(header, new QByteArray(data), to));
-}
-
-/*!
- Closes the connection; this is useful if you have a keep-alive
- connection and want to close it.
-
- For the requests issued with get(), post() and head(), QHttp sets
- the connection to be keep-alive. You can also do this using the
- header you pass to the request() function. QHttp only closes the
- connection to the HTTP server if the response header requires it
- to do so.
-
- The function does not block; instead, it returns immediately. The request
- is scheduled, and its execution is performed asynchronously. The
- function returns a unique identifier which is passed by
- requestStarted() and requestFinished().
-
- When the request is started the requestStarted() signal is
- emitted. When it is finished the requestFinished() signal is
- emitted.
-
- If you want to close the connection immediately, you have to use
- abort() instead.
-
- \sa stateChanged() abort() requestStarted() requestFinished() done()
-*/
-int QHttp::close()
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpCloseRequest());
-}
-
-/*!
- \obsolete
-
- Behaves the same as close().
-*/
-int QHttp::closeConnection()
-{
- Q_D(QHttp);
- return d->addRequest(new QHttpCloseRequest());
-}
-
-int QHttpPrivate::addRequest(QHttpNormalRequest *req)
-{
- QHttpRequestHeader h = req->requestHeader();
- if (h.path().isEmpty()) {
- // note: the following qWarning is autotested. If you change it, change the test too.
- qWarning("QHttp: empty path requested is invalid -- using '/'");
- h.setRequest(h.method(), QLatin1String("/"), h.majorVersion(), h.minorVersion());
- req->setRequestHeader(h);
- }
-
- // contine below
- return addRequest(static_cast<QHttpRequest *>(req));
-}
-
-int QHttpPrivate::addRequest(QHttpRequest *req)
-{
- Q_Q(QHttp);
- pending.append(req);
-
- if (pending.count() == 1) {
- // don't emit the requestStarted() signal before the id is returned
- QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
- }
- return req->id;
-}
-
-void QHttpPrivate::_q_startNextRequest()
-{
- Q_Q(QHttp);
- if (pending.isEmpty())
- return;
- QHttpRequest *r = pending.first();
-
- error = QHttp::NoError;
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Unknown error"));
-
- if (q->bytesAvailable() != 0)
- q->readAll(); // clear the data
- emit q->requestStarted(r->id);
- r->start(q);
-}
-
-void QHttpPrivate::_q_slotSendRequest()
-{
- if (hostName.isNull()) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "No server set to connect to")),
- QHttp::UnknownError);
- return;
- }
-
- QString connectionHost = hostName;
- int connectionPort = port;
- bool sslInUse = false;
-
-#ifndef QT_NO_OPENSSL
- QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);
- if (mode == QHttp::ConnectionModeHttps || (sslSocket && sslSocket->isEncrypted()))
- sslInUse = true;
-#endif
-
-#ifndef QT_NO_NETWORKPROXY
- bool cachingProxyInUse = false;
- bool transparentProxyInUse = false;
- if (proxy.type() == QNetworkProxy::DefaultProxy)
- proxy = QNetworkProxy::applicationProxy();
-
- if (proxy.type() == QNetworkProxy::HttpCachingProxy) {
- if (proxy.hostName().isEmpty())
- proxy.setType(QNetworkProxy::NoProxy);
- else
- cachingProxyInUse = true;
- } else if (proxy.type() == QNetworkProxy::HttpProxy) {
- // Compatibility behaviour: HttpProxy can be used to mean both
- // transparent and caching proxy
- if (proxy.hostName().isEmpty()) {
- proxy.setType(QNetworkProxy::NoProxy);
- } else if (sslInUse) {
- // Disallow use of caching proxy with HTTPS; instead fall back to
- // transparent HTTP CONNECT proxying.
- transparentProxyInUse = true;
- } else {
- proxy.setType(QNetworkProxy::HttpCachingProxy);
- cachingProxyInUse = true;
- }
- }
-
- // Proxy support. Insert the Proxy-Authorization item into the
- // header before it's sent off to the proxy.
- if (cachingProxyInUse) {
- QUrl proxyUrl;
- proxyUrl.setScheme(QLatin1String("http"));
- proxyUrl.setHost(hostName);
- if (port && port != 80)
- proxyUrl.setPort(port);
- QString request = QString::fromAscii(proxyUrl.resolved(QUrl::fromEncoded(header.path().toLatin1())).toEncoded());
-
- header.setRequest(header.method(), request, header.majorVersion(), header.minorVersion());
- header.setValue(QLatin1String("Proxy-Connection"), QLatin1String("keep-alive"));
-
- QAuthenticatorPrivate *auth = QAuthenticatorPrivate::getPrivate(proxyAuthenticator);
- if (auth && auth->method != QAuthenticatorPrivate::None) {
- QByteArray response = auth->calculateResponse(header.method().toLatin1(), header.path().toLatin1());
- header.setValue(QLatin1String("Proxy-Authorization"), QString::fromLatin1(response));
- }
-
- connectionHost = proxy.hostName();
- connectionPort = proxy.port();
- }
-
- if (transparentProxyInUse || sslInUse) {
- socket->setProxy(proxy);
- }
-#endif
-
- // Username support. Insert the user and password into the query
- // string.
- QAuthenticatorPrivate *auth = QAuthenticatorPrivate::getPrivate(authenticator);
- if (auth && auth->method != QAuthenticatorPrivate::None) {
- QByteArray response = auth->calculateResponse(header.method().toLatin1(), header.path().toLatin1());
- header.setValue(QLatin1String("Authorization"), QString::fromLatin1(response));
- }
-
- // Do we need to setup a new connection or can we reuse an
- // existing one?
- if (socket->peerName() != connectionHost || socket->peerPort() != connectionPort
- || socket->state() != QTcpSocket::ConnectedState
-#ifndef QT_NO_OPENSSL
- || (sslSocket && sslSocket->isEncrypted() != (mode == QHttp::ConnectionModeHttps))
-#endif
- ) {
- socket->blockSignals(true);
- socket->abort();
- socket->blockSignals(false);
-
- setState(QHttp::Connecting);
-#ifndef QT_NO_OPENSSL
- if (sslSocket && mode == QHttp::ConnectionModeHttps) {
- sslSocket->connectToHostEncrypted(hostName, port);
- } else
-#endif
- {
- socket->connectToHost(connectionHost, connectionPort);
- }
- } else {
- _q_slotConnected();
- }
-
-}
-
-void QHttpPrivate::finishedWithSuccess()
-{
- Q_Q(QHttp);
- if (pending.isEmpty())
- return;
- QHttpRequest *r = pending.first();
-
- // did we recurse?
- if (r->finished)
- return;
- r->finished = true;
- hasFinishedWithError = false;
-
- emit q->requestFinished(r->id, false);
- if (hasFinishedWithError) {
- // we recursed and changed into an error. The finishedWithError function
- // below has emitted the done(bool) signal and cleared the queue by now.
- return;
- }
-
- pending.removeFirst();
- delete r;
-
- if (pending.isEmpty()) {
- emit q->done(false);
- } else {
- _q_startNextRequest();
- }
-}
-
-void QHttpPrivate::finishedWithError(const QString &detail, int errorCode)
-{
- Q_Q(QHttp);
- if (pending.isEmpty())
- return;
- QHttpRequest *r = pending.first();
- hasFinishedWithError = true;
-
- error = QHttp::Error(errorCode);
- errorString = detail;
-
- // did we recurse?
- if (!r->finished) {
- r->finished = true;
- emit q->requestFinished(r->id, true);
- }
-
- while (!pending.isEmpty())
- delete pending.takeFirst();
- emit q->done(hasFinishedWithError);
-}
-
-void QHttpPrivate::_q_slotClosed()
-{
- Q_Q(QHttp);
-
- if (state == QHttp::Reading) {
- if (response.hasKey(QLatin1String("content-length"))) {
- // We got Content-Length, so did we get all bytes?
- if (bytesDone + q->bytesAvailable() != response.contentLength()) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Wrong content length")), QHttp::WrongContentLength);
- }
- }
- } else if (state == QHttp::Connecting || state == QHttp::Sending) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Server closed connection unexpectedly")), QHttp::UnexpectedClose);
- }
-
- postDevice = 0;
- if (state != QHttp::Closing)
- setState(QHttp::Closing);
- QMetaObject::invokeMethod(q, "_q_slotDoFinished", Qt::QueuedConnection);
-}
-
-void QHttpPrivate::_q_continuePost()
-{
- if (pendingPost) {
- pendingPost = false;
- setState(QHttp::Sending);
- _q_slotBytesWritten(0);
- }
-}
-
-void QHttpPrivate::_q_slotConnected()
-{
- if (state != QHttp::Sending) {
- bytesDone = 0;
- setState(QHttp::Sending);
- }
-
- QString str = header.toString();
- bytesTotal = str.length();
- socket->write(str.toLatin1(), bytesTotal);
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp: write request header %p:\n---{\n%s}---", &header, str.toLatin1().constData());
-#endif
-
- if (postDevice) {
- postDevice->seek(0); // reposition the device
- bytesTotal += postDevice->size();
- //check for 100-continue
- if (header.value(QLatin1String("expect")).contains(QLatin1String("100-continue"), Qt::CaseInsensitive)) {
- //create a time out for 2 secs.
- pendingPost = true;
- post100ContinueTimer.start(2000);
- }
- } else {
- bytesTotal += buffer.size();
- socket->write(buffer, buffer.size());
- }
-}
-
-void QHttpPrivate::_q_slotError(QAbstractSocket::SocketError err)
-{
- Q_Q(QHttp);
- postDevice = 0;
-
- if (state == QHttp::Connecting || state == QHttp::Reading || state == QHttp::Sending) {
- switch (err) {
- case QTcpSocket::ConnectionRefusedError:
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection refused (or timed out)")), QHttp::ConnectionRefused);
- break;
- case QTcpSocket::HostNotFoundError:
- finishedWithError(QString::fromLatin1(QT_TRANSLATE_NOOP("QHttp", "Host %1 not found"))
- .arg(socket->peerName()), QHttp::HostNotFound);
- break;
- case QTcpSocket::RemoteHostClosedError:
- if (state == QHttp::Sending && reconnectAttempts--) {
- setState(QHttp::Closing);
- setState(QHttp::Unconnected);
- socket->blockSignals(true);
- socket->abort();
- socket->blockSignals(false);
- QMetaObject::invokeMethod(q, "_q_slotSendRequest", Qt::QueuedConnection);
- return;
- }
- break;
-#ifndef QT_NO_NETWORKPROXY
- case QTcpSocket::ProxyAuthenticationRequiredError:
- finishedWithError(socket->errorString(), QHttp::ProxyAuthenticationRequiredError);
- break;
-#endif
- default:
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "HTTP request failed")), QHttp::UnknownError);
- break;
- }
- }
-
- closeConn();
-}
-
-#ifndef QT_NO_OPENSSL
-void QHttpPrivate::_q_slotEncryptedBytesWritten(qint64 written)
-{
- Q_UNUSED(written);
- postMoreData();
-}
-#endif
-
-void QHttpPrivate::_q_slotBytesWritten(qint64 written)
-{
- Q_Q(QHttp);
- bytesDone += written;
- emit q->dataSendProgress(bytesDone, bytesTotal);
- postMoreData();
-}
-
-// Send the POST data
-void QHttpPrivate::postMoreData()
-{
- if (pendingPost)
- return;
-
- if (!postDevice)
- return;
-
- // the following is backported code from Qt 4.6 QNetworkAccessManager.
- // We also have to check the encryptedBytesToWrite() if it is an SSL socket.
-#ifndef QT_NO_OPENSSL
- QSslSocket *sslSocket = qobject_cast<QSslSocket*>(socket);
- // if it is really an ssl socket, check more than just bytesToWrite()
- if ((socket->bytesToWrite() + (sslSocket ? sslSocket->encryptedBytesToWrite() : 0)) == 0) {
-#else
- if (socket->bytesToWrite() == 0) {
-#endif
- int max = qMin<qint64>(4096, postDevice->size() - postDevice->pos());
- QByteArray arr;
- arr.resize(max);
-
- int n = postDevice->read(arr.data(), max);
- if (n < 0) {
- qWarning("Could not read enough bytes from the device");
- closeConn();
- return;
- }
- if (postDevice->atEnd()) {
- postDevice = 0;
- }
-
- socket->write(arr, n);
- }
-}
-
-void QHttpPrivate::_q_slotReadyRead()
-{
- Q_Q(QHttp);
- QHttp::State oldState = state;
- if (state != QHttp::Reading) {
- setState(QHttp::Reading);
- readHeader = true;
- headerStr = QLatin1String("");
- bytesDone = 0;
- chunkedSize = -1;
- repost = false;
- }
-
- while (readHeader) {
- bool end = false;
- QString tmp;
- while (!end && socket->canReadLine()) {
- tmp = QString::fromAscii(socket->readLine());
- if (tmp == QLatin1String("\r\n") || tmp == QLatin1String("\n") || tmp.isEmpty())
- end = true;
- else
- headerStr += tmp;
- }
-
- if (!end)
- return;
-
- response = QHttpResponseHeader(headerStr);
- headerStr = QLatin1String("");
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp: read response header:\n---{\n%s}---", response.toString().toLatin1().constData());
-#endif
- // Check header
- if (!response.isValid()) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Invalid HTTP response header")),
- QHttp::InvalidResponseHeader);
- closeConn();
- return;
- }
-
- int statusCode = response.statusCode();
- if (statusCode == 401 || statusCode == 407) { // (Proxy) Authentication required
- QAuthenticator *auth =
-#ifndef QT_NO_NETWORKPROXY
- statusCode == 407
- ? &proxyAuthenticator :
-#endif
- &authenticator;
- if (auth->isNull())
- auth->detach();
- QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*auth);
- priv->parseHttpResponse(response, (statusCode == 407));
- if (priv->phase == QAuthenticatorPrivate::Done) {
- socket->blockSignals(true);
-#ifndef QT_NO_NETWORKPROXY
- if (statusCode == 407)
- emit q->proxyAuthenticationRequired(proxy, auth);
- else
-#endif
- emit q->authenticationRequired(hostName, port, auth);
- socket->blockSignals(false);
- } else if (priv->phase == QAuthenticatorPrivate::Invalid) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Unknown authentication method")),
- QHttp::AuthenticationRequiredError);
- closeConn();
- return;
- }
-
- // priv->phase will get reset to QAuthenticatorPrivate::Start if the authenticator got modified in the signal above.
- if (priv->phase == QAuthenticatorPrivate::Done) {
-#ifndef QT_NO_NETWORKPROXY
- if (statusCode == 407)
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Proxy authentication required")),
- QHttp::ProxyAuthenticationRequiredError);
- else
-#endif
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Authentication required")),
- QHttp::AuthenticationRequiredError);
- closeConn();
- return;
- } else {
- // close the connection if it isn't already and reconnect using the chosen authentication method
- bool willClose = (response.value(QLatin1String("proxy-connection")).toLower() == QLatin1String("close"))
- || (response.value(QLatin1String("connection")).toLower() == QLatin1String("close"));
- if (willClose) {
- if (socket) {
- setState(QHttp::Closing);
- socket->blockSignals(true);
- socket->close();
- socket->blockSignals(false);
- socket->readAll();
- }
- _q_slotSendRequest();
- return;
- } else {
- repost = true;
- }
- }
- } else {
- buffer.clear();
- }
-
- if (response.statusCode() == 100 && pendingPost) {
- // if we have pending POST, start sending data otherwise ignore
- post100ContinueTimer.stop();
- QMetaObject::invokeMethod(q, "_q_continuePost", Qt::QueuedConnection);
- return;
- }
-
- // The 100-continue header is ignored (in case of no 'expect:100-continue' header),
- // because when using the POST method, we send both the request header and data in
- // one chunk.
- if (response.statusCode() != 100) {
- post100ContinueTimer.stop();
- pendingPost = false;
- readHeader = false;
- if (response.hasKey(QLatin1String("transfer-encoding")) &&
- response.value(QLatin1String("transfer-encoding")).toLower().contains(QLatin1String("chunked")))
- chunkedSize = 0;
-
- if (!repost)
- emit q->responseHeaderReceived(response);
- if (state == QHttp::Unconnected || state == QHttp::Closing)
- return;
- } else {
- // Restore the state, the next incoming data will be treated as if
- // we never say the 100 response.
- state = oldState;
- }
- }
-
- bool everythingRead = false;
-
- if (q->currentRequest().method() == QLatin1String("HEAD") ||
- response.statusCode() == 304 || response.statusCode() == 204 ||
- response.statusCode() == 205) {
- // HEAD requests have only headers as replies
- // These status codes never have a body:
- // 304 Not Modified
- // 204 No Content
- // 205 Reset Content
- everythingRead = true;
- } else {
- qint64 n = socket->bytesAvailable();
- QByteArray *arr = 0;
- if (chunkedSize != -1) {
- // transfer-encoding is chunked
- for (;;) {
- // get chunk size
- if (chunkedSize == 0) {
- if (!socket->canReadLine())
- break;
- QString sizeString = QString::fromAscii(socket->readLine());
- int tPos = sizeString.indexOf(QLatin1Char(';'));
- if (tPos != -1)
- sizeString.truncate(tPos);
- bool ok;
- chunkedSize = sizeString.toInt(&ok, 16);
- if (!ok) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Invalid HTTP chunked body")),
- QHttp::WrongContentLength);
- closeConn();
- delete arr;
- return;
- }
- if (chunkedSize == 0) // last-chunk
- chunkedSize = -2;
- }
-
- // read trailer
- while (chunkedSize == -2 && socket->canReadLine()) {
- QString read = QString::fromAscii(socket->readLine());
- if (read == QLatin1String("\r\n") || read == QLatin1String("\n"))
- chunkedSize = -1;
- }
- if (chunkedSize == -1) {
- everythingRead = true;
- break;
- }
-
- // make sure that you can read the terminating CRLF,
- // otherwise wait until next time...
- n = socket->bytesAvailable();
- if (n == 0)
- break;
- if (n == chunkedSize || n == chunkedSize+1) {
- n = chunkedSize - 1;
- if (n == 0)
- break;
- }
-
- // read data
- qint64 toRead = chunkedSize < 0 ? n : qMin(n, chunkedSize);
- if (!arr)
- arr = new QByteArray;
- uint oldArrSize = arr->size();
- arr->resize(oldArrSize + toRead);
- qint64 read = socket->read(arr->data()+oldArrSize, toRead);
- arr->resize(oldArrSize + read);
-
- chunkedSize -= read;
-
- if (chunkedSize == 0 && n - read >= 2) {
- // read terminating CRLF
- char tmp[2];
- socket->read(tmp, 2);
- if (tmp[0] != '\r' || tmp[1] != '\n') {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Invalid HTTP chunked body")),
- QHttp::WrongContentLength);
- closeConn();
- delete arr;
- return;
- }
- }
- }
- } else if (response.hasContentLength()) {
- if (repost && (n < response.contentLength())) {
- // wait for the content to be available fully
- // if repost is required, the content is ignored
- return;
- }
- n = qMin(qint64(response.contentLength() - bytesDone), n);
- if (n > 0) {
- arr = new QByteArray;
- arr->resize(n);
- qint64 read = socket->read(arr->data(), n);
- arr->resize(read);
- }
- if (bytesDone + q->bytesAvailable() + n == response.contentLength())
- everythingRead = true;
- } else if (n > 0) {
- // workaround for VC++ bug
- QByteArray temp = socket->readAll();
- arr = new QByteArray(temp);
- }
-
- if (arr && !repost) {
- n = arr->size();
- if (toDevice) {
- qint64 bytesWritten;
- bytesWritten = toDevice->write(*arr, n);
- delete arr;
- arr = 0;
- // if writing to the device does not succeed, quit with error
- if (bytesWritten == -1 || bytesWritten < n) {
- finishedWithError(QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Error writing response to device")), QHttp::UnknownError);
- } else {
- bytesDone += bytesWritten;
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp::_q_slotReadyRead(): read %lld bytes (%lld bytes done)", n, bytesDone);
-#endif
- }
- if (response.hasContentLength())
- emit q->dataReadProgress(bytesDone, response.contentLength());
- else
- emit q->dataReadProgress(bytesDone, 0);
- } else {
- char *ptr = rba.reserve(arr->size());
- memcpy(ptr, arr->data(), arr->size());
- delete arr;
- arr = 0;
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp::_q_slotReadyRead(): read %lld bytes (%lld bytes done)", n, bytesDone + q->bytesAvailable());
-#endif
- if (response.hasContentLength())
- emit q->dataReadProgress(bytesDone + q->bytesAvailable(), response.contentLength());
- else
- emit q->dataReadProgress(bytesDone + q->bytesAvailable(), 0);
- emit q->readyRead(response);
- }
- }
-
- delete arr;
- }
-
- if (everythingRead) {
- if (repost) {
- _q_slotSendRequest();
- return;
- }
- // Handle "Connection: close"
- if (response.value(QLatin1String("connection")).toLower() == QLatin1String("close")) {
- closeConn();
- } else {
- setState(QHttp::Connected);
- // Start a timer, so that we emit the keep alive signal
- // "after" this method returned.
- QMetaObject::invokeMethod(q, "_q_slotDoFinished", Qt::QueuedConnection);
- }
- }
-}
-
-void QHttpPrivate::_q_slotDoFinished()
-{
- if (state == QHttp::Connected) {
- finishedWithSuccess();
- } else if (state != QHttp::Unconnected) {
- setState(QHttp::Unconnected);
- finishedWithSuccess();
- }
-}
-
-
-/*!
- Returns the current state of the object. When the state changes,
- the stateChanged() signal is emitted.
-
- \sa State stateChanged()
-*/
-QHttp::State QHttp::state() const
-{
- Q_D(const QHttp);
- return d->state;
-}
-
-/*!
- Returns the last error that occurred. This is useful to find out
- what happened when receiving a requestFinished() or a done()
- signal with the \c error argument \c true.
-
- If you start a new request, the error status is reset to \c NoError.
-*/
-QHttp::Error QHttp::error() const
-{
- Q_D(const QHttp);
- return d->error;
-}
-
-/*!
- Returns a human-readable description of the last error that
- occurred. This is useful to present a error message to the user
- when receiving a requestFinished() or a done() signal with the \c
- error argument \c true.
-*/
-QString QHttp::errorString() const
-{
- Q_D(const QHttp);
- return d->errorString;
-}
-
-void QHttpPrivate::setState(int s)
-{
- Q_Q(QHttp);
-#if defined(QHTTP_DEBUG)
- qDebug("QHttp state changed %d -> %d", state, s);
-#endif
- state = QHttp::State(s);
- emit q->stateChanged(s);
-}
-
-void QHttpPrivate::closeConn()
-{
- Q_Q(QHttp);
- // If no connection is open -> ignore
- if (state == QHttp::Closing || state == QHttp::Unconnected)
- return;
-
- postDevice = 0;
- setState(QHttp::Closing);
-
- // Already closed ?
- if (!socket || !socket->isOpen()) {
- QMetaObject::invokeMethod(q, "_q_slotDoFinished", Qt::QueuedConnection);
- } else {
- // Close now.
- socket->close();
- }
-}
-
-void QHttpPrivate::setSock(QTcpSocket *sock)
-{
- Q_Q(const QHttp);
-
- // disconnect all existing signals
- if (socket)
- socket->disconnect();
- if (deleteSocket)
- delete socket;
-
- // use the new QTcpSocket socket, or create one if socket is 0.
- deleteSocket = (sock == 0);
- socket = sock;
- if (!socket) {
-#ifndef QT_NO_OPENSSL
- if (QSslSocket::supportsSsl())
- socket = new QSslSocket();
- else
-#endif
- socket = new QTcpSocket();
- }
-
- // connect all signals
- QObject::connect(socket, SIGNAL(connected()), q, SLOT(_q_slotConnected()));
- QObject::connect(socket, SIGNAL(disconnected()), q, SLOT(_q_slotClosed()));
- QObject::connect(socket, SIGNAL(readyRead()), q, SLOT(_q_slotReadyRead()));
- QObject::connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), q, SLOT(_q_slotError(QAbstractSocket::SocketError)));
- QObject::connect(socket, SIGNAL(bytesWritten(qint64)),
- q, SLOT(_q_slotBytesWritten(qint64)));
-#ifndef QT_NO_NETWORKPROXY
- QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
- q, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-#endif
-
-#ifndef QT_NO_OPENSSL
- if (qobject_cast<QSslSocket *>(socket)) {
- QObject::connect(socket, SIGNAL(sslErrors(QList<QSslError>)),
- q, SIGNAL(sslErrors(QList<QSslError>)));
- QObject::connect(socket, SIGNAL(encryptedBytesWritten(qint64)),
- q, SLOT(_q_slotEncryptedBytesWritten(qint64)));
- }
-#endif
-}
-
-/*!
- Tells the QSslSocket used for the Http connection to ignore the errors
- reported in the sslErrors() signal.
-
- Note that this function must be called from within a slot connected to the
- sslErrors() signal to have any effect.
-
- \sa QSslSocket QSslSocket::sslErrors()
-*/
-#ifndef QT_NO_OPENSSL
-void QHttp::ignoreSslErrors()
-{
- Q_D(QHttp);
- QSslSocket *sslSocket = qobject_cast<QSslSocket *>(d->socket);
- if (sslSocket)
- sslSocket->ignoreSslErrors();
-}
-#endif
-
-QT_END_NAMESPACE
-
-#include "moc_qhttp.cpp"
-
-#endif
diff --git a/src/network/access/qhttp.h b/src/network/access/qhttp.h
deleted file mode 100644
index 83b23f85f9..0000000000
--- a/src/network/access/qhttp.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtNetwork module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QHTTP_H
-#define QHTTP_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qstringlist.h>
-#include <QtCore/qmap.h>
-#include <QtCore/qpair.h>
-#include <QtCore/qscopedpointer.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Network)
-
-#ifndef QT_NO_HTTP
-
-class QTcpSocket;
-class QTimerEvent;
-class QIODevice;
-class QAuthenticator;
-class QNetworkProxy;
-class QSslError;
-
-class QHttpPrivate;
-
-class QHttpHeaderPrivate;
-class Q_NETWORK_EXPORT QHttpHeader
-{
-public:
- QHttpHeader();
- QHttpHeader(const QHttpHeader &header);
- QHttpHeader(const QString &str);
- virtual ~QHttpHeader();
-
- QHttpHeader &operator=(const QHttpHeader &h);
-
- void setValue(const QString &key, const QString &value);
- void setValues(const QList<QPair<QString, QString> > &values);
- void addValue(const QString &key, const QString &value);
- QList<QPair<QString, QString> > values() const;
- bool hasKey(const QString &key) const;
- QStringList keys() const;
- QString value(const QString &key) const;
- QStringList allValues(const QString &key) const;
- void removeValue(const QString &key);
- void removeAllValues(const QString &key);
-
- // ### Qt 5: change to qint64
- bool hasContentLength() const;
- uint contentLength() const;
- void setContentLength(int len);
-
- bool hasContentType() const;
- QString contentType() const;
- void setContentType(const QString &type);
-
- virtual QString toString() const;
- bool isValid() const;
-
- virtual int majorVersion() const = 0;
- virtual int minorVersion() const = 0;
-
-protected:
- virtual bool parseLine(const QString &line, int number);
- bool parse(const QString &str);
- void setValid(bool);
-
- QHttpHeader(QHttpHeaderPrivate &dd, const QString &str = QString());
- QHttpHeader(QHttpHeaderPrivate &dd, const QHttpHeader &header);
- QScopedPointer<QHttpHeaderPrivate> d_ptr;
-
-private:
- Q_DECLARE_PRIVATE(QHttpHeader)
-};
-
-class QHttpResponseHeaderPrivate;
-class Q_NETWORK_EXPORT QHttpResponseHeader : public QHttpHeader
-{
-public:
- QHttpResponseHeader();
- QHttpResponseHeader(const QHttpResponseHeader &header);
- QHttpResponseHeader(const QString &str);
- QHttpResponseHeader(int code, const QString &text = QString(), int majorVer = 1, int minorVer = 1);
- QHttpResponseHeader &operator=(const QHttpResponseHeader &header);
-
- void setStatusLine(int code, const QString &text = QString(), int majorVer = 1, int minorVer = 1);
-
- int statusCode() const;
- QString reasonPhrase() const;
-
- int majorVersion() const;
- int minorVersion() const;
-
- QString toString() const;
-
-protected:
- bool parseLine(const QString &line, int number);
-
-private:
- Q_DECLARE_PRIVATE(QHttpResponseHeader)
- friend class QHttpPrivate;
-};
-
-class QHttpRequestHeaderPrivate;
-class Q_NETWORK_EXPORT QHttpRequestHeader : public QHttpHeader
-{
-public:
- QHttpRequestHeader();
- QHttpRequestHeader(const QString &method, const QString &path, int majorVer = 1, int minorVer = 1);
- QHttpRequestHeader(const QHttpRequestHeader &header);
- QHttpRequestHeader(const QString &str);
- QHttpRequestHeader &operator=(const QHttpRequestHeader &header);
-
- void setRequest(const QString &method, const QString &path, int majorVer = 1, int minorVer = 1);
-
- QString method() const;
- QString path() const;
-
- int majorVersion() const;
- int minorVersion() const;
-
- QString toString() const;
-
-protected:
- bool parseLine(const QString &line, int number);
-
-private:
- Q_DECLARE_PRIVATE(QHttpRequestHeader)
-};
-
-class Q_NETWORK_EXPORT QHttp : public QObject
-{
- Q_OBJECT
-
-public:
- enum ConnectionMode {
- ConnectionModeHttp,
- ConnectionModeHttps
- };
-
- explicit QHttp(QObject *parent = 0);
- QHttp(const QString &hostname, quint16 port = 80, QObject *parent = 0);
- QHttp(const QString &hostname, ConnectionMode mode, quint16 port = 0, QObject *parent = 0);
- virtual ~QHttp();
-
- enum State {
- Unconnected,
- HostLookup,
- Connecting,
- Sending,
- Reading,
- Connected,
- Closing
- };
- enum Error {
- NoError,
- UnknownError,
- HostNotFound,
- ConnectionRefused,
- UnexpectedClose,
- InvalidResponseHeader,
- WrongContentLength,
- Aborted,
- AuthenticationRequiredError,
- ProxyAuthenticationRequiredError
- };
-
- int setHost(const QString &hostname, quint16 port = 80);
- int setHost(const QString &hostname, ConnectionMode mode, quint16 port = 0);
-
- int setSocket(QTcpSocket *socket);
- int setUser(const QString &username, const QString &password = QString());
-
-#ifndef QT_NO_NETWORKPROXY
- int setProxy(const QString &host, int port,
- const QString &username = QString(),
- const QString &password = QString());
- int setProxy(const QNetworkProxy &proxy);
-#endif
-
- int get(const QString &path, QIODevice *to=0);
- int post(const QString &path, QIODevice *data, QIODevice *to=0 );
- int post(const QString &path, const QByteArray &data, QIODevice *to=0);
- int head(const QString &path);
- int request(const QHttpRequestHeader &header, QIODevice *device=0, QIODevice *to=0);
- int request(const QHttpRequestHeader &header, const QByteArray &data, QIODevice *to=0);
-
- int closeConnection();
- int close();
-
- qint64 bytesAvailable() const;
- qint64 read(char *data, qint64 maxlen);
- QByteArray readAll();
-
- int currentId() const;
- QIODevice *currentSourceDevice() const;
- QIODevice *currentDestinationDevice() const;
- QHttpRequestHeader currentRequest() const;
- QHttpResponseHeader lastResponse() const;
- bool hasPendingRequests() const;
- void clearPendingRequests();
-
- State state() const;
-
- Error error() const;
- QString errorString() const;
-
-public Q_SLOTS:
- void abort();
-
-#ifndef QT_NO_OPENSSL
- void ignoreSslErrors();
-#endif
-
-Q_SIGNALS:
- void stateChanged(int);
- void responseHeaderReceived(const QHttpResponseHeader &resp);
- void readyRead(const QHttpResponseHeader &resp);
-
- // ### Qt 5: change to qint64
- void dataSendProgress(int, int);
- void dataReadProgress(int, int);
-
- void requestStarted(int);
- void requestFinished(int, bool);
- void done(bool);
-
-#ifndef QT_NO_NETWORKPROXY
- void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *);
-#endif
- void authenticationRequired(const QString &hostname, quint16 port, QAuthenticator *);
-
-#ifndef QT_NO_OPENSSL
- void sslErrors(const QList<QSslError> &errors);
-#endif
-
-private:
- Q_DISABLE_COPY(QHttp)
- Q_DECLARE_PRIVATE(QHttp)
-
- Q_PRIVATE_SLOT(d_func(), void _q_startNextRequest())
- Q_PRIVATE_SLOT(d_func(), void _q_slotReadyRead())
- Q_PRIVATE_SLOT(d_func(), void _q_slotConnected())
- Q_PRIVATE_SLOT(d_func(), void _q_slotError(QAbstractSocket::SocketError))
- Q_PRIVATE_SLOT(d_func(), void _q_slotClosed())
- Q_PRIVATE_SLOT(d_func(), void _q_slotBytesWritten(qint64 numBytes))
-#ifndef QT_NO_OPENSSL
- Q_PRIVATE_SLOT(d_func(), void _q_slotEncryptedBytesWritten(qint64 numBytes))
-#endif
- Q_PRIVATE_SLOT(d_func(), void _q_slotDoFinished())
- Q_PRIVATE_SLOT(d_func(), void _q_slotSendRequest())
- Q_PRIVATE_SLOT(d_func(), void _q_continuePost())
-
- friend class QHttpNormalRequest;
- friend class QHttpSetHostRequest;
- friend class QHttpSetSocketRequest;
- friend class QHttpSetUserRequest;
- friend class QHttpSetProxyRequest;
- friend class QHttpCloseRequest;
- friend class QHttpPGHRequest;
-};
-
-#endif // QT_NO_HTTP
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QHTTP_H
diff --git a/src/network/access/qhttpheader.cpp b/src/network/access/qhttpheader.cpp
new file mode 100644
index 0000000000..6e87a05c6b
--- /dev/null
+++ b/src/network/access/qhttpheader.cpp
@@ -0,0 +1,770 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//#define QHTTP_DEBUG
+
+#include <qplatformdefs.h>
+#include "qhttpheader_p.h"
+
+#ifndef QT_NO_HTTP
+# include "private/qobject_p.h"
+# include "qtcpsocket.h"
+# include "qsslsocket.h"
+# include "qtextstream.h"
+# include "qmap.h"
+# include "qlist.h"
+# include "qstring.h"
+# include "qstringlist.h"
+# include "qbuffer.h"
+# include "private/qringbuffer_p.h"
+# include "qcoreevent.h"
+# include "qurl.h"
+# include "qnetworkproxy.h"
+# include "qauthenticator.h"
+# include "qauthenticator_p.h"
+# include "qdebug.h"
+# include "qtimer.h"
+#endif
+
+#ifndef QT_NO_HTTP
+
+QT_BEGIN_NAMESPACE
+
+class QHttpHeaderPrivate
+{
+ Q_DECLARE_PUBLIC(QHttpHeader)
+public:
+ inline virtual ~QHttpHeaderPrivate() {}
+
+ QList<QPair<QString, QString> > values;
+ bool valid;
+ QHttpHeader *q_ptr;
+};
+
+/****************************************************
+ *
+ * QHttpHeader
+ *
+ ****************************************************/
+
+/*!
+ \class QHttpHeader
+ \obsolete
+ \brief The QHttpHeader class contains header information for HTTP.
+
+ \ingroup network
+ \inmodule QtNetwork
+
+ In most cases you should use the more specialized derivatives of
+ this class, QHttpResponseHeader and QHttpRequestHeader, rather
+ than directly using QHttpHeader.
+
+ QHttpHeader provides the HTTP header fields. A HTTP header field
+ consists of a name followed by a colon, a single space, and the
+ field value. (See RFC 1945.) Field names are case-insensitive. A
+ typical header field looks like this:
+ \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 0
+
+ In the API the header field name is called the "key" and the
+ content is called the "value". You can get and set a header
+ field's value by using its key with value() and setValue(), e.g.
+ \snippet doc/src/snippets/code/src_network_access_qhttp.cpp 1
+
+ Some fields are so common that getters and setters are provided
+ for them as a convenient alternative to using \l value() and
+ \l setValue(), e.g. contentLength() and contentType(),
+ setContentLength() and setContentType().
+
+ Each header key has a \e single value associated with it. If you
+ set the value for a key which already exists the previous value
+ will be discarded.
+
+ \sa QHttpRequestHeader QHttpResponseHeader
+*/
+
+/*!
+ \fn int QHttpHeader::majorVersion() const
+
+ Returns the major protocol-version of the HTTP header.
+*/
+
+/*!
+ \fn int QHttpHeader::minorVersion() const
+
+ Returns the minor protocol-version of the HTTP header.
+*/
+
+/*!
+ Constructs an empty HTTP header.
+*/
+QHttpHeader::QHttpHeader()
+ : d_ptr(new QHttpHeaderPrivate)
+{
+ Q_D(QHttpHeader);
+ d->q_ptr = this;
+ d->valid = true;
+}
+
+/*!
+ Constructs a copy of \a header.
+*/
+QHttpHeader::QHttpHeader(const QHttpHeader &header)
+ : d_ptr(new QHttpHeaderPrivate)
+{
+ Q_D(QHttpHeader);
+ d->q_ptr = this;
+ d->valid = header.d_func()->valid;
+ d->values = header.d_func()->values;
+}
+
+/*!
+ Constructs a HTTP header for \a str.
+
+ This constructor parses the string \a str for header fields and
+ adds this information. The \a str should consist of one or more
+ "\r\n" delimited lines; each of these lines should have the format
+ key, colon, space, value.
+*/
+QHttpHeader::QHttpHeader(const QString &str)
+ : d_ptr(new QHttpHeaderPrivate)
+{
+ Q_D(QHttpHeader);
+ d->q_ptr = this;
+ d->valid = true;
+ parse(str);
+}
+
+/*! \internal
+ */
+QHttpHeader::QHttpHeader(QHttpHeaderPrivate &dd, const QString &str)
+ : d_ptr(&dd)
+{
+ Q_D(QHttpHeader);
+ d->q_ptr = this;
+ d->valid = true;
+ if (!str.isEmpty())
+ parse(str);
+}
+
+/*! \internal
+ */
+QHttpHeader::QHttpHeader(QHttpHeaderPrivate &dd, const QHttpHeader &header)
+ : d_ptr(&dd)
+{
+ Q_D(QHttpHeader);
+ d->q_ptr = this;
+ d->valid = header.d_func()->valid;
+ d->values = header.d_func()->values;
+}
+/*!
+ Destructor.
+*/
+QHttpHeader::~QHttpHeader()
+{
+}
+
+/*!
+ Assigns \a h and returns a reference to this http header.
+*/
+QHttpHeader &QHttpHeader::operator=(const QHttpHeader &h)
+{
+ Q_D(QHttpHeader);
+ d->values = h.d_func()->values;
+ d->valid = h.d_func()->valid;
+ return *this;
+}
+
+/*!
+ Returns true if the HTTP header is valid; otherwise returns false.
+
+ A QHttpHeader is invalid if it was created by parsing a malformed string.
+*/
+bool QHttpHeader::isValid() const
+{
+ Q_D(const QHttpHeader);
+ return d->valid;
+}
+
+/*! \internal
+ Parses the HTTP header string \a str for header fields and adds
+ the keys/values it finds. If the string is not parsed successfully
+ the QHttpHeader becomes \link isValid() invalid\endlink.
+
+ Returns true if \a str was successfully parsed; otherwise returns false.
+
+ \sa toString()
+*/
+bool QHttpHeader::parse(const QString &str)
+{
+ Q_D(QHttpHeader);
+ QStringList lst;
+ int pos = str.indexOf(QLatin1Char('\n'));
+ if (pos > 0 && str.at(pos - 1) == QLatin1Char('\r'))
+ lst = str.trimmed().split(QLatin1String("\r\n"));
+ else
+ lst = str.trimmed().split(QLatin1String("\n"));
+ lst.removeAll(QString()); // No empties
+
+ if (lst.isEmpty())
+ return true;
+
+ QStringList lines;
+ QStringList::Iterator it = lst.begin();
+ for (; it != lst.end(); ++it) {
+ if (!(*it).isEmpty()) {
+ if ((*it)[0].isSpace()) {
+ if (!lines.isEmpty()) {
+ lines.last() += QLatin1Char(' ');
+ lines.last() += (*it).trimmed();
+ }
+ } else {
+ lines.append((*it));
+ }
+ }
+ }
+
+ int number = 0;
+ it = lines.begin();
+ for (; it != lines.end(); ++it) {
+ if (!parseLine(*it, number++)) {
+ d->valid = false;
+ return false;
+ }
+ }
+ return true;
+}
+
+/*! \internal
+*/
+void QHttpHeader::setValid(bool v)
+{
+ Q_D(QHttpHeader);
+ d->valid = v;
+}
+
+/*!
+ Returns the first value for the entry with the given \a key. If no entry
+ has this \a key, an empty string is returned.
+
+ \sa setValue() removeValue() hasKey() keys()
+*/
+QString QHttpHeader::value(const QString &key) const
+{
+ Q_D(const QHttpHeader);
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
+ while (it != d->values.constEnd()) {
+ if ((*it).first.toLower() == lowercaseKey)
+ return (*it).second;
+ ++it;
+ }
+ return QString();
+}
+
+/*!
+ Returns all the entries with the given \a key. If no entry
+ has this \a key, an empty string list is returned.
+*/
+QStringList QHttpHeader::allValues(const QString &key) const
+{
+ Q_D(const QHttpHeader);
+ QString lowercaseKey = key.toLower();
+ QStringList valueList;
+ QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
+ while (it != d->values.constEnd()) {
+ if ((*it).first.toLower() == lowercaseKey)
+ valueList.append((*it).second);
+ ++it;
+ }
+ return valueList;
+}
+
+/*!
+ Returns a list of the keys in the HTTP header.
+
+ \sa hasKey()
+*/
+QStringList QHttpHeader::keys() const
+{
+ Q_D(const QHttpHeader);
+ QStringList keyList;
+ QSet<QString> seenKeys;
+ QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
+ while (it != d->values.constEnd()) {
+ const QString &key = (*it).first;
+ QString lowercaseKey = key.toLower();
+ if (!seenKeys.contains(lowercaseKey)) {
+ keyList.append(key);
+ seenKeys.insert(lowercaseKey);
+ }
+ ++it;
+ }
+ return keyList;
+}
+
+/*!
+ Returns true if the HTTP header has an entry with the given \a
+ key; otherwise returns false.
+
+ \sa value() setValue() keys()
+*/
+bool QHttpHeader::hasKey(const QString &key) const
+{
+ Q_D(const QHttpHeader);
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
+ while (it != d->values.constEnd()) {
+ if ((*it).first.toLower() == lowercaseKey)
+ return true;
+ ++it;
+ }
+ return false;
+}
+
+/*!
+ Sets the value of the entry with the \a key to \a value.
+
+ If no entry with \a key exists, a new entry with the given \a key
+ and \a value is created. If an entry with the \a key already
+ exists, the first value is discarded and replaced with the given
+ \a value.
+
+ \sa value() hasKey() removeValue()
+*/
+void QHttpHeader::setValue(const QString &key, const QString &value)
+{
+ Q_D(QHttpHeader);
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::Iterator it = d->values.begin();
+ while (it != d->values.end()) {
+ if ((*it).first.toLower() == lowercaseKey) {
+ (*it).second = value;
+ return;
+ }
+ ++it;
+ }
+ // not found so add
+ addValue(key, value);
+}
+
+/*!
+ Sets the header entries to be the list of key value pairs in \a values.
+*/
+void QHttpHeader::setValues(const QList<QPair<QString, QString> > &values)
+{
+ Q_D(QHttpHeader);
+ d->values = values;
+}
+
+/*!
+ Adds a new entry with the \a key and \a value.
+*/
+void QHttpHeader::addValue(const QString &key, const QString &value)
+{
+ Q_D(QHttpHeader);
+ d->values.append(qMakePair(key, value));
+}
+
+/*!
+ Returns all the entries in the header.
+*/
+QList<QPair<QString, QString> > QHttpHeader::values() const
+{
+ Q_D(const QHttpHeader);
+ return d->values;
+}
+
+/*!
+ Removes the entry with the key \a key from the HTTP header.
+
+ \sa value() setValue()
+*/
+void QHttpHeader::removeValue(const QString &key)
+{
+ Q_D(QHttpHeader);
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::Iterator it = d->values.begin();
+ while (it != d->values.end()) {
+ if ((*it).first.toLower() == lowercaseKey) {
+ d->values.erase(it);
+ return;
+ }
+ ++it;
+ }
+}
+
+/*!
+ Removes all the entries with the key \a key from the HTTP header.
+*/
+void QHttpHeader::removeAllValues(const QString &key)
+{
+ Q_D(QHttpHeader);
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::Iterator it = d->values.begin();
+ while (it != d->values.end()) {
+ if ((*it).first.toLower() == lowercaseKey) {
+ it = d->values.erase(it);
+ continue;
+ }
+ ++it;
+ }
+}
+
+/*! \internal
+ Parses the single HTTP header line \a line which has the format
+ key, colon, space, value, and adds key/value to the headers. The
+ linenumber is \a number. Returns true if the line was successfully
+ parsed and the key/value added; otherwise returns false.
+
+ \sa parse()
+*/
+bool QHttpHeader::parseLine(const QString &line, int)
+{
+ int i = line.indexOf(QLatin1Char(':'));
+ if (i == -1)
+ return false;
+
+ addValue(line.left(i).trimmed(), line.mid(i + 1).trimmed());
+
+ return true;
+}
+
+/*!
+ Returns a string representation of the HTTP header.
+
+ The string is suitable for use by the constructor that takes a
+ QString. It consists of lines with the format: key, colon, space,
+ value, "\r\n".
+*/
+QString QHttpHeader::toString() const
+{
+ Q_D(const QHttpHeader);
+ if (!isValid())
+ return QLatin1String("");
+
+ QString ret = QLatin1String("");
+
+ QList<QPair<QString, QString> >::ConstIterator it = d->values.constBegin();
+ while (it != d->values.constEnd()) {
+ ret += (*it).first + QLatin1String(": ") + (*it).second + QLatin1String("\r\n");
+ ++it;
+ }
+ return ret;
+}
+
+/*!
+ Returns true if the header has an entry for the special HTTP
+ header field \c content-length; otherwise returns false.
+
+ \sa contentLength() setContentLength()
+*/
+bool QHttpHeader::hasContentLength() const
+{
+ return hasKey(QLatin1String("content-length"));
+}
+
+/*!
+ Returns the value of the special HTTP header field \c
+ content-length.
+
+ \sa setContentLength() hasContentLength()
+*/
+uint QHttpHeader::contentLength() const
+{
+ return value(QLatin1String("content-length")).toUInt();
+}
+
+/*!
+ Sets the value of the special HTTP header field \c content-length
+ to \a len.
+
+ \sa contentLength() hasContentLength()
+*/
+void QHttpHeader::setContentLength(int len)
+{
+ setValue(QLatin1String("content-length"), QString::number(len));
+}
+
+/*!
+ Returns true if the header has an entry for the special HTTP
+ header field \c content-type; otherwise returns false.
+
+ \sa contentType() setContentType()
+*/
+bool QHttpHeader::hasContentType() const
+{
+ return hasKey(QLatin1String("content-type"));
+}
+
+/*!
+ Returns the value of the special HTTP header field \c content-type.
+
+ \sa setContentType() hasContentType()
+*/
+QString QHttpHeader::contentType() const
+{
+ QString type = value(QLatin1String("content-type"));
+ if (type.isEmpty())
+ return QString();
+
+ int pos = type.indexOf(QLatin1Char(';'));
+ if (pos == -1)
+ return type;
+
+ return type.left(pos).trimmed();
+}
+
+/*!
+ Sets the value of the special HTTP header field \c content-type to
+ \a type.
+
+ \sa contentType() hasContentType()
+*/
+void QHttpHeader::setContentType(const QString &type)
+{
+ setValue(QLatin1String("content-type"), type);
+}
+
+class QHttpResponseHeaderPrivate : public QHttpHeaderPrivate
+{
+ Q_DECLARE_PUBLIC(QHttpResponseHeader)
+public:
+ int statCode;
+ QString reasonPhr;
+ int majVer;
+ int minVer;
+};
+
+/****************************************************
+ *
+ * QHttpResponseHeader
+ *
+ ****************************************************/
+
+/*!
+ \class QHttpResponseHeader
+ \obsolete
+ \brief The QHttpResponseHeader class contains response header information for HTTP.
+
+ \ingroup network
+ \inmodule QtNetwork
+
+ HTTP responses have a status code that indicates the status of the
+ response. This code is a 3-digit integer result code (for details
+ see to RFC 1945). In addition to the status code, you can also
+ specify a human-readable text that describes the reason for the
+ code ("reason phrase"). This class allows you to get the status
+ code and the reason phrase.
+
+ \sa QHttpRequestHeader, {HTTP Example}
+*/
+
+/*!
+ Constructs an empty HTTP response header.
+*/
+QHttpResponseHeader::QHttpResponseHeader()
+ : QHttpHeader(*new QHttpResponseHeaderPrivate)
+{
+ setValid(false);
+}
+
+/*!
+ Constructs a copy of \a header.
+*/
+QHttpResponseHeader::QHttpResponseHeader(const QHttpResponseHeader &header)
+ : QHttpHeader(*new QHttpResponseHeaderPrivate, header)
+{
+ Q_D(QHttpResponseHeader);
+ d->statCode = header.d_func()->statCode;
+ d->reasonPhr = header.d_func()->reasonPhr;
+ d->majVer = header.d_func()->majVer;
+ d->minVer = header.d_func()->minVer;
+}
+
+/*!
+ Copies the contents of \a header into this QHttpResponseHeader.
+*/
+QHttpResponseHeader &QHttpResponseHeader::operator=(const QHttpResponseHeader &header)
+{
+ Q_D(QHttpResponseHeader);
+ QHttpHeader::operator=(header);
+ d->statCode = header.d_func()->statCode;
+ d->reasonPhr = header.d_func()->reasonPhr;
+ d->majVer = header.d_func()->majVer;
+ d->minVer = header.d_func()->minVer;
+ return *this;
+}
+
+/*!
+ Constructs a HTTP response header from the string \a str. The
+ string is parsed and the information is set. The \a str should
+ consist of one or more "\r\n" delimited lines; the first line should be the
+ status-line (format: HTTP-version, space, status-code, space,
+ reason-phrase); each of remaining lines should have the format key, colon,
+ space, value.
+*/
+QHttpResponseHeader::QHttpResponseHeader(const QString &str)
+ : QHttpHeader(*new QHttpResponseHeaderPrivate)
+{
+ parse(str);
+}
+
+/*!
+ \since 4.1
+
+ Constructs a QHttpResponseHeader, setting the status code to \a code, the
+ reason phrase to \a text and the protocol-version to \a majorVer and \a
+ minorVer.
+
+ \sa statusCode() reasonPhrase() majorVersion() minorVersion()
+*/
+QHttpResponseHeader::QHttpResponseHeader(int code, const QString &text, int majorVer, int minorVer)
+ : QHttpHeader(*new QHttpResponseHeaderPrivate)
+{
+ setStatusLine(code, text, majorVer, minorVer);
+}
+
+/*!
+ \since 4.1
+
+ Sets the status code to \a code, the reason phrase to \a text and
+ the protocol-version to \a majorVer and \a minorVer.
+
+ \sa statusCode() reasonPhrase() majorVersion() minorVersion()
+*/
+void QHttpResponseHeader::setStatusLine(int code, const QString &text, int majorVer, int minorVer)
+{
+ Q_D(QHttpResponseHeader);
+ setValid(true);
+ d->statCode = code;
+ d->reasonPhr = text;
+ d->majVer = majorVer;
+ d->minVer = minorVer;
+}
+
+/*!
+ Returns the status code of the HTTP response header.
+
+ \sa reasonPhrase() majorVersion() minorVersion()
+*/
+int QHttpResponseHeader::statusCode() const
+{
+ Q_D(const QHttpResponseHeader);
+ return d->statCode;
+}
+
+/*!
+ Returns the reason phrase of the HTTP response header.
+
+ \sa statusCode() majorVersion() minorVersion()
+*/
+QString QHttpResponseHeader::reasonPhrase() const
+{
+ Q_D(const QHttpResponseHeader);
+ return d->reasonPhr;
+}
+
+/*!
+ Returns the major protocol-version of the HTTP response header.
+
+ \sa minorVersion() statusCode() reasonPhrase()
+*/
+int QHttpResponseHeader::majorVersion() const
+{
+ Q_D(const QHttpResponseHeader);
+ return d->majVer;
+}
+
+/*!
+ Returns the minor protocol-version of the HTTP response header.
+
+ \sa majorVersion() statusCode() reasonPhrase()
+*/
+int QHttpResponseHeader::minorVersion() const
+{
+ Q_D(const QHttpResponseHeader);
+ return d->minVer;
+}
+
+/*! \internal
+*/
+bool QHttpResponseHeader::parseLine(const QString &line, int number)
+{
+ Q_D(QHttpResponseHeader);
+ if (number != 0)
+ return QHttpHeader::parseLine(line, number);
+
+ QString l = line.simplified();
+ if (l.length() < 10)
+ return false;
+
+ if (l.left(5) == QLatin1String("HTTP/") && l[5].isDigit() && l[6] == QLatin1Char('.') &&
+ l[7].isDigit() && l[8] == QLatin1Char(' ') && l[9].isDigit()) {
+ d->majVer = l[5].toLatin1() - '0';
+ d->minVer = l[7].toLatin1() - '0';
+
+ int pos = l.indexOf(QLatin1Char(' '), 9);
+ if (pos != -1) {
+ d->reasonPhr = l.mid(pos + 1);
+ d->statCode = l.mid(9, pos - 9).toInt();
+ } else {
+ d->statCode = l.mid(9).toInt();
+ d->reasonPhr.clear();
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+}
+
+/*! \reimp
+*/
+QString QHttpResponseHeader::toString() const
+{
+ Q_D(const QHttpResponseHeader);
+ QString ret(QLatin1String("HTTP/%1.%2 %3 %4\r\n%5\r\n"));
+ return ret.arg(d->majVer).arg(d->minVer).arg(d->statCode).arg(d->reasonPhr).arg(QHttpHeader::toString());
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/network/access/qhttpheader_p.h b/src/network/access/qhttpheader_p.h
new file mode 100644
index 0000000000..fec7da4f92
--- /dev/null
+++ b/src/network/access/qhttpheader_p.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QHTTP_H
+#define QHTTP_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qmap.h>
+#include <QtCore/qpair.h>
+#include <QtCore/qscopedpointer.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Network)
+
+#ifndef QT_NO_HTTP
+
+#if 0
+#pragma qt_class(QHttp)
+#endif
+
+class QHttpHeaderPrivate;
+class QHttpHeader
+{
+public:
+ QHttpHeader();
+ QHttpHeader(const QHttpHeader &header);
+ QHttpHeader(const QString &str);
+ virtual ~QHttpHeader();
+
+ QHttpHeader &operator=(const QHttpHeader &h);
+
+ void setValue(const QString &key, const QString &value);
+ void setValues(const QList<QPair<QString, QString> > &values);
+ void addValue(const QString &key, const QString &value);
+ QList<QPair<QString, QString> > values() const;
+ bool hasKey(const QString &key) const;
+ QStringList keys() const;
+ QString value(const QString &key) const;
+ QStringList allValues(const QString &key) const;
+ void removeValue(const QString &key);
+ void removeAllValues(const QString &key);
+
+ // ### Qt 5: change to qint64
+ bool hasContentLength() const;
+ uint contentLength() const;
+ void setContentLength(int len);
+
+ bool hasContentType() const;
+ QString contentType() const;
+ void setContentType(const QString &type);
+
+ virtual QString toString() const;
+ bool isValid() const;
+
+ virtual int majorVersion() const = 0;
+ virtual int minorVersion() const = 0;
+
+protected:
+ virtual bool parseLine(const QString &line, int number);
+ bool parse(const QString &str);
+ void setValid(bool);
+
+ QHttpHeader(QHttpHeaderPrivate &dd, const QString &str = QString());
+ QHttpHeader(QHttpHeaderPrivate &dd, const QHttpHeader &header);
+ QScopedPointer<QHttpHeaderPrivate> d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(QHttpHeader)
+};
+
+class QHttpResponseHeaderPrivate;
+class QHttpResponseHeader : public QHttpHeader
+{
+public:
+ QHttpResponseHeader();
+ QHttpResponseHeader(const QHttpResponseHeader &header);
+ QHttpResponseHeader(const QString &str);
+ QHttpResponseHeader(int code, const QString &text = QString(), int majorVer = 1, int minorVer = 1);
+ QHttpResponseHeader &operator=(const QHttpResponseHeader &header);
+
+ void setStatusLine(int code, const QString &text = QString(), int majorVer = 1, int minorVer = 1);
+
+ int statusCode() const;
+ QString reasonPhrase() const;
+
+ int majorVersion() const;
+ int minorVersion() const;
+
+ QString toString() const;
+
+protected:
+ bool parseLine(const QString &line, int number);
+
+private:
+ Q_DECLARE_PRIVATE(QHttpResponseHeader)
+ friend class QHttpPrivate;
+};
+
+#endif // QT_NO_HTTP
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QHTTP_H
diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp
index 75456581f8..6de7a807e4 100644
--- a/src/network/access/qhttpmultipart.cpp
+++ b/src/network/access/qhttpmultipart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpmultipart.h b/src/network/access/qhttpmultipart.h
index 76e8e14b8a..317b068e3d 100644
--- a/src/network/access/qhttpmultipart.h
+++ b/src/network/access/qhttpmultipart.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpmultipart_p.h b/src/network/access/qhttpmultipart_p.h
index f57b0eb8a2..0ab2fa1d7f 100644
--- a/src/network/access/qhttpmultipart_p.h
+++ b/src/network/access/qhttpmultipart_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index fca3d5999e..104a21f591 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,6 @@
#include <qbuffer.h>
#include <qpair.h>
-#include <qhttp.h>
#include <qdebug.h>
#ifndef QT_NO_HTTP
@@ -81,7 +80,7 @@ const int QHttpNetworkConnectionPrivate::defaultRePipelineLength = 2;
QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(const QString &hostName, quint16 port, bool encrypt)
: state(RunningState),
networkLayerState(Unknown),
- hostName(hostName), port(port), encrypt(encrypt),
+ hostName(hostName), port(port), encrypt(encrypt), delayIpv4(true),
channelCount(defaultChannelCount)
#ifndef QT_NO_NETWORKPROXY
, networkProxy(QNetworkProxy::NoProxy)
@@ -92,7 +91,7 @@ QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(const QString &host
QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(quint16 channelCount, const QString &hostName, quint16 port, bool encrypt)
: state(RunningState), networkLayerState(Unknown),
- hostName(hostName), port(port), encrypt(encrypt),
+ hostName(hostName), port(port), encrypt(encrypt), delayIpv4(true),
channelCount(channelCount)
#ifndef QT_NO_NETWORKPROXY
, networkProxy(QNetworkProxy::NoProxy)
@@ -116,6 +115,7 @@ QHttpNetworkConnectionPrivate::~QHttpNetworkConnectionPrivate()
void QHttpNetworkConnectionPrivate::init()
{
+ Q_Q(QHttpNetworkConnection);
for (int i = 0; i < channelCount; i++) {
channels[i].setConnection(this->q_func());
channels[i].ssl = encrypt;
@@ -125,6 +125,8 @@ void QHttpNetworkConnectionPrivate::init()
#endif
channels[i].init();
}
+ delayedConnectionTimer.setSingleShot(true);
+ QObject::connect(&delayedConnectionTimer, SIGNAL(timeout()), q, SLOT(_q_connectDelayedChannel()));
}
void QHttpNetworkConnectionPrivate::pauseConnection()
@@ -185,6 +187,12 @@ bool QHttpNetworkConnectionPrivate::shouldEmitChannelError(QAbstractSocket *sock
int i = indexOf(socket);
int otherSocket = (i == 0 ? 1 : 0);
+ // If the IPv4 connection still isn't started we need to start it now.
+ if (delayedConnectionTimer.isActive()) {
+ delayedConnectionTimer.stop();
+ channels[otherSocket].ensureConnection();
+ }
+
if (channelCount == 1) {
if (networkLayerState == QHttpNetworkConnectionPrivate::InProgress)
networkLayerState = QHttpNetworkConnectionPrivate::Unknown;
@@ -419,9 +427,23 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
if (priv->phase == QAuthenticatorPrivate::Done) {
pauseConnection();
if (!isProxy) {
+ if (channels[i].authenticationCredentialsSent) {
+ auth->detach();
+ priv = QAuthenticatorPrivate::getPrivate(*auth);
+ priv->hasFailed = true;
+ priv->phase = QAuthenticatorPrivate::Done;
+ channels[i].authenticationCredentialsSent = false;
+ }
emit reply->authenticationRequired(reply->request(), auth);
#ifndef QT_NO_NETWORKPROXY
} else {
+ if (channels[i].proxyCredentialsSent) {
+ auth->detach();
+ priv = QAuthenticatorPrivate::getPrivate(*auth);
+ priv->hasFailed = true;
+ priv->phase = QAuthenticatorPrivate::Done;
+ channels[i].proxyCredentialsSent = false;
+ }
emit reply->proxyAuthenticationRequired(networkProxy, auth);
#endif
}
@@ -459,7 +481,6 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
reply->d_func()->errorString = errorDetail(errorCode, socket);
emit reply->finishedWithError(errorCode, reply->d_func()->errorString);
// ### at this point the reply could be deleted
- socket->close();
return true;
}
//resend the request
@@ -482,6 +503,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket,
if (priv && priv->method != QAuthenticatorPrivate::None) {
QByteArray response = priv->calculateResponse(request.d->methodName(), request.d->uri(false));
request.setHeaderField("Authorization", response);
+ channels[i].authenticationCredentialsSent = true;
}
}
}
@@ -493,6 +515,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket,
if (priv && priv->method != QAuthenticatorPrivate::None) {
QByteArray response = priv->calculateResponse(request.d->methodName(), request.d->uri(false));
request.setHeaderField("Proxy-Authorization", response);
+ channels[i].proxyCredentialsSent = true;
}
}
}
@@ -632,9 +655,13 @@ void QHttpNetworkConnectionPrivate::fillPipeline(QAbstractSocket *socket)
// we do not like authentication stuff
// ### make sure to be OK with this in later releases
- if (!channels[i].authenticator.isNull() || !channels[i].authenticator.user().isEmpty())
+ if (!channels[i].authenticator.isNull()
+ && (!channels[i].authenticator.user().isEmpty()
+ || !channels[i].authenticator.password().isEmpty()))
return;
- if (!channels[i].proxyAuthenticator.isNull() || !channels[i].proxyAuthenticator.user().isEmpty())
+ if (!channels[i].proxyAuthenticator.isNull()
+ && (!channels[i].proxyAuthenticator.user().isEmpty()
+ || !channels[i].proxyAuthenticator.password().isEmpty()))
return;
// must be in ReadingState or WaitingState
@@ -965,12 +992,22 @@ void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(QHostInfo info)
{
bool bIpv4 = false;
bool bIpv6 = false;
+ bool foundAddress = false;
- foreach (QHostAddress address, info.addresses()) {
- if (address.protocol() == QAbstractSocket::IPv4Protocol)
+ foreach (const QHostAddress &address, info.addresses()) {
+ if (address.protocol() == QAbstractSocket::IPv4Protocol) {
+ if (!foundAddress) {
+ foundAddress = true;
+ delayIpv4 = false;
+ }
bIpv4 = true;
- else if (address.protocol() == QAbstractSocket::IPv6Protocol)
+ } else if (address.protocol() == QAbstractSocket::IPv6Protocol) {
+ if (!foundAddress) {
+ foundAddress = true;
+ delayIpv4 = true;
+ }
bIpv6 = true;
+ }
}
if (bIpv4 && bIpv6)
@@ -1010,8 +1047,24 @@ void QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup()
channels[0].networkLayerPreference = QAbstractSocket::IPv4Protocol;
channels[1].networkLayerPreference = QAbstractSocket::IPv6Protocol;
- channels[0].ensureConnection(); // Possibly delay this one..
- channels[1].ensureConnection();
+ int timeout = 300;
+#ifndef QT_NO_BEARERMANAGEMENT
+ if (networkSession) {
+ if (networkSession->configuration().bearerType() == QNetworkConfiguration::Bearer2G)
+ timeout = 800;
+ else if (networkSession->configuration().bearerType() == QNetworkConfiguration::BearerCDMA2000)
+ timeout = 500;
+ else if (networkSession->configuration().bearerType() == QNetworkConfiguration::BearerWCDMA)
+ timeout = 500;
+ else if (networkSession->configuration().bearerType() == QNetworkConfiguration::BearerHSPA)
+ timeout = 400;
+ }
+#endif
+ delayedConnectionTimer.start(timeout);
+ if (delayIpv4)
+ channels[1].ensureConnection();
+ else
+ channels[0].ensureConnection();
} else {
networkLayerState = InProgress;
channels[0].networkLayerPreference = QAbstractSocket::AnyIPProtocol;
@@ -1019,6 +1072,13 @@ void QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup()
}
}
+void QHttpNetworkConnectionPrivate::_q_connectDelayedChannel()
+{
+ if (delayIpv4)
+ channels[0].ensureConnection();
+ else
+ channels[1].ensureConnection();
+}
#ifndef QT_NO_BEARERMANAGEMENT
QHttpNetworkConnection::QHttpNetworkConnection(const QString &hostName, quint16 port, bool encrypt, QObject *parent, QSharedPointer<QNetworkSession> networkSession)
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 70b9cf3754..8ce9bf24fe 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -61,6 +61,7 @@
#include <qauthenticator.h>
#include <qnetworkproxy.h>
#include <qbuffer.h>
+#include <qtimer.h>
#include <private/qhttpnetworkheader_p.h>
#include <private/qhttpnetworkrequest_p.h>
@@ -134,6 +135,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_startNextRequest())
Q_PRIVATE_SLOT(d_func(), void _q_hostLookupFinished(QHostInfo))
+ Q_PRIVATE_SLOT(d_func(), void _q_connectDelayedChannel())
};
@@ -196,6 +198,7 @@ public:
void _q_startNextRequest(); // send the next request from the queue
void _q_hostLookupFinished(QHostInfo info);
+ void _q_connectDelayedChannel();
void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request);
@@ -207,8 +210,10 @@ public:
QString hostName;
quint16 port;
bool encrypt;
+ bool delayIpv4;
const int channelCount;
+ QTimer delayedConnectionTimer;
QHttpNetworkConnectionChannel *channels; // parallel connections to the server
bool shouldEmitChannelError(QAbstractSocket *socket);
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 072648cf62..3acfe54ef7 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,6 +75,8 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
, reconnectAttempts(2)
, authMethod(QAuthenticatorPrivate::None)
, proxyAuthMethod(QAuthenticatorPrivate::None)
+ , authenticationCredentialsSent(false)
+ , proxyCredentialsSent(false)
#ifndef QT_NO_OPENSSL
, ignoreAllSslErrors(false)
#endif
@@ -549,6 +551,14 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
// reset state
pipeliningSupported = PipeliningSupportUnknown;
+ authenticationCredentialsSent = false;
+ proxyCredentialsSent = false;
+ authenticator.detach();
+ QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(authenticator);
+ priv->hasFailed = false;
+ proxyAuthenticator.detach();
+ priv = QAuthenticatorPrivate::getPrivate(proxyAuthenticator);
+ priv->hasFailed = false;
// This workaround is needed since we use QAuthenticator for NTLM authentication. The "phase == Done"
// is the usual criteria for emitting authentication signals. The "phase" is set to "Done" when the
@@ -556,7 +566,7 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
// check the "phase" for generating the Authorization header. NTLM authentication is a two stage
// process & needs the "phase". To make sure the QAuthenticator uses the current username/password
// the phase is reset to Start.
- QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(authenticator);
+ priv = QAuthenticatorPrivate::getPrivate(authenticator);
if (priv && priv->phase == QAuthenticatorPrivate::Done)
priv->phase = QAuthenticatorPrivate::Start;
priv = QAuthenticatorPrivate::getPrivate(proxyAuthenticator);
@@ -580,8 +590,11 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
value = connection->d_func()->predictNextRequest().headerField("user-agent");
else
value = request.headerField("user-agent");
- if (!value.isEmpty())
- socket->proxy().setRawHeader("User-Agent", value);
+ if (!value.isEmpty()) {
+ QNetworkProxy proxy(socket->proxy());
+ proxy.setRawHeader("User-Agent", value); //detaches
+ socket->setProxy(proxy);
+ }
}
#endif
if (ssl) {
@@ -780,6 +793,9 @@ void QHttpNetworkConnectionChannel::handleStatus()
closeAndResendCurrentRequest();
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
}
+ } else {
+ //authentication cancelled, close the channel.
+ close();
}
} else {
emit reply->headerChanged();
@@ -951,6 +967,8 @@ void QHttpNetworkConnectionChannel::_q_connected()
// For the Happy Eyeballs we need to check if this is the first channel to connect.
if (!pendingEncrypt) {
if (connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::InProgress) {
+ if (connection->d_func()->delayedConnectionTimer.isActive())
+ connection->d_func()->delayedConnectionTimer.stop();
if (networkLayerPreference == QAbstractSocket::IPv4Protocol)
connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv4;
else if (networkLayerPreference == QAbstractSocket::IPv6Protocol)
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
index 7a4dd07db1..d5a0925f7d 100644
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -113,6 +113,8 @@ public:
QAuthenticatorPrivate::Method proxyAuthMethod;
QAuthenticator authenticator;
QAuthenticator proxyAuthenticator;
+ bool authenticationCredentialsSent;
+ bool proxyCredentialsSent;
#ifndef QT_NO_OPENSSL
bool ignoreAllSslErrors;
QList<QSslError> ignoreSslErrorsList;
diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp
index 1d457b90a7..531afe92e0 100644
--- a/src/network/access/qhttpnetworkheader.cpp
+++ b/src/network/access/qhttpnetworkheader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpnetworkheader_p.h b/src/network/access/qhttpnetworkheader_p.h
index 38db0506b9..00393b5e92 100644
--- a/src/network/access/qhttpnetworkheader_p.h
+++ b/src/network/access/qhttpnetworkheader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index e6d0d3238c..a9ba5d2b24 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index a6bf3fcc8e..1bb0832d19 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp
index cbc0d97e12..e39faaeaa8 100644
--- a/src/network/access/qhttpnetworkrequest.cpp
+++ b/src/network/access/qhttpnetworkrequest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpnetworkrequest_p.h b/src/network/access/qhttpnetworkrequest_p.h
index 4000ecad87..71e09eba06 100644
--- a/src/network/access/qhttpnetworkrequest_p.h
+++ b/src/network/access/qhttpnetworkrequest_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index f0755337fc..39a7e8ed08 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -364,7 +364,7 @@ void QHttpThreadDelegate::readyReadSlot()
void QHttpThreadDelegate::finishedSlot()
{
if (!httpReply) {
- qWarning() << "QHttpThreadDelegate::finishedSlot: HTTP reply had already been deleted, internal problem. Please report.";
+ qWarning("QHttpThreadDelegate::finishedSlot: HTTP reply had already been deleted, internal problem. Please report.");
return;
}
#ifdef QHTTPTHREADDELEGATE_DEBUG
@@ -420,7 +420,7 @@ void QHttpThreadDelegate::synchronousFinishedSlot()
void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail)
{
if (!httpReply) {
- qWarning() << "QHttpThreadDelegate::finishedWithErrorSlot: HTTP reply had already been deleted, internal problem. Please report.";
+ qWarning("QHttpThreadDelegate::finishedWithErrorSlot: HTTP reply had already been deleted, internal problem. Please report.");
return;
}
#ifdef QHTTPTHREADDELEGATE_DEBUG
diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
index d97193d7c7..366d3bcc60 100644
--- a/src/network/access/qhttpthreaddelegate_p.h
+++ b/src/network/access/qhttpthreaddelegate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessauthenticationmanager.cpp b/src/network/access/qnetworkaccessauthenticationmanager.cpp
index 1b15cf9cdf..30e3174f25 100644
--- a/src/network/access/qnetworkaccessauthenticationmanager.cpp
+++ b/src/network/access/qnetworkaccessauthenticationmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -159,6 +159,11 @@ void QNetworkAccessAuthenticationManager::cacheProxyCredentials(const QNetworkPr
QString realm = authenticator->realm();
QNetworkProxy proxy = p;
proxy.setUser(authenticator->user());
+
+ // don't cache null passwords, empty password may be valid though
+ if (authenticator->password().isNull())
+ return;
+
// Set two credentials: one with the username and one without
do {
// Set two credentials actually: one with and one without the realm
@@ -283,9 +288,12 @@ QNetworkAccessAuthenticationManager::fetchCachedCredentials(const QUrl &url,
QNetworkAuthenticationCache *auth =
static_cast<QNetworkAuthenticationCache *>(authenticationCache.requestEntryNow(cacheKey));
- QNetworkAuthenticationCredential cred = *auth->findClosestMatch(url.path());
+ QNetworkAuthenticationCredential *cred = auth->findClosestMatch(url.path());
+ QNetworkAuthenticationCredential ret;
+ if (cred)
+ ret = *cred;
authenticationCache.releaseEntry(cacheKey);
- return cred;
+ return ret;
}
void QNetworkAccessAuthenticationManager::clearCache()
diff --git a/src/network/access/qnetworkaccessauthenticationmanager_p.h b/src/network/access/qnetworkaccessauthenticationmanager_p.h
index ddfc11606d..7e7be8ca8a 100644
--- a/src/network/access/qnetworkaccessauthenticationmanager_p.h
+++ b/src/network/access/qnetworkaccessauthenticationmanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,7 +73,7 @@ public:
QString user;
QString password;
bool isNull() {
- return domain.isNull();
+ return domain.isNull() && user.isNull() && password.isNull();
}
};
Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_MOVABLE_TYPE);
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 8dfcb33282..6647c58f8d 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h
index 7f6aff9b79..f9563da4a7 100644
--- a/src/network/access/qnetworkaccessbackend_p.h
+++ b/src/network/access/qnetworkaccessbackend_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccesscache.cpp b/src/network/access/qnetworkaccesscache.cpp
index 0458a59e22..2594e53949 100644
--- a/src/network/access/qnetworkaccesscache.cpp
+++ b/src/network/access/qnetworkaccesscache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccesscache_p.h b/src/network/access/qnetworkaccesscache_p.h
index b9f468e767..813ba3c35f 100644
--- a/src/network/access/qnetworkaccesscache_p.h
+++ b/src/network/access/qnetworkaccesscache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccesscachebackend.cpp b/src/network/access/qnetworkaccesscachebackend.cpp
index 1881dac126..baf6292124 100644
--- a/src/network/access/qnetworkaccesscachebackend.cpp
+++ b/src/network/access/qnetworkaccesscachebackend.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccesscachebackend_p.h b/src/network/access/qnetworkaccesscachebackend_p.h
index be0f2fb84a..5444703793 100644
--- a/src/network/access/qnetworkaccesscachebackend_p.h
+++ b/src/network/access/qnetworkaccesscachebackend_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp
index 6a59bad2bd..678d6e404e 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend.cpp
+++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessdebugpipebackend_p.h b/src/network/access/qnetworkaccessdebugpipebackend_p.h
index d22acf7c9f..411c38b3ba 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend_p.h
+++ b/src/network/access/qnetworkaccessdebugpipebackend_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp
index 6a8f0993a0..0080e23a8f 100644
--- a/src/network/access/qnetworkaccessfilebackend.cpp
+++ b/src/network/access/qnetworkaccessfilebackend.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessfilebackend_p.h b/src/network/access/qnetworkaccessfilebackend_p.h
index 795d4b9d25..2fbf806851 100644
--- a/src/network/access/qnetworkaccessfilebackend_p.h
+++ b/src/network/access/qnetworkaccessfilebackend_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index 0461da284b..7b7ebb5e46 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessftpbackend_p.h b/src/network/access/qnetworkaccessftpbackend_p.h
index 2dc3c1becf..7338121493 100644
--- a/src/network/access/qnetworkaccessftpbackend_p.h
+++ b/src/network/access/qnetworkaccessftpbackend_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,7 +57,7 @@
#include "qnetworkaccesscache_p.h"
#include "qnetworkrequest.h"
#include "qnetworkreply.h"
-#include "QtNetwork/qftp.h"
+#include "private/qftp_p.h"
#include "QtCore/qpointer.h"
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 3978bd6c85..3a80b9ed92 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,6 +45,7 @@
#include "qnetworkreply.h"
#include "qnetworkreply_p.h"
#include "qnetworkcookie.h"
+#include "qnetworkcookiejar.h"
#include "qabstractnetworkcache.h"
#include "QtNetwork/qnetworksession.h"
@@ -60,7 +61,7 @@
#include "QtCore/qbuffer.h"
#include "QtCore/qurl.h"
#include "QtCore/qvector.h"
-#include "QtNetwork/qauthenticator.h"
+#include "QtNetwork/private/qauthenticator_p.h"
#include "QtNetwork/qsslconfiguration.h"
#include "QtNetwork/qnetworkconfigmanager.h"
#include "QtNetwork/qhttpmultipart.h"
@@ -285,11 +286,16 @@ static void ensureInitialized()
again, without emitting the authenticationRequired() signal. If it
rejects the credentials, this signal will be emitted again.
+ \note To have the request not send credentials you must not call
+ setUser() or setPassword() on the \a authenticator object. This
+ will result in the the \l finished() signal being emitted with a
+ \l QNetworkReply with error \l AuthenticationRequiredError.
+
\note It is not possible to use a QueuedConnection to connect to
this signal, as the connection will fail if the authenticator has
not been filled in with new information when the signal returns.
- \sa proxyAuthenticationRequired()
+ \sa proxyAuthenticationRequired(), QAuthenticator::setUser(), QAuthenticator::setPassword()
*/
/*!
@@ -1115,14 +1121,8 @@ void QNetworkAccessManagerPrivate::proxyAuthenticationRequired(const QNetworkPro
QNetworkProxy *lastProxyAuthentication)
{
Q_Q(QNetworkAccessManager);
- // ### FIXME Tracking of successful authentications
- // This code is a bit broken right now for SOCKS authentication
- // first request: proxyAuthenticationRequired gets emitted, credentials gets saved
- // second request: (proxy != backend->reply->lastProxyAuthentication) does not evaluate to true,
- // proxyAuthenticationRequired gets emitted again
- // possible solution: some tracking inside the authenticator
- // or a new function proxyAuthenticationSucceeded(true|false)
- if (proxy != *lastProxyAuthentication) {
+ QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*authenticator);
+ if (proxy != *lastProxyAuthentication && (!priv || !priv->hasFailed)) {
QNetworkAuthenticationCredential cred = authenticationManager->fetchCachedProxyCredentials(proxy);
if (!cred.isNull()) {
authenticator->setUser(cred.user);
diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h
index c707243ec6..72fd86c5a5 100644
--- a/src/network/access/qnetworkaccessmanager.h
+++ b/src/network/access/qnetworkaccessmanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h
index 39a9874acc..bc8df575a0 100644
--- a/src/network/access/qnetworkaccessmanager_p.h
+++ b/src/network/access/qnetworkaccessmanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 06707385fb..a5c4fb516c 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h
index 0f7690c174..fd9c825ddc 100644
--- a/src/network/access/qnetworkcookie.h
+++ b/src/network/access/qnetworkcookie.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -113,9 +113,6 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug, const QNetworkCookie &);
QT_END_NAMESPACE
-// ### Qt5 remove this include
-#include <QtNetwork/QNetworkCookieJar>
-
Q_DECLARE_METATYPE(QNetworkCookie)
Q_DECLARE_METATYPE(QList<QNetworkCookie>)
diff --git a/src/network/access/qnetworkcookie_p.h b/src/network/access/qnetworkcookie_p.h
index a059a7abbd..7e45219fce 100644
--- a/src/network/access/qnetworkcookie_p.h
+++ b/src/network/access/qnetworkcookie_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index a2fa689256..54c2ccfaba 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkcookiejar.h b/src/network/access/qnetworkcookiejar.h
index 006d58eafe..4ff27d8cf0 100644
--- a/src/network/access/qnetworkcookiejar.h
+++ b/src/network/access/qnetworkcookiejar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,15 +45,14 @@
#include <QtCore/QObject>
#include <QtCore/QUrl>
-// ### Qt5 remove this include
-#include <QtNetwork/QNetworkCookie>
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Network)
+class QNetworkCookie;
+
class QNetworkCookieJarPrivate;
class Q_NETWORK_EXPORT QNetworkCookieJar: public QObject
{
diff --git a/src/network/access/qnetworkcookiejar_p.h b/src/network/access/qnetworkcookiejar_p.h
index 34858d9c92..32fdecdb50 100644
--- a/src/network/access/qnetworkcookiejar_p.h
+++ b/src/network/access/qnetworkcookiejar_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index 1c515c2ac7..8dd2033a35 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkdiskcache.h b/src/network/access/qnetworkdiskcache.h
index 5492a02d29..b8f1de5930 100644
--- a/src/network/access/qnetworkdiskcache.h
+++ b/src/network/access/qnetworkdiskcache.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkdiskcache_p.h b/src/network/access/qnetworkdiskcache_p.h
index ceb300d08c..d8f386e9eb 100644
--- a/src/network/access/qnetworkdiskcache_p.h
+++ b/src/network/access/qnetworkdiskcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index 1ce7e8fce5..db62f2935a 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -586,13 +586,7 @@ QVariant QNetworkReply::attribute(QNetworkRequest::Attribute code) const
QSslConfiguration QNetworkReply::sslConfiguration() const
{
QSslConfiguration config;
-
- // determine if we support this extension
- int id = metaObject()->indexOfMethod("sslConfigurationImplementation()");
- if (id != -1) {
- void *arr[] = { &config, 0 };
- const_cast<QNetworkReply *>(this)->qt_metacall(QMetaObject::InvokeMetaMethod, id, arr);
- }
+ sslConfigurationImplementation(config);
return config;
}
@@ -602,15 +596,7 @@ QSslConfiguration QNetworkReply::sslConfiguration() const
*/
void QNetworkReply::setSslConfiguration(const QSslConfiguration &config)
{
- if (config.isNull())
- return;
-
- int id = metaObject()->indexOfMethod("setSslConfigurationImplementation(QSslConfiguration)");
- if (id != -1) {
- QSslConfiguration copy(config);
- void *arr[] = { 0, &copy };
- qt_metacall(QMetaObject::InvokeMetaMethod, id, arr);
- }
+ setSslConfigurationImplementation(config);
}
/*!
@@ -635,18 +621,53 @@ void QNetworkReply::setSslConfiguration(const QSslConfiguration &config)
*/
void QNetworkReply::ignoreSslErrors(const QList<QSslError> &errors)
{
- // do this cryptic trick, because we could not add a virtual method to this class later on
- // since that breaks binary compatibility
- int id = metaObject()->indexOfMethod("ignoreSslErrorsImplementation(QList<QSslError>)");
- if (id != -1) {
- QList<QSslError> copy(errors);
- void *arr[] = { 0, &copy };
- qt_metacall(QMetaObject::InvokeMetaMethod, id, arr);
- }
+ ignoreSslErrorsImplementation(errors);
}
#endif
/*!
+ \fn void QNetworkReply::sslConfigurationImplementation(QSslConfiguration &configuration) const
+ \since 5.0
+
+ This virtual method is provided to enable overriding the behavior of
+ sslConfiguration(). sslConfiguration() is a public wrapper for this method.
+ The configuration will be returned in \a configuration.
+
+ \sa sslConfiguration()
+*/
+void QNetworkReply::sslConfigurationImplementation(QSslConfiguration &) const
+{
+}
+
+/*!
+ \fn void QNetworkReply::setSslConfigurationImplementation(const QSslConfiguration &configuration)
+ \since 5.0
+
+ This virtual method is provided to enable overriding the behavior of
+ setSslConfiguration(). setSslConfiguration() is a public wrapper for this method.
+ If you override this method use \a configuration to set the SSL configuration.
+
+ \sa sslConfigurationImplementation(), setSslConfiguration()
+*/
+void QNetworkReply::setSslConfigurationImplementation(const QSslConfiguration &)
+{
+}
+
+/*!
+ \fn void QNetworkReply::ignoreSslErrorsImplementation(const QList<QSslError> &errors)
+ \since 5.0
+
+ This virtual method is provided to enable overriding the behavior of
+ ignoreSslErrors(). ignoreSslErrors() is a public wrapper for this method.
+ \a errors contains the errors the user wishes ignored.
+
+ \sa ignoreSslErrors()
+*/
+void QNetworkReply::ignoreSslErrorsImplementation(const QList<QSslError> &)
+{
+}
+
+/*!
If this function is called, SSL errors related to network
connection will be ignored, including certificate validation
errors.
diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h
index f8352a2dfe..492336bbf6 100644
--- a/src/network/access/qnetworkreply.h
+++ b/src/network/access/qnetworkreply.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -169,6 +169,10 @@ protected:
void setRawHeader(const QByteArray &headerName, const QByteArray &value);
void setAttribute(QNetworkRequest::Attribute code, const QVariant &value);
+ virtual void sslConfigurationImplementation(QSslConfiguration &) const;
+ virtual void setSslConfigurationImplementation(const QSslConfiguration &);
+ virtual void ignoreSslErrorsImplementation(const QList<QSslError> &);
+
private:
Q_DECLARE_PRIVATE(QNetworkReply)
};
diff --git a/src/network/access/qnetworkreply_p.h b/src/network/access/qnetworkreply_p.h
index 687e65252e..b725a11520 100644
--- a/src/network/access/qnetworkreply_p.h
+++ b/src/network/access/qnetworkreply_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkreplydataimpl.cpp b/src/network/access/qnetworkreplydataimpl.cpp
index 0cd10ce13b..22f40b2420 100644
--- a/src/network/access/qnetworkreplydataimpl.cpp
+++ b/src/network/access/qnetworkreplydataimpl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -70,19 +70,15 @@ QNetworkReplyDataImpl::QNetworkReplyDataImpl(QObject *parent, const QNetworkRequ
QNetworkReply::open(QIODevice::ReadOnly);
QUrl url = req.url();
-
- // FIXME qDecodeDataUrl should instead be rewritten to have the QByteArray
- // and the mime type as an output parameter and return a bool instead
- d->decodeDataUrlResult = qDecodeDataUrl(url);
-
- if (! d->decodeDataUrlResult.first.isNull()) {
- QString &mimeType = d->decodeDataUrlResult.first;
- qint64 size = d->decodeDataUrlResult.second.size();
+ QString mimeType;
+ QByteArray payload;
+ if (qDecodeDataUrl(url, mimeType, payload)) {
+ qint64 size = payload.size();
setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
setHeader(QNetworkRequest::ContentLengthHeader, size);
QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);
- d->decodedData.setBuffer(&d->decodeDataUrlResult.second);
+ d->decodedData.setData(payload);
d->decodedData.open(QIODevice::ReadOnly);
QMetaObject::invokeMethod(this, "downloadProgress", Qt::QueuedConnection,
diff --git a/src/network/access/qnetworkreplydataimpl_p.h b/src/network/access/qnetworkreplydataimpl_p.h
index a63c4b1eec..0b47bbbb34 100644
--- a/src/network/access/qnetworkreplydataimpl_p.h
+++ b/src/network/access/qnetworkreplydataimpl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -87,7 +87,6 @@ public:
QNetworkReplyDataImplPrivate();
~QNetworkReplyDataImplPrivate();
- QPair<QString, QByteArray> decodeDataUrlResult;
QBuffer decodedData;
Q_DECLARE_PUBLIC(QNetworkReplyDataImpl)
diff --git a/src/network/access/qnetworkreplyfileimpl.cpp b/src/network/access/qnetworkreplyfileimpl.cpp
index 7a0c5c7fcc..0b4c89987c 100644
--- a/src/network/access/qnetworkreplyfileimpl.cpp
+++ b/src/network/access/qnetworkreplyfileimpl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkreplyfileimpl_p.h b/src/network/access/qnetworkreplyfileimpl_p.h
index c9f5def12a..c097fedb68 100644
--- a/src/network/access/qnetworkreplyfileimpl_p.h
+++ b/src/network/access/qnetworkreplyfileimpl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 2df18b24d9..2c1ad95ea8 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,6 +48,7 @@
#include "qnetworkrequest.h"
#include "qnetworkreply.h"
#include "qnetworkrequest_p.h"
+#include "qnetworkcookie.h"
#include "qnetworkcookie_p.h"
#include "QtCore/qdatetime.h"
#include "QtCore/qelapsedtimer.h"
@@ -410,10 +411,10 @@ void QNetworkReplyHttpImpl::setSslConfigurationImplementation(const QSslConfigur
Q_UNUSED(newconfig);
}
-QSslConfiguration QNetworkReplyHttpImpl::sslConfigurationImplementation() const
+void QNetworkReplyHttpImpl::sslConfigurationImplementation(QSslConfiguration &configuration) const
{
Q_D(const QNetworkReplyHttpImpl);
- return d->sslConfiguration;
+ configuration = d->sslConfiguration;
}
#endif
@@ -1496,10 +1497,12 @@ void QNetworkReplyHttpImplPrivate::setResumeOffset(quint64 offset)
*/
bool QNetworkReplyHttpImplPrivate::start()
{
+#ifndef QT_NO_BEARERMANAGEMENT
if (!managerPrivate->networkSession) {
postRequest();
return true;
}
+#endif
// This is not ideal.
const QString host = url.host();
@@ -1510,11 +1513,13 @@ bool QNetworkReplyHttpImplPrivate::start()
return true;
}
+#ifndef QT_NO_BEARERMANAGEMENT
if (managerPrivate->networkSession->isOpen() &&
managerPrivate->networkSession->state() == QNetworkSession::Connected) {
postRequest();
return true;
}
+#endif
return false;
}
@@ -1846,7 +1851,7 @@ void QNetworkReplyHttpImplPrivate::error(QNetworkReplyImpl::NetworkError code, c
Q_Q(QNetworkReplyHttpImpl);
// Can't set and emit multiple errors.
if (errorCode != QNetworkReply::NoError) {
- qWarning() << "QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.";
+ qWarning("QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.");
return;
}
@@ -1959,7 +1964,7 @@ void QNetworkReplyHttpImplPrivate::setCachingEnabled(bool enable)
if (enable) {
if (bytesDownloaded) {
- qDebug() << "x" << bytesDownloaded;
+ qDebug("setCachingEnabled: %d bytesDownloaded", bytesDownloaded);
// refuse to enable in this case
qCritical("QNetworkReplyImpl: backend error: caching was enabled after some bytes had been written");
return;
diff --git a/src/network/access/qnetworkreplyhttpimpl_p.h b/src/network/access/qnetworkreplyhttpimpl_p.h
index 0c6721b646..432b769add 100644
--- a/src/network/access/qnetworkreplyhttpimpl_p.h
+++ b/src/network/access/qnetworkreplyhttpimpl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -94,16 +94,6 @@ public:
void setReadBufferSize(qint64 size);
bool canReadLine () const;
-#ifndef QT_NO_OPENSSL
- void ignoreSslErrors();
- // ### Qt5 Add proper virtual
- Q_INVOKABLE void ignoreSslErrorsImplementation(const QList<QSslError> &errors);
- // ### Qt5 Add proper virtual
- Q_INVOKABLE void setSslConfigurationImplementation(const QSslConfiguration &configuration);
- // ### Qt5 Add proper virtual
- Q_INVOKABLE QSslConfiguration sslConfigurationImplementation() const;
-#endif
-
Q_DECLARE_PRIVATE(QNetworkReplyHttpImpl)
Q_PRIVATE_SLOT(d_func(), void _q_startOperation())
Q_PRIVATE_SLOT(d_func(), void _q_cacheLoadReadyRead())
@@ -135,6 +125,13 @@ public:
Q_PRIVATE_SLOT(d_func(), void emitReplyUploadProgress(qint64, qint64))
+#ifndef QT_NO_OPENSSL
+protected:
+ void ignoreSslErrors();
+ void ignoreSslErrorsImplementation(const QList<QSslError> &errors);
+ void setSslConfigurationImplementation(const QSslConfiguration &configuration);
+ void sslConfigurationImplementation(QSslConfiguration &configuration) const;
+#endif
signals:
// To HTTP thread:
@@ -193,8 +190,6 @@ public:
// incoming from user
QNetworkAccessManager *manager;
QNetworkAccessManagerPrivate *managerPrivate;
- QNetworkRequest request;
- QNetworkAccessManager::Operation operation; // FIXME already in replyprivate?
QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread
bool synchronous;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 46cc364172..1f9efa6ed9 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,7 @@
#include "qnetworkreplyimpl_p.h"
#include "qnetworkaccessbackend_p.h"
#include "qnetworkcookie.h"
+#include "qnetworkcookiejar.h"
#include "qabstractnetworkcache.h"
#include "QtCore/qcoreapplication.h"
#include "QtCore/qdatetime.h"
@@ -780,7 +781,7 @@ void QNetworkReplyImplPrivate::error(QNetworkReplyImpl::NetworkError code, const
Q_Q(QNetworkReplyImpl);
// Can't set and emit multiple errors.
if (errorCode != QNetworkReply::NoError) {
- qWarning() << "QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.";
+ qWarning( "QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.");
return;
}
@@ -930,13 +931,11 @@ void QNetworkReplyImpl::setReadBufferSize(qint64 size)
}
#ifndef QT_NO_OPENSSL
-QSslConfiguration QNetworkReplyImpl::sslConfigurationImplementation() const
+void QNetworkReplyImpl::sslConfigurationImplementation(QSslConfiguration &configuration) const
{
Q_D(const QNetworkReplyImpl);
- QSslConfiguration config;
if (d->backend)
- d->backend->fetchSslConfiguration(config);
- return config;
+ d->backend->fetchSslConfiguration(configuration);
}
void QNetworkReplyImpl::setSslConfigurationImplementation(const QSslConfiguration &config)
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index 089c87e693..0b7664acc6 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -87,13 +87,6 @@ public:
virtual qint64 readData(char *data, qint64 maxlen);
virtual bool event(QEvent *);
-#ifndef QT_NO_OPENSSL
- Q_INVOKABLE QSslConfiguration sslConfigurationImplementation() const;
- Q_INVOKABLE void setSslConfigurationImplementation(const QSslConfiguration &configuration);
- virtual void ignoreSslErrors();
- Q_INVOKABLE virtual void ignoreSslErrorsImplementation(const QList<QSslError> &errors);
-#endif
-
Q_DECLARE_PRIVATE(QNetworkReplyImpl)
Q_PRIVATE_SLOT(d_func(), void _q_startOperation())
Q_PRIVATE_SLOT(d_func(), void _q_copyReadyRead())
@@ -104,6 +97,14 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
#endif
+
+#ifndef QT_NO_OPENSSL
+protected:
+ void sslConfigurationImplementation(QSslConfiguration &configuration) const;
+ void setSslConfigurationImplementation(const QSslConfiguration &configuration);
+ virtual void ignoreSslErrors();
+ virtual void ignoreSslErrorsImplementation(const QList<QSslError> &errors);
+#endif
};
class QNetworkReplyImplPrivate: public QNetworkReplyPrivate
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 608aaa5eec..c909ce2fea 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index aa86007127..66bfcf5942 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/access/qnetworkrequest_p.h b/src/network/access/qnetworkrequest_p.h
index 54251c82a7..eb61f092f1 100644
--- a/src/network/access/qnetworkrequest_p.h
+++ b/src/network/access/qnetworkrequest_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qbearerengine.cpp b/src/network/bearer/qbearerengine.cpp
index b761eb2e9b..5cf52af744 100644
--- a/src/network/bearer/qbearerengine.cpp
+++ b/src/network/bearer/qbearerengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qbearerengine_p.h b/src/network/bearer/qbearerengine_p.h
index 64af68a520..42481fcd15 100644
--- a/src/network/bearer/qbearerengine_p.h
+++ b/src/network/bearer/qbearerengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qbearerplugin.cpp b/src/network/bearer/qbearerplugin.cpp
index bea7116451..02f6e36807 100644
--- a/src/network/bearer/qbearerplugin.cpp
+++ b/src/network/bearer/qbearerplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qbearerplugin_p.h b/src/network/bearer/qbearerplugin_p.h
index 424dfe1edd..6533cebf4f 100644
--- a/src/network/bearer/qbearerplugin_p.h
+++ b/src/network/bearer/qbearerplugin_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 28bbafab36..1a96ba77a9 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfigmanager.h b/src/network/bearer/qnetworkconfigmanager.h
index e317cdfb44..5f4e64b957 100644
--- a/src/network/bearer/qnetworkconfigmanager.h
+++ b/src/network/bearer/qnetworkconfigmanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index 54cd898c67..5f8f0dff53 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h
index e73e9bb399..dcd736cc6e 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.h
+++ b/src/network/bearer/qnetworkconfigmanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index e207feb97c..150e1cf715 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h
index 4839b7b809..5b650d0303 100644
--- a/src/network/bearer/qnetworkconfiguration.h
+++ b/src/network/bearer/qnetworkconfiguration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index edb7105e6e..9acda9210b 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index f63298dba1..7f76fde4f0 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h
index 1eeea02ae1..5321875078 100644
--- a/src/network/bearer/qnetworksession.h
+++ b/src/network/bearer/qnetworksession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h
index ddf0428b52..c43762136d 100644
--- a/src/network/bearer/qnetworksession_p.h
+++ b/src/network/bearer/qnetworksession_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qsharednetworksession.cpp b/src/network/bearer/qsharednetworksession.cpp
index f10eaaa489..358bc95377 100644
--- a/src/network/bearer/qsharednetworksession.cpp
+++ b/src/network/bearer/qsharednetworksession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/bearer/qsharednetworksession_p.h b/src/network/bearer/qsharednetworksession_p.h
index 31b61b53ec..86946955a1 100644
--- a/src/network/bearer/qsharednetworksession_p.h
+++ b/src/network/bearer/qsharednetworksession_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 8e64968346..0a3dddbe28 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,7 @@
#include <qhash.h>
#include <qbytearray.h>
#include <qcryptographichash.h>
-#include <qhttp.h>
+#include <private/qhttpheader_p.h>
#include <qiodevice.h>
#include <qdatastream.h>
#include <qendian.h>
@@ -206,6 +206,8 @@ QString QAuthenticator::user() const
/*!
Sets the \a user used for authentication.
+
+ \sa QNetworkAccessManager::authenticationRequired()
*/
void QAuthenticator::setUser(const QString &user)
{
@@ -220,12 +222,6 @@ void QAuthenticator::setUser(const QString &user)
d->userDomain = user.left(separatorPosn);
d->extractedUser = user.mid(separatorPosn + 1);
d->user = user;
- } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) {
- //domain name is present
- d->realm.clear();
- d->userDomain = user.mid(separatorPosn + 1);
- d->extractedUser = user.left(separatorPosn);
- d->user = user;
} else {
d->extractedUser = user;
d->user = user;
@@ -250,6 +246,8 @@ QString QAuthenticator::password() const
/*!
Sets the \a password used for authentication.
+
+ \sa QNetworkAccessManager::authenticationRequired()
*/
void QAuthenticator::setPassword(const QString &password)
{
@@ -332,6 +330,7 @@ bool QAuthenticator::isNull() const
QAuthenticatorPrivate::QAuthenticatorPrivate()
: ref(0)
, method(None)
+ , hasFailed(false)
, phase(Start)
, nonceCount(0)
{
@@ -393,8 +392,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt
switch(method) {
case Basic:
- if(realm.isEmpty())
- this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
+ this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
if (user.isEmpty() && password.isEmpty())
phase = Done;
break;
@@ -402,8 +400,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt
// #### extract from header
break;
case DigestMd5: {
- if(realm.isEmpty())
- this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
+ this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
if (options.value("stale").toLower() == "true")
phase = Start;
if (user.isEmpty() && password.isEmpty())
@@ -1381,8 +1378,9 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
int offset = QNtlmPhase3BlockBase::Size;
Q_ASSERT(QNtlmPhase3BlockBase::Size == sizeof(QNtlmPhase3BlockBase));
-
- if(ctx->userDomain.isEmpty()) {
+
+ // for kerberos style user@domain logins, NTLM domain string should be left empty
+ if (ctx->userDomain.isEmpty() && !ctx->extractedUser.contains(QLatin1Char('@'))) {
offset = qEncodeNtlmString(pb.domain, offset, ch.targetNameStr, unicode);
pb.domainStr = ch.targetNameStr;
} else {
diff --git a/src/network/kernel/qauthenticator.h b/src/network/kernel/qauthenticator.h
index 37649e905b..958532e9dc 100644
--- a/src/network/kernel/qauthenticator.h
+++ b/src/network/kernel/qauthenticator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qauthenticator_p.h b/src/network/kernel/qauthenticator_p.h
index 88a30511b1..4b79202d92 100644
--- a/src/network/kernel/qauthenticator_p.h
+++ b/src/network/kernel/qauthenticator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -77,6 +77,7 @@ public:
Method method;
QString realm;
QByteArray challenge;
+ bool hasFailed; //credentials have been tried but rejected by server.
enum Phase {
Start,
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index b662a1d610..3bda5410d0 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h
index 83e8a7ce3c..4747499e38 100644
--- a/src/network/kernel/qhostaddress.h
+++ b/src/network/kernel/qhostaddress.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qhostaddress_p.h b/src/network/kernel/qhostaddress_p.h
index 255d706858..bc863a8562 100644
--- a/src/network/kernel/qhostaddress_p.h
+++ b/src/network/kernel/qhostaddress_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 465345c085..45073f6ad1 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -248,10 +248,12 @@ QHostInfo QHostInfoPrivate::fromName(const QString &name, QSharedPointer<QNetwor
}
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
QHostInfo QHostInfoAgent::fromName(const QString &hostName, QSharedPointer<QNetworkSession>)
{
return QHostInfoAgent::fromName(hostName);
}
+#endif
/*!
diff --git a/src/network/kernel/qhostinfo.h b/src/network/kernel/qhostinfo.h
index 80e39573ed..d84d6d72fa 100644
--- a/src/network/kernel/qhostinfo.h
+++ b/src/network/kernel/qhostinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index fb7ae37c53..35de89c1e9 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -95,7 +95,9 @@ class QHostInfoAgent : public QObject
Q_OBJECT
public:
static QHostInfo fromName(const QString &hostName);
+#ifndef QT_NO_BEARERMANAGEMENT
static QHostInfo fromName(const QString &hostName, QSharedPointer<QNetworkSession> networkSession);
+#endif
};
class QHostInfoPrivate
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 37444ae2d9..73882dd54f 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -329,7 +329,7 @@ QString QHostInfo::localDomainName()
resolveLibrary();
if (local_res_ninit) {
// using thread-safe version
- res_state_ptr state = res_state_ptr(qMalloc(sizeof(*state)));
+ res_state_ptr state = res_state_ptr(malloc(sizeof(*state)));
Q_CHECK_PTR(state);
memset(state, 0, sizeof(*state));
local_res_ninit(state);
@@ -337,7 +337,7 @@ QString QHostInfo::localDomainName()
if (domainName.isEmpty())
domainName = QUrl::fromAce(state->dnsrch[0]);
local_res_nclose(state);
- qFree(state);
+ free(state);
return domainName;
}
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index 10528634db..fc3724f879 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index ed479b2b3f..1f69d9fa1b 100644
--- a/src/network/kernel/qnetworkinterface.cpp
+++ b/src/network/kernel/qnetworkinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkinterface.h b/src/network/kernel/qnetworkinterface.h
index a749e53250..17a8e09cee 100644
--- a/src/network/kernel/qnetworkinterface.h
+++ b/src/network/kernel/qnetworkinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkinterface_p.h b/src/network/kernel/qnetworkinterface_p.h
index d58909eb6a..a964f9bc54 100644
--- a/src/network/kernel/qnetworkinterface_p.h
+++ b/src/network/kernel/qnetworkinterface_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp
index 528e195ef6..8bd7e32766 100644
--- a/src/network/kernel/qnetworkinterface_unix.cpp
+++ b/src/network/kernel/qnetworkinterface_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkinterface_win.cpp b/src/network/kernel/qnetworkinterface_win.cpp
index e8b96f6c47..da9fa80efc 100644
--- a/src/network/kernel/qnetworkinterface_win.cpp
+++ b/src/network/kernel/qnetworkinterface_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -110,12 +110,12 @@ static QHash<QHostAddress, QHostAddress> ipv4Netmasks()
DWORD retval = ptrGetAdaptersInfo(pAdapter, &bufSize);
if (retval == ERROR_BUFFER_OVERFLOW) {
// need more memory
- pAdapter = (IP_ADAPTER_INFO *)qMalloc(bufSize);
+ pAdapter = (IP_ADAPTER_INFO *)malloc(bufSize);
if (!pAdapter)
return ipv4netmasks;
// try again
if (ptrGetAdaptersInfo(pAdapter, &bufSize) != ERROR_SUCCESS) {
- qFree(pAdapter);
+ free(pAdapter);
return ipv4netmasks;
}
} else if (retval != ERROR_SUCCESS) {
@@ -132,7 +132,7 @@ static QHash<QHostAddress, QHostAddress> ipv4Netmasks()
}
}
if (pAdapter != staticBuf)
- qFree(pAdapter);
+ free(pAdapter);
return ipv4netmasks;
@@ -153,12 +153,12 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWinXP()
ULONG retval = ptrGetAdaptersAddresses(AF_UNSPEC, flags, NULL, pAdapter, &bufSize);
if (retval == ERROR_BUFFER_OVERFLOW) {
// need more memory
- pAdapter = (IP_ADAPTER_ADDRESSES *)qMalloc(bufSize);
+ pAdapter = (IP_ADAPTER_ADDRESSES *)malloc(bufSize);
if (!pAdapter)
return interfaces;
// try again
if (ptrGetAdaptersAddresses(AF_UNSPEC, flags, NULL, pAdapter, &bufSize) != ERROR_SUCCESS) {
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
} else if (retval != ERROR_SUCCESS) {
@@ -219,7 +219,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWinXP()
}
if (pAdapter != staticBuf)
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
@@ -234,12 +234,12 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWin2k()
DWORD retval = ptrGetAdaptersInfo(pAdapter, &bufSize);
if (retval == ERROR_BUFFER_OVERFLOW) {
// need more memory
- pAdapter = (IP_ADAPTER_INFO *)qMalloc(bufSize);
+ pAdapter = (IP_ADAPTER_INFO *)malloc(bufSize);
if (!pAdapter)
return interfaces;
// try again
if (ptrGetAdaptersInfo(pAdapter, &bufSize) != ERROR_SUCCESS) {
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
} else if (retval != ERROR_SUCCESS) {
@@ -273,7 +273,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWin2k()
}
if (pAdapter != staticBuf)
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
@@ -305,12 +305,12 @@ QString QHostInfo::localDomainName()
ULONG bufSize = sizeof info;
pinfo = &info;
if (ptrGetNetworkParams(pinfo, &bufSize) == ERROR_BUFFER_OVERFLOW) {
- pinfo = (FIXED_INFO *)qMalloc(bufSize);
+ pinfo = (FIXED_INFO *)malloc(bufSize);
if (!pinfo)
return QString();
// try again
if (ptrGetNetworkParams(pinfo, &bufSize) != ERROR_SUCCESS) {
- qFree(pinfo);
+ free(pinfo);
return QString(); // error
}
}
@@ -318,7 +318,7 @@ QString QHostInfo::localDomainName()
QString domainName = QUrl::fromAce(pinfo->DomainName);
if (pinfo != &info)
- qFree(pinfo);
+ free(pinfo);
return domainName;
}
diff --git a/src/network/kernel/qnetworkinterface_win_p.h b/src/network/kernel/qnetworkinterface_win_p.h
index f56d103a5f..0445e512d2 100644
--- a/src/network/kernel/qnetworkinterface_win_p.h
+++ b/src/network/kernel/qnetworkinterface_win_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 19cf67feec..a8873d3be9 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,8 +53,8 @@
QNetworkProxy provides the method for configuring network layer
proxy support to the Qt network classes. The currently supported
- classes are QAbstractSocket, QTcpSocket, QUdpSocket, QTcpServer,
- QNetworkAccessManager and QFtp. The proxy support is designed to
+ classes are QAbstractSocket, QTcpSocket, QUdpSocket, QTcpServer
+ and QNetworkAccessManager. The proxy support is designed to
be as transparent as possible. This means that existing
network-enabled applications that you have written should
automatically support network proxy using the following code.
@@ -166,8 +166,7 @@
\row
\o Caching FTP
\o Implemented using an FTP proxy, it is useful only in the
- context of FTP requests (see QFtp,
- QNetworkAccessManager)
+ context of FTP requests (see QNetworkAccessManager)
\o CachingCapability, HostNameLookupCapability
\endtable
diff --git a/src/network/kernel/qnetworkproxy.h b/src/network/kernel/qnetworkproxy.h
index 07da51e5ec..472c220e62 100644
--- a/src/network/kernel/qnetworkproxy.h
+++ b/src/network/kernel/qnetworkproxy.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkproxy_generic.cpp b/src/network/kernel/qnetworkproxy_generic.cpp
index f78f63d561..9328eb379a 100644
--- a/src/network/kernel/qnetworkproxy_generic.cpp
+++ b/src/network/kernel/qnetworkproxy_generic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 56c25d66f5..a994976860 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index 84112867e0..84b2b79c11 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qurlinfo.cpp b/src/network/kernel/qurlinfo.cpp
index fed954d30a..8b320a9e03 100644
--- a/src/network/kernel/qurlinfo.cpp
+++ b/src/network/kernel/qurlinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/kernel/qurlinfo.h b/src/network/kernel/qurlinfo.h
index bd460867be..3bcdff6a9c 100644
--- a/src/network/kernel/qurlinfo.h
+++ b/src/network/kernel/qurlinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index d74a717d93..e1a2449593 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -163,7 +163,7 @@
issue to be aware of, though: You must make sure that enough data
is available before attempting to read it using operator>>().
- \sa QFtp, QNetworkAccessManager, QTcpServer
+ \sa QNetworkAccessManager, QTcpServer
*/
/*!
@@ -315,6 +315,8 @@
proxy) was not found.
\value ProxyProtocolError The connection negotiation with the proxy server
because the response from the proxy server could not be understood.
+ \value OperationError An operation was attempted while the socket was in a state that
+ did not permit it.
\value UnknownSocketError An unidentified error occurred.
\sa QAbstractSocket::error()
@@ -347,18 +349,40 @@
\enum QAbstractSocket::SocketOption
\since 4.6
- This enum represents the options that can be set on a socket.
- If desired, they can be set after having received the connected() signal from
- the socket or after having received a new socket from a QTcpServer.
+ This enum represents the options that can be set on a socket. If
+ desired, they can be set after having received the connected()
+ signal from the socket or after having received a new socket from
+ a QTcpServer.
- \value LowDelayOption Try to optimize the socket for low latency. For a QTcpSocket
- this would set the TCP_NODELAY option and disable Nagle's algorithm. Set this to 1
- to enable.
- \value KeepAliveOption Set this to 1 to enable the SO_KEEPALIVE socket option
+ \value LowDelayOption Try to optimize the socket for low
+ latency. For a QTcpSocket this would set the TCP_NODELAY option
+ and disable Nagle's algorithm. Set this to 1 to enable.
- \value MulticastTtlOption Set this to an integer value to set IP_MULTICAST_TTL (TTL for multicast datagrams) socket option.
+ \value KeepAliveOption Set this to 1 to enable the SO_KEEPALIVE
+ socket option
- \value MulticastLoopbackOption Set this to 1 to enable the IP_MULTICAST_LOOP (multicast loopback) socket option.
+ \value MulticastTtlOption Set this to an integer value to set
+ IP_MULTICAST_TTL (TTL for multicast datagrams) socket option.
+
+ \value MulticastLoopbackOption Set this to 1 to enable the
+ IP_MULTICAST_LOOP (multicast loopback) socket option.
+
+ \value TypeOfServiceOption This option is not supported on
+ Windows. This maps to to the IP_TOS socket option.
+
+ Possible values for the \e{TypeOfServiceOption} are:
+
+ \table
+ \header \o Value \o Description
+ \row \o 224 \o Network control
+ \row \o 192 \o Internetwork control
+ \row \o 160 \o CRITIC/ECP
+ \row \o 128 \o Flash override
+ \row \o 96 \o Flash
+ \row \o 64 \o Immediate
+ \row \o 32 \o Priority
+ \row \o 0 \o Routine
+ \endtable
\sa QAbstractSocket::setSocketOption(), QAbstractSocket::socketOption()
*/
@@ -939,7 +963,7 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo)
if (preferredNetworkLayerProtocol == QAbstractSocket::UnknownNetworkLayerProtocol || preferredNetworkLayerProtocol == QAbstractSocket::AnyIPProtocol) {
addresses = hostInfo.addresses();
} else {
- foreach (QHostAddress address, hostInfo.addresses())
+ foreach (const QHostAddress &address, hostInfo.addresses())
if (address.protocol() == preferredNetworkLayerProtocol)
addresses += address;
}
@@ -1455,27 +1479,6 @@ void QAbstractSocket::connectToHost(const QString &hostName, quint16 port,
NetworkLayerProtocol protocol)
{
Q_D(QAbstractSocket);
- d->preferredNetworkLayerProtocol = protocol;
-
- QMetaObject::invokeMethod(this, "connectToHostImplementation",
- Qt::DirectConnection,
- Q_ARG(QString, hostName),
- Q_ARG(quint16, port),
- Q_ARG(OpenMode, openMode));
-}
-
-/*!
- \since 4.1
-
- Contains the implementation of connectToHost().
-
- Attempts to make a connection to \a hostName on the given \a
- port. The socket is opened in the given \a openMode.
-*/
-void QAbstractSocket::connectToHostImplementation(const QString &hostName, quint16 port,
- OpenMode openMode)
-{
- Q_D(QAbstractSocket);
#if defined(QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocket::connectToHost(\"%s\", %i, %i)...", qPrintable(hostName), port,
(int) openMode);
@@ -1484,9 +1487,13 @@ void QAbstractSocket::connectToHostImplementation(const QString &hostName, quint
if (d->state == ConnectedState || d->state == ConnectingState
|| d->state == ClosingState || d->state == HostLookupState) {
qWarning("QAbstractSocket::connectToHost() called when already looking up or connecting/connected to \"%s\"", qPrintable(hostName));
+ d->socketError = QAbstractSocket::OperationError;
+ setErrorString(QAbstractSocket::tr("Trying to connect while connection is in progress"));
+ emit error(d->socketError);
return;
}
+ d->preferredNetworkLayerProtocol = protocol;
d->hostName = hostName;
d->port = port;
d->state = UnconnectedState;
@@ -1705,7 +1712,7 @@ bool QAbstractSocket::canReadLine() const
\sa setSocketDescriptor()
*/
-int QAbstractSocket::socketDescriptor() const
+qintptr QAbstractSocket::socketDescriptor() const
{
Q_D(const QAbstractSocket);
return d->cachedSocketDescriptor;
@@ -1723,7 +1730,7 @@ int QAbstractSocket::socketDescriptor() const
\sa socketDescriptor()
*/
-bool QAbstractSocket::setSocketDescriptor(int socketDescriptor, SocketState socketState,
+bool QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState socketState,
OpenMode openMode)
{
Q_D(QAbstractSocket);
@@ -1805,6 +1812,10 @@ void QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, cons
case MulticastLoopbackOption:
d_func()->socketEngine->setOption(QAbstractSocketEngine::MulticastLoopbackOption, value.toInt());
break;
+
+ case TypeOfServiceOption:
+ d_func()->socketEngine->setOption(QAbstractSocketEngine::TypeOfServiceOption, value.toInt());
+ break;
}
}
@@ -1841,6 +1852,10 @@ QVariant QAbstractSocket::socketOption(QAbstractSocket::SocketOption option)
case MulticastLoopbackOption:
ret = d_func()->socketEngine->option(QAbstractSocketEngine::MulticastLoopbackOption);
break;
+
+ case TypeOfServiceOption:
+ ret = d_func()->socketEngine->option(QAbstractSocketEngine::TypeOfServiceOption);
+ break;
}
if (ret == -1)
return QVariant();
@@ -2595,17 +2610,6 @@ void QAbstractSocket::close()
*/
void QAbstractSocket::disconnectFromHost()
{
- QMetaObject::invokeMethod(this, "disconnectFromHostImplementation",
- Qt::DirectConnection);
-}
-
-/*!
- \since 4.1
-
- Contains the implementation of disconnectFromHost().
-*/
-void QAbstractSocket::disconnectFromHostImplementation()
-{
Q_D(QAbstractSocket);
#if defined(QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocket::disconnectFromHost()");
diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h
index ee910e3b33..e821f3ddb2 100644
--- a/src/network/socket/qabstractsocket.h
+++ b/src/network/socket/qabstractsocket.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -97,6 +97,7 @@ public:
ProxyConnectionTimeoutError,
ProxyNotFoundError,
ProxyProtocolError,
+ OperationError,
UnknownSocketError = -1
};
@@ -113,7 +114,8 @@ public:
LowDelayOption, // TCP_NODELAY
KeepAliveOption, // SO_KEEPALIVE
MulticastTtlOption, // IP_MULTICAST_TTL
- MulticastLoopbackOption // IP_MULTICAST_LOOPBACK
+ MulticastLoopbackOption, // IP_MULTICAST_LOOPBACK
+ TypeOfServiceOption //IP_TOS
};
enum BindFlag {
DefaultForPlatform = 0x0,
@@ -129,10 +131,9 @@ public:
bool bind(const QHostAddress &address, quint16 port = 0, BindMode mode = DefaultForPlatform);
bool bind(quint16 port = 0, BindMode mode = DefaultForPlatform);
- // ### Qt 5: Make connectToHost() and disconnectFromHost() virtual.
- void connectToHost(const QString &hostName, quint16 port, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol);
- void connectToHost(const QHostAddress &address, quint16 port, OpenMode mode = ReadWrite);
- void disconnectFromHost();
+ virtual void connectToHost(const QString &hostName, quint16 port, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol);
+ virtual void connectToHost(const QHostAddress &address, quint16 port, OpenMode mode = ReadWrite);
+ virtual void disconnectFromHost();
bool isValid() const;
@@ -154,8 +155,8 @@ public:
void abort();
// ### Qt 5: Make socketDescriptor() and setSocketDescriptor() virtual.
- int socketDescriptor() const;
- bool setSocketDescriptor(int socketDescriptor, SocketState state = ConnectedState,
+ qintptr socketDescriptor() const;
+ bool setSocketDescriptor(qintptr socketDescriptor, SocketState state = ConnectedState,
OpenMode openMode = ReadWrite);
// ### Qt 5: Make virtual?
@@ -194,10 +195,6 @@ Q_SIGNALS:
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator);
#endif
-protected Q_SLOTS:
- void connectToHostImplementation(const QString &hostName, quint16 port, OpenMode mode = ReadWrite);
- void disconnectFromHostImplementation();
-
protected:
qint64 readData(char *data, qint64 maxlen);
qint64 readLineData(char *data, qint64 maxlen);
diff --git a/src/network/socket/qabstractsocket_p.h b/src/network/socket/qabstractsocket_p.h
index 978fb1433a..49e7c82e21 100644
--- a/src/network/socket/qabstractsocket_p.h
+++ b/src/network/socket/qabstractsocket_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -118,7 +118,7 @@ public:
QString peerName;
QAbstractSocketEngine *socketEngine;
- int cachedSocketDescriptor;
+ qintptr cachedSocketDescriptor;
#ifndef QT_NO_NETWORKPROXY
QNetworkProxy proxy;
diff --git a/src/network/socket/qabstractsocketengine.cpp b/src/network/socket/qabstractsocketengine.cpp
index 7fc0ea3993..8c1ee88ce1 100644
--- a/src/network/socket/qabstractsocketengine.cpp
+++ b/src/network/socket/qabstractsocketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -118,7 +118,7 @@ QAbstractSocketEngine *QAbstractSocketEngine::createSocketEngine(QAbstractSocket
return new QNativeSocketEngine(parent);
}
-QAbstractSocketEngine *QAbstractSocketEngine::createSocketEngine(int socketDescripter, QObject *parent)
+QAbstractSocketEngine *QAbstractSocketEngine::createSocketEngine(qintptr socketDescripter, QObject *parent)
{
QMutexLocker locker(&socketHandlers()->mutex);
for (int i = 0; i < socketHandlers()->size(); i++) {
diff --git a/src/network/socket/qabstractsocketengine_p.h b/src/network/socket/qabstractsocketengine_p.h
index a8be98a0cf..e365eb8b5e 100644
--- a/src/network/socket/qabstractsocketengine_p.h
+++ b/src/network/socket/qabstractsocketengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -84,7 +84,7 @@ class Q_AUTOTEST_EXPORT QAbstractSocketEngine : public QObject
public:
static QAbstractSocketEngine *createSocketEngine(QAbstractSocket::SocketType socketType, const QNetworkProxy &, QObject *parent);
- static QAbstractSocketEngine *createSocketEngine(int socketDescripter, QObject *parent);
+ static QAbstractSocketEngine *createSocketEngine(qintptr socketDescriptor, QObject *parent);
QAbstractSocketEngine(QObject *parent = 0);
@@ -99,14 +99,15 @@ public:
LowDelayOption,
KeepAliveOption,
MulticastTtlOption,
- MulticastLoopbackOption
+ MulticastLoopbackOption,
+ TypeOfServiceOption
};
virtual bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol) = 0;
- virtual bool initialize(int socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState) = 0;
+ virtual bool initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState) = 0;
- virtual int socketDescriptor() const = 0;
+ virtual qintptr socketDescriptor() const = 0;
virtual bool isValid() const = 0;
@@ -224,7 +225,7 @@ protected:
virtual ~QSocketEngineHandler();
virtual QAbstractSocketEngine *createSocketEngine(QAbstractSocket::SocketType socketType,
const QNetworkProxy &, QObject *parent) = 0;
- virtual QAbstractSocketEngine *createSocketEngine(int socketDescripter, QObject *parent) = 0;
+ virtual QAbstractSocketEngine *createSocketEngine(qintptr socketDescriptor, QObject *parent) = 0;
private:
friend class QAbstractSocketEngine;
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index fd0119b8fd..e882f77dcd 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,7 +43,7 @@
#include "qtcpsocket.h"
#include "qhostaddress.h"
#include "qurl.h"
-#include "qhttp.h"
+#include "private/qhttpheader_p.h"
#include "qelapsedtimer.h"
#include "qnetworkinterface.h"
@@ -103,7 +103,7 @@ bool QHttpSocketEngine::initialize(QAbstractSocket::SocketType type, QAbstractSo
return true;
}
-bool QHttpSocketEngine::initialize(int, QAbstractSocket::SocketState)
+bool QHttpSocketEngine::initialize(qintptr, QAbstractSocket::SocketState)
{
return false;
}
@@ -120,7 +120,7 @@ void QHttpSocketEngine::setProxy(const QNetworkProxy &proxy)
d->authenticator.setPassword(password);
}
-int QHttpSocketEngine::socketDescriptor() const
+qintptr QHttpSocketEngine::socketDescriptor() const
{
Q_D(const QHttpSocketEngine);
return d->socket ? d->socket->socketDescriptor() : 0;
@@ -136,6 +136,8 @@ bool QHttpSocketEngine::connectInternal()
{
Q_D(QHttpSocketEngine);
+ d->credentialsSent = false;
+
// If the handshake is done, enter ConnectedState state and return true.
if (d->state == Connected) {
qWarning("QHttpSocketEngine::connectToHost: called when already connected");
@@ -512,6 +514,7 @@ void QHttpSocketEngine::slotSocketConnected()
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
//qDebug() << "slotSocketConnected: priv=" << priv << (priv ? (int)priv->method : -1);
if (priv && priv->method != QAuthenticatorPrivate::None) {
+ d->credentialsSent = true;
data += "Proxy-Authorization: " + priv->calculateResponse(method, path);
data += "\r\n";
}
@@ -589,15 +592,26 @@ void QHttpSocketEngine::slotSocketReadNotification()
d->readBuffer.clear(); // we parsed the proxy protocol response. from now on direct socket reading will be done
int statusCode = responseHeader.statusCode();
+ QAuthenticatorPrivate *priv = 0;
if (statusCode == 200) {
d->state = Connected;
setLocalAddress(d->socket->localAddress());
setLocalPort(d->socket->localPort());
setState(QAbstractSocket::ConnectedState);
+ d->authenticator.detach();
+ priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
+ priv->hasFailed = false;
} else if (statusCode == 407) {
- if (d->authenticator.isNull())
+ if (d->credentialsSent) {
+ //407 response again means the provided username/password were invalid.
+ d->authenticator = QAuthenticator(); //this is needed otherwise parseHttpResponse won't set the state, and then signal isn't emitted.
+ d->authenticator.detach();
+ priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
+ priv->hasFailed = true;
+ }
+ else if (d->authenticator.isNull())
d->authenticator.detach();
- QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
+ priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
priv->parseHttpResponse(responseHeader, true);
@@ -637,7 +651,6 @@ void QHttpSocketEngine::slotSocketReadNotification()
if (priv->phase == QAuthenticatorPrivate::Done)
emit proxyAuthenticationRequired(d->proxy, &d->authenticator);
-
// priv->phase will get reset to QAuthenticatorPrivate::Start if the authenticator got modified in the signal above.
if (priv->phase == QAuthenticatorPrivate::Done) {
setError(QAbstractSocket::ProxyAuthenticationRequiredError, tr("Authentication required"));
@@ -794,6 +807,7 @@ QHttpSocketEnginePrivate::QHttpSocketEnginePrivate()
, readNotificationPending(false)
, writeNotificationPending(false)
, connectionNotificationPending(false)
+ , credentialsSent(false)
, pendingResponseData(0)
{
socket = 0;
@@ -824,7 +838,7 @@ QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(QAbstractSoc
return engine;
}
-QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(int, QObject *)
+QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(qintptr, QObject *)
{
return 0;
}
diff --git a/src/network/socket/qhttpsocketengine_p.h b/src/network/socket/qhttpsocketengine_p.h
index d7cc7c1604..1a93956bd2 100644
--- a/src/network/socket/qhttpsocketengine_p.h
+++ b/src/network/socket/qhttpsocketengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -80,11 +80,11 @@ public:
~QHttpSocketEngine();
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol);
- bool initialize(int socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState);
+ bool initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState);
void setProxy(const QNetworkProxy &networkProxy);
- int socketDescriptor() const;
+ qintptr socketDescriptor() const;
bool isValid() const;
@@ -182,6 +182,7 @@ public:
bool readNotificationPending;
bool writeNotificationPending;
bool connectionNotificationPending;
+ bool credentialsSent;
uint pendingResponseData;
};
@@ -190,7 +191,7 @@ class Q_AUTOTEST_EXPORT QHttpSocketEngineHandler : public QSocketEngineHandler
public:
virtual QAbstractSocketEngine *createSocketEngine(QAbstractSocket::SocketType socketType,
const QNetworkProxy &, QObject *parent);
- virtual QAbstractSocketEngine *createSocketEngine(int socketDescripter, QObject *parent);
+ virtual QAbstractSocketEngine *createSocketEngine(qintptr socketDescripter, QObject *parent);
};
#endif
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index ffd87aa946..fc5fe3443e 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qlocalserver.h b/src/network/socket/qlocalserver.h
index 4468bf90e3..6887c16056 100644
--- a/src/network/socket/qlocalserver.h
+++ b/src/network/socket/qlocalserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h
index ed699fc1d5..d762818692 100644
--- a/src/network/socket/qlocalserver_p.h
+++ b/src/network/socket/qlocalserver_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qlocalserver_tcp.cpp b/src/network/socket/qlocalserver_tcp.cpp
index 47c4204802..cb4ee53f6a 100644
--- a/src/network/socket/qlocalserver_tcp.cpp
+++ b/src/network/socket/qlocalserver_tcp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index e0115de8d2..5859ab0080 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp
index 8e6bbc6deb..bdbe4d74f1 100644
--- a/src/network/socket/qlocalserver_win.cpp
+++ b/src/network/socket/qlocalserver_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp
index 219d2aa8ad..e311f6a060 100644
--- a/src/network/socket/qlocalsocket.cpp
+++ b/src/network/socket/qlocalsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -94,7 +94,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
+ \fn bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
Initializes QLocalSocket with the native socket descriptor
@@ -110,7 +110,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn quintptr QLocalSocket::socketDescriptor() const
+ \fn qintptr QLocalSocket::socketDescriptor() const
Returns the native socket descriptor of the QLocalSocket object if
this is available; otherwise returns -1.
@@ -419,6 +419,8 @@ bool QLocalSocket::isSequential() const
\value ConnectionError An error occurred with the connection.
\value UnsupportedSocketOperationError The requested socket operation
is not supported by the local operating system.
+ \value OperationError An operation was attempted while the socket was in a state that
+ did not permit it.
\value UnknownSocketError An unidentified error occurred.
*/
diff --git a/src/network/socket/qlocalsocket.h b/src/network/socket/qlocalsocket.h
index 698c06377b..bb39b0f4c8 100644
--- a/src/network/socket/qlocalsocket.h
+++ b/src/network/socket/qlocalsocket.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,7 +72,8 @@ public:
DatagramTooLargeError = QAbstractSocket::DatagramTooLargeError,
ConnectionError = QAbstractSocket::NetworkError,
UnsupportedSocketOperationError = QAbstractSocket::UnsupportedSocketOperationError,
- UnknownSocketError = QAbstractSocket::UnknownSocketError
+ UnknownSocketError = QAbstractSocket::UnknownSocketError,
+ OperationError = QAbstractSocket::OperationError
};
enum LocalSocketState
@@ -104,10 +105,10 @@ public:
qint64 readBufferSize() const;
void setReadBufferSize(qint64 size);
- bool setSocketDescriptor(quintptr socketDescriptor,
+ bool setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState = ConnectedState,
OpenMode openMode = ReadWrite);
- quintptr socketDescriptor() const;
+ qintptr socketDescriptor() const;
LocalSocketState state() const;
bool waitForBytesWritten(int msecs = 30000);
@@ -131,10 +132,9 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_stateChanged(QAbstractSocket::SocketState))
Q_PRIVATE_SLOT(d_func(), void _q_error(QAbstractSocket::SocketError))
#elif defined(Q_OS_WIN)
- Q_PRIVATE_SLOT(d_func(), void _q_notified())
Q_PRIVATE_SLOT(d_func(), void _q_canWrite())
Q_PRIVATE_SLOT(d_func(), void _q_pipeClosed())
- Q_PRIVATE_SLOT(d_func(), void _q_emitReadyRead())
+ Q_PRIVATE_SLOT(d_func(), void _q_winError(ulong, const QString &))
#else
Q_PRIVATE_SLOT(d_func(), void _q_stateChanged(QAbstractSocket::SocketState))
Q_PRIVATE_SLOT(d_func(), void _q_error(QAbstractSocket::SocketError))
diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h
index a0749fd35f..3541d950e8 100644
--- a/src/network/socket/qlocalsocket_p.h
+++ b/src/network/socket/qlocalsocket_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -63,8 +63,8 @@
#if defined(QT_LOCALSOCKET_TCP)
# include "qtcpsocket.h"
#elif defined(Q_OS_WIN)
+# include "private/qwindowspipereader_p.h"
# include "private/qwindowspipewriter_p.h"
-# include "private/qringbuffer_p.h"
# include <qwineventnotifier.h>
#else
# include "private/qabstractsocketengine_p.h"
@@ -131,26 +131,13 @@ public:
~QLocalSocketPrivate();
void destroyPipeHandles();
void setErrorString(const QString &function);
- void _q_notified();
void _q_canWrite();
void _q_pipeClosed();
- void _q_emitReadyRead();
- DWORD checkPipeState();
- void startAsyncRead();
- bool completeAsyncRead();
- void checkReadyRead();
+ void _q_winError(ulong windowsError, const QString &function);
HANDLE handle;
- OVERLAPPED overlapped;
QWindowsPipeWriter *pipeWriter;
- qint64 readBufferMaxSize;
- QRingBuffer readBuffer;
- int actualReadBufferSize;
- QWinEventNotifier *dataReadNotifier;
+ QWindowsPipeReader *pipeReader;
QLocalSocket::LocalSocketError error;
- bool readSequenceStarted;
- bool pendingReadyRead;
- bool pipeClosed;
- static const qint64 initialReadBufferSize = 4096;
#else
QLocalUnixSocket unixSocket;
QString generateErrorString(QLocalSocket::LocalSocketError, const QString &function) const;
diff --git a/src/network/socket/qlocalsocket_tcp.cpp b/src/network/socket/qlocalsocket_tcp.cpp
index 38d2b627b1..3b83d0ee01 100644
--- a/src/network/socket/qlocalsocket_tcp.cpp
+++ b/src/network/socket/qlocalsocket_tcp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -155,6 +155,9 @@ QString QLocalSocketPrivate::generateErrorString(QLocalSocket::LocalSocketError
case QLocalSocket::UnsupportedSocketOperationError:
errorString = QLocalSocket::tr("%1: The socket operation is not supported").arg(function);
break;
+ case QLocalSocket::OperationError:
+ errorString = QLocalSocket::tr("%1: Operation not permitted when socket is in this state").arg(function);
+ break;
case QLocalSocket::UnknownSocketError:
default:
errorString = QLocalSocket::tr("%1: Unknown error").arg(function);
@@ -247,7 +250,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
QIODevice::open(openMode);
}
-bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
+bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
{
Q_D(QLocalSocket);
@@ -287,7 +290,7 @@ bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
newSocketState, openMode);
}
-quintptr QLocalSocket::socketDescriptor() const
+qintptr QLocalSocket::socketDescriptor() const
{
Q_D(const QLocalSocket);
return d->tcpSocket->socketDescriptor();
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 1bdf604eb1..5bd929d477 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -162,6 +162,9 @@ QString QLocalSocketPrivate::generateErrorString(QLocalSocket::LocalSocketError
case QLocalSocket::UnsupportedSocketOperationError:
errorString = QLocalSocket::tr("%1: The socket operation is not supported").arg(function);
break;
+ case QLocalSocket::OperationError:
+ errorString = QLocalSocket::tr("%1: Operation not permitted when socket is in this state").arg(function);
+ break;
case QLocalSocket::UnknownSocketError:
default:
errorString = QLocalSocket::tr("%1: Unknown error %2").arg(function).arg(errno);
@@ -221,9 +224,12 @@ void QLocalSocketPrivate::errorOccurred(QLocalSocket::LocalSocketError error, co
void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
{
Q_D(QLocalSocket);
- if (state() == ConnectedState
- || state() == ConnectingState)
+ if (state() == ConnectedState || state() == ConnectingState) {
+ QString errorString = d->generateErrorString(QLocalSocket::OperationError, QLatin1String("QLocalSocket::connectToserver"));
+ setErrorString(errorString);
+ emit error(QLocalSocket::OperationError);
return;
+ }
d->errorString.clear();
d->unixSocket.setSocketState(QAbstractSocket::ConnectingState);
@@ -343,7 +349,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
connectingOpenMode = 0;
}
-bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
+bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
{
Q_D(QLocalSocket);
@@ -386,7 +392,7 @@ void QLocalSocketPrivate::cancelDelayedConnect()
}
}
-quintptr QLocalSocket::socketDescriptor() const
+qintptr QLocalSocket::socketDescriptor() const
{
Q_D(const QLocalSocket);
return d->unixSocket.socketDescriptor();
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index f595ba72ae..99942a6138 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,16 +50,21 @@ QT_BEGIN_NAMESPACE
void QLocalSocketPrivate::init()
{
Q_Q(QLocalSocket);
- memset(&overlapped, 0, sizeof(overlapped));
- overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- dataReadNotifier = new QWinEventNotifier(overlapped.hEvent, q);
- q->connect(dataReadNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_notified()));
+ pipeReader = new QWindowsPipeReader(q);
+ q->connect(pipeReader, SIGNAL(readyRead()), SIGNAL(readyRead()));
+ q->connect(pipeReader, SIGNAL(pipeClosed()), SLOT(_q_pipeClosed()), Qt::QueuedConnection);
+ q->connect(pipeReader, SIGNAL(winError(ulong, const QString &)), SLOT(_q_winError(ulong, const QString &)));
}
void QLocalSocketPrivate::setErrorString(const QString &function)
{
+ DWORD windowsError = GetLastError();
+ _q_winError(windowsError, function);
+}
+
+void QLocalSocketPrivate::_q_winError(ulong windowsError, const QString &function)
+{
Q_Q(QLocalSocket);
- BOOL windowsError = GetLastError();
QLocalSocket::LocalSocketState currentState = state;
// If the connectToServer fails due to WaitNamedPipe() time-out, assume ConnectionError
@@ -95,7 +100,7 @@ void QLocalSocketPrivate::setErrorString(const QString &function)
if (currentState != state) {
q->emit stateChanged(state);
- if (state == QLocalSocket::UnconnectedState)
+ if (state == QLocalSocket::UnconnectedState && currentState != QLocalSocket::ConnectingState)
q->emit disconnected();
}
emit q->error(error);
@@ -103,13 +108,9 @@ void QLocalSocketPrivate::setErrorString(const QString &function)
QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
handle(INVALID_HANDLE_VALUE),
+ pipeReader(0),
pipeWriter(0),
- readBufferMaxSize(0),
- actualReadBufferSize(0),
error(QLocalSocket::UnknownSocketError),
- readSequenceStarted(false),
- pendingReadyRead(false),
- pipeClosed(false),
state(QLocalSocket::UnconnectedState)
{
}
@@ -117,7 +118,6 @@ QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
QLocalSocketPrivate::~QLocalSocketPrivate()
{
destroyPipeHandles();
- CloseHandle(overlapped.hEvent);
}
void QLocalSocketPrivate::destroyPipeHandles()
@@ -131,8 +131,11 @@ void QLocalSocketPrivate::destroyPipeHandles()
void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
{
Q_D(QLocalSocket);
- if (state() == ConnectedState || state() == ConnectingState)
+ if (state() == ConnectedState || state() == ConnectingState) {
+ setErrorString(tr("Trying to connect while connection is in progress"));
+ emit error(QLocalSocket::OperationError);
return;
+ }
d->error = QLocalSocket::UnknownSocketError;
d->errorString = QString();
@@ -186,7 +189,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
// we have a valid handle
d->serverName = name;
- if (setSocketDescriptor((quintptr)localSocket, ConnectedState, openMode)) {
+ if (setSocketDescriptor((qintptr)localSocket, ConnectedState, openMode)) {
d->handle = localSocket;
emit connected();
}
@@ -197,146 +200,7 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize)
{
Q_D(QLocalSocket);
- if (d->pipeClosed && d->actualReadBufferSize == 0)
- return -1; // signal EOF
-
- qint64 readSoFar;
- // If startAsyncRead() read data, copy it to its destination.
- if (maxSize == 1 && d->actualReadBufferSize > 0) {
- *data = d->readBuffer.getChar();
- d->actualReadBufferSize--;
- readSoFar = 1;
- } else {
- qint64 bytesToRead = qMin(qint64(d->actualReadBufferSize), maxSize);
- readSoFar = 0;
- while (readSoFar < bytesToRead) {
- const char *ptr = d->readBuffer.readPointer();
- int bytesToReadFromThisBlock = qMin(bytesToRead - readSoFar,
- qint64(d->readBuffer.nextDataBlockSize()));
- memcpy(data + readSoFar, ptr, bytesToReadFromThisBlock);
- readSoFar += bytesToReadFromThisBlock;
- d->readBuffer.free(bytesToReadFromThisBlock);
- d->actualReadBufferSize -= bytesToReadFromThisBlock;
- }
- }
-
- if (d->pipeClosed) {
- if (d->actualReadBufferSize == 0)
- QTimer::singleShot(0, this, SLOT(_q_pipeClosed()));
- } else {
- if (!d->readSequenceStarted)
- d->startAsyncRead();
- d->checkReadyRead();
- }
-
- return readSoFar;
-}
-
-/*!
- \internal
- Schedules or cancels a readyRead() emission depending on actual data availability
- */
-void QLocalSocketPrivate::checkReadyRead()
-{
- if (actualReadBufferSize > 0) {
- if (!pendingReadyRead) {
- Q_Q(QLocalSocket);
- QTimer::singleShot(0, q, SLOT(_q_emitReadyRead()));
- pendingReadyRead = true;
- }
- } else {
- pendingReadyRead = false;
- }
-}
-
-/*!
- \internal
- Reads data from the socket into the readbuffer
- */
-void QLocalSocketPrivate::startAsyncRead()
-{
- do {
- DWORD bytesToRead = checkPipeState();
- if (pipeClosed)
- return;
-
- if (bytesToRead == 0) {
- // There are no bytes in the pipe but we need to
- // start the overlapped read with some buffer size.
- bytesToRead = initialReadBufferSize;
- }
-
- if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - readBuffer.size())) {
- bytesToRead = readBufferMaxSize - readBuffer.size();
- if (bytesToRead == 0) {
- // Buffer is full. User must read data from the buffer
- // before we can read more from the pipe.
- return;
- }
- }
-
- char *ptr = readBuffer.reserve(bytesToRead);
-
- readSequenceStarted = true;
- if (ReadFile(handle, ptr, bytesToRead, NULL, &overlapped)) {
- completeAsyncRead();
- } else {
- switch (GetLastError()) {
- case ERROR_IO_PENDING:
- // This is not an error. We're getting notified, when data arrives.
- return;
- case ERROR_MORE_DATA:
- // This is not an error. The synchronous read succeeded.
- // We're connected to a message mode pipe and the message
- // didn't fit into the pipe's system buffer.
- completeAsyncRead();
- break;
- case ERROR_PIPE_NOT_CONNECTED:
- {
- // It may happen, that the other side closes the connection directly
- // after writing data. Then we must set the appropriate socket state.
- pipeClosed = true;
- Q_Q(QLocalSocket);
- emit q->readChannelFinished();
- return;
- }
- default:
- setErrorString(QLatin1String("QLocalSocketPrivate::startAsyncRead"));
- return;
- }
- }
- } while (!readSequenceStarted);
-}
-
-/*!
- \internal
- Sets the correct size of the read buffer after a read operation.
- Returns false, if an error occurred or the connection dropped.
- */
-bool QLocalSocketPrivate::completeAsyncRead()
-{
- ResetEvent(overlapped.hEvent);
- readSequenceStarted = false;
-
- DWORD bytesRead;
- if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) {
- switch (GetLastError()) {
- case ERROR_MORE_DATA:
- // This is not an error. We're connected to a message mode
- // pipe and the message didn't fit into the pipe's system
- // buffer. We will read the remaining data in the next call.
- break;
- case ERROR_PIPE_NOT_CONNECTED:
- return false;
- default:
- setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead"));
- return false;
- }
- }
-
- actualReadBufferSize += bytesRead;
- readBuffer.truncate(actualReadBufferSize);
- return true;
+ return d->pipeReader->read(data, maxSize);
}
qint64 QLocalSocket::writeData(const char *data, qint64 maxSize)
@@ -361,39 +225,38 @@ void QLocalSocket::abort()
close();
}
-/*!
- \internal
- Returns the number of available bytes in the pipe.
- Sets QLocalSocketPrivate::pipeClosed to true if the connection is broken.
- */
-DWORD QLocalSocketPrivate::checkPipeState()
+void QLocalSocketPrivate::_q_pipeClosed()
{
Q_Q(QLocalSocket);
- DWORD bytes;
- if (PeekNamedPipe(handle, NULL, 0, NULL, &bytes, NULL)) {
- return bytes;
- } else {
- if (!pipeClosed) {
- pipeClosed = true;
- emit q->readChannelFinished();
- if (actualReadBufferSize == 0)
- QTimer::singleShot(0, q, SLOT(_q_pipeClosed()));
- }
+ if (state == QLocalSocket::UnconnectedState)
+ return;
+
+ emit q->readChannelFinished();
+ if (state != QLocalSocket::ClosingState) {
+ state = QLocalSocket::ClosingState;
+ emit q->stateChanged(state);
+ if (state != QLocalSocket::ClosingState)
+ return;
}
- return 0;
-}
+ state = QLocalSocket::UnconnectedState;
+ emit q->stateChanged(state);
+ emit q->disconnected();
-void QLocalSocketPrivate::_q_pipeClosed()
-{
- Q_Q(QLocalSocket);
- q->close();
+ pipeReader->stop();
+ destroyPipeHandles();
+ handle = INVALID_HANDLE_VALUE;
+
+ if (pipeWriter) {
+ delete pipeWriter;
+ pipeWriter = 0;
+ }
}
qint64 QLocalSocket::bytesAvailable() const
{
Q_D(const QLocalSocket);
qint64 available = QIODevice::bytesAvailable();
- available += (qint64) d->actualReadBufferSize;
+ available += d->pipeReader->bytesAvailable();
return available;
}
@@ -406,42 +269,26 @@ qint64 QLocalSocket::bytesToWrite() const
bool QLocalSocket::canReadLine() const
{
Q_D(const QLocalSocket);
- if (state() != ConnectedState)
- return false;
- return (QIODevice::canReadLine()
- || d->readBuffer.indexOf('\n', d->actualReadBufferSize) != -1);
+ return QIODevice::canReadLine() || d->pipeReader->canReadLine();
}
void QLocalSocket::close()
{
Q_D(QLocalSocket);
- if (state() == UnconnectedState)
+ if (openMode() == NotOpen)
return;
QIODevice::close();
- d->state = ClosingState;
- emit stateChanged(d->state);
- if (!d->pipeClosed)
- emit readChannelFinished();
d->serverName = QString();
d->fullServerName = QString();
- if (state() != UnconnectedState && bytesToWrite() > 0) {
- disconnectFromServer();
- return;
- }
- d->readSequenceStarted = false;
- d->pendingReadyRead = false;
- d->pipeClosed = false;
- d->destroyPipeHandles();
- d->handle = INVALID_HANDLE_VALUE;
- ResetEvent(d->overlapped.hEvent);
- d->state = UnconnectedState;
- emit stateChanged(d->state);
- emit disconnected();
- if (d->pipeWriter) {
- delete d->pipeWriter;
- d->pipeWriter = 0;
+ if (state() != UnconnectedState) {
+ if (bytesToWrite() > 0) {
+ disconnectFromServer();
+ return;
+ }
+
+ d->_q_pipeClosed();
}
}
@@ -480,20 +327,18 @@ QLocalSocket::LocalSocketError QLocalSocket::error() const
return d->error;
}
-bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
+bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
{
Q_D(QLocalSocket);
- d->readBuffer.clear();
- d->actualReadBufferSize = 0;
- QIODevice::open(openMode);
- d->handle = (int*)socketDescriptor;
+ d->pipeReader->stop();
+ d->handle = reinterpret_cast<HANDLE>(socketDescriptor);
d->state = socketState;
+ d->pipeReader->setHandle(d->handle);
+ QIODevice::open(openMode);
emit stateChanged(d->state);
- if (d->state == ConnectedState && openMode.testFlag(QIODevice::ReadOnly)) {
- d->startAsyncRead();
- d->checkReadyRead();
- }
+ if (d->state == ConnectedState && openMode.testFlag(QIODevice::ReadOnly))
+ d->pipeReader->startAsyncRead();
return true;
}
@@ -504,46 +349,22 @@ void QLocalSocketPrivate::_q_canWrite()
q->close();
}
-void QLocalSocketPrivate::_q_notified()
-{
- Q_Q(QLocalSocket);
- if (!completeAsyncRead()) {
- pipeClosed = true;
- emit q->readChannelFinished();
- if (actualReadBufferSize == 0)
- QTimer::singleShot(0, q, SLOT(_q_pipeClosed()));
- return;
- }
- startAsyncRead();
- pendingReadyRead = false;
- emit q->readyRead();
-}
-
-void QLocalSocketPrivate::_q_emitReadyRead()
-{
- if (pendingReadyRead) {
- Q_Q(QLocalSocket);
- pendingReadyRead = false;
- emit q->readyRead();
- }
-}
-
-quintptr QLocalSocket::socketDescriptor() const
+qintptr QLocalSocket::socketDescriptor() const
{
Q_D(const QLocalSocket);
- return (quintptr)d->handle;
+ return (qintptr)d->handle;
}
qint64 QLocalSocket::readBufferSize() const
{
Q_D(const QLocalSocket);
- return d->readBufferMaxSize;
+ return d->pipeReader->maxReadBufferSize();
}
void QLocalSocket::setReadBufferSize(qint64 size)
{
Q_D(QLocalSocket);
- d->readBufferMaxSize = size;
+ d->pipeReader->setMaxReadBufferSize(size);
}
bool QLocalSocket::waitForConnected(int msecs)
@@ -561,18 +382,10 @@ bool QLocalSocket::waitForDisconnected(int msecs)
qWarning("QLocalSocket::waitForDisconnected isn't supported for write only pipes.");
return false;
}
- QIncrementalSleepTimer timer(msecs);
- forever {
- d->checkPipeState();
- if (d->pipeClosed)
- close();
- if (state() == UnconnectedState)
- return true;
- Sleep(timer.nextSleepTime());
- if (timer.hasTimedOut())
- break;
+ if (d->pipeReader->waitForPipeClosed(msecs)) {
+ d->_q_pipeClosed();
+ return true;
}
-
return false;
}
@@ -593,28 +406,18 @@ bool QLocalSocket::waitForReadyRead(int msecs)
return false;
// We already know that the pipe is gone, but did not enter the event loop yet.
- if (d->pipeClosed) {
- close();
+ if (d->pipeReader->isPipeClosed()) {
+ d->_q_pipeClosed();
return false;
}
- Q_ASSERT(d->readSequenceStarted);
- DWORD result = WaitForSingleObject(d->overlapped.hEvent, msecs == -1 ? INFINITE : msecs);
- switch (result) {
- case WAIT_OBJECT_0:
- d->_q_notified();
- // We just noticed that the pipe is gone.
- if (d->pipeClosed) {
- close();
- return false;
- }
- return true;
- case WAIT_TIMEOUT:
- return false;
- }
+ bool result = d->pipeReader->waitForReadyRead(msecs);
- qWarning("QLocalSocket::waitForReadyRead WaitForSingleObject failed with error code %d.", int(GetLastError()));
- return false;
+ // We just noticed that the pipe is gone.
+ if (d->pipeReader->isPipeClosed())
+ d->_q_pipeClosed();
+
+ return result;
}
bool QLocalSocket::waitForBytesWritten(int msecs)
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index 5e3e22a23e..cae2469328 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -414,7 +414,7 @@ bool QNativeSocketEngine::initialize(QAbstractSocket::SocketType socketType, QAb
If the socket type is either TCP or UDP, it is made non-blocking.
UDP sockets are also broadcast enabled.
*/
-bool QNativeSocketEngine::initialize(int socketDescriptor, QAbstractSocket::SocketState socketState)
+bool QNativeSocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState)
{
Q_D(QNativeSocketEngine);
@@ -471,7 +471,7 @@ bool QNativeSocketEngine::isValid() const
Returns the native socket descriptor. Any use of this descriptor
stands the risk of being non-portable.
*/
-int QNativeSocketEngine::socketDescriptor() const
+qintptr QNativeSocketEngine::socketDescriptor() const
{
Q_D(const QNativeSocketEngine);
return d->socketDescriptor;
@@ -1114,7 +1114,7 @@ bool QNativeSocketEngine::isReadNotificationEnabled() const
class QReadNotifier : public QSocketNotifier
{
public:
- QReadNotifier(int fd, QNativeSocketEngine *parent)
+ QReadNotifier(qintptr fd, QNativeSocketEngine *parent)
: QSocketNotifier(fd, QSocketNotifier::Read, parent)
{ engine = parent; }
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index a024cd42d1..60c13c1258 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -113,9 +113,9 @@ public:
~QNativeSocketEngine();
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol);
- bool initialize(int socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState);
+ bool initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState);
- int socketDescriptor() const;
+ qintptr socketDescriptor() const;
bool isValid() const;
@@ -199,7 +199,7 @@ public:
QNativeSocketEnginePrivate();
~QNativeSocketEnginePrivate();
- int socketDescriptor;
+ qintptr socketDescriptor;
QSocketNotifier *readNotifier, *writeNotifier, *exceptNotifier;
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 09aed255d6..324705d998 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -251,6 +251,12 @@ int QNativeSocketEnginePrivate::option(QNativeSocketEngine::SocketOption opt) co
n = IP_MULTICAST_LOOP;
}
break;
+ case QNativeSocketEngine::TypeOfServiceOption:
+ if (socketProtocol == QAbstractSocket::IPv4Protocol) {
+ level = IPPROTO_IP;
+ n = IP_TOS;
+ }
+ break;
}
int v = -1;
@@ -352,6 +358,12 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt
n = IP_MULTICAST_LOOP;
}
break;
+ case QNativeSocketEngine::TypeOfServiceOption:
+ if (socketProtocol == QAbstractSocket::IPv4Protocol) {
+ level = IPPROTO_IP;
+ n = IP_TOS;
+ }
+ break;
}
return ::setsockopt(socketDescriptor, level, n, (char *) &v, sizeof(v)) == 0;
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index 247de01072..ee15702b76 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -229,7 +229,7 @@ void QNativeSocketEnginePrivate::setPortAndAddress(sockaddr_in * sockAddrIPv4, q
/*! \internal
*/
-static inline QAbstractSocket::SocketType qt_socket_getType(int socketDescriptor)
+static inline QAbstractSocket::SocketType qt_socket_getType(qintptr socketDescriptor)
{
int value = 0;
QT_SOCKLEN_T valueSize = sizeof(value);
@@ -247,7 +247,7 @@ static inline QAbstractSocket::SocketType qt_socket_getType(int socketDescriptor
/*! \internal
*/
-static inline int qt_socket_getMaxMsgSize(int socketDescriptor)
+static inline int qt_socket_getMaxMsgSize(qintptr socketDescriptor)
{
int value = 0;
QT_SOCKLEN_T valueSize = sizeof(value);
@@ -422,6 +422,9 @@ int QNativeSocketEnginePrivate::option(QNativeSocketEngine::SocketOption opt) co
n = IP_MULTICAST_LOOP;
}
break;
+ case QNativeSocketEngine::TypeOfServiceOption:
+ return -1;
+ break;
}
int v = -1;
@@ -502,6 +505,9 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt
n = IP_MULTICAST_LOOP;
}
break;
+ case QNativeSocketEngine::TypeOfServiceOption:
+ return false;
+ break;
}
if (::setsockopt(socketDescriptor, level, n, (char*)&v, sizeof(v)) != 0) {
diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h
index fe22c329e4..7b2ba54648 100644
--- a/src/network/socket/qnet_unix_p.h
+++ b/src/network/socket/qnet_unix_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp
index 5f510fa84b..919bdea2e0 100644
--- a/src/network/socket/qsocks5socketengine.cpp
+++ b/src/network/socket/qsocks5socketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -332,9 +332,9 @@ public:
QSocks5BindStore();
~QSocks5BindStore();
- void add(int socketDescriptor, QSocks5BindData *bindData);
- bool contains(int socketDescriptor);
- QSocks5BindData *retrieve(int socketDescriptor);
+ void add(qintptr socketDescriptor, QSocks5BindData *bindData);
+ bool contains(qintptr socketDescriptor);
+ QSocks5BindData *retrieve(qintptr socketDescriptor);
protected:
void timerEvent(QTimerEvent * event);
@@ -360,7 +360,7 @@ QSocks5BindStore::~QSocks5BindStore()
{
}
-void QSocks5BindStore::add(int socketDescriptor, QSocks5BindData *bindData)
+void QSocks5BindStore::add(qintptr socketDescriptor, QSocks5BindData *bindData)
{
QMutexLocker lock(&mutex);
if (store.contains(socketDescriptor)) {
@@ -373,13 +373,13 @@ void QSocks5BindStore::add(int socketDescriptor, QSocks5BindData *bindData)
sweepTimerId = startTimer(60000);
}
-bool QSocks5BindStore::contains(int socketDescriptor)
+bool QSocks5BindStore::contains(qintptr socketDescriptor)
{
QMutexLocker lock(&mutex);
return store.contains(socketDescriptor);
}
-QSocks5BindData *QSocks5BindStore::retrieve(int socketDescriptor)
+QSocks5BindData *QSocks5BindStore::retrieve(qintptr socketDescriptor)
{
QMutexLocker lock(&mutex);
if (!store.contains(socketDescriptor))
@@ -1018,7 +1018,7 @@ bool QSocks5SocketEngine::initialize(QAbstractSocket::SocketType type, QAbstract
return true;
}
-bool QSocks5SocketEngine::initialize(int socketDescriptor, QAbstractSocket::SocketState socketState)
+bool QSocks5SocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState)
{
Q_D(QSocks5SocketEngine);
@@ -1080,7 +1080,7 @@ void QSocks5SocketEngine::setProxy(const QNetworkProxy &networkProxy)
d->proxyInfo = networkProxy;
}
-int QSocks5SocketEngine::socketDescriptor() const
+qintptr QSocks5SocketEngine::socketDescriptor() const
{
Q_D(const QSocks5SocketEngine);
return d->socketDescriptor;
@@ -1448,7 +1448,7 @@ int QSocks5SocketEngine::accept()
d->data->controlSocket->setParent(0);
d->bindData->localAddress = d->localAddress;
d->bindData->localPort = d->localPort;
- int sd = d->socketDescriptor;
+ qintptr sd = d->socketDescriptor;
socks5BindStore()->add(sd, d->bindData);
d->data = 0;
d->bindData = 0;
@@ -1917,7 +1917,7 @@ QSocks5SocketEngineHandler::createSocketEngine(QAbstractSocket::SocketType socke
return engine.take();
}
-QAbstractSocketEngine *QSocks5SocketEngineHandler::createSocketEngine(int socketDescriptor, QObject *parent)
+QAbstractSocketEngine *QSocks5SocketEngineHandler::createSocketEngine(qintptr socketDescriptor, QObject *parent)
{
QSOCKS5_DEBUG << "createSocketEngine" << socketDescriptor;
if (socks5BindStore()->contains(socketDescriptor)) {
diff --git a/src/network/socket/qsocks5socketengine_p.h b/src/network/socket/qsocks5socketengine_p.h
index 9b2f6e3ade..386e4856a1 100644
--- a/src/network/socket/qsocks5socketengine_p.h
+++ b/src/network/socket/qsocks5socketengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -70,11 +70,11 @@ public:
~QSocks5SocketEngine();
bool initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::IPv4Protocol);
- bool initialize(int socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState);
+ bool initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState = QAbstractSocket::ConnectedState);
void setProxy(const QNetworkProxy &networkProxy);
- int socketDescriptor() const;
+ qintptr socketDescriptor() const;
bool isValid() const;
@@ -261,7 +261,7 @@ public:
bool readNotificationEnabled, writeNotificationEnabled, exceptNotificationEnabled;
- int socketDescriptor;
+ qintptr socketDescriptor;
QSocks5Data *data;
QSocks5ConnectData *connectData;
@@ -290,7 +290,7 @@ class Q_AUTOTEST_EXPORT QSocks5SocketEngineHandler : public QSocketEngineHandler
public:
virtual QAbstractSocketEngine *createSocketEngine(QAbstractSocket::SocketType socketType,
const QNetworkProxy &, QObject *parent);
- virtual QAbstractSocketEngine *createSocketEngine(int socketDescripter, QObject *parent);
+ virtual QAbstractSocketEngine *createSocketEngine(qintptr socketDescriptor, QObject *parent);
};
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 500d383e0f..857827facc 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -378,7 +378,7 @@ void QTcpServer::close()
\sa setSocketDescriptor(), isListening()
*/
-int QTcpServer::socketDescriptor() const
+qintptr QTcpServer::socketDescriptor() const
{
Q_D(const QTcpServer);
Q_CHECK_SOCKETENGINE(-1);
@@ -394,7 +394,7 @@ int QTcpServer::socketDescriptor() const
\sa socketDescriptor(), isListening()
*/
-bool QTcpServer::setSocketDescriptor(int socketDescriptor)
+bool QTcpServer::setSocketDescriptor(qintptr socketDescriptor)
{
Q_D(QTcpServer);
if (isListening()) {
@@ -566,7 +566,7 @@ QTcpSocket *QTcpServer::nextPendingConnection()
\sa newConnection(), nextPendingConnection(), addPendingConnection()
*/
-void QTcpServer::incomingConnection(int socketDescriptor)
+void QTcpServer::incomingConnection(qintptr socketDescriptor)
{
#if defined (QTCPSERVER_DEBUG)
qDebug("QTcpServer::incomingConnection(%i)", socketDescriptor);
diff --git a/src/network/socket/qtcpserver.h b/src/network/socket/qtcpserver.h
index 2fe090af32..a322294f58 100644
--- a/src/network/socket/qtcpserver.h
+++ b/src/network/socket/qtcpserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,8 +76,8 @@ public:
quint16 serverPort() const;
QHostAddress serverAddress() const;
- int socketDescriptor() const;
- bool setSocketDescriptor(int socketDescriptor);
+ qintptr socketDescriptor() const;
+ bool setSocketDescriptor(qintptr socketDescriptor);
bool waitForNewConnection(int msec = 0, bool *timedOut = 0);
virtual bool hasPendingConnections() const;
@@ -92,7 +92,7 @@ public:
#endif
protected:
- virtual void incomingConnection(int handle);
+ virtual void incomingConnection(qintptr handle);
void addPendingConnection(QTcpSocket* socket);
Q_SIGNALS:
diff --git a/src/network/socket/qtcpsocket.cpp b/src/network/socket/qtcpsocket.cpp
index 78fb4cd050..f900ca752c 100644
--- a/src/network/socket/qtcpsocket.cpp
+++ b/src/network/socket/qtcpsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,7 @@
\bold{Note:} TCP sockets cannot be opened in QIODevice::Unbuffered mode.
- \sa QTcpServer, QUdpSocket, QFtp, QNetworkAccessManager,
+ \sa QTcpServer, QUdpSocket, QNetworkAccessManager,
{Fortune Server Example}, {Fortune Client Example},
{Threaded Fortune Server Example}, {Blocking Fortune Client Example},
{Loopback Example}, {Torrent Example}
diff --git a/src/network/socket/qtcpsocket.h b/src/network/socket/qtcpsocket.h
index 8323836a54..aa2e89d840 100644
--- a/src/network/socket/qtcpsocket.h
+++ b/src/network/socket/qtcpsocket.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qtcpsocket_p.h b/src/network/socket/qtcpsocket_p.h
index 1ecc274fcd..33672539cc 100644
--- a/src/network/socket/qtcpsocket_p.h
+++ b/src/network/socket/qtcpsocket_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp
index e12034d86b..f378fea7b9 100644
--- a/src/network/socket/qudpsocket.cpp
+++ b/src/network/socket/qudpsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/socket/qudpsocket.h b/src/network/socket/qudpsocket.h
index 068c20b9c4..ed5f539732 100644
--- a/src/network/socket/qudpsocket.h
+++ b/src/network/socket/qudpsocket.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
index d0d7584ff1..7bb68956ee 100644
--- a/src/network/ssl/qssl.cpp
+++ b/src/network/ssl/qssl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qssl.h b/src/network/ssl/qssl.h
index 0793a84671..7da5a78c56 100644
--- a/src/network/ssl/qssl.h
+++ b/src/network/ssl/qssl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index d1624faaea..5a4702d992 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1177,7 +1177,7 @@ QDebug operator<<(QDebug debug, const QSslCertificate &certificate)
<< ',' << certificate.issuerInfo(QSslCertificate::Organization)
<< ',' << certificate.subjectInfo(QSslCertificate::Organization)
<< ',' << certificate.subjectAlternativeNames()
-#ifndef QT_NO_TEXTSTREAM
+#ifndef QT_NO_DATESTRING
<< ',' << certificate.effectiveDate()
<< ',' << certificate.expiryDate()
#endif
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index dcc7f64aa4..3aa7075eb3 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class QDateTime;
class QIODevice;
@@ -152,7 +152,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslCertificate &certific
Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QSslCertificate::SubjectInfo info);
#endif
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index c4a833460a..031165b267 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslcertificateextension.h b/src/network/ssl/qsslcertificateextension.h
index 200ae3e091..6c1d219a3b 100644
--- a/src/network/ssl/qsslcertificateextension.h
+++ b/src/network/ssl/qsslcertificateextension.h
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class QSslCertificateExtensionPrivate;
@@ -78,7 +78,7 @@ private:
QSharedDataPointer<QSslCertificateExtensionPrivate> d;
};
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslcipher.cpp b/src/network/ssl/qsslcipher.cpp
index a583257a88..3c59a8ebf9 100644
--- a/src/network/ssl/qsslcipher.cpp
+++ b/src/network/ssl/qsslcipher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslcipher.h b/src/network/ssl/qsslcipher.h
index d9d3b9b31e..8d58fa50ba 100644
--- a/src/network/ssl/qsslcipher.h
+++ b/src/network/ssl/qsslcipher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class QSslCipherPrivate;
class Q_NETWORK_EXPORT QSslCipher
@@ -88,7 +88,7 @@ class QDebug;
Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslCipher &cipher);
#endif
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslcipher_p.h b/src/network/ssl/qsslcipher_p.h
index a47c159ade..d4117abe3a 100644
--- a/src/network/ssl/qsslcipher_p.h
+++ b/src/network/ssl/qsslcipher_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 0e9eb5db62..f29bb02813 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index ff8c8fc4b4..37df073ae9 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
template<typename T> class QList;
class QSslCertificate;
@@ -132,7 +132,7 @@ private:
QSharedDataPointer<QSslConfigurationPrivate> d;
};
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h
index 59078ae7cc..d9f41d6351 100644
--- a/src/network/ssl/qsslconfiguration_p.h
+++ b/src/network/ssl/qsslconfiguration_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslerror.cpp b/src/network/ssl/qsslerror.cpp
index 5091ed27a4..39e6d6114e 100644
--- a/src/network/ssl/qsslerror.cpp
+++ b/src/network/ssl/qsslerror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h
index 451c95f180..0bdc230b2e 100644
--- a/src/network/ssl/qsslerror.h
+++ b/src/network/ssl/qsslerror.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class QSslErrorPrivate;
class Q_NETWORK_EXPORT QSslError
@@ -115,7 +115,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslError &error);
Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslError::SslError &error);
#endif
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslkey.cpp b/src/network/ssl/qsslkey.cpp
index 580b71bca9..cb038d726f 100644
--- a/src/network/ssl/qsslkey.cpp
+++ b/src/network/ssl/qsslkey.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslkey.h b/src/network/ssl/qsslkey.h
index 7064d22eb4..d7d52fa992 100644
--- a/src/network/ssl/qsslkey.h
+++ b/src/network/ssl/qsslkey.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
template <typename A, typename B> struct QPair;
@@ -103,7 +103,7 @@ class QDebug;
Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslKey &key);
#endif
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h
index 14075ecad0..1beb2a608a 100644
--- a/src/network/ssl/qsslkey_p.h
+++ b/src/network/ssl/qsslkey_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index e3dd6ae0c5..b428316a77 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -455,7 +455,7 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port,
\sa socketDescriptor()
*/
-bool QSslSocket::setSocketDescriptor(int socketDescriptor, SocketState state, OpenMode openMode)
+bool QSslSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState state, OpenMode openMode)
{
Q_D(QSslSocket);
#ifdef QSSLSOCKET_DEBUG
@@ -1733,16 +1733,16 @@ void QSslSocket::ignoreSslErrors(const QList<QSslError> &errors)
/*!
\internal
*/
-void QSslSocket::connectToHostImplementation(const QString &hostName, quint16 port,
- OpenMode openMode)
+void QSslSocket::connectToHost(const QString &hostName, quint16 port, OpenMode openMode, NetworkLayerProtocol protocol)
{
Q_D(QSslSocket);
+ d->preferredNetworkLayerProtocol = protocol;
if (!d->initialized)
d->init();
d->initialized = false;
#ifdef QSSLSOCKET_DEBUG
- qDebug() << "QSslSocket::connectToHostImplementation("
+ qDebug() << "QSslSocket::connectToHost("
<< hostName << ',' << port << ',' << openMode << ')';
#endif
if (!d->plainSocket) {
@@ -1762,11 +1762,11 @@ void QSslSocket::connectToHostImplementation(const QString &hostName, quint16 po
/*!
\internal
*/
-void QSslSocket::disconnectFromHostImplementation()
+void QSslSocket::disconnectFromHost()
{
Q_D(QSslSocket);
#ifdef QSSLSOCKET_DEBUG
- qDebug() << "QSslSocket::disconnectFromHostImplementation()";
+ qDebug() << "QSslSocket::disconnectFromHost()";
#endif
if (!d->plainSocket)
return;
diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h
index 803e79e0c4..936f27905a 100644
--- a/src/network/ssl/qsslsocket.h
+++ b/src/network/ssl/qsslsocket.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,7 @@
#include <QtCore/qlist.h>
#include <QtCore/qregexp.h>
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
# include <QtNetwork/qtcpsocket.h>
# include <QtNetwork/qsslerror.h>
#endif
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Network)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class QDir;
class QSslCipher;
@@ -87,9 +87,12 @@ public:
// Autostarting the SSL client handshake.
void connectToHostEncrypted(const QString &hostName, quint16 port, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol);
void connectToHostEncrypted(const QString &hostName, quint16 port, const QString &sslPeerName, OpenMode mode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol);
- bool setSocketDescriptor(int socketDescriptor, SocketState state = ConnectedState,
+ bool setSocketDescriptor(qintptr socketDescriptor, SocketState state = ConnectedState,
OpenMode openMode = ReadWrite);
+ void connectToHost(const QString &hostName, quint16 port, OpenMode openMode = ReadWrite, NetworkLayerProtocol protocol = AnyIPProtocol);
+ void disconnectFromHost();
+
// ### Qt 5: Make virtual
void setSocketOption(QAbstractSocket::SocketOption option, const QVariant &value);
QVariant socketOption(QAbstractSocket::SocketOption option);
@@ -193,11 +196,6 @@ Q_SIGNALS:
void modeChanged(QSslSocket::SslMode newMode);
void encryptedBytesWritten(qint64 totalBytes);
-protected Q_SLOTS:
- void connectToHostImplementation(const QString &hostName, quint16 port,
- OpenMode openMode);
- void disconnectFromHostImplementation();
-
protected:
qint64 readData(char *data, qint64 maxlen);
qint64 writeData(const char *data, qint64 len);
@@ -217,7 +215,7 @@ private:
friend class QSslSocketBackendPrivate;
};
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index f70b4217bd..96b2c8170b 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -225,6 +225,27 @@ static int q_X509Callback(int ok, X509_STORE_CTX *ctx)
if (!ok) {
// Store the error and at which depth the error was detected.
_q_sslErrorList()->errors << qMakePair<int, int>(ctx->error, ctx->error_depth);
+#ifdef QSSLSOCKET_DEBUG
+ qDebug() << "verification error: dumping bad certificate";
+ qDebug() << QSslCertificatePrivate::QSslCertificate_from_X509(ctx->current_cert).toPem();
+ qDebug() << "dumping chain";
+ foreach (QSslCertificate cert, QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates(ctx->chain)) {
+ QString certFormat(QStringLiteral("O=%1 CN=%2 L=%3 OU=%4 C=%5 ST=%6"));
+ qDebug() << "Issuer:" << "O=" << cert.issuerInfo(QSslCertificate::Organization)
+ << "CN=" << cert.issuerInfo(QSslCertificate::CommonName)
+ << "L=" << cert.issuerInfo(QSslCertificate::LocalityName)
+ << "OU=" << cert.issuerInfo(QSslCertificate::OrganizationalUnitName)
+ << "C=" << cert.issuerInfo(QSslCertificate::CountryName)
+ << "ST=" << cert.issuerInfo(QSslCertificate::StateOrProvinceName);
+ qDebug() << "Subject:" << "O=" << cert.subjectInfo(QSslCertificate::Organization)
+ << "CN=" << cert.subjectInfo(QSslCertificate::CommonName)
+ << "L=" << cert.subjectInfo(QSslCertificate::LocalityName)
+ << "OU=" << cert.subjectInfo(QSslCertificate::OrganizationalUnitName)
+ << "C=" << cert.subjectInfo(QSslCertificate::CountryName)
+ << "ST=" << cert.subjectInfo(QSslCertificate::StateOrProvinceName);
+ qDebug() << "Valid:" << cert.effectiveDate() << "-" << cert.expiryDate();
+ }
+#endif
}
// Always return OK to allow verification to continue. We're handle the
// errors gracefully after collecting all errors, after verification has
@@ -343,7 +364,7 @@ init_context:
foreach (const QSslCertificate &caCertificate, q->caCertificates()) {
// add expired certs later, so that the
// valid ones are used before the expired ones
- if (caCertificate.expiryDate() > QDateTime::currentDateTime()) {
+ if (caCertificate.expiryDate() < QDateTime::currentDateTime()) {
expiredCerts.append(caCertificate);
} else {
q_X509_STORE_add_cert(ctx->cert_store, reinterpret_cast<X509 *>(caCertificate.handle()));
@@ -453,11 +474,7 @@ init_context:
if (!ace.isEmpty()
&& !QHostAddress().setAddress(tlsHostName)
&& !(configuration.sslOptions & QSsl::SslOptionDisableServerNameIndication)) {
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.data()))
-#else
- if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.constData()))
-#endif
qWarning("could not set SSL_CTRL_SET_TLSEXT_HOSTNAME, Server Name Indication disabled");
}
}
@@ -874,10 +891,17 @@ void QSslSocketBackendPrivate::transmit()
int encryptedBytesRead = q_BIO_read(writeBio, data.data(), pendingBytes);
// Write encrypted data from the buffer to the socket.
- plainSocket->write(data.constData(), encryptedBytesRead);
+ qint64 actualWritten = plainSocket->write(data.constData(), encryptedBytesRead);
#ifdef QSSLSOCKET_DEBUG
- qDebug() << "QSslSocketBackendPrivate::transmit: wrote" << encryptedBytesRead << "encrypted bytes to the socket";
+ qDebug() << "QSslSocketBackendPrivate::transmit: wrote" << encryptedBytesRead << "encrypted bytes to the socket" << actualWritten << "actual.";
#endif
+ if (actualWritten < 0) {
+ //plain socket write fails if it was in the pending close state.
+ q->setErrorString(plainSocket->errorString());
+ q->setSocketError(plainSocket->error());
+ emit q->error(plainSocket->error());
+ return;
+ }
transmitting = true;
}
@@ -1351,7 +1375,7 @@ QList<QSslError> QSslSocketBackendPrivate::verify(QList<QSslCertificate> certifi
foreach (const QSslCertificate &caCertificate, QSslSocket::defaultCaCertificates()) {
// add expired certs later, so that the
// valid ones are used before the expired ones
- if (caCertificate.expiryDate() > QDateTime::currentDateTime()) {
+ if (caCertificate.expiryDate() < QDateTime::currentDateTime()) {
expiredCerts.append(caCertificate);
} else {
q_X509_STORE_add_cert(certStore, reinterpret_cast<X509 *>(caCertificate.handle()));
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index ef00b0998d..4d1ed9e681 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -105,8 +105,6 @@ public:
BIO *readBio;
BIO *writeBio;
SSL_SESSION *session;
- X509_STORE *certificateStore;
- X509_STORE_CTX *certificateStoreCtx;
QList<QPair<int, int> > errorList;
// Platform specific functions
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index cd27c31456..c3bee3edd2 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -218,11 +218,7 @@ DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return)
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
-#else
-DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, const void *parg, parg, return -1, return)
-#endif
#endif
DEFINEFUNC3(int, SSL_read, SSL *a, a, void *b, b, int c, c, return -1, return)
DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index ad7a0a7557..1f1e842c13 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -325,11 +325,7 @@ int q_SSL_library_init();
void q_SSL_load_error_strings();
SSL *q_SSL_new(SSL_CTX *a);
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
-#else
-long q_SSL_ctrl(SSL *ssl,int cmd, long larg, const void *parg);
-#endif
#endif
int q_SSL_read(SSL *a, void *b, int c);
void q_SSL_set_bio(SSL *a, BIO *b, BIO *c);
@@ -431,11 +427,7 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length);
(char *)(rsa))
#define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
(char *)(dsa))
-#ifdef OPENSSL_LOAD_CONF
#define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_conf()
-#else
-#define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_noconf()
-#endif
void q_OPENSSL_add_all_algorithms_noconf();
void q_OPENSSL_add_all_algorithms_conf();
int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath);
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index b1dc656e88..6fa443d0c7 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
index 4374f80d35..50444ecc86 100644
--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
+++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
index 904d20bdbb..8324bab28e 100644
--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
+++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp b/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp
index 550b65237b..9f1cd3cf32 100644
--- a/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp
+++ b/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h b/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h
index 392c7775f8..166779cd75 100644
--- a/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h
+++ b/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index aebdce6e01..4daed7ebfa 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -246,8 +246,7 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
if (!inCache)
simpleShaderCache.store(simpleShaderProg, context);
} else {
- qCritical() << "Errors linking simple shader:"
- << simpleShaderProg->log();
+ qCritical("Errors linking simple shader: %s", qPrintable(simpleShaderProg->log()));
}
// Compile the blit shader:
@@ -288,8 +287,7 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
if (!inCache)
blitShaderCache.store(blitShaderProg, context);
} else {
- qCritical() << "Errors linking blit shader:"
- << blitShaderProg->log();
+ qCritical("Errors linking blit shader: %s", qPrintable(blitShaderProg->log()));
}
#ifdef QT_GL_SHARED_SHADER_DEBUG
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index 58c761df43..fc922928cd 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index 1d35124bc8..8a6bce0d8c 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglgradientcache.cpp b/src/opengl/gl2paintengineex/qglgradientcache.cpp
index 6ca09ba140..96a8a4c33a 100644
--- a/src/opengl/gl2paintengineex/qglgradientcache.cpp
+++ b/src/opengl/gl2paintengineex/qglgradientcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglgradientcache_p.h b/src/opengl/gl2paintengineex/qglgradientcache_p.h
index 600085a75f..105afb157e 100644
--- a/src/opengl/gl2paintengineex/qglgradientcache_p.h
+++ b/src/opengl/gl2paintengineex/qglgradientcache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglshadercache_meego_p.h b/src/opengl/gl2paintengineex/qglshadercache_meego_p.h
index 5f239a698d..2d013ae77a 100644
--- a/src/opengl/gl2paintengineex/qglshadercache_meego_p.h
+++ b/src/opengl/gl2paintengineex/qglshadercache_meego_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qglshadercache_p.h b/src/opengl/gl2paintengineex/qglshadercache_p.h
index 9fd16fcff9..26f5076a5a 100644
--- a/src/opengl/gl2paintengineex/qglshadercache_p.h
+++ b/src/opengl/gl2paintengineex/qglshadercache_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 45ac639286..85773fa3cc 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -674,8 +674,8 @@ void QGL2PaintEngineExPrivate::cleanupVectorPath(QPaintEngineEx *engine, void *d
d->unusedIBOSToClean << c->ibo;
#else
Q_UNUSED(engine);
- qFree(c->vertices);
- qFree(c->indices);
+ free(c->vertices);
+ free(c->indices);
#endif
delete c;
}
@@ -720,7 +720,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
cache->vbo = 0;
Q_ASSERT(cache->ibo == 0);
#else
- qFree(cache->vertices);
+ free(cache->vertices);
Q_ASSERT(cache->indices == 0);
#endif
updateCache = true;
@@ -748,7 +748,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW);
cache->ibo = 0;
#else
- cache->vertices = (float *) qMalloc(floatSizeInBytes);
+ cache->vertices = (float *) malloc(floatSizeInBytes);
memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes);
cache->indices = 0;
#endif
@@ -800,8 +800,8 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
glDeleteBuffers(1, &cache->vbo);
glDeleteBuffers(1, &cache->ibo);
#else
- qFree(cache->vertices);
- qFree(cache->indices);
+ free(cache->vertices);
+ free(cache->indices);
#endif
updateCache = true;
}
@@ -836,12 +836,12 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
vertices[i] = float(inverseScale * polys.vertices.at(i));
glBufferData(GL_ARRAY_BUFFER, sizeof(float) * vertices.size(), vertices.data(), GL_STATIC_DRAW);
#else
- cache->vertices = (float *) qMalloc(sizeof(float) * polys.vertices.size());
+ cache->vertices = (float *) malloc(sizeof(float) * polys.vertices.size());
if (polys.indices.type() == QVertexIndexVector::UnsignedInt) {
- cache->indices = (quint32 *) qMalloc(sizeof(quint32) * polys.indices.size());
+ cache->indices = (quint32 *) malloc(sizeof(quint32) * polys.indices.size());
memcpy(cache->indices, polys.indices.data(), sizeof(quint32) * polys.indices.size());
} else {
- cache->indices = (quint16 *) qMalloc(sizeof(quint16) * polys.indices.size());
+ cache->indices = (quint16 *) malloc(sizeof(quint16) * polys.indices.size());
memcpy(cache->indices, polys.indices.data(), sizeof(quint16) * polys.indices.size());
}
for (int i = 0; i < polys.vertices.size(); ++i)
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index dbf760929c..629a0f3ddb 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 3a3abb19d4..c3f0257100 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 7b7da9d8e8..ca5832ca4a 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
index 29e660fbc7..7cad66e6ec 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
index 2985a6e550..3dbadaadde 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 42235bca18..7afbaa9343 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -3582,7 +3582,7 @@ QGLWidget::~QGLWidget()
*/
/*!
- \fn void *QGLContext::getProcAddress(const QString &proc) const
+ \fn QFunctionPointer QGLContext::getProcAddress() const
Returns a function pointer to the GL extension function passed in
\a proc. 0 is returned if a pointer to the function could not be
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 5f164440be..85c4eb9dbc 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -322,7 +322,7 @@ public:
static void setTextureCacheLimit(int size);
static int textureCacheLimit();
- void *getProcAddress(const QString &proc) const;
+ QFunctionPointer getProcAddress(const QString &proc) const;
QPaintDevice* device() const;
QColor overlayTransparentColor() const;
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 2f8b677b7c..78eb2d5d6b 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index afa2772a6f..009b43d297 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -231,10 +231,10 @@ void QGLContext::swapBuffers() const
d->guiGlContext->swapBuffers(widget->windowHandle());
}
-void *QGLContext::getProcAddress(const QString &procName) const
+QFunctionPointer QGLContext::getProcAddress(const QString &procName) const
{
Q_D(const QGLContext);
- return (void *)d->guiGlContext->getProcAddress(procName.toAscii());
+ return d->guiGlContext->getProcAddress(procName.toAscii());
}
void QGLWidget::setContext(QGLContext *context,
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index c1128a0ebd..baeac676e7 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index 0acf0c32ed..3dece18ab3 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp
index 8ff2f9fa0a..8a3c9d7b86 100644
--- a/src/opengl/qglcolormap.cpp
+++ b/src/opengl/qglcolormap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglcolormap.h b/src/opengl/qglcolormap.h
index cc8519173b..5774aea1d0 100644
--- a/src/opengl/qglcolormap.h
+++ b/src/opengl/qglcolormap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp
index 42f1ea59dd..34196b6181 100644
--- a/src/opengl/qglextensions.cpp
+++ b/src/opengl/qglextensions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,13 +43,11 @@
QT_BEGIN_NAMESPACE
-static void *qt_gl_getProcAddress_search
+static QFunctionPointer qt_gl_getProcAddress_search
(QGLContext *ctx, const char *name1, const char *name2,
const char *name3, const char *name4)
{
- void *addr;
-
- addr = ctx->getProcAddress(QLatin1String(name1));
+ QFunctionPointer addr = ctx->getProcAddress(QLatin1String(name1));
if (addr)
return addr;
diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h
index d391a99643..f8eff5a8bc 100644
--- a/src/opengl/qglextensions_p.h
+++ b/src/opengl/qglextensions_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index d0d2b2773f..dc62bf0426 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglframebufferobject.h b/src/opengl/qglframebufferobject.h
index 817aecd9b7..a3211ebdfd 100644
--- a/src/opengl/qglframebufferobject.h
+++ b/src/opengl/qglframebufferobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index 61d39c6a07..461d13bbcc 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index 227e6cc176..9c84fe637e 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h
index 3b50a1cd66..725fc22bc5 100644
--- a/src/opengl/qglfunctions.h
+++ b/src/opengl/qglfunctions.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index 08807bdd49..1ef13259c5 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglpaintdevice_p.h b/src/opengl/qglpaintdevice_p.h
index 32ae85dc90..c630009171 100644
--- a/src/opengl/qglpaintdevice_p.h
+++ b/src/opengl/qglpaintdevice_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index ddabbef0b2..39f589cbab 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglpixelbuffer.h b/src/opengl/qglpixelbuffer.h
index 0c7ad38237..09a7eeec7c 100644
--- a/src/opengl/qglpixelbuffer.h
+++ b/src/opengl/qglpixelbuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h
index 05e161b7ef..559af5d63e 100644
--- a/src/opengl/qglpixelbuffer_p.h
+++ b/src/opengl/qglpixelbuffer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglpixelbuffer_stub.cpp b/src/opengl/qglpixelbuffer_stub.cpp
index 0d1d8d6d21..8d8cd93975 100644
--- a/src/opengl/qglpixelbuffer_stub.cpp
+++ b/src/opengl/qglpixelbuffer_stub.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index af093bc9b4..6ffba78b7c 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 591aab27cd..3af47e5939 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp
index c785fb29ad..b0c46a96cd 100644
--- a/src/opengl/qgraphicsshadereffect.cpp
+++ b/src/opengl/qgraphicsshadereffect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h
index 7ae5f53d7e..de6048acbf 100644
--- a/src/opengl/qgraphicsshadereffect_p.h
+++ b/src/opengl/qgraphicsshadereffect_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/cglconvenience/cglconvenience.mm b/src/platformsupport/cglconvenience/cglconvenience.mm
index 280baf48a5..a1a7f8bd89 100644
--- a/src/platformsupport/cglconvenience/cglconvenience.mm
+++ b/src/platformsupport/cglconvenience/cglconvenience.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/cglconvenience/cglconvenience_p.h b/src/platformsupport/cglconvenience/cglconvenience_p.h
index facf8c9b7f..8ac5039bf3 100644
--- a/src/platformsupport/cglconvenience/cglconvenience_p.h
+++ b/src/platformsupport/cglconvenience/cglconvenience_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp
index 72da29c063..857bc0356a 100644
--- a/src/platformsupport/dnd/qsimpledrag.cpp
+++ b/src/platformsupport/dnd/qsimpledrag.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/dnd/qsimpledrag_p.h b/src/platformsupport/dnd/qsimpledrag_p.h
index 82668a68c9..980be04ff8 100644
--- a/src/platformsupport/dnd/qsimpledrag_p.h
+++ b/src/platformsupport/dnd/qsimpledrag_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index ea4b5566c5..5a01e5a03c 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eglconvenience/qeglconvenience_p.h b/src/platformsupport/eglconvenience/qeglconvenience_p.h
index 7b5b970415..1384f11b5e 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience_p.h
+++ b/src/platformsupport/eglconvenience/qeglconvenience_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 1f1f215494..cab551fe51 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index 7002c8b9c2..a0e984b390 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eglconvenience/qxlibeglintegration.cpp b/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
index aeebd35d21..a0a758fc51 100644
--- a/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
+++ b/src/platformsupport/eglconvenience/qxlibeglintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eglconvenience/qxlibeglintegration_p.h b/src/platformsupport/eglconvenience/qxlibeglintegration_p.h
index ad77754eee..3a2de0d780 100644
--- a/src/platformsupport/eglconvenience/qxlibeglintegration_p.h
+++ b/src/platformsupport/eglconvenience/qxlibeglintegration_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pri b/src/platformsupport/eventdispatchers/eventdispatchers.pri
index 38aca26b42..9e6ff282ce 100644
--- a/src/platformsupport/eventdispatchers/eventdispatchers.pri
+++ b/src/platformsupport/eventdispatchers/eventdispatchers.pri
@@ -1,10 +1,10 @@
unix {
SOURCES +=\
- $$PWD/qeventdispatcher_qpa.cpp\
+ $$PWD/qunixeventdispatcher_qpa.cpp\
$$PWD/qgenericunixeventdispatcher.cpp\
HEADERS +=\
- $$PWD/qeventdispatcher_qpa_p.h\
+ $$PWD/qunixeventdispatcher_qpa_p.h\
$$PWD/qgenericunixeventdispatcher_p.h\
}
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
index 005c44a034..75ce257aac 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h b/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h
index 8a34e78357..e329dfb0b2 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher.cpp b/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher.cpp
index ba783c547a..01e6866158 100644
--- a/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher.cpp
+++ b/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qgenericunixeventdispatcher_p.h"
-#include "qeventdispatcher_qpa_p.h"
+#include "qunixeventdispatcher_qpa_p.h"
#include "qeventdispatcher_glib_p.h"
QT_BEGIN_NAMESPACE
@@ -52,7 +52,7 @@ class QAbstractEventDispatcher *createUnixEventDispatcher()
return new QPAEventDispatcherGlib();
else
#endif
- return new QEventDispatcherQPA();
+ return new QUnixEventDispatcherQPA();
}
QT_END_NAMESPACE
diff --git a/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher_p.h b/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher_p.h
index e50f57d9a8..453fa06e13 100644
--- a/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher_p.h
+++ b/src/platformsupport/eventdispatchers/qgenericunixeventdispatcher_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa.cpp
index 8ccb181365..838c59174d 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp
+++ b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,7 +41,7 @@
#include "qplatformdefs.h"
#include "qcoreapplication.h"
-#include "qeventdispatcher_qpa_p.h"
+#include "qunixeventdispatcher_qpa_p.h"
#include "private/qguiapplication_p.h"
#include <QWindowSystemInterface>
@@ -58,14 +58,14 @@ QT_BEGIN_NAMESPACE
QT_USE_NAMESPACE
-QEventDispatcherQPA::QEventDispatcherQPA(QObject *parent)
+QUnixEventDispatcherQPA::QUnixEventDispatcherQPA(QObject *parent)
: QEventDispatcherUNIX(parent)
{ }
-QEventDispatcherQPA::~QEventDispatcherQPA()
+QUnixEventDispatcherQPA::~QUnixEventDispatcherQPA()
{ }
-bool QEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags)
+bool QUnixEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags)
{
bool didSendEvents = QWindowSystemInterface::sendWindowSystemEvents(this, flags);
@@ -76,13 +76,13 @@ bool QEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags)
return didSendEvents;
}
-bool QEventDispatcherQPA::hasPendingEvents()
+bool QUnixEventDispatcherQPA::hasPendingEvents()
{
extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
return qGlobalPostedEventsCount() || QWindowSystemInterface::windowSystemEventsQueued();
}
-void QEventDispatcherQPA::flush()
+void QUnixEventDispatcherQPA::flush()
{
if(qApp)
qApp->sendPostedEvents();
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h
index 7aeb795742..b242f6350b 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h
+++ b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QEVENTDISPATCHER_QPA_H
-#define QEVENTDISPATCHER_QPA_H
+#ifndef QUNIXEVENTDISPATCHER_QPA_H
+#define QUNIXEVENTDISPATCHER_QPA_H
//
// W A R N I N G
@@ -58,16 +58,16 @@
QT_BEGIN_NAMESPACE
-class QEventDispatcherQPAPrivate;
+class QUnixEventDispatcherQPAPrivate;
-class Q_PLATFORMSUPPORT_EXPORT QEventDispatcherQPA : public QEventDispatcherUNIX
+class Q_PLATFORMSUPPORT_EXPORT QUnixEventDispatcherQPA : public QEventDispatcherUNIX
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QEventDispatcherQPA)
+ Q_DECLARE_PRIVATE(QUnixEventDispatcherQPA)
public:
- explicit QEventDispatcherQPA(QObject *parent = 0);
- ~QEventDispatcherQPA();
+ explicit QUnixEventDispatcherQPA(QObject *parent = 0);
+ ~QUnixEventDispatcherQPA();
bool processEvents(QEventLoop::ProcessEventsFlags flags);
bool hasPendingEvents();
@@ -77,4 +77,4 @@ public:
QT_END_NAMESPACE
-#endif // QEVENTDISPATCHER_QPA_H
+#endif // QUNIXEVENTDISPATCHER_QPA_H
diff --git a/src/platformsupport/fb_base/fb_base.cpp b/src/platformsupport/fb_base/fb_base.cpp
index aa395fec29..37b20752c2 100644
--- a/src/platformsupport/fb_base/fb_base.cpp
+++ b/src/platformsupport/fb_base/fb_base.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fb_base/fb_base_p.h b/src/platformsupport/fb_base/fb_base_p.h
index 6b0b152482..d5c825092d 100644
--- a/src/platformsupport/fb_base/fb_base_p.h
+++ b/src/platformsupport/fb_base/fb_base_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
index 9c5d3be637..eb951cad41 100644
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase_p.h b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase_p.h
index 3816ec5862..e7ccce445c 100644
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 0f4adca6f7..a859f6c672 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -724,7 +724,7 @@ QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const
FcConfigSubstitute(0, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
- FcChar8 *familyAfterSubstitution;
+ FcChar8 *familyAfterSubstitution = 0;
FcPatternGetString(pattern, FC_FAMILY, 0, &familyAfterSubstitution);
QString resolved = QString::fromUtf8((const char *) familyAfterSubstitution);
FcPatternDestroy(pattern);
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h
index ecf2d4da49..389338b911 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h b/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h
index ef2414a2d5..55e33fffaa 100644
--- a/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 6c3e403c51..dc54efd67b 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -159,6 +159,8 @@ static QString familyNameFromPostScriptName(QHash<QString, QString> &psNameToFam
void QCoreTextFontDatabase::populateFontDatabase()
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
QCFType<CTFontCollectionRef> collection = CTFontCollectionCreateFromAvailableFonts(0);
if (! collection)
return;
@@ -243,8 +245,6 @@ void QCoreTextFontDatabase::populateFontDatabase()
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
-
NSDictionary *fallbackDict = [NSDictionary dictionaryWithContentsOfFile: @"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist"];
for (NSString *style in [fallbackDict allKeys]) {
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
index 63012f4f8d..3e77548de6 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 687ddb2486..fa18de9621 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index 502cf3819c..543c170cdd 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/glxconvenience/glxconvenience.pri b/src/platformsupport/glxconvenience/glxconvenience.pri
index 5b65e13306..3632f45b54 100644
--- a/src/platformsupport/glxconvenience/glxconvenience.pri
+++ b/src/platformsupport/glxconvenience/glxconvenience.pri
@@ -1,5 +1,6 @@
-contains(QT_CONFIG,xlib) {
+contains(QT_CONFIG,xlib):contains(QT_CONFIG,xrender) {
contains(QT_CONFIG,opengl):!contains(QT_CONFIG,opengles2) {
+ LIBS += $$QMAKE_LIBS_X11 -lXrender
HEADERS += $$PWD/qglxconvenience_p.h
SOURCES += $$PWD/qglxconvenience.cpp
}
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp
index ce0c49d93f..a857d734c3 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
+++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/glxconvenience/qglxconvenience_p.h b/src/platformsupport/glxconvenience/qglxconvenience_p.h
index 4892b07729..df6fe99ed8 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience_p.h
+++ b/src/platformsupport/glxconvenience/qglxconvenience_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp
index fa16fea628..aa268ff940 100644
--- a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp
+++ b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa_p.h b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa_p.h
index 5c42931357..c43658dd4a 100644
--- a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa_p.h
+++ b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa.cpp b/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa.cpp
index 380ab06d9c..737eab1a66 100644
--- a/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa.cpp
+++ b/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h b/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h
index ea9b10f66c..e0ed477acb 100644
--- a/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h
+++ b/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp
index bac5ba20f0..db4737706e 100644
--- a/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp
+++ b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h
index bcfc36799f..95d8280659 100644
--- a/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h
+++ b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp
index 1ceeb31b16..2c1330f188 100644
--- a/src/plugins/accessible/widgets/complexwidgets.cpp
+++ b/src/plugins/accessible/widgets/complexwidgets.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -68,1378 +68,6 @@ QT_BEGIN_NAMESPACE
QString Q_GUI_EXPORT qt_accStripAmp(const QString &text);
-#if 0
-#ifndef QT_NO_ITEMVIEWS
-/*
-The MSDN article "Exposing Data Tables through Microsoft Active Accessibility" explains
-how data tables should be exposed. Url: http://msdn2.microsoft.com/en-us/library/ms971325.aspx
-Basically, the model is like this:
-
-ROLE_SYSTEM_TABLE
- |- ROLE_SYSTEM_ROW
- | |- ROLE_SYSTEM_ROWHEADER
- | |- ROLE_SYSTEM_COLUMNHEADER
- | |- ROLE_SYSTEM_COLUMNHEADER
- | |- ROLE_SYSTEM_COLUMNHEADER
- | '- ..
- |- ROLE_SYSTEM_ROW
- | |- ROLE_SYSTEM_ROWHEADER
- | |- ROLE_SYSTEM_CELL
- | |- ROLE_SYSTEM_CELL
- | |- ROLE_SYSTEM_CELL
- | '- ..
- |- ROLE_SYSTEM_ROW
- | |- ROLE_SYSTEM_ROWHEADER
- | |- ROLE_SYSTEM_CELL
- | |- ROLE_SYSTEM_CELL
- | |- ROLE_SYSTEM_CELL
- | '- ..
- '- ..
-
-The headers of QTreeView is also represented like this.
-*/
-QAccessibleItemRow::QAccessibleItemRow(QAbstractItemView *aView, const QModelIndex &index, bool isHeader)
- : row(index), view(aView), m_header(isHeader)
-{
-}
-
-QHeaderView *QAccessibleItemRow::horizontalHeader() const
-{
- QHeaderView *header = 0;
- if (m_header) {
- if (false) {
-#ifndef QT_NO_TABLEVIEW
- } else if (const QTableView *tv = qobject_cast<const QTableView*>(view)) {
- header = tv->horizontalHeader();
-#endif
-#ifndef QT_NO_TREEVIEW
- } else if (const QTreeView *tv = qobject_cast<const QTreeView*>(view)) {
- header = tv->header();
-#endif
- }
- }
- return header;
-}
-
-QHeaderView *QAccessibleItemRow::verticalHeader() const
-{
- QHeaderView *header = 0;
-#ifndef QT_NO_TABLEVIEW
- if (const QTableView *tv = qobject_cast<const QTableView*>(view))
- header = tv->verticalHeader();
-#endif
- return header;
-}
-
-int QAccessibleItemRow::logicalFromChild(QHeaderView *header, int child) const
-{
- int logical = -1;
- if (header->sectionsHidden()) {
- int kid = 0;
- for (int i = 0; i < header->count(); ++i) {
- if (!header->isSectionHidden(i))
- ++kid;
- if (kid == child) {
- logical = i;
- break;
- }
- }
- } else {
- logical = child - 1;
- }
- return logical;
-}
-
-QRect QAccessibleItemRow::rect(int child) const
-{
- QRect r;
- if (view && view->isVisible()) {
- if (QHeaderView *header = horizontalHeader()) {
- if (!child) {
- r = header->rect();
- } else {
- if (QHeaderView *vheader = verticalHeader()) {
- if (child == 1) {
- int w = vheader->width();
- int h = header->height();
- r.setRect(0, 0, w, h);
- }
- --child;
- }
- if (child) {
- int logical = logicalFromChild(header, child);
- int w = header->sectionSize(logical);
- r.setRect(header->sectionViewportPosition(logical), 0, w, header->height());
- r.translate(header->mapTo(view, QPoint(0, 0)));
- }
- }
- } else if (row.isValid()) {
- if (!child) {
- QModelIndex parent = row.parent();
- const int colCount = row.model()->columnCount(parent);
- for (int i = 0; i < colCount; ++i)
- r |= view->visualRect(row.model()->index(row.row(), i, parent));
- r.translate(view->viewport()->mapTo(view, QPoint(0,0)));
-
- if (const QHeaderView *vheader = verticalHeader()) { // include the section of the vertical header
- QRect re;
- int logicalRow = row.row();
- int h = vheader->sectionSize(logicalRow);
- re.setRect(0, vheader->sectionViewportPosition(logicalRow), vheader->width(), h);
- re.translate(vheader->mapTo(view, QPoint(0, 0)));
- r |= re;
- }
- } else {
- if (QHeaderView *vheader = verticalHeader()) {
- if (child == 1) {
- int logicalRow = row.row();
- int h = vheader->sectionSize(logicalRow);
- r.setRect(0, vheader->sectionViewportPosition(logicalRow), vheader->width(), h);
- r.translate(vheader->mapTo(view, QPoint(0, 0)));
- }
- --child;
- }
- if (child) {
- r = view->visualRect(childIndex(child));
- r.translate(view->viewport()->mapTo(view, QPoint(0,0)));
- }
- }
- }
- }
- if (!r.isNull())
- r.translate(view->mapToGlobal(QPoint(0, 0)));
-
- return r;
-}
-
-int QAccessibleItemRow::treeLevel() const
-{
- int level = 0;
- QModelIndex idx = row;
- while (idx.isValid()) {
- idx = idx.parent();
- ++level;
- }
- return level;
-}
-
-QString QAccessibleItemRow::text_helper(int child) const
-{
- QString value;
- if (m_header) {
- if (!child)
- return QString();
- if (verticalHeader()) {
- if (child == 1)
- return QString();
- --child;
- }
- QHeaderView *header = horizontalHeader();
- int logical = logicalFromChild(header, child);
- value = view->model()->headerData(logical, Qt::Horizontal, Qt::AccessibleTextRole).toString();
- if (value.isEmpty())
- value = view->model()->headerData(logical, Qt::Horizontal).toString();
- return value;
- } else {
- if (!child) { // for one-column views (i.e. QListView)
- if (children().count() >= 1)
- child = 1;
- else
- return QString();
- }
- if (verticalHeader()) {
- if (child == 1) {
- int logical = row.row();
- value = view->model()->headerData(logical, Qt::Vertical, Qt::AccessibleTextRole).toString();
- if (value.isEmpty())
- value = view->model()->headerData(logical, Qt::Vertical).toString();
- return value;
- } else {
- --child;
- }
- }
- }
- if (value.isEmpty()) {
- QModelIndex idx = childIndex(child);
- if (idx.isValid()) {
- value = idx.model()->data(idx, Qt::AccessibleTextRole).toString();
- if (value.isEmpty())
- value = idx.model()->data(idx, Qt::DisplayRole).toString();
- }
- }
- return value;
-}
-
-QString QAccessibleItemRow::text(QAccessible::Text t, int child) const
-{
- QString value;
- if (t == Name) {
- value = text_helper(child);
- } else if (t == Value) {
-#ifndef QT_NO_TREEVIEW
- if (qobject_cast<const QTreeView*>(view)) {
- if (child == 0)
- value = QString::number(treeLevel());
- } else
-#endif
- {
- value = text_helper(child);
- }
- } else if (t == Description) {
-#ifndef QT_NO_TREEVIEW
- if (child == 0 && qobject_cast<const QTreeView*>(view)) {
- // We store the tree coordinates of the current item in the description.
- // This enables some screen readers to report where the focus is
- // in a tree view. (works in JAWS). Also, Firefox does the same thing.
- // For instance the description "L2, 4 of 25 with 24" means
- // "L2": Tree Level 2
- // "4 of 25": We are item 4 out of in total 25 other siblings
- // "with 24": We have 24 children. (JAWS does not read this number)
-
- // level
- int level = treeLevel();
-
- QAbstractItemModel *m = view->model();
- // totalSiblings and itemIndex
- QModelIndex parent = row.parent();
- int rowCount = m->rowCount(parent);
- int itemIndex = -1;
- int totalSiblings = 0;
- for (int i = 0 ; i < rowCount; ++i) {
- QModelIndex sibling = row.sibling(i, 0);
- if (!view->isIndexHidden(sibling))
- ++totalSiblings;
- if (row == sibling)
- itemIndex = totalSiblings;
- }
- int totalChildren = m->rowCount(row); // JAWS does not report child count, so we do
- // this simple and efficient.
- // (don't check if they are all visible).
- value = QString::fromAscii("L%1, %2 of %3 with %4").arg(level).arg(itemIndex).arg(totalSiblings).arg(totalChildren);
- } else
-#endif // QT_NO_TREEVIEW
- {
- if (!m_header) {
- if (child == 0 && children().count() >= 1)
- child = 1;
- if (verticalHeader()) {
- if (child == 1) {
- value = view->model()->headerData(row.row(), Qt::Vertical).toString();
- }
- --child;
- }
- if (child) {
- QModelIndex idx = childIndex(child);
- value = idx.model()->data(idx, Qt::AccessibleDescriptionRole).toString();
- }
-
- }
- }
- }
- return value;
-}
-
-void QAccessibleItemRow::setText(QAccessible::Text t, int child, const QString &text)
-{
- if (m_header) {
- if (child)
- view->model()->setHeaderData(child - 1, Qt::Horizontal, text);
- // child == 0 means the cell to the left of the horizontal header, which is empty!?
- } else {
- if (!child) {
- if (children().count() == 1)
- child = 1;
- else
- return;
- }
-
- if (verticalHeader()) {
- if (child == 1) {
- view->model()->setHeaderData(row.row(), Qt::Vertical, text);
- return;
- }
- --child;
- }
- QModelIndex idx = childIndex(child);
- if (!idx.isValid())
- return;
-
- switch (t) {
- case Description:
- const_cast<QAbstractItemModel *>(idx.model())->setData(idx, text,
- Qt::AccessibleDescriptionRole);
- break;
- case Value:
- const_cast<QAbstractItemModel *>(idx.model())->setData(idx, text, Qt::EditRole);
- break;
- default:
- break;
- }
- }
-}
-
-QModelIndex QAccessibleItemRow::childIndex(int child) const
-{
- QList<QModelIndex> kids = children();
- Q_ASSERT(child >= 1 && child <= kids.count());
- return kids.at(child - 1);
-}
-
-QList<QModelIndex> QAccessibleItemRow::children() const
-{
- QList<QModelIndex> kids;
- for (int i = 0; i < row.model()->columnCount(row.parent()); ++i) {
- QModelIndex idx = row.model()->index(row.row(), i, row.parent());
- if (!view->isIndexHidden(idx)) {
- kids << idx;
- }
- }
- return kids;
-}
-
-bool QAccessibleItemRow::isValid() const
-{
- return m_header ? true : row.isValid();
-}
-
-QObject *QAccessibleItemRow::object() const
-{
- return 0;
-}
-
-int QAccessibleItemRow::childCount() const
-{
- int count = 0;
- if (QHeaderView *header = horizontalHeader()) {
- count = header->count() - header->hiddenSectionCount();
- } else {
- count = children().count();
- }
-#ifndef QT_NO_TABLEVIEW
- if (qobject_cast<const QTableView*>(view)) {
- if (verticalHeader())
- ++count;
- }
-#endif
- return count;
-}
-
-int QAccessibleItemRow::indexOfChild(const QAccessibleInterface *iface) const
-{
- if (!iface || iface->role() != Row)
- return -1;
-
- //### meaningless code?
- QList<QModelIndex> kids = children();
- QModelIndex idx = static_cast<const QAccessibleItemRow *>(iface)->row;
- if (!idx.isValid())
- return -1;
- return kids.indexOf(idx) + 1;
-}
-
-QAccessible::Relation QAccessibleItemRow::relationTo(int child, const QAccessibleInterface *other,
- int otherChild) const
-{
- if (!child && !otherChild && other->object() == view)
- return Child;
- if (!child && !otherChild && other == this)
- return Self;
- if (!child && otherChild && other == this)
- return Ancestor;
- if (child && otherChild && other == this)
- return Sibling;
- return Unrelated;
-}
-
-int QAccessibleItemRow::childAt(int x, int y) const
-{
- if (!view || !view->isVisible())
- return -1;
-
- for (int i = childCount(); i >= 0; --i) {
- if (rect(i).contains(x, y))
- return i;
- }
- return -1;
-}
-
-QAbstractItemView::CursorAction QAccessibleItemRow::toCursorAction(
- QAccessible::Relation rel)
-{
- switch (rel) {
- case QAccessible::Up:
- return QAbstractItemView::MoveUp;
- case QAccessible::Down:
- return QAbstractItemView::MoveDown;
- case QAccessible::Left:
- return QAbstractItemView::MoveLeft;
- case QAccessible::Right:
- return QAbstractItemView::MoveRight;
- default:
- Q_ASSERT(false);
- }
- // should never be reached.
- return QAbstractItemView::MoveRight;
-}
-
-QAccessibleInterface *QAccessibleItemRow::parent() const
-{
- return new QAccessibleItemView(view->viewport());
-}
-
-QAccessibleInterface *QAccessibleItemRow::child(int) const
-{
- // FIXME? port to IA2 table2.
- return 0;
-}
-
-int QAccessibleItemRow::navigate(RelationFlag relation, int index,
- QAccessibleInterface **iface) const
-{
- *iface = 0;
- if (!view)
- return -1;
-
- switch (relation) {
- case Ancestor:
- *iface = parent();
- return *iface ? 0 : -1;
- case Child: {
- if (!index)
- return -1;
- if (index < 1 && index > childCount())
- return -1;
-
- return index;}
- case Sibling:
- if (index) {
- QAccessibleInterface *ifaceParent = parent();
- if (ifaceParent) {
- *iface = ifaceParent->child(index - 1);
- delete ifaceParent;
- return *iface ? 0 : -1;
- }
- }
- return -1;
- case Up:
- case Down:
- case Left:
- case Right: {
- // This is in the "not so nice" category. In order to find out which item
- // is geometrically around, we have to set the current index, navigate
- // and restore the index as well as the old selection
- view->setUpdatesEnabled(false);
- const QModelIndex oldIdx = view->currentIndex();
- QList<QModelIndex> kids = children();
- const QModelIndex currentIndex = index ? kids.at(index - 1) : QModelIndex(row);
- const QItemSelection oldSelection = view->selectionModel()->selection();
- view->setCurrentIndex(currentIndex);
- const QModelIndex idx = view->moveCursor(toCursorAction(relation), Qt::NoModifier);
- view->setCurrentIndex(oldIdx);
- view->selectionModel()->select(oldSelection, QItemSelectionModel::ClearAndSelect);
- view->setUpdatesEnabled(true);
- if (!idx.isValid())
- return -1;
-
- if (idx.parent() != row.parent() || idx.row() != row.row())
- *iface = new QAccessibleItemRow(view, idx);
- return index ? kids.indexOf(idx) + 1 : 0; }
- default:
- break;
- }
-
- return -1;
-}
-
-QAccessible::Role QAccessibleItemRow::role(int child) const
-{
- if (false) {
-#ifndef QT_NO_TREEVIEW
- } else if (qobject_cast<const QTreeView*>(view)) {
- if (horizontalHeader()) {
- if (!child)
- return Row;
- return ColumnHeader;
- }
- return TreeItem;
-#endif
-#ifndef QT_NO_LISTVIEW
- } else if (qobject_cast<const QListView*>(view)) {
- return ListItem;
-#endif
-#ifndef QT_NO_TABLEVIEW
- } else if (qobject_cast<const QTableView *>(view)) {
- if (!child)
- return Row;
- if (child == 1) {
- if (verticalHeader())
- return RowHeader;
- }
- if (m_header)
- return ColumnHeader;
-#endif
- }
- return Cell;
-}
-
-QAccessible::State QAccessibleItemRow::state(int child) const
-{
- State st = Normal;
-
- if (!view)
- return st;
-
- QAccessibleInterface *parentIface = parent();
- QRect globalRect;
- if (parentIface) {
- globalRect = parentIface->rect(0);
- delete parentIface;
- }
- if (!globalRect.intersects(rect(child)))
- st |= Invisible;
-
- if (!horizontalHeader()) {
- if (!(st & Invisible)) {
- if (child) {
- if (QHeaderView *vheader = verticalHeader() ) {
- if (child == 1) {
- if (!vheader->isVisible())
- st |= Invisible;
- }
- --child;
- }
- if (child) {
- QModelIndex idx = childIndex(child);
- if (!idx.isValid())
- return st;
-
- if (view->selectionModel()->isSelected(idx))
- st |= Selected;
- if (view->selectionModel()->currentIndex() == idx)
- st |= Focused;
- if (idx.model()->data(idx, Qt::CheckStateRole).toInt() == Qt::Checked)
- st |= Checked;
-
- Qt::ItemFlags flags = idx.flags();
- if (flags & Qt::ItemIsSelectable) {
- st |= Selectable;
- if (view->selectionMode() == QAbstractItemView::MultiSelection)
- st |= MultiSelectable;
- if (view->selectionMode() == QAbstractItemView::ExtendedSelection)
- st |= ExtSelectable;
- }
- }
- } else {
- Qt::ItemFlags flags = row.flags();
- if (flags & Qt::ItemIsSelectable) {
- st |= Selectable;
- st |= Focusable;
- }
- if (view->selectionModel()->isRowSelected(row.row(), row.parent()))
- st |= Selected;
- if (view->selectionModel()->currentIndex().row() == row.row())
- st |= Focused;
- }
- }
- }
-
- return st;
-}
-
-int QAccessibleItemRow::userActionCount(int) const
-{
- return 0;
-}
-
-QString QAccessibleItemRow::actionText(int, Text, int) const
-{
- return QString();
-}
-
-static QItemSelection rowAt(const QModelIndex &idx)
-{
- return QItemSelection(idx.sibling(idx.row(), 0),
- idx.sibling(idx.row(), idx.model()->columnCount(idx.parent())));
-}
-
-bool QAccessibleItemRow::doAction(int action, int child, const QVariantList & /*params*/)
-{
- if (!view)
- return false;
-
- if (verticalHeader())
- --child;
-
- QModelIndex idx = child ? childIndex(child) : QModelIndex(row);
- if (!idx.isValid())
- return false;
-
- QItemSelectionModel::SelectionFlags command = QItemSelectionModel::NoUpdate;
-
- switch (action) {
- case SetFocus:
- view->setCurrentIndex(idx);
- return true;
- case ExtendSelection:
- if (!child)
- return false;
- view->selectionModel()->select(QItemSelection(view->currentIndex(), idx),
- QItemSelectionModel::SelectCurrent);
- return true;
- case Select:
- command = QItemSelectionModel::ClearAndSelect;
- break;
- case ClearSelection:
- command = QItemSelectionModel::Clear;
- break;
- case RemoveSelection:
- command = QItemSelectionModel::Deselect;
- break;
- case AddToSelection:
- command = QItemSelectionModel::SelectCurrent;
- break;
- }
- if (command == QItemSelectionModel::NoUpdate)
- return false;
-
- if (child)
- view->selectionModel()->select(idx, command);
- else
- view->selectionModel()->select(rowAt(row), command);
- return true;
-}
-
-class ModelIndexIterator
-{
-public:
- ModelIndexIterator(QAbstractItemView *view, const QModelIndex &start = QModelIndex()) : m_view(view)
- {
-#ifndef QT_NO_LISTVIEW
- list = qobject_cast<QListView*>(m_view);
-#endif
-#ifndef QT_NO_TREEVIEW
- tree = qobject_cast<QTreeView*>(m_view);
-#endif
-#ifndef QT_NO_TABLEVIEW
- table = qobject_cast<QTableView*>(m_view);
-#endif
- if (start.isValid()) {
- m_current = start;
- } else if (m_view && m_view->model()) {
- m_current = view->rootIndex().isValid() ?
- view->rootIndex().child(0,0) : view->model()->index(0, 0);
- }
- }
-
- bool next(int count = 1) {
- for (int i = 0; i < count; ++i) {
- do {
- if (m_current.isValid()) {
- const QAbstractItemModel *m = m_current.model();
-#ifndef QT_NO_TREEVIEW
- if (tree && m_current.model()->hasChildren(m_current) && tree->isExpanded(m_current)) {
- m_current = m_current.child(0, 0);
- } else
-#endif
- {
- int row = m_current.row();
- QModelIndex par = m_current.parent();
-
- // Go up to the parent if we reach the end of the rows
- // If m_curent becomses invalid, stop going up.
- while (row + 1 >= m->rowCount(par)) {
- m_current = par;
- if (m_current.isValid()) {
- row = m_current.row();
- par = m_current.parent();
- } else {
- row = 0;
- par = QModelIndex();
- break;
- }
- }
-
- if (m_current.isValid())
- m_current = m_current.sibling(row + 1, 0);
- }
- }
- } while (isHidden());
- }
- return m_current.isValid();
- }
-
- bool isHidden() const {
- if (false) {
-#ifndef QT_NO_LISTVIEW
- } else if (list) {
- return list->isRowHidden(m_current.row());
-#endif
-#ifndef QT_NO_TREEVIEW
- } else if (tree) {
- return tree->isRowHidden(m_current.row(), m_current.parent());
-#endif
-#ifndef QT_NO_TABLEVIEW
- } else if (table) {
- return table->isRowHidden(m_current.row());
-#endif
- }
- return false;
- }
-
- QModelIndex current() const {
- return m_current;
- }
-
-private:
- QModelIndex m_current;
- QAbstractItemView *m_view;
-
-#ifndef QT_NO_TREEVIEW
- QTreeView *tree;
-#endif
-#ifndef QT_NO_LISTVIEW
- QListView *list;
-#endif
-#ifndef QT_NO_TABLEVIEW
- QTableView *table;
-#endif
-};
-
-QAccessibleItemView::QAccessibleItemView(QWidget *w)
- : QAccessibleAbstractScrollArea(w->objectName() == QLatin1String("qt_scrollarea_viewport") ? w->parentWidget() : w)
-{
- atVP = w->objectName() == QLatin1String("qt_scrollarea_viewport");
-
-}
-
-
-QHeaderView *QAccessibleItemView::horizontalHeader() const
-{
- QHeaderView *header = 0;
- if (false) {
-#ifndef QT_NO_TABLEVIEW
- } else if (const QTableView *tv = qobject_cast<const QTableView*>(itemView())) {
- header = tv->horizontalHeader();
-#endif
-#ifndef QT_NO_TREEVIEW
- } else if (const QTreeView *tv = qobject_cast<const QTreeView*>(itemView())) {
- header = tv->header();
-#endif
- }
- return header;
-}
-
-QHeaderView *QAccessibleItemView::verticalHeader() const
-{
- QHeaderView *header = 0;
- if (false) {
-#ifndef QT_NO_TABLEVIEW
- } else if (const QTableView *tv = qobject_cast<const QTableView*>(itemView())) {
- header = tv->verticalHeader();
-#endif
- }
- return header;
-}
-
-
-bool QAccessibleItemView::isValidChildRole(QAccessible::Role role) const
-{
- if (atViewport()) {
- if (false) {
-#ifndef QT_NO_TREEVIEW
- } else if (qobject_cast<const QTreeView*>(itemView())) {
- return (role == TreeItem || role == Row);
-#endif
-#ifndef QT_NO_LISTVIEW
- } else if (qobject_cast<const QListView*>(itemView())) {
- return (role == ListItem);
-#endif
- }
- // TableView
- return role == Row;
- } else {
- if (false) {
-#ifndef QT_NO_TREEVIEW
- } else if (qobject_cast<const QTreeView*>(itemView())) {
- return (role == Tree);
-#endif
-#ifndef QT_NO_LISTVIEW
- } else if (qobject_cast<const QListView*>(itemView())) {
- return (role == List);
-#endif
- }
- // TableView
- return (role == Table);
- }
-}
-
-QObject *QAccessibleItemView::object() const
-{
- QObject *view = QAccessibleAbstractScrollArea::object();
- Q_ASSERT(qobject_cast<const QAbstractItemView *>(view));
- if (atViewport())
- view = qobject_cast<const QAbstractItemView *>(view)->viewport();
- return view;
-}
-
-QAbstractItemView *QAccessibleItemView::itemView() const
-{
- return qobject_cast<QAbstractItemView *>(QAccessibleAbstractScrollArea::object());
-}
-
-int QAccessibleItemView::indexOfChild(const QAccessibleInterface *iface) const
-{
- if (atViewport()) {
- if (!iface || !isValidChildRole(iface->role(0)))
- return -1;
-
- int entry = -1;
- // ### This will fail if a row is hidden.
- const QAccessibleItemRow *ifRow = static_cast<const QAccessibleItemRow *>(iface);
- if (ifRow->horizontalHeader())
- return 1;
-
- QModelIndex idx = ifRow->row;
- if (!idx.isValid())
- return -1;
-
- entry = entryFromIndex(idx);
- if (horizontalHeader())
- ++entry;
-
- return entry;
-
- } else {
- return QAccessibleAbstractScrollArea::indexOfChild(iface);
- }
-}
-
-QModelIndex QAccessibleItemView::childIndex(int child) const
-{
- if (!atViewport())
- return QModelIndex();
- ModelIndexIterator it(itemView());
- it.next(child - 1);
- return it.current();
-}
-
-int QAccessibleItemView::entryFromIndex(const QModelIndex &index) const
-{
- int entry = -1;
- if (false) {
-#ifndef QT_NO_TREEVIEW
- } else if (QTreeView *tree = qobject_cast<QTreeView*>(itemView())) {
- entry = tree->visualIndex(index) + 1;
-#endif
-#ifndef QT_NO_LISTVIEW
- } else if (QListView *list = qobject_cast<QListView*>(itemView())) {
- entry = list->visualIndex(index) + 1;
-#endif
-#ifndef QT_NO_TABLEVIEW
- } else if (QTableView *table = qobject_cast<QTableView*>(itemView())) {
- entry = table->visualIndex(index) + 1;
-#endif
- }
- return entry;
-}
-
-int QAccessibleItemView::childCount() const
-{
- if (atViewport()) {
- if (itemView()->model() == 0)
- return 0;
- QAbstractItemModel *m = itemView()->model();
- QModelIndex idx = m->index(0,0);
- if (!idx.isValid())
- return 0;
- ModelIndexIterator it(itemView());
- int count = 1;
- while (it.next()) {
- ++count;
- }
- if (horizontalHeader())
- ++count;
-
- return count;
- } else {
- return QAccessibleAbstractScrollArea::childCount();
- }
-}
-
-QString QAccessibleItemView::text(QAccessible::Text t, int child) const
-{
- if (atViewport()) {
- if (!child)
- return QAccessibleAbstractScrollArea::text(t, child);
-
- QAccessibleItemRow item(itemView(), childIndex(child));
- if (item.isValid()) {
- return item.text(t, 1);
- } else {
- return QString();
- }
- } else {
- return QAccessibleAbstractScrollArea::text(t, child);
- }
-}
-
-void QAccessibleItemView::setText(QAccessible::Text t, int child, const QString &text)
-{
- if (atViewport()) {
- if (!child) {
- QAccessibleAbstractScrollArea::setText(t, child, text);
- return;
- }
-
- QAccessibleItemRow item(itemView(), childIndex(child));
- item.setText(t, 1, text);
- } else {
- QAccessibleAbstractScrollArea::setText(t, child, text);
- }
-}
-
-QRect QAccessibleItemView::rect(int childIndex) const
-{
- if (atViewport()) {
- QRect r;
- if (!childIndex) {
- // Make sure that the rect *include* the vertical and horizontal headers, while
- // not including the potential vertical and horizontal scrollbars.
- QAbstractItemView *w = itemView();
-
- int vscrollWidth = 0;
- const QScrollBar *sb = w->verticalScrollBar();
- if (sb && sb->isVisible())
- vscrollWidth = sb->width();
-
- int hscrollHeight = 0;
- sb = w->horizontalScrollBar();
- if (sb && sb->isVisible())
- hscrollHeight = sb->height();
-
- QPoint globalPos = w->mapToGlobal(QPoint(0,0));
- r = w->rect().translated(globalPos);
- if (w->isRightToLeft()) {
- r.adjust(vscrollWidth, 0, 0, -hscrollHeight);
- } else {
- r.adjust(0, 0, -vscrollWidth, -hscrollHeight);
- }
- } else {
- QAccessibleInterface *iface = child(childIndex - 1);
- if (iface) {
- r = iface->rect(0);
- delete iface;
- }
- }
- return r;
- } else {
- QRect r = QAccessibleAbstractScrollArea::rect(childIndex);
- if (childIndex == 1) {
- // include the potential vertical and horizontal headers
-
- const QHeaderView *header = verticalHeader();
- int headerWidth = (header && header->isVisible()) ? header->width() : 0;
- header = horizontalHeader();
- int headerHeight= (header && header->isVisible()) ? header->height() : 0;
- if (itemView()->isRightToLeft()) {
- r.adjust(0, -headerHeight, headerWidth, 0);
- } else {
- r.adjust(-headerWidth, -headerHeight, 0, 0);
- }
- }
- return r;
- }
-}
-
-int QAccessibleItemView::childAt(int x, int y) const
-{
- if (atViewport()) {
- QPoint p(x, y);
- for (int i = childCount(); i >= 0; --i) {
- if (rect(i).contains(p))
- return i;
- }
- return -1;
- } else {
- return QAccessibleAbstractScrollArea::childAt(x, y);
- }
-}
-
-QAccessible::Role QAccessibleItemView::role(int child) const
-{
- if ((!atViewport() && child) || (atViewport() && child == 0)) {
- QAbstractItemView *view = itemView();
-#ifndef QT_NO_TABLEVIEW
- if (qobject_cast<QTableView *>(view))
- return Table;
-#endif
-#ifndef QT_NO_LISTVIEW
- if (qobject_cast<QListView *>(view))
- return List;
-#endif
- return Tree;
- }
- if (atViewport()) {
- if (child)
- return Row;
- }
-
- return QAccessibleAbstractScrollArea::role(child);
-}
-
-QAccessible::State QAccessibleItemView::state(int child) const
-{
- State st = Normal;
-
- if (itemView() == 0)
- return State(Unavailable);
-
- bool queryViewPort = (atViewport() && child == 0) || (!atViewport() && child == 1);
- if (queryViewPort) {
- if (itemView()->selectionMode() != QAbstractItemView::NoSelection) {
- st |= Selectable;
- st |= Focusable;
- }
- } else if (atViewport()) { // children of viewport
- if (horizontalHeader())
- --child;
- if (child) {
- QAccessibleItemRow item(itemView(), childIndex(child));
- st |= item.state(0);
- }
- } else if (!atViewport() && child != 1) {
- st = QAccessibleAbstractScrollArea::state(child);
- }
- return st;
-}
-
-bool QAccessibleItemView::isValid() const
-{
- if (atViewport())
- return QAccessibleWidget::isValid();
- else
- return QAccessibleAbstractScrollArea::isValid();
-}
-
-int QAccessibleItemView::navigate(RelationFlag relation, int index,
- QAccessibleInterface **iface) const
-{
- if (atViewport()) {
- if (relation == Ancestor && index == 1) {
- *iface = new QAccessibleItemView(itemView());
- return 0;
- } else if (relation == Child && index >= 1) {
- if (horizontalHeader()) {
- if (index == 1) {
- *iface = new QAccessibleItemRow(itemView(), QModelIndex(), true);
- return 0;
- }
- --index;
- }
-
- //###JAS hidden rows..
- QModelIndex idx = childIndex(index);
- if (idx.isValid()) {
- *iface = new QAccessibleItemRow(itemView(), idx);
- return 0;
- }
- } else if (relation == Sibling && index >= 1) {
- QAccessibleInterface *parent = new QAccessibleItemView(itemView());
- return parent->navigate(Child, index, iface);
- }
- *iface = 0;
- return -1;
- } else {
- return QAccessibleAbstractScrollArea::navigate(relation, index, iface);
- }
-}
-
-/* returns the model index for a given row and column */
-QModelIndex QAccessibleItemView::index(int row, int column) const
-{
- return itemView()->model()->index(row, column);
-}
-
-QAccessibleInterface *QAccessibleItemView::accessibleAt(int row, int column)
-{
- QWidget *indexWidget = itemView()->indexWidget(index(row, column));
- return QAccessible::queryAccessibleInterface(indexWidget);
-}
-
-/* We don't have a concept of a "caption" in Qt's standard widgets */
-QAccessibleInterface *QAccessibleItemView::caption()
-{
- return 0;
-}
-
-/* childIndex is row * columnCount + columnIndex */
-int QAccessibleItemView::childIndex(int rowIndex, int columnIndex)
-{
- return rowIndex * itemView()->model()->columnCount() + columnIndex;
-}
-
-/* Return the header data as column description */
-QString QAccessibleItemView::columnDescription(int column)
-{
- return itemView()->model()->headerData(column, Qt::Horizontal).toString();
-}
-
-/* We don't support column spanning atm */
-int QAccessibleItemView::columnSpan(int /* row */, int /* column */)
-{
- return 1;
-}
-
-/* Return the horizontal header view */
-QAccessibleInterface *QAccessibleItemView::columnHeader()
-{
-#ifndef QT_NO_TREEVIEW
- if (QTreeView *tree = qobject_cast<QTreeView *>(itemView()))
- return QAccessible::queryAccessibleInterface(tree->header());
-#endif
-#ifndef QT_NO_TABLEVIEW
- if (QTableView *table = qobject_cast<QTableView *>(itemView()))
- return QAccessible::queryAccessibleInterface(table->horizontalHeader());
-#endif
- return 0;
-}
-
-int QAccessibleItemView::columnIndex(int childIndex)
-{
- int columnCount = itemView()->model()->columnCount();
- if (!columnCount)
- return 0;
-
- return childIndex % columnCount;
-}
-
-int QAccessibleItemView::columnCount()
-{
- return itemView()->model()->columnCount();
-}
-
-int QAccessibleItemView::rowCount()
-{
- return itemView()->model()->rowCount();
-}
-
-int QAccessibleItemView::selectedColumnCount()
-{
- return itemView()->selectionModel()->selectedColumns().count();
-}
-
-int QAccessibleItemView::selectedRowCount()
-{
- return itemView()->selectionModel()->selectedRows().count();
-}
-
-QString QAccessibleItemView::rowDescription(int row)
-{
- return itemView()->model()->headerData(row, Qt::Vertical).toString();
-}
-
-/* We don't support row spanning */
-int QAccessibleItemView::rowSpan(int /*row*/, int /*column*/)
-{
- return 1;
-}
-
-QAccessibleInterface *QAccessibleItemView::rowHeader()
-{
-#ifndef QT_NO_TABLEVIEW
- if (QTableView *table = qobject_cast<QTableView *>(itemView()))
- return QAccessible::queryAccessibleInterface(table->verticalHeader());
-#endif
- return 0;
-}
-
-int QAccessibleItemView::rowIndex(int childIndex)
-{
- int columnCount = itemView()->model()->columnCount();
- if (!columnCount)
- return 0;
-
- return int(childIndex / columnCount);
-}
-
-int QAccessibleItemView::selectedRows(int maxRows, QList<int> *rows)
-{
- Q_ASSERT(rows);
-
- const QModelIndexList selRows = itemView()->selectionModel()->selectedRows();
- int maxCount = qMin(selRows.count(), maxRows);
-
- for (int i = 0; i < maxCount; ++i)
- rows->append(selRows.at(i).row());
-
- return maxCount;
-}
-
-int QAccessibleItemView::selectedColumns(int maxColumns, QList<int> *columns)
-{
- Q_ASSERT(columns);
-
- const QModelIndexList selColumns = itemView()->selectionModel()->selectedColumns();
- int maxCount = qMin(selColumns.count(), maxColumns);
-
- for (int i = 0; i < maxCount; ++i)
- columns->append(selColumns.at(i).row());
-
- return maxCount;
-}
-
-/* Qt widgets don't have a concept of a summary */
-QAccessibleInterface *QAccessibleItemView::summary()
-{
- return 0;
-}
-
-bool QAccessibleItemView::isColumnSelected(int column)
-{
- return itemView()->selectionModel()->isColumnSelected(column, QModelIndex());
-}
-
-bool QAccessibleItemView::isRowSelected(int row)
-{
- return itemView()->selectionModel()->isRowSelected(row, QModelIndex());
-}
-
-bool QAccessibleItemView::isSelected(int row, int column)
-{
- return itemView()->selectionModel()->isSelected(index(row, column));
-}
-
-void QAccessibleItemView::selectRow(int row)
-{
- QItemSelectionModel *s = itemView()->selectionModel();
- s->select(index(row, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows);
-}
-
-void QAccessibleItemView::selectColumn(int column)
-{
- QItemSelectionModel *s = itemView()->selectionModel();
- s->select(index(0, column), QItemSelectionModel::Select | QItemSelectionModel::Columns);
-}
-
-void QAccessibleItemView::unselectRow(int row)
-{
- QItemSelectionModel *s = itemView()->selectionModel();
- s->select(index(row, 0), QItemSelectionModel::Deselect | QItemSelectionModel::Rows);
-}
-
-void QAccessibleItemView::unselectColumn(int column)
-{
- QItemSelectionModel *s = itemView()->selectionModel();
- s->select(index(0, column), QItemSelectionModel::Deselect | QItemSelectionModel::Columns);
-}
-
-void QAccessibleItemView::cellAtIndex(int index, int *row, int *column, int *rSpan,
- int *cSpan, bool *isSelect)
-{
- *row = rowIndex(index);
- *column = columnIndex(index);
- *rSpan = rowSpan(*row, *column);
- *cSpan = columnSpan(*row, *column);
- *isSelect = isSelected(*row, *column);
-}
-
-/*!
- \class QAccessibleHeader
- \brief The QAccessibleHeader class implements the QAccessibleInterface for header widgets.
- \internal
-
- \ingroup accessibility
-*/
-
-/*!
- Constructs a QAccessibleHeader object for \a w.
-*/
-QAccessibleHeader::QAccessibleHeader(QWidget *w)
-: QAccessibleWidget(w)
-{
- Q_ASSERT(header());
- addControllingSignal(QLatin1String("sectionClicked(int)"));
-}
-
-/*! Returns the QHeaderView. */
-QHeaderView *QAccessibleHeader::header() const
-{
- return qobject_cast<QHeaderView*>(object());
-}
-
-QRect QAccessibleHeader::rect(int child) const
-{
- if (!child)
- return QAccessibleWidget::rect(0);
-
- QHeaderView *h = header();
- QPoint zero = h->mapToGlobal(QPoint(0, 0));
- int sectionSize = h->sectionSize(child - 1);
- int sectionPos = h->sectionPosition(child - 1);
- return h->orientation() == Qt::Horizontal
- ? QRect(zero.x() + sectionPos, zero.y(), sectionSize, h->height())
- : QRect(zero.x(), zero.y() + sectionPos, h->width(), sectionSize);
-}
-
-int QAccessibleHeader::childCount() const
-{
- return header()->count();
-}
-
-QString QAccessibleHeader::text(QAccessible::Text t, int child) const
-{
- QString str;
-
- if (child > 0 && child <= childCount()) {
- switch (t) {
- case Name:
- str = header()->model()->headerData(child - 1, header()->orientation()).toString();
- break;
- case Description: {
- QAccessibleEvent event(QEvent::AccessibilityDescription, child);
- if (QApplication::sendEvent(widget(), &event))
- str = event.value();
- break; }
- case Help: {
- QAccessibleEvent event(QEvent::AccessibilityHelp, child);
- if (QApplication::sendEvent(widget(), &event))
- str = event.value();
- break; }
- default:
- break;
- }
- }
- if (str.isEmpty())
- str = QAccessibleWidget::text(t, child);
- return str;
-}
-
-QAccessible::Role QAccessibleHeader::role(int) const
-{
- return (header()->orientation() == Qt::Horizontal) ? ColumnHeader : RowHeader;
-}
-
-QAccessible::State QAccessibleHeader::state(int child) const
-{
- State state = QAccessibleWidget::state(child);
-
- if (child) {
- int section = child - 1;
- if (header()->isSectionHidden(section))
- state |= Invisible;
- if (header()->resizeMode(section) != QHeaderView::Custom)
- state |= Sizeable;
- } else {
- if (header()->isMovable())
- state |= Movable;
- }
- if (!header()->isClickable())
- state |= Unavailable;
- return state;
-}
-#endif // QT_NO_ITEMVIEWS
-#endif // 0
-
#ifndef QT_NO_TABBAR
/*!
\class QAccessibleTabBar
@@ -1483,7 +111,7 @@ public:
bool isValid() const { return true; }// (!m_parent.isNull()) && m_parent->count() > m_index; }
- int childAt(int, int) const { return 0; }
+ QAccessibleInterface *childAt(int, int) const { return 0; }
int childCount() const { return 0; }
int indexOfChild(const QAccessibleInterface *) const { return -1; }
@@ -1496,17 +124,11 @@ public:
QAccessibleInterface *child(int) const { return 0; }
int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const
{
- if (relation == QAccessible::Ancestor && index == 1) {
- *iface = parent();
- return 0;
- }
+ Q_UNUSED(relation);
+ Q_UNUSED(index);
+ Q_UNUSED(iface);
return -1;
}
- QAccessible::Relation relationTo(const QAccessibleInterface *) const
- {
- return QAccessible::Unrelated;
- }
-
// action interface
QStringList actionNames() const
{
@@ -1544,18 +166,6 @@ QTabBar *QAccessibleTabBar::tabBar() const
return qobject_cast<QTabBar*>(object());
}
-int QAccessibleTabBar::navigate(QAccessible::RelationFlag rel, int entry, QAccessibleInterface **target) const
-{
- if (rel == QAccessible::Child) {
- *target = child(entry - 1);
- if (*target) {
- return 0;
- }
- return -1;
- }
- return QAccessibleWidget::navigate(rel, entry, target);
-}
-
QAccessibleInterface* QAccessibleTabBar::child(int index) const
{
// first the tabs, then 2 buttons
@@ -1577,11 +187,13 @@ QAccessibleInterface* QAccessibleTabBar::child(int index) const
int QAccessibleTabBar::indexOfChild(const QAccessibleInterface *child) const
{
+ // FIXME this looks broken
+
if (child->object() && child->object() == tabBar()->d_func()->leftB)
- return tabBar()->count() + 1; // fixme - one based
+ return tabBar()->count();
if (child->object() && child->object() == tabBar()->d_func()->rightB)
- return tabBar()->count() + 2; // fixme - one based
- return 0;
+ return tabBar()->count() + 1;
+ return -1;
}
int QAccessibleTabBar::childCount() const
@@ -1661,7 +273,7 @@ QComboBox *QAccessibleComboBox::comboBox() const
return qobject_cast<QComboBox*>(object());
}
-QAccessibleInterface* QAccessibleComboBox::child(int index) const
+QAccessibleInterface *QAccessibleComboBox::child(int index) const
{
if (index == 0) {
QAbstractItemView *view = comboBox()->view();
@@ -1679,10 +291,10 @@ int QAccessibleComboBox::childCount() const
return comboBox()->isEditable() ? 2 : 1;
}
-int QAccessibleComboBox::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleComboBox::childAt(int x, int y) const
{
if (comboBox()->isEditable() && comboBox()->lineEdit()->rect().contains(x, y))
- return 1;
+ return child(1);
return 0;
}
@@ -1775,11 +387,6 @@ QAccessibleAbstractScrollArea::QAccessibleAbstractScrollArea(QWidget *widget)
Q_ASSERT(qobject_cast<QAbstractScrollArea *>(widget));
}
-QVariant QAccessibleAbstractScrollArea::invokeMethod(QAccessible::Method, int, const QVariantList &)
-{
- return QVariant();
-}
-
QAccessibleInterface *QAccessibleAbstractScrollArea::child(int index) const
{
return QAccessible::queryAccessibleInterface(accessibleChildren().at(index));
@@ -1794,10 +401,7 @@ int QAccessibleAbstractScrollArea::indexOfChild(const QAccessibleInterface *chil
{
if (!child || !child->object())
return -1;
- int index = accessibleChildren().indexOf(qobject_cast<QWidget *>(child->object()));
- if (index >= 0)
- return ++index;
- return -1;
+ return accessibleChildren().indexOf(qobject_cast<QWidget *>(child->object()));
}
bool QAccessibleAbstractScrollArea::isValid() const
@@ -1805,152 +409,20 @@ bool QAccessibleAbstractScrollArea::isValid() const
return (QAccessibleWidget::isValid() && abstractScrollArea() && abstractScrollArea()->viewport());
}
-int QAccessibleAbstractScrollArea::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
+QAccessibleInterface *QAccessibleAbstractScrollArea::childAt(int x, int y) const
{
- if (!target)
- return -1;
-
- *target = 0;
-
- QWidget *targetWidget = 0;
- QWidget *entryWidget = 0;
-
- if (relation == QAccessible::Child ||
- relation == QAccessible::Left || relation == QAccessible::Up || relation == QAccessible::Right || relation == QAccessible::Down) {
- QWidgetList children = accessibleChildren();
- if (entry < 0 || entry > children.count())
- return -1;
+ if (!abstractScrollArea()->isVisible())
+ return 0;
- if (entry == Self)
- entryWidget = abstractScrollArea();
- else
- entryWidget = children.at(entry - 1);
- AbstractScrollAreaElement entryElement = elementType(entryWidget);
-
- // Not one of the most beautiful switches I've ever seen, but I believe it has
- // to be like this since each case need special handling.
- // It might be possible to make it more general, but I'll leave that as an exercise
- // to the reader. :-)
- switch (relation) {
- case QAccessible::Child:
- if (entry > 0) {
- *target = child(entry - 1);
- return *target ? 0 : -1;
- }
- case QAccessible::Left:
- if (entry < 1)
- break;
- switch (entryElement) {
- case Viewport:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->verticalScrollBar();
- break;
- case HorizontalContainer:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->cornerWidget();
- break;
- case VerticalContainer:
- if (isLeftToRight())
- targetWidget = abstractScrollArea()->viewport();
- break;
- case CornerWidget:
- if (isLeftToRight())
- targetWidget = abstractScrollArea()->horizontalScrollBar();
- break;
- default:
- break;
- }
- break;
- case QAccessible::Right:
- if (entry < 1)
- break;
- switch (entryElement) {
- case Viewport:
- if (isLeftToRight())
- targetWidget = abstractScrollArea()->verticalScrollBar();
- break;
- case HorizontalContainer:
- targetWidget = abstractScrollArea()->cornerWidget();
- break;
- case VerticalContainer:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->viewport();
- break;
- case CornerWidget:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->horizontalScrollBar();
- break;
- default:
- break;
- }
- break;
- case QAccessible::Up:
- if (entry < 1)
- break;
- switch (entryElement) {
- case HorizontalContainer:
- targetWidget = abstractScrollArea()->viewport();
- break;
- case CornerWidget:
- targetWidget = abstractScrollArea()->verticalScrollBar();
- break;
- default:
- break;
- }
- break;
- case QAccessible::Down:
- if (entry < 1)
- break;
- switch (entryElement) {
- case Viewport:
- targetWidget = abstractScrollArea()->horizontalScrollBar();
- break;
- case VerticalContainer:
- targetWidget = abstractScrollArea()->cornerWidget();
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- } else {
- return QAccessibleWidget::navigate(relation, entry, target);
+ for (int i = 0; i < childCount(); ++i) {
+ QPoint wpos = accessibleChildren().at(i)->mapToGlobal(QPoint(0, 0));
+ QRect rect = QRect(wpos, accessibleChildren().at(i)->size());
+ if (rect.contains(x, y))
+ return child(i);
}
-
- if (qobject_cast<const QScrollBar *>(targetWidget))
- targetWidget = targetWidget->parentWidget();
- *target = QAccessible::queryAccessibleInterface(targetWidget);
- return *target ? 0: -1;
+ return 0;
}
-//int QAccessibleAbstractScrollArea::childAt(int x, int y) const
-//{
-// if (!abstractScrollArea()->isVisible())
-// return -1;
-//#if 0
-// const QRect globalSelfGeometry = rect(Self);
-// if (!globalSelfGeometry.isValid() || !globalSelfGeometry.contains(QPoint(x, y)))
-// return -1;
-// const QWidgetList children = accessibleChildren();
-// for (int i = 0; i < children.count(); ++i) {
-// const QWidget *child = children.at(i);
-// const QRect globalChildGeometry = QRect(child->mapToGlobal(QPoint(0, 0)), child->size());
-// if (globalChildGeometry.contains(QPoint(x, y))) {
-// return ++i;
-// }
-// }
-// return 0;
-//#else
-// for (int i = childCount(); i >= 0; --i) {
-// if (rect().contains(x, y))
-// return i;
-// }
-// return -1;
-//#endif
-//}
-
QAbstractScrollArea *QAccessibleAbstractScrollArea::abstractScrollArea() const
{
return static_cast<QAbstractScrollArea *>(object());
diff --git a/src/plugins/accessible/widgets/complexwidgets.h b/src/plugins/accessible/widgets/complexwidgets.h
index 2dde422b12..c596e0b348 100644
--- a/src/plugins/accessible/widgets/complexwidgets.h
+++ b/src/plugins/accessible/widgets/complexwidgets.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,12 +75,10 @@ public:
};
QAccessibleInterface *child(int index) const;
- QVariant invokeMethod(QAccessible::Method method, int, const QVariantList &params);
int childCount() const;
int indexOfChild(const QAccessibleInterface *child) const;
bool isValid() const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
-// int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
//protected:
QAbstractScrollArea *abstractScrollArea() const;
@@ -96,137 +94,8 @@ class QAccessibleScrollArea : public QAccessibleAbstractScrollArea
public:
explicit QAccessibleScrollArea(QWidget *widget);
};
-
#endif // QT_NO_SCROLLAREA
-#if 0
-#ifndef QT_NO_ITEMVIEWS
-class QAccessibleHeader : public QAccessibleWidget
-{
-public:
- explicit QAccessibleHeader(QWidget *w);
-
- int childCount() const;
-
- QRect rect(int child) const;
- QString text(QAccessible::Text t, int child) const;
- Role role(int child) const;
- State state(int child) const;
-
-protected:
- QHeaderView *header() const;
-};
-
-class QAccessibleItemRow: public QAccessibleInterface
-{
- friend class QAccessibleItemView;
-public:
- QAccessibleItemRow(QAbstractItemView *view, const QModelIndex &index = QModelIndex(), bool isHeader = false);
- QRect rect(int child) const;
- QString text(QAccessible::Text t, int child) const;
- void setText(QAccessible::Text t, int child, const QString &text);
- bool isValid() const;
- QObject *object() const;
- Role role(int child) const;
- State state(int child) const;
-
- int childCount() const;
- int indexOfChild(const QAccessibleInterface *) const;
- QList<QModelIndex> children() const;
-
- Relation relationTo(int child, const QAccessibleInterface *other, int otherChild) const;
- int childAt(int x, int y) const;
- QAccessibleInterface *parent() const;
- QAccessibleInterface *child(int index) const;
- int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const;
-
- int userActionCount(int child) const;
- QString actionText(int action, Text t, int child) const;
- bool doAction(int action, int child, const QVariantList &params = QVariantList());
-
- QModelIndex childIndex(int child) const;
-
- QHeaderView *horizontalHeader() const; //used by QAccessibleItemView
-private:
- static QAbstractItemView::CursorAction toCursorAction(Relation rel);
- int logicalFromChild(QHeaderView *header, int child) const;
- int treeLevel() const;
- QHeaderView *verticalHeader() const;
- QString text_helper(int child) const;
-
- QPersistentModelIndex row;
- QPointer<QAbstractItemView> view;
- bool m_header;
-};
-
-class QAccessibleItemView: public QAccessibleAbstractScrollArea, public QAccessibleTableInterface
-{
-public:
- explicit QAccessibleItemView(QWidget *w);
-
- QObject *object() const;
- Role role(int child) const;
- State state(int child) const;
- QRect rect(int child) const;
- int childAt(int x, int y) const;
- int childCount() const;
- QString text(QAccessible::Text t, int child) const;
- void setText(QAccessible::Text t, int child, const QString &text);
- int indexOfChild(const QAccessibleInterface *iface) const;
-
- QModelIndex childIndex(int child) const;
- int entryFromIndex(const QModelIndex &index) const;
- bool isValid() const;
- int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const;
-
- QAccessibleInterface *accessibleAt(int row, int column);
- QAccessibleInterface *caption();
- int childIndex(int rowIndex, int columnIndex);
- QString columnDescription(int column);
- int columnSpan(int row, int column);
- QAccessibleInterface *columnHeader();
- int columnIndex(int childIndex);
- int columnCount();
- int rowCount();
- int selectedColumnCount();
- int selectedRowCount();
- QString rowDescription(int row);
- int rowSpan(int row, int column);
- QAccessibleInterface *rowHeader();
- int rowIndex(int childIndex);
- int selectedRows(int maxRows, QList<int> *rows);
- int selectedColumns(int maxColumns, QList<int> *columns);
- QAccessibleInterface *summary();
- bool isColumnSelected(int column);
- bool isRowSelected(int row);
- bool isSelected(int row, int column);
- void selectRow(int row);
- void selectColumn(int column);
- void unselectRow(int row);
- void unselectColumn(int column);
- void cellAtIndex(int index, int *row, int *column, int *rowSpan,
- int *columnSpan, bool *isSelected);
-
- QHeaderView *horizontalHeader() const;
- QHeaderView *verticalHeader() const;
- bool isValidChildRole(QAccessible::Role role) const;
-
-protected:
- QAbstractItemView *itemView() const;
- QModelIndex index(int row, int column) const;
-
-private:
- inline bool atViewport() const {
- return atVP;
- };
- QAccessible::Role expectedRoleOfChildren() const;
-
- bool atVP;
-};
-
-#endif
-#endif
-
#ifndef QT_NO_TABBAR
class QAccessibleTabBar : public QAccessibleWidget
{
@@ -241,7 +110,6 @@ public:
QAccessibleInterface* child(int index) const;
int indexOfChild(const QAccessibleInterface *child) const;
- int navigate(QAccessible::RelationFlag rel, int entry, QAccessibleInterface **target) const;
protected:
QTabBar *tabBar() const;
@@ -255,7 +123,7 @@ public:
explicit QAccessibleComboBox(QWidget *w);
int childCount() const;
- int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
int indexOfChild(const QAccessibleInterface *child) const;
QAccessibleInterface* child(int index) const;
diff --git a/src/plugins/accessible/widgets/itemviews.cpp b/src/plugins/accessible/widgets/itemviews.cpp
index b33260099f..a7989ccd4e 100644
--- a/src/plugins/accessible/widgets/itemviews.cpp
+++ b/src/plugins/accessible/widgets/itemviews.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -363,10 +363,10 @@ QAccessible::Role QAccessibleTable::role() const
QAccessible::State QAccessibleTable::state() const
{
- return QAccessible::Normal;
+ return QAccessible::State();
}
-int QAccessibleTable::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleTable::childAt(int x, int y) const
{
QPoint viewportOffset = view->viewport()->mapTo(view, QPoint(0,0));
QPoint indexPosition = view->mapFromGlobal(QPoint(x, y) - viewportOffset);
@@ -374,9 +374,9 @@ int QAccessibleTable::childAt(int x, int y) const
QModelIndex index = view->indexAt(indexPosition);
if (index.isValid()) {
- return logicalIndex(index);
+ return childFromLogical(logicalIndex(index));
}
- return -1;
+ return 0;
}
int QAccessibleTable::childCount() const
@@ -393,15 +393,15 @@ int QAccessibleTable::indexOfChild(const QAccessibleInterface *iface) const
Q_ASSERT(iface->role() != QAccessible::TreeItem); // should be handled by tree class
if (iface->role() == QAccessible::Cell || iface->role() == QAccessible::ListItem) {
const QAccessibleTableCell* cell = static_cast<const QAccessibleTableCell*>(iface);
- return logicalIndex(cell->m_index);
+ return logicalIndex(cell->m_index) - 1;
} else if (iface->role() == QAccessible::ColumnHeader){
const QAccessibleTableHeaderCell* cell = static_cast<const QAccessibleTableHeaderCell*>(iface);
- return cell->index + (verticalHeader() ? 1 : 0) + 1;
+ return cell->index + (verticalHeader() ? 1 : 0);
} else if (iface->role() == QAccessible::RowHeader){
const QAccessibleTableHeaderCell* cell = static_cast<const QAccessibleTableHeaderCell*>(iface);
- return (cell->index+1) * (view->model()->rowCount()+1) + 1;
+ return (cell->index+1) * (view->model()->rowCount()+1);
} else if (iface->role() == QAccessible::Pane) {
- return 1; // corner button
+ return 0; // corner button
} else {
qWarning() << "WARNING QAccessibleTable::indexOfChild Fix my children..."
<< iface->role() << iface->text(QAccessible::Name);
@@ -444,31 +444,12 @@ QAccessibleInterface *QAccessibleTable::child(int index) const
int QAccessibleTable::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const
{
+ Q_UNUSED(relation);
+ Q_UNUSED(index);
*iface = 0;
- switch (relation) {
- case QAccessible::Ancestor: {
- *iface = parent();
- return *iface ? 0 : -1;
- }
- case QAccessible::Child: {
- Q_ASSERT(index > 0);
- *iface = child(index - 1);
- if (*iface) {
- return 0;
- }
- break;
- }
- default:
- break;
- }
return -1;
}
-QAccessible::Relation QAccessibleTable::relationTo(const QAccessibleInterface *) const
-{
- return QAccessible::Unrelated;
-}
-
void *QAccessibleTable::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::TableInterface)
@@ -489,14 +470,14 @@ QModelIndex QAccessibleTree::indexFromLogical(int row, int column) const
return modelIndex;
}
-int QAccessibleTree::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleTree::childAt(int x, int y) const
{
QPoint viewportOffset = view->viewport()->mapTo(view, QPoint(0,0));
QPoint indexPosition = view->mapFromGlobal(QPoint(x, y) - viewportOffset);
QModelIndex index = view->indexAt(indexPosition);
if (!index.isValid())
- return -1;
+ return 0;
const QTreeView *treeView = qobject_cast<const QTreeView*>(view);
int row = treeView->d_func()->viewIndex(index) + (horizontalHeader() ? 1 : 0);
@@ -504,7 +485,7 @@ int QAccessibleTree::childAt(int x, int y) const
int i = row * view->model()->columnCount() + column + 1;
Q_ASSERT(i > view->model()->columnCount());
- return i;
+ return child(i - 1);
}
int QAccessibleTree::childCount() const
@@ -518,6 +499,29 @@ int QAccessibleTree::childCount() const
return (treeView->d_func()->viewItems.count() + hHeader)* view->model()->columnCount();
}
+
+QAccessibleInterface *QAccessibleTree::child(int index) const
+{
+ Q_ASSERT(index >= 0);
+ int hHeader = horizontalHeader() ? 1 : 0;
+
+ if (hHeader) {
+ if (index < view->model()->columnCount()) {
+ return new QAccessibleTableHeaderCell(view, index, Qt::Horizontal);
+ } else {
+ index -= view->model()->columnCount();
+ }
+ }
+
+ int row = index / view->model()->columnCount();
+ int column = index % view->model()->columnCount();
+ QModelIndex modelIndex = indexFromLogical(row, column);
+ if (modelIndex.isValid()) {
+ return cell(modelIndex);
+ }
+ return 0;
+}
+
int QAccessibleTree::rowCount() const
{
const QTreeView *treeView = qobject_cast<const QTreeView*>(view);
@@ -534,14 +538,14 @@ int QAccessibleTree::indexOfChild(const QAccessibleInterface *iface) const
int row = treeView->d_func()->viewIndex(cell->m_index) + (horizontalHeader() ? 1 : 0);
int column = cell->m_index.column();
- int index = row * view->model()->columnCount() + column + 1;
+ int index = row * view->model()->columnCount() + column;
//qDebug() << "QAccessibleTree::indexOfChild r " << row << " c " << column << "index " << index;
- Q_ASSERT(index > treeView->model()->columnCount());
+ Q_ASSERT(index >= treeView->model()->columnCount());
return index;
} else if (iface->role() == QAccessible::ColumnHeader){
const QAccessibleTableHeaderCell* cell = static_cast<const QAccessibleTableHeaderCell*>(iface);
//qDebug() << "QAccessibleTree::indexOfChild header " << cell->index << "is: " << cell->index + 1;
- return cell->index + 1;
+ return cell->index;
} else {
qWarning() << "WARNING QAccessibleTable::indexOfChild invalid child"
<< iface->role() << iface->text(QAccessible::Name);
@@ -550,43 +554,6 @@ int QAccessibleTree::indexOfChild(const QAccessibleInterface *iface) const
return -1;
}
-int QAccessibleTree::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const
-{
- switch (relation) {
- case QAccessible::Child: {
- Q_ASSERT(index > 0);
- --index;
- int hHeader = horizontalHeader() ? 1 : 0;
-
- if (hHeader) {
- if (index < view->model()->columnCount()) {
- *iface = new QAccessibleTableHeaderCell(view, index, Qt::Horizontal);
- return 0;
- } else {
- index -= view->model()->columnCount();
- }
- }
-
- int row = index / view->model()->columnCount();
- int column = index % view->model()->columnCount();
- QModelIndex modelIndex = indexFromLogical(row, column);
- if (modelIndex.isValid()) {
- *iface = cell(modelIndex);
- return 0;
- }
- return -1;
- }
- default:
- break;
- }
- return QAccessibleTable::navigate(relation, index, iface);
-}
-
-QAccessible::Relation QAccessibleTree::relationTo(const QAccessibleInterface *) const
-{
- return QAccessible::Unrelated;
-}
-
QAccessibleInterface *QAccessibleTree::cellAt(int row, int column) const
{
QModelIndex index = indexFromLogical(row, column);
@@ -724,34 +691,34 @@ QAccessible::Role QAccessibleTableCell::role() const
QAccessible::State QAccessibleTableCell::state() const
{
- QAccessible::State st = QAccessible::Normal;
+ QAccessible::State st;
QRect globalRect = view->rect();
globalRect.translate(view->mapToGlobal(QPoint(0,0)));
if (!globalRect.intersects(rect()))
- st |= QAccessible::Invisible;
+ st.invisible = true;
if (view->selectionModel()->isSelected(m_index))
- st |= QAccessible::Selected;
+ st.selected = true;
if (view->selectionModel()->currentIndex() == m_index)
- st |= QAccessible::Focused;
+ st.focused = true;
if (m_index.model()->data(m_index, Qt::CheckStateRole).toInt() == Qt::Checked)
- st |= QAccessible::Checked;
+ st.checked = true;
Qt::ItemFlags flags = m_index.flags();
if (flags & Qt::ItemIsSelectable) {
- st |= QAccessible::Selectable;
- st |= QAccessible::Focusable;
+ st.selectable = true;
+ st.focusable = true;
if (view->selectionMode() == QAbstractItemView::MultiSelection)
- st |= QAccessible::MultiSelectable;
+ st.multiSelectable = true;
if (view->selectionMode() == QAbstractItemView::ExtendedSelection)
- st |= QAccessible::ExtSelectable;
+ st.extSelectable = true;
}
if (m_role == QAccessible::TreeItem) {
const QTreeView *treeView = qobject_cast<const QTreeView*>(view);
if (treeView->model()->hasChildren(m_index))
- st |= QAccessible::Expandable;
+ st.expandable = true;
if (treeView->isExpanded(m_index))
- st |= QAccessible::Expanded;
+ st.expanded = true;
}
return st;
}
@@ -815,29 +782,10 @@ QAccessibleInterface *QAccessibleTableCell::child(int) const
int QAccessibleTableCell::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const
{
- if (relation == QAccessible::Ancestor && index == 1) {
- *iface = parent();
- return 0;
- }
-
- *iface = 0;
- if (!view)
- return -1;
-
- switch (relation) {
-
- case QAccessible::Child: {
- return -1;
- }
- case QAccessible::Sibling:
- if (index > 0) {
- QAccessibleInterface *parent = QAccessible::queryAccessibleInterface(view);
- *iface = parent->child(index - 1);
- delete parent;
- return *iface ? 0 : -1;
- }
- return -1;
+ Q_UNUSED(index);
+ Q_UNUSED(relation);
+// switch (relation) {
// From table1 implementation:
// case Up:
// case Down:
@@ -862,28 +810,11 @@ int QAccessibleTableCell::navigate(QAccessible::RelationFlag relation, int index
// if (idx.parent() != row.parent() || idx.row() != row.row())
// *iface = cell(idx);
// return index ? kids.indexOf(idx) + 1 : 0; }
- default:
- break;
- }
-
+// }
+ *iface = 0;
return -1;
}
-QAccessible::Relation QAccessibleTableCell::relationTo(const QAccessibleInterface *other) const
-{
- // we only check for parent-child relationships in trees
- if (m_role == QAccessible::TreeItem && other->role() == QAccessible::TreeItem) {
- QModelIndex otherIndex = static_cast<const QAccessibleTableCell*>(other)->m_index;
- // is the other our parent?
- if (otherIndex.parent() == m_index)
- return QAccessible::Ancestor;
- // are we the other's child?
- if (m_index.parent() == otherIndex)
- return QAccessible::Child;
- }
- return QAccessible::Unrelated;
-}
-
QAccessibleTableHeaderCell::QAccessibleTableHeaderCell(QAbstractItemView *view_, int index_, Qt::Orientation orientation_)
: view(view_), index(index_), orientation(orientation_)
{
@@ -899,7 +830,7 @@ QAccessible::Role QAccessibleTableHeaderCell::role() const
QAccessible::State QAccessibleTableHeaderCell::state() const
{
- return QAccessible::Normal;
+ return QAccessible::State();
}
QRect QAccessibleTableHeaderCell::rect() const
@@ -976,17 +907,11 @@ QAccessibleInterface *QAccessibleTableHeaderCell::child(int) const
int QAccessibleTableHeaderCell::navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const
{
- if (relation == QAccessible::Ancestor && index == 1) {
- *iface = parent();
- return *iface ? 0 : -1;
- }
- *iface = 0;
- return -1;
-}
+ Q_UNUSED(relation);
+ Q_UNUSED(index);
+ Q_UNUSED(iface);
-QAccessible::Relation QAccessibleTableHeaderCell::relationTo(int, const QAccessibleInterface *, int) const
-{
- return QAccessible::Unrelated;
+ return -1;
}
#endif // QT_NO_ITEMVIEWS
diff --git a/src/plugins/accessible/widgets/itemviews.h b/src/plugins/accessible/widgets/itemviews.h
index 08e0bbb487..4b5112350f 100644
--- a/src/plugins/accessible/widgets/itemviews.h
+++ b/src/plugins/accessible/widgets/itemviews.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -71,16 +71,14 @@ public:
QString text(QAccessible::Text t) const;
QRect rect() const;
- int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
int childCount() const;
int indexOfChild(const QAccessibleInterface *) const;
QAccessibleInterface *parent() const;
QAccessibleInterface *child(int index) const;
int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const;
- QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
- QVariant invokeMethod(QAccessible::Method, const QVariantList &) { return QVariant(); }
void *interface_cast(QAccessible::InterfaceType t);
// table interface
@@ -153,15 +151,14 @@ public:
virtual ~QAccessibleTree() {}
- int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
int childCount() const;
+ QAccessibleInterface *child(int index) const;
+
int indexOfChild(const QAccessibleInterface *) const;
int rowCount() const;
- int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const;
- QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
-
// table interface
QAccessibleInterface *cellAt(int row, int column) const;
QString rowDescription(int row) const;
@@ -184,7 +181,7 @@ public:
QRect rect() const;
bool isValid() const;
- int childAt(int, int) const { return 0; }
+ QAccessibleInterface *childAt(int, int) const { return 0; }
int childCount() const { return 0; }
int indexOfChild(const QAccessibleInterface *) const { return -1; }
@@ -194,7 +191,6 @@ public:
QAccessibleInterface *parent() const;
QAccessibleInterface *child(int) const;
int navigate(QAccessible::RelationFlag relation, int m_index, QAccessibleInterface **iface) const;
- QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
// cell interface
virtual int columnExtent() const;
@@ -231,7 +227,7 @@ public:
QRect rect() const;
bool isValid() const;
- int childAt(int, int) const { return 0; }
+ QAccessibleInterface *childAt(int, int) const { return 0; }
int childCount() const { return 0; }
int indexOfChild(const QAccessibleInterface *) const { return -1; }
@@ -241,7 +237,6 @@ public:
QAccessibleInterface *parent() const;
QAccessibleInterface *child(int index) const;
int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const;
- QAccessible::Relation relationTo(int child, const QAccessibleInterface *other, int otherChild) const;
private:
QAbstractItemView *view;
@@ -264,11 +259,11 @@ public:
QObject *object() const { return 0; }
QAccessible::Role role() const { return QAccessible::Pane; }
- QAccessible::State state() const { return QAccessible::Normal; }
+ QAccessible::State state() const { return QAccessible::State(); }
QRect rect() const { return QRect(); }
bool isValid() const { return true; }
- int childAt(int, int) const { return 0; }
+ QAccessibleInterface *childAt(int, int) const { return 0; }
int childCount() const { return 0; }
int indexOfChild(const QAccessibleInterface *) const { return -1; }
@@ -283,16 +278,10 @@ public:
}
int navigate(QAccessible::RelationFlag relation, int, QAccessibleInterface **iface) const
{
- if (relation == QAccessible::Ancestor) {
- *iface = parent();
- return *iface ? 0 : -1;
- }
+ Q_UNUSED(relation);
+ Q_UNUSED(iface);
return -1;
}
- QAccessible::Relation relationTo(int, const QAccessibleInterface *, int) const
- {
- return QAccessible::Unrelated;
- }
private:
QAbstractItemView *view;
diff --git a/src/plugins/accessible/widgets/main.cpp b/src/plugins/accessible/widgets/main.cpp
index 821b219b36..67e1a46703 100644
--- a/src/plugins/accessible/widgets/main.cpp
+++ b/src/plugins/accessible/widgets/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.cpp b/src/plugins/accessible/widgets/qaccessiblemenu.cpp
index 2fe67fedfe..fcd118e745 100644
--- a/src/plugins/accessible/widgets/qaccessiblemenu.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblemenu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -71,12 +71,12 @@ int QAccessibleMenu::childCount() const
return menu()->actions().count();
}
-int QAccessibleMenu::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleMenu::childAt(int x, int y) const
{
QAction *act = menu()->actionAt(menu()->mapFromGlobal(QPoint(x,y)));
if(act && act->isSeparator())
act = 0;
- return menu()->actions().indexOf(act) + 1;
+ return act ? new QAccessibleMenuItem(menu(), act) : 0;
}
QString QAccessibleMenu::text(QAccessible::Text t) const
@@ -111,31 +111,13 @@ QAccessibleInterface *QAccessibleMenu::parent() const
return QAccessibleWidget::parent();
}
-int QAccessibleMenu::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- Q_ASSERT(entry >= 0);
- switch (relation) {
- case QAccessible::Child:
- *target = child(entry - 1);
- return *target ? 0 : -1;
- case QAccessible::Ancestor:
- *target = parent();
- return *target ? 0 : -1;
- default:
- return QAccessibleWidget::navigate(relation, entry, target);
- }
-}
-
int QAccessibleMenu::indexOfChild( const QAccessibleInterface *child) const
{
- int index = -1;
QAccessible::Role r = child->role();
if ((r == QAccessible::MenuItem || r == QAccessible::Separator) && menu()) {
- index = menu()->actions().indexOf(qobject_cast<QAction*>(child->object()));
- if (index != -1)
- ++index;
+ return menu()->actions().indexOf(qobject_cast<QAction*>(child->object()));
}
- return index;
+ return -1;
}
#ifndef QT_NO_MENUBAR
@@ -162,25 +144,13 @@ QAccessibleInterface *QAccessibleMenuBar::child(int index) const
return 0;
}
-int QAccessibleMenuBar::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- if (relation == QAccessible::Child) {
- *target = child(entry - 1);
- return *target ? 0 : -1;
- }
- return QAccessibleWidget::navigate(relation, entry, target);
-}
-
int QAccessibleMenuBar::indexOfChild(const QAccessibleInterface *child) const
{
- int index = -1;
QAccessible::Role r = child->role();
if ((r == QAccessible::MenuItem || r == QAccessible::Separator) && menuBar()) {
- index = menuBar()->actions().indexOf(qobject_cast<QAction*>(child->object()));
- if (index != -1)
- ++index;
+ return menuBar()->actions().indexOf(qobject_cast<QAction*>(child->object()));
}
- return index;
+ return -1;
}
#endif // QT_NO_MENUBAR
@@ -193,17 +163,16 @@ QAccessibleMenuItem::QAccessibleMenuItem(QWidget *owner, QAction *action)
QAccessibleMenuItem::~QAccessibleMenuItem()
{}
-int QAccessibleMenuItem::childAt(int x, int y ) const
+QAccessibleInterface *QAccessibleMenuItem::childAt(int x, int y ) const
{
for (int i = childCount(); i >= 0; --i) {
QAccessibleInterface *childInterface = child(i);
if (childInterface->rect().contains(x,y)) {
- delete childInterface;
- return i;
+ return childInterface;
}
delete childInterface;
}
- return -1;
+ return 0;
}
int QAccessibleMenuItem::childCount() const
@@ -213,10 +182,8 @@ int QAccessibleMenuItem::childCount() const
int QAccessibleMenuItem::indexOfChild(const QAccessibleInterface * child) const
{
- Q_ASSERT(child == 0);
- if (child->role() == QAccessible::PopupMenu && child->object() == m_action->menu())
- return 1;
-
+ if (child && child->role() == QAccessible::PopupMenu && child->object() == m_action->menu())
+ return 0;
return -1;
}
@@ -239,43 +206,10 @@ QAccessibleInterface *QAccessibleMenuItem::child(int index) const
int QAccessibleMenuItem::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
{
+ Q_UNUSED(relation);
+ Q_UNUSED(entry);
*target = 0;
- if (entry < 0) {
- return -1;
- }
-
- switch (relation) {
- case QAccessible::Child:
- *target = child(entry - 1);
- break;
- case QAccessible::Ancestor:
- *target = parent();
- break;
- case QAccessible::Up:
- case QAccessible::Down:{
- QAccessibleInterface *parentIface = parent();
- if (parentIface) {
- int index = parentIface->indexOfChild(this);
- if (index != -1) {
- index += (relation == QAccessible::Down ? +1 : -1);
- *target = parentIface->child(index - 1);
- }
- }
- delete parentIface;
- break;
- }
- case QAccessible::Sibling: {
- QAccessibleInterface *parentIface = parent();
- if (parentIface)
- *target = parentIface->child(entry - 1);
- delete parentIface;
- break;
- }
- default:
- break;
-
- }
- return *target ? 0 : -1;
+ return -1;
}
void *QAccessibleMenuItem::interface_cast(QAccessible::InterfaceType t)
@@ -309,16 +243,6 @@ QRect QAccessibleMenuItem::rect() const
return rect;
}
-QAccessible::Relation QAccessibleMenuItem::relationTo(const QAccessibleInterface *other) const
-{
- if (other->object() == owner()) {
- return QAccessible::Child;
- }
- Q_UNUSED(other)
- // ###
- return QAccessible::Unrelated;
-}
-
QAccessible::Role QAccessibleMenuItem::role() const
{
return m_action->isSeparator() ? QAccessible::Separator : QAccessible::MenuItem;
@@ -330,28 +254,28 @@ void QAccessibleMenuItem::setText(QAccessible::Text /*t*/, const QString & /*tex
QAccessible::State QAccessibleMenuItem::state() const
{
- QAccessible::State s = QAccessible::Normal;
+ QAccessible::State s;
QWidget *own = owner();
if (own->testAttribute(Qt::WA_WState_Visible) == false || m_action->isVisible() == false) {
- s |= QAccessible::Invisible;
+ s.invisible = true;
}
if (QMenu *menu = qobject_cast<QMenu*>(own)) {
if (menu->activeAction() == m_action)
- s |= QAccessible::Focused;
+ s.focused = true;
#ifndef QT_NO_MENUBAR
} else if (QMenuBar *menuBar = qobject_cast<QMenuBar*>(own)) {
if (menuBar->activeAction() == m_action)
- s |= QAccessible::Focused;
+ s.focused = true;
#endif
}
if (own->style()->styleHint(QStyle::SH_Menu_MouseTracking))
- s |= QAccessible::HotTracked;
+ s.hotTracked = true;
if (m_action->isSeparator() || !m_action->isEnabled())
- s |= QAccessible::Unavailable;
+ s.disabled = true;
if (m_action->isChecked())
- s |= QAccessible::Checked;
+ s.checked = true;
return s;
}
diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.h b/src/plugins/accessible/widgets/qaccessiblemenu.h
index cf6a703b0c..873aacd5d4 100644
--- a/src/plugins/accessible/widgets/qaccessiblemenu.h
+++ b/src/plugins/accessible/widgets/qaccessiblemenu.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,13 +59,12 @@ public:
explicit QAccessibleMenu(QWidget *w);
int childCount() const;
- int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
QString text(QAccessible::Text t) const;
QAccessible::Role role() const;
QAccessibleInterface *child(int index) const;
QAccessibleInterface *parent() const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
int indexOfChild( const QAccessibleInterface *child ) const;
protected:
@@ -81,7 +80,6 @@ public:
QAccessibleInterface *child(int index) const;
int childCount() const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
int indexOfChild(const QAccessibleInterface *child) const;
protected:
@@ -95,20 +93,19 @@ class QAccessibleMenuItem : public QAccessibleInterface, public QAccessibleActio
public:
explicit QAccessibleMenuItem(QWidget *owner, QAction *w);
- virtual ~QAccessibleMenuItem();
-
+ ~QAccessibleMenuItem();
void *interface_cast(QAccessible::InterfaceType t);
- int childAt(int x, int y) const;
+
int childCount() const;
- int indexOfChild(const QAccessibleInterface * child) const;
+ QAccessibleInterface *childAt(int x, int y) const;
bool isValid() const;
+ int indexOfChild(const QAccessibleInterface * child) const;
QAccessibleInterface *parent() const;
QAccessibleInterface *child(int index) const;
int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface ** target) const;
QObject * object() const;
QRect rect() const;
- QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
QAccessible::Role role() const;
void setText(QAccessible::Text t, const QString & text);
QAccessible::State state() const;
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index c1cdd7c45d..70d1a7bf48 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -98,121 +98,6 @@ QList<QWidget*> childWidgets(const QWidget *widget, bool includeTopLevel)
return widgets;
}
-static inline int distance(QWidget *source, QWidget *target,
- QAccessible::RelationFlag relation)
-{
- if (!source || !target)
- return -1;
-
- int returnValue = -1;
- switch (relation) {
- case QAccessible::Up:
- if (target->y() <= source->y())
- returnValue = source->y() - target->y();
- break;
- case QAccessible::Down:
- if (target->y() >= source->y() + source->height())
- returnValue = target->y() - (source->y() + source->height());
- break;
- case QAccessible::Right:
- if (target->x() >= source->x() + source->width())
- returnValue = target->x() - (source->x() + source->width());
- break;
- case QAccessible::Left:
- if (target->x() <= source->x())
- returnValue = source->x() - target->x();
- break;
- default:
- break;
- }
- return returnValue;
-}
-
-static inline QWidget *mdiAreaNavigate(QWidget *area,
- QAccessible::RelationFlag relation, int entry)
-{
-#if defined(QT_NO_MDIAREA) && defined(QT_NO_WORKSPACE)
- Q_UNUSED(area);
-#endif
-#ifndef QT_NO_MDIAREA
- const QMdiArea *mdiArea = qobject_cast<QMdiArea *>(area);
-#endif
-#ifndef QT_NO_WORKSPACE
- const QWorkspace *workspace = qobject_cast<QWorkspace *>(area);
-#endif
- if (true
-#ifndef QT_NO_MDIAREA
- && !mdiArea
-#endif
-#ifndef QT_NO_WORKSPACE
- && !workspace
-#endif
- )
- return 0;
-
- QWidgetList windows;
-#ifndef QT_NO_MDIAREA
- if (mdiArea) {
- foreach (QMdiSubWindow *window, mdiArea->subWindowList())
- windows.append(window);
- } else
-#endif
- {
-#ifndef QT_NO_WORKSPACE
- foreach (QWidget *window, workspace->windowList())
- windows.append(window->parentWidget());
-#endif
- }
-
- if (windows.isEmpty() || entry < 1 || entry > windows.count())
- return 0;
-
- QWidget *source = windows.at(entry - 1);
- QMap<int, QWidget *> candidates;
- foreach (QWidget *window, windows) {
- if (source == window)
- continue;
- int candidateDistance = distance(source, window, relation);
- if (candidateDistance >= 0)
- candidates.insert(candidateDistance, window);
- }
-
- int minimumDistance = INT_MAX;
- QWidget *target = 0;
- foreach (QWidget *candidate, candidates) {
- switch (relation) {
- case QAccessible::Up:
- case QAccessible::Down:
- if (qAbs(candidate->x() - source->x()) < minimumDistance) {
- target = candidate;
- minimumDistance = qAbs(candidate->x() - source->x());
- }
- break;
- case QAccessible::Left:
- case QAccessible::Right:
- if (qAbs(candidate->y() - source->y()) < minimumDistance) {
- target = candidate;
- minimumDistance = qAbs(candidate->y() - source->y());
- }
- break;
- default:
- break;
- }
- if (minimumDistance == 0)
- break;
- }
-
-#ifndef QT_NO_WORKSPACE
- if (workspace) {
- foreach (QWidget *widget, workspace->windowList()) {
- if (widget->parentWidget() == target)
- target = widget;
- }
- }
-#endif
- return target;
-}
-
#ifndef QT_NO_TEXTEDIT
/*!
@@ -282,26 +167,6 @@ void QAccessibleTextEdit::setText(QAccessible::Text t, const QString &text)
textEdit()->setText(text);
}
-QVariant QAccessibleTextEdit::invokeMethod(QAccessible::Method method,
- const QVariantList &params)
-{
- switch (method) {
- case QAccessible::ListSupportedMethods: {
- QSet<QAccessible::Method> set;
- set << QAccessible::ListSupportedMethods << QAccessible::SetCursorPosition << QAccessible::GetCursorPosition;
- return QVariant::fromValue(set | qvariant_cast<QSet<QAccessible::Method> >(
- QAccessibleWidget::invokeMethod(method, params)));
- }
- case QAccessible::SetCursorPosition:
- setCursorPosition(params.value(0).toInt());
- return true;
- case QAccessible::GetCursorPosition:
- return textEdit()->textCursor().position();
- default:
- return QAccessibleWidget::invokeMethod(method, params);
- }
-}
-
void *QAccessibleTextEdit::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::TextInterface)
@@ -316,7 +181,7 @@ void QAccessibleTextEdit::addSelection(int startOffset, int endOffset)
setSelection(0, startOffset, endOffset);
}
-QString QAccessibleTextEdit::attributes(int offset, int *startOffset, int *endOffset)
+QString QAccessibleTextEdit::attributes(int offset, int *startOffset, int *endOffset) const
{
/* The list of attributes can be found at:
http://linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2/textattributes
@@ -426,12 +291,12 @@ QString QAccessibleTextEdit::attributes(int offset, int *startOffset, int *endOf
return result;
}
-int QAccessibleTextEdit::cursorPosition()
+int QAccessibleTextEdit::cursorPosition() const
{
return textEdit()->textCursor().position();
}
-QRect QAccessibleTextEdit::characterRect(int offset, CoordinateType coordType)
+QRect QAccessibleTextEdit::characterRect(int offset, CoordinateType coordType) const
{
QTextEdit *edit = textEdit();
QTextCursor cursor(edit->document());
@@ -463,12 +328,12 @@ QRect QAccessibleTextEdit::characterRect(int offset, CoordinateType coordType)
return r;
}
-int QAccessibleTextEdit::selectionCount()
+int QAccessibleTextEdit::selectionCount() const
{
return textEdit()->textCursor().hasSelection() ? 1 : 0;
}
-int QAccessibleTextEdit::offsetAtPoint(const QPoint &point, CoordinateType coordType)
+int QAccessibleTextEdit::offsetAtPoint(const QPoint &point, CoordinateType coordType) const
{
QTextEdit *edit = textEdit();
@@ -481,7 +346,7 @@ int QAccessibleTextEdit::offsetAtPoint(const QPoint &point, CoordinateType coord
return edit->document()->documentLayout()->hitTest(p, Qt::ExactHit);
}
-void QAccessibleTextEdit::selection(int selectionIndex, int *startOffset, int *endOffset)
+void QAccessibleTextEdit::selection(int selectionIndex, int *startOffset, int *endOffset) const
{
*startOffset = *endOffset = 0;
QTextCursor cursor = textEdit()->textCursor();
@@ -493,7 +358,7 @@ void QAccessibleTextEdit::selection(int selectionIndex, int *startOffset, int *e
*endOffset = cursor.selectionEnd();
}
-QString QAccessibleTextEdit::text(int startOffset, int endOffset)
+QString QAccessibleTextEdit::text(int startOffset, int endOffset) const
{
QTextCursor cursor(textEdit()->document());
@@ -504,7 +369,7 @@ QString QAccessibleTextEdit::text(int startOffset, int endOffset)
}
QString QAccessibleTextEdit::textBeforeOffset (int offset, BoundaryType boundaryType,
- int *startOffset, int *endOffset)
+ int *startOffset, int *endOffset) const
{
// TODO - what exactly is before?
Q_UNUSED(offset);
@@ -515,7 +380,7 @@ QString QAccessibleTextEdit::textBeforeOffset (int offset, BoundaryType boundary
}
QString QAccessibleTextEdit::textAfterOffset(int offset, BoundaryType boundaryType,
- int *startOffset, int *endOffset)
+ int *startOffset, int *endOffset) const
{
// TODO - what exactly is after?
Q_UNUSED(offset);
@@ -526,7 +391,7 @@ QString QAccessibleTextEdit::textAfterOffset(int offset, BoundaryType boundaryTy
}
QString QAccessibleTextEdit::textAtOffset(int offset, BoundaryType boundaryType,
- int *startOffset, int *endOffset)
+ int *startOffset, int *endOffset) const
{
Q_ASSERT(startOffset);
Q_ASSERT(endOffset);
@@ -607,7 +472,7 @@ void QAccessibleTextEdit::setSelection(int selectionIndex, int startOffset, int
textEdit()->setTextCursor(cursor);
}
-int QAccessibleTextEdit::characterCount()
+int QAccessibleTextEdit::characterCount() const
{
return textEdit()->toPlainText().count();
}
@@ -640,7 +505,7 @@ static QTextCursor cursorForRange(QTextEdit *textEdit, int startOffset, int endO
return cursor;
}
-void QAccessibleTextEdit::copyText(int startOffset, int endOffset)
+void QAccessibleTextEdit::copyText(int startOffset, int endOffset) const
{
QTextCursor cursor = cursorForRange(textEdit(), startOffset, endOffset);
@@ -716,23 +581,17 @@ QAccessibleStackedWidget::QAccessibleStackedWidget(QWidget *widget)
Q_ASSERT(qobject_cast<QStackedWidget *>(widget));
}
-QVariant QAccessibleStackedWidget::invokeMethod(QAccessible::Method, int, const QVariantList &)
-{
- return QVariant();
-}
-
-
-int QAccessibleStackedWidget::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleStackedWidget::childAt(int x, int y) const
{
if (!stackedWidget()->isVisible())
- return -1;
+ return 0;
QWidget *currentWidget = stackedWidget()->currentWidget();
if (!currentWidget)
- return -1;
+ return 0;
QPoint position = currentWidget->mapFromGlobal(QPoint(x, y));
if (currentWidget->rect().contains(position))
- return 1;
- return -1;
+ return child(stackedWidget()->currentIndex());
+ return 0;
}
int QAccessibleStackedWidget::childCount() const
@@ -746,10 +605,7 @@ int QAccessibleStackedWidget::indexOfChild(const QAccessibleInterface *child) co
return -1;
QWidget* widget = qobject_cast<QWidget*>(child->object());
- int index = stackedWidget()->indexOf(widget);
- if (index >= 0) // one based counting of children
- return index + 1;
- return -1;
+ return stackedWidget()->indexOf(widget);
}
QAccessibleInterface *QAccessibleStackedWidget::child(int index) const
@@ -759,17 +615,6 @@ QAccessibleInterface *QAccessibleStackedWidget::child(int index) const
return QAccessible::queryAccessibleInterface(stackedWidget()->widget(index));
}
-int QAccessibleStackedWidget::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- switch (relation) {
- case QAccessible::Child:
- *target = child(entry - 1);
- return *target ? 0 : -1;
- default:
- return QAccessibleWidget::navigate(relation, entry, target);
- }
-}
-
QStackedWidget *QAccessibleStackedWidget::stackedWidget() const
{
return static_cast<QStackedWidget *>(object());
@@ -803,42 +648,26 @@ int QAccessibleMdiArea::childCount() const
return mdiArea()->subWindowList().count();
}
+QAccessibleInterface *QAccessibleMdiArea::child(int index) const
+{
+ QList<QMdiSubWindow *> subWindows = mdiArea()->subWindowList();
+ QWidget *targetObject = subWindows.value(index);
+ if (!targetObject)
+ return 0;
+ return QAccessible::queryAccessibleInterface(targetObject);
+}
+
+
int QAccessibleMdiArea::indexOfChild(const QAccessibleInterface *child) const
{
if (!child || !child->object() || mdiArea()->subWindowList().isEmpty())
return -1;
if (QMdiSubWindow *window = qobject_cast<QMdiSubWindow *>(child->object())) {
- int index = mdiArea()->subWindowList().indexOf(window);
- if (index != -1)
- return ++index;
+ return mdiArea()->subWindowList().indexOf(window);
}
return -1;
}
-int QAccessibleMdiArea::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- *target = 0;
- QWidget *targetObject = 0;
- QList<QMdiSubWindow *> subWindows = mdiArea()->subWindowList();
- switch (relation) {
- case QAccessible::Child:
- if (entry < 1 || subWindows.isEmpty() || entry > subWindows.count())
- return -1;
- targetObject = subWindows.at(entry - 1);
- break;
- case QAccessible::Up:
- case QAccessible::Down:
- case QAccessible::Left:
- case QAccessible::Right:
- targetObject = mdiAreaNavigate(mdiArea(), relation, entry);
- break;
- default:
- return QAccessibleWidget::navigate(relation, entry, target);
- }
- *target = QAccessible::queryAccessibleInterface(targetObject);
- return *target ? 0: -1;
-}
-
QMdiArea *QAccessibleMdiArea::mdiArea() const
{
return static_cast<QMdiArea *>(object());
@@ -871,18 +700,21 @@ void QAccessibleMdiSubWindow::setText(QAccessible::Text textType, const QString
QAccessible::State QAccessibleMdiSubWindow::state() const
{
- QAccessible::State state = QAccessible::Normal | QAccessible::Focusable;
- if (!mdiSubWindow()->isMaximized())
- state |= (QAccessible::Movable | QAccessible::Sizeable);
+ QAccessible::State state;
+ state.focusable = true;
+ if (!mdiSubWindow()->isMaximized()) {
+ state.movable = true;
+ state.sizeable = true;
+ }
if (mdiSubWindow()->isAncestorOf(QApplication::focusWidget())
|| QApplication::focusWidget() == mdiSubWindow())
- state |= QAccessible::Focused;
+ state.focused = true;
if (!mdiSubWindow()->isVisible())
- state |= QAccessible::Invisible;
+ state.invisible = true;
if (!mdiSubWindow()->parentWidget()->contentsRect().contains(mdiSubWindow()->geometry()))
- state |= QAccessible::Offscreen;
+ state.offscreen = true;
if (!mdiSubWindow()->isEnabled())
- state |= QAccessible::Unavailable;
+ state.disabled = true;
return state;
}
@@ -893,54 +725,20 @@ int QAccessibleMdiSubWindow::childCount() const
return 0;
}
-int QAccessibleMdiSubWindow::indexOfChild(const QAccessibleInterface *child) const
+QAccessibleInterface *QAccessibleMdiSubWindow::child(int index) const
{
- if (child && child->object() && child->object() == mdiSubWindow()->widget())
- return 1;
- return -1;
+ QMdiSubWindow *source = mdiSubWindow();
+ if (index != 0 || !source->widget())
+ return 0;
+
+ return QAccessible::queryAccessibleInterface(source->widget());
}
-int QAccessibleMdiSubWindow::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
+int QAccessibleMdiSubWindow::indexOfChild(const QAccessibleInterface *child) const
{
- *target = 0;
-
- if (!mdiSubWindow()->parent())
- return QAccessibleWidget::navigate(relation, entry, target);
-
- QWidget *targetObject = 0;
- QMdiSubWindow *source = mdiSubWindow();
- switch (relation) {
- case QAccessible::Child:
- if (entry != 1 || !source->widget())
- return -1;
- targetObject = source->widget();
- break;
- case QAccessible::Up:
- case QAccessible::Down:
- case QAccessible::Left:
- case QAccessible::Right: {
- if (entry != 0)
- break;
- QWidget *parent = source->parentWidget();
- while (parent && !parent->inherits("QMdiArea"))
- parent = parent->parentWidget();
- QMdiArea *mdiArea = qobject_cast<QMdiArea *>(parent);
- if (!mdiArea)
- break;
- int index = mdiArea->subWindowList().indexOf(source);
- if (index == -1)
- break;
- if (QWidget *dest = mdiAreaNavigate(mdiArea, relation, index + 1)) {
- *target = QAccessible::queryAccessibleInterface(dest);
- return *target ? 0 : -1;
- }
- break;
- }
- default:
- return QAccessibleWidget::navigate(relation, entry, target);
- }
- *target = QAccessible::queryAccessibleInterface(targetObject);
- return *target ? 0: -1;
+ if (child && child->object() && child->object() == mdiSubWindow()->widget())
+ return 0;
+ return -1;
}
QRect QAccessibleMdiSubWindow::rect() const
@@ -953,25 +751,6 @@ QRect QAccessibleMdiSubWindow::rect() const
return QRect(pos, mdiSubWindow()->size());
}
-int QAccessibleMdiSubWindow::childAt(int x, int y) const
-{
- if (!mdiSubWindow()->isVisible())
- return -1;
- if (!mdiSubWindow()->parent())
- return QAccessibleWidget::childAt(x, y);
- const QRect globalGeometry = rect();
- if (!globalGeometry.isValid())
- return -1;
- QAccessibleInterface *childIface = child(0);
- const QRect globalChildGeometry = childIface->rect();
- delete childIface;
- if (globalChildGeometry.isValid() && globalChildGeometry.contains(QPoint(x, y)))
- return 1;
- if (globalGeometry.contains(QPoint(x, y)))
- return 0;
- return -1;
-}
-
QMdiSubWindow *QAccessibleMdiSubWindow::mdiSubWindow() const
{
return static_cast<QMdiSubWindow *>(object());
@@ -991,42 +770,25 @@ int QAccessibleWorkspace::childCount() const
return workspace()->windowList().count();
}
+QAccessibleInterface *QAccessibleWorkspace::child(int index) const
+{
+ QWidgetList subWindows = workspace()->windowList();
+ if (index < 0 || subWindows.isEmpty() || index >= subWindows.count())
+ return 0;
+ QObject *targetObject = subWindows.at(index);
+ return QAccessible::queryAccessibleInterface(targetObject);
+}
+
int QAccessibleWorkspace::indexOfChild(const QAccessibleInterface *child) const
{
if (!child || !child->object() || workspace()->windowList().isEmpty())
return -1;
if (QWidget *window = qobject_cast<QWidget *>(child->object())) {
- int index = workspace()->windowList().indexOf(window);
- if (index != -1)
- return ++index;
+ return workspace()->windowList().indexOf(window);
}
return -1;
}
-int QAccessibleWorkspace::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- *target = 0;
- QWidget *targetObject = 0;
- QWidgetList subWindows = workspace()->windowList();
- switch (relation) {
- case QAccessible::Child:
- if (entry < 1 || subWindows.isEmpty() || entry > subWindows.count())
- return -1;
- targetObject = subWindows.at(entry - 1);
- break;
- case QAccessible::Up:
- case QAccessible::Down:
- case QAccessible::Left:
- case QAccessible::Right:
- targetObject = mdiAreaNavigate(workspace(), relation, entry);
- break;
- default:
- return QAccessibleWidget::navigate(relation, entry, target);
- }
- *target = QAccessible::queryAccessibleInterface(targetObject);
- return *target ? 0: -1;
-}
-
QWorkspace *QAccessibleWorkspace::workspace() const
{
return static_cast<QWorkspace *>(object());
@@ -1041,10 +803,6 @@ QAccessibleDialogButtonBox::QAccessibleDialogButtonBox(QWidget *widget)
Q_ASSERT(qobject_cast<QDialogButtonBox*>(widget));
}
-QVariant QAccessibleDialogButtonBox::invokeMethod(QAccessible::Method, int, const QVariantList &)
-{
- return QVariant();
-}
#endif // QT_NO_DIALOGBUTTONBOX
#ifndef QT_NO_TEXTBROWSER
@@ -1068,11 +826,6 @@ QAccessibleCalendarWidget::QAccessibleCalendarWidget(QWidget *widget)
Q_ASSERT(qobject_cast<QCalendarWidget *>(widget));
}
-QVariant QAccessibleCalendarWidget::invokeMethod(QAccessible::Method, int, const QVariantList &)
-{
- return QVariant();
-}
-
int QAccessibleCalendarWidget::childCount() const
{
return calendarWidget()->isNavigationBarVisible() ? 2 : 1;
@@ -1083,8 +836,8 @@ int QAccessibleCalendarWidget::indexOfChild(const QAccessibleInterface *child) c
if (!child || !child->object() || childCount() <= 0)
return -1;
if (qobject_cast<QAbstractItemView *>(child->object()))
- return childCount();
- return 1;
+ return childCount() - 1; // FIXME
+ return 0;
}
QAccessibleInterface *QAccessibleCalendarWidget::child(int index) const
@@ -1098,31 +851,6 @@ QAccessibleInterface *QAccessibleCalendarWidget::child(int index) const
return QAccessible::queryAccessibleInterface(calendarView());
}
-int QAccessibleCalendarWidget::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- *target = 0;
- if (entry <= 0 || entry > childCount())
- return QAccessibleWidget::navigate(relation, entry, target);
- QWidget *targetWidget = 0;
- switch (relation) {
- case QAccessible::Child:
- *target = child(entry - 1);
- return *target ? 0 : -1;
- case QAccessible::Up:
- if (entry == 2)
- targetWidget = navigationBar();
- break;
- case QAccessible::Down:
- if (entry == 1 && childCount() == 2)
- targetWidget = calendarView();
- break;
- default:
- return QAccessibleWidget::navigate(relation, entry, target);
- }
- *target = QAccessible::queryAccessibleInterface(targetWidget);
- return *target ? 0 : -1;
-}
-
QCalendarWidget *QAccessibleCalendarWidget::calendarWidget() const
{
return static_cast<QCalendarWidget *>(object());
@@ -1173,9 +901,9 @@ int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const
{
if (child) {
if (child->role() == QAccessible::TitleBar) {
- return 1;
+ return 0;
} else {
- return 2; //###
+ return 1; // FIXME
}
}
return -1;
@@ -1240,9 +968,6 @@ QAccessibleInterface *QAccessibleTitleBar::child(int index) const
int QAccessibleTitleBar::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **iface) const
{
switch (relation) {
- case QAccessible::Child:
- *iface = child(entry - 1);
- return *iface ? 0 : -1;
case QAccessible::FocusChild:
// ###
if (entry >= 1) {
@@ -1261,9 +986,6 @@ int QAccessibleTitleBar::navigate(QAccessible::RelationFlag relation, int entry,
return role > QDockWidgetLayout::FloatButton ? -1 : index;
}
break;
- case QAccessible::Ancestor:
- *iface = parent();
- return iface ? 0 : -1;
default:
break;
}
@@ -1271,11 +993,6 @@ int QAccessibleTitleBar::navigate(QAccessible::RelationFlag relation, int entry,
return -1;
}
-QAccessible::Relation QAccessibleTitleBar::relationTo(const QAccessibleInterface * /*otherChild*/) const
-{
- return QAccessible::Unrelated; //###
-}
-
int QAccessibleTitleBar::indexOfChild(const QAccessibleInterface * /*child*/) const
{
return -1;
@@ -1303,17 +1020,17 @@ QString QAccessibleTitleBar::text(QAccessible::Text t) const
QAccessible::State QAccessibleTitleBar::state() const
{
- QAccessible::State state = QAccessible::Normal;
+ QAccessible::State state;
QDockWidget *w = dockWidget();
if (w->testAttribute(Qt::WA_WState_Visible) == false)
- state |= QAccessible::Invisible;
+ state.invisible = true;
if (w->focusPolicy() != Qt::NoFocus && w->isActiveWindow())
- state |= QAccessible::Focusable;
+ state.focusable = true;
if (w->hasFocus())
- state |= QAccessible::Focused;
+ state.focused = true;
if (!w->isEnabled())
- state |= QAccessible::Unavailable;
+ state.disabled = true;
return state;
}
@@ -1344,17 +1061,16 @@ QRect QAccessibleTitleBar::rect() const
return rect;
}
-int QAccessibleTitleBar::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleTitleBar::childAt(int x, int y) const
{
- for (int i = childCount(); i >= 0; --i) {
- QAccessibleInterface *childIface = child(i - 1);
+ for (int i = 0; i < childCount(); ++i) {
+ QAccessibleInterface *childIface = child(i);
if (childIface->rect().contains(x,y)) {
- delete childIface;
- return i;
+ return childIface;
}
delete childIface;
}
- return -1;
+ return 0;
}
QObject *QAccessibleTitleBar::object() const
@@ -1436,11 +1152,6 @@ bool QAccessibleTitleBar::isValid() const
QAccessibleMainWindow::QAccessibleMainWindow(QWidget *widget)
: QAccessibleWidget(widget, QAccessible::Window) { }
-QVariant QAccessibleMainWindow::invokeMethod(QAccessible::Method /*method*/, int /*child*/, const QVariantList & /*params*/)
-{
- return QVariant();
-}
-
QAccessibleInterface *QAccessibleMainWindow::child(int index) const
{
QList<QWidget*> kids = childWidgets(mainWindow(), true);
@@ -1459,25 +1170,24 @@ int QAccessibleMainWindow::childCount() const
int QAccessibleMainWindow::indexOfChild(const QAccessibleInterface *iface) const
{
QList<QWidget*> kids = childWidgets(mainWindow(), true);
- int childIndex = kids.indexOf(static_cast<QWidget*>(iface->object()));
- return childIndex == -1 ? -1 : ++childIndex;
+ return kids.indexOf(static_cast<QWidget*>(iface->object()));
}
-int QAccessibleMainWindow::childAt(int x, int y) const
+QAccessibleInterface *QAccessibleMainWindow::childAt(int x, int y) const
{
QWidget *w = widget();
if (!w->isVisible())
- return -1;
+ return 0;
QPoint gp = w->mapToGlobal(QPoint(0, 0));
if (!QRect(gp.x(), gp.y(), w->width(), w->height()).contains(x, y))
- return -1;
+ return 0;
QWidgetList kids = childWidgets(mainWindow(), true);
QPoint rp = mainWindow()->mapFromGlobal(QPoint(x, y));
for (int i = 0; i < kids.size(); ++i) {
QWidget *child = kids.at(i);
if (!child->isWindow() && !child->isHidden() && child->geometry().contains(rp)) {
- return i + 1;
+ return QAccessible::queryAccessibleInterface(child);
}
}
return 0;
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.h b/src/plugins/accessible/widgets/qaccessiblewidgets.h
index 232293b32a..b53138636f 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.h
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,32 +75,31 @@ public:
QString text(QAccessible::Text t) const;
void setText(QAccessible::Text t, const QString &text);
- QVariant invokeMethod(QAccessible::Method method, const QVariantList &params);
void *interface_cast(QAccessible::InterfaceType t);
// QAccessibleTextInterface
void addSelection(int startOffset, int endOffset);
- QString attributes(int offset, int *startOffset, int *endOffset);
- int cursorPosition();
- QRect characterRect(int offset, QAccessible2::CoordinateType coordType);
- int selectionCount();
- int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType);
- void selection(int selectionIndex, int *startOffset, int *endOffset);
- QString text(int startOffset, int endOffset);
+ QString attributes(int offset, int *startOffset, int *endOffset) const;
+ int cursorPosition() const;
+ QRect characterRect(int offset, QAccessible2::CoordinateType coordType) const;
+ int selectionCount() const;
+ int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType) const;
+ void selection(int selectionIndex, int *startOffset, int *endOffset) const;
+ QString text(int startOffset, int endOffset) const;
QString textBeforeOffset (int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset);
+ int *startOffset, int *endOffset) const;
QString textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset);
+ int *startOffset, int *endOffset) const;
QString textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset);
+ int *startOffset, int *endOffset) const;
void removeSelection(int selectionIndex);
void setCursorPosition(int position);
void setSelection(int selectionIndex, int startOffset, int endOffset);
- int characterCount();
+ int characterCount() const;
void scrollToSubstring(int startIndex, int endIndex);
// QAccessibleEditableTextInterface
- void copyText(int startOffset, int endOffset);
+ void copyText(int startOffset, int endOffset) const;
void deleteText(int startOffset, int endOffset);
void insertText(int offset, const QString &text);
void cutText(int startOffset, int endOffset);
@@ -121,12 +120,10 @@ class QAccessibleStackedWidget : public QAccessibleWidget
public:
explicit QAccessibleStackedWidget(QWidget *widget);
- QVariant invokeMethod(QAccessible::Method method, int child, const QVariantList &params);
- int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
int childCount() const;
int indexOfChild(const QAccessibleInterface *child) const;
QAccessibleInterface *child(int index) const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
protected:
QStackedWidget *stackedWidget() const;
@@ -154,8 +151,8 @@ public:
explicit QAccessibleMdiArea(QWidget *widget);
int childCount() const;
+ QAccessibleInterface *child(int index) const;
int indexOfChild(const QAccessibleInterface *child) const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
protected:
QMdiArea *mdiArea() const;
@@ -170,10 +167,9 @@ public:
void setText(QAccessible::Text textType, const QString &text);
QAccessible::State state() const;
int childCount() const;
+ QAccessibleInterface *child(int index) const;
int indexOfChild(const QAccessibleInterface *child) const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
QRect rect() const;
- int childAt(int x, int y) const;
protected:
QMdiSubWindow *mdiSubWindow() const;
@@ -187,8 +183,8 @@ public:
explicit QAccessibleWorkspace(QWidget *widget);
int childCount() const;
+ QAccessibleInterface *child(int index) const;
int indexOfChild(const QAccessibleInterface *child) const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
protected:
QWorkspace *workspace() const;
@@ -199,8 +195,6 @@ class QAccessibleDialogButtonBox : public QAccessibleWidget
{
public:
explicit QAccessibleDialogButtonBox(QWidget *widget);
-
- QVariant invokeMethod(QAccessible::Method method, int child, const QVariantList &params);
};
#ifndef QT_NO_TEXTBROWSER
@@ -221,12 +215,9 @@ public:
int childCount() const;
int indexOfChild(const QAccessibleInterface *child) const;
- int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const;
QAccessibleInterface *child(int index) const;
-
- QVariant invokeMethod(QAccessible::Method method, int child, const QVariantList &params);
protected:
QCalendarWidget *calendarWidget() const;
@@ -260,13 +251,12 @@ public:
int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **iface) const;
int indexOfChild(const QAccessibleInterface *child) const;
int childCount() const;
- QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
+ QAccessibleInterface *childAt(int x, int y) const;
void setText(QAccessible::Text t, const QString &text);
QString text(QAccessible::Text t) const;
QAccessible::Role role() const;
QRect rect () const;
QAccessible::State state() const;
- int childAt(int x, int y) const;
QObject *object() const;
bool isValid() const;
@@ -287,10 +277,9 @@ public:
QAccessibleInterface *child(int index) const;
int childCount() const;
int indexOfChild(const QAccessibleInterface *iface) const;
- int childAt(int x, int y) const;
+ QAccessibleInterface *childAt(int x, int y) const;
QMainWindow *mainWindow() const;
- QVariant invokeMethod(QAccessible::Method method, int child, const QVariantList &params);
};
#endif //QT_NO_MAINWINDOW
diff --git a/src/plugins/accessible/widgets/rangecontrols.cpp b/src/plugins/accessible/widgets/rangecontrols.cpp
index 06ff8e2cbf..6c439a71f0 100644
--- a/src/plugins/accessible/widgets/rangecontrols.cpp
+++ b/src/plugins/accessible/widgets/rangecontrols.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -94,7 +94,7 @@ void *QAccessibleAbstractSpinBox::interface_cast(QAccessible::InterfaceType t)
return QAccessibleWidget::interface_cast(t);
}
-QVariant QAccessibleAbstractSpinBox::currentValue()
+QVariant QAccessibleAbstractSpinBox::currentValue() const
{
QVariant result = abstractSpinBox()->property("value");
QVariant::Type type = result.type();
@@ -112,12 +112,12 @@ void QAccessibleAbstractSpinBox::setCurrentValue(const QVariant &value)
abstractSpinBox()->setProperty("value", value);
}
-QVariant QAccessibleAbstractSpinBox::maximumValue()
+QVariant QAccessibleAbstractSpinBox::maximumValue() const
{
return abstractSpinBox()->property("maximum");
}
-QVariant QAccessibleAbstractSpinBox::minimumValue()
+QVariant QAccessibleAbstractSpinBox::minimumValue() const
{
return abstractSpinBox()->property("minimum");
}
@@ -258,7 +258,7 @@ void *QAccessibleAbstractSlider::interface_cast(QAccessible::InterfaceType t)
return QAccessibleWidget::interface_cast(t);
}
-QVariant QAccessibleAbstractSlider::currentValue()
+QVariant QAccessibleAbstractSlider::currentValue() const
{
return abstractSlider()->value();
}
@@ -268,12 +268,12 @@ void QAccessibleAbstractSlider::setCurrentValue(const QVariant &value)
abstractSlider()->setValue(value.toInt());
}
-QVariant QAccessibleAbstractSlider::maximumValue()
+QVariant QAccessibleAbstractSlider::maximumValue() const
{
return abstractSlider()->maximum();
}
-QVariant QAccessibleAbstractSlider::minimumValue()
+QVariant QAccessibleAbstractSlider::minimumValue() const
{
return abstractSlider()->minimum();
}
diff --git a/src/plugins/accessible/widgets/rangecontrols.h b/src/plugins/accessible/widgets/rangecontrols.h
index f6cbcc6900..218c48184c 100644
--- a/src/plugins/accessible/widgets/rangecontrols.h
+++ b/src/plugins/accessible/widgets/rangecontrols.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,10 +67,10 @@ public:
void *interface_cast(QAccessible::InterfaceType t);
// QAccessibleValueInterface
- QVariant currentValue();
+ QVariant currentValue() const;
void setCurrentValue(const QVariant &value);
- QVariant maximumValue();
- QVariant minimumValue();
+ QVariant maximumValue() const;
+ QVariant minimumValue() const;
// FIXME Action interface
@@ -106,10 +106,10 @@ public:
void *interface_cast(QAccessible::InterfaceType t);
// QAccessibleValueInterface
- QVariant currentValue();
+ QVariant currentValue() const;
void setCurrentValue(const QVariant &value);
- QVariant maximumValue();
- QVariant minimumValue();
+ QVariant maximumValue() const;
+ QVariant minimumValue() const;
protected:
QAbstractSlider *abstractSlider() const;
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 8f4fed48fe..d645ad2d22 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -140,18 +140,18 @@ QAccessible::State QAccessibleButton::state() const
QAbstractButton *b = button();
QCheckBox *cb = qobject_cast<QCheckBox *>(b);
if (b->isChecked())
- state |= QAccessible::Checked;
+ state.checked = true;
else if (cb && cb->checkState() == Qt::PartiallyChecked)
- state |= QAccessible::Mixed;
+ state.checkStateMixed = true;
if (b->isDown())
- state |= QAccessible::Pressed;
+ state.pressed = true;
QPushButton *pb = qobject_cast<QPushButton*>(b);
if (pb) {
if (pb->isDefault())
- state |= QAccessible::DefaultButton;
+ state.defaultButton = true;
#ifndef QT_NO_MENU
if (pb->menu())
- state |= QAccessible::HasPopup;
+ state.hasPopup = true;
#endif
}
@@ -171,7 +171,7 @@ QStringList QAccessibleButton::actionNames() const
break;
default:
if (button()->isCheckable()) {
- if (state() & QAccessible::Checked) {
+ if (state().checked) {
names << uncheckAction();
} else {
// FIXME
@@ -263,10 +263,10 @@ QAccessible::State QAccessibleToolButton::state() const
{
QAccessible::State st = QAccessibleButton::state();
if (toolButton()->autoRaise())
- st |= QAccessible::HotTracked;
+ st.hotTracked = true;
#ifndef QT_NO_MENU
if (toolButton()->menu())
- st |= QAccessible::HasPopup;
+ st.hasPopup = true;
#endif
return st;
}
@@ -464,10 +464,11 @@ int QAccessibleDisplay::navigate(QAccessible::RelationFlag rel, int entry, QAcce
} else {
QGroupBox *groupbox = qobject_cast<QGroupBox*>(object());
if (groupbox && !groupbox->title().isEmpty())
- rel = QAccessible::Child;
+ *target = child(entry - 1);
#endif
}
- *target = QAccessible::queryAccessibleInterface(targetObject);
+ if (targetObject)
+ *target = QAccessible::queryAccessibleInterface(targetObject);
if (*target)
return 0;
}
@@ -482,7 +483,7 @@ void *QAccessibleDisplay::interface_cast(QAccessible::InterfaceType t)
}
/*! \internal */
-QString QAccessibleDisplay::imageDescription()
+QString QAccessibleDisplay::imageDescription() const
{
#ifndef QT_NO_TOOLTIP
return widget()->toolTip();
@@ -492,7 +493,7 @@ QString QAccessibleDisplay::imageDescription()
}
/*! \internal */
-QSize QAccessibleDisplay::imageSize()
+QSize QAccessibleDisplay::imageSize() const
{
QLabel *label = qobject_cast<QLabel *>(widget());
if (!label)
@@ -504,7 +505,7 @@ QSize QAccessibleDisplay::imageSize()
}
/*! \internal */
-QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType)
+QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType) const
{
QLabel *label = qobject_cast<QLabel *>(widget());
if (!label)
@@ -587,40 +588,20 @@ QAccessible::State QAccessibleLineEdit::state() const
QLineEdit *l = lineEdit();
if (l->isReadOnly())
- state |= QAccessible::ReadOnly;
+ state.readOnly = true;
if (l->echoMode() != QLineEdit::Normal)
- state |= QAccessible::Protected;
- state |= QAccessible::Selectable;
+ state.passwordEdit = true;
+ state.selectable = true;
if (l->hasSelectedText())
- state |= QAccessible::Selected;
+ state.selected = true;
if (l->contextMenuPolicy() != Qt::NoContextMenu
&& l->contextMenuPolicy() != Qt::PreventContextMenu)
- state |= QAccessible::HasPopup;
+ state.hasPopup = true;
return state;
}
-QVariant QAccessibleLineEdit::invokeMethod(QAccessible::Method method,
- const QVariantList &params)
-{
- switch (method) {
- case QAccessible::ListSupportedMethods: {
- QSet<QAccessible::Method> set;
- set << QAccessible::ListSupportedMethods << QAccessible::SetCursorPosition << QAccessible::GetCursorPosition;
- return QVariant::fromValue(set | qvariant_cast<QSet<QAccessible::Method> >(
- QAccessibleWidget::invokeMethod(method, params)));
- }
- case QAccessible::SetCursorPosition:
- setCursorPosition(params.value(0).toInt());
- return true;
- case QAccessible::GetCursorPosition:
- return cursorPosition();
- default:
- return QAccessibleWidget::invokeMethod(method, params);
- }
-}
-
void *QAccessibleLineEdit::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::TextInterface)
@@ -635,30 +616,30 @@ void QAccessibleLineEdit::addSelection(int startOffset, int endOffset)
setSelection(0, startOffset, endOffset);
}
-QString QAccessibleLineEdit::attributes(int offset, int *startOffset, int *endOffset)
+QString QAccessibleLineEdit::attributes(int offset, int *startOffset, int *endOffset) const
{
// QLineEdit doesn't have text attributes
*startOffset = *endOffset = offset;
return QString();
}
-int QAccessibleLineEdit::cursorPosition()
+int QAccessibleLineEdit::cursorPosition() const
{
return lineEdit()->cursorPosition();
}
-QRect QAccessibleLineEdit::characterRect(int /*offset*/, CoordinateType /*coordType*/)
+QRect QAccessibleLineEdit::characterRect(int /*offset*/, CoordinateType /*coordType*/) const
{
// QLineEdit doesn't hand out character rects
return QRect();
}
-int QAccessibleLineEdit::selectionCount()
+int QAccessibleLineEdit::selectionCount() const
{
return lineEdit()->hasSelectedText() ? 1 : 0;
}
-int QAccessibleLineEdit::offsetAtPoint(const QPoint &point, CoordinateType coordType)
+int QAccessibleLineEdit::offsetAtPoint(const QPoint &point, CoordinateType coordType) const
{
QPoint p = point;
if (coordType == RelativeToScreen)
@@ -667,7 +648,7 @@ int QAccessibleLineEdit::offsetAtPoint(const QPoint &point, CoordinateType coord
return lineEdit()->cursorPositionAt(p);
}
-void QAccessibleLineEdit::selection(int selectionIndex, int *startOffset, int *endOffset)
+void QAccessibleLineEdit::selection(int selectionIndex, int *startOffset, int *endOffset) const
{
*startOffset = *endOffset = 0;
if (selectionIndex != 0)
@@ -677,7 +658,7 @@ void QAccessibleLineEdit::selection(int selectionIndex, int *startOffset, int *e
*endOffset = *startOffset + lineEdit()->selectedText().count();
}
-QString QAccessibleLineEdit::text(int startOffset, int endOffset)
+QString QAccessibleLineEdit::text(int startOffset, int endOffset) const
{
if (startOffset > endOffset)
return QString();
@@ -689,7 +670,7 @@ QString QAccessibleLineEdit::text(int startOffset, int endOffset)
}
QString QAccessibleLineEdit::textBeforeOffset(int offset, BoundaryType boundaryType,
- int *startOffset, int *endOffset)
+ int *startOffset, int *endOffset) const
{
if (lineEdit()->echoMode() != QLineEdit::Normal) {
*startOffset = *endOffset = -1;
@@ -699,7 +680,7 @@ QString QAccessibleLineEdit::textBeforeOffset(int offset, BoundaryType boundaryT
}
QString QAccessibleLineEdit::textAfterOffset(int offset, BoundaryType boundaryType,
- int *startOffset, int *endOffset)
+ int *startOffset, int *endOffset) const
{
if (lineEdit()->echoMode() != QLineEdit::Normal) {
*startOffset = *endOffset = -1;
@@ -709,7 +690,7 @@ QString QAccessibleLineEdit::textAfterOffset(int offset, BoundaryType boundaryTy
}
QString QAccessibleLineEdit::textAtOffset(int offset, BoundaryType boundaryType,
- int *startOffset, int *endOffset)
+ int *startOffset, int *endOffset) const
{
if (lineEdit()->echoMode() != QLineEdit::Normal) {
*startOffset = *endOffset = -1;
@@ -739,7 +720,7 @@ void QAccessibleLineEdit::setSelection(int selectionIndex, int startOffset, int
lineEdit()->setSelection(startOffset, endOffset - startOffset);
}
-int QAccessibleLineEdit::characterCount()
+int QAccessibleLineEdit::characterCount() const
{
return lineEdit()->text().count();
}
@@ -766,17 +747,17 @@ void *QAccessibleProgressBar::interface_cast(QAccessible::InterfaceType t)
return QAccessibleDisplay::interface_cast(t);
}
-QVariant QAccessibleProgressBar::currentValue()
+QVariant QAccessibleProgressBar::currentValue() const
{
return progressBar()->value();
}
-QVariant QAccessibleProgressBar::maximumValue()
+QVariant QAccessibleProgressBar::maximumValue() const
{
return progressBar()->maximum();
}
-QVariant QAccessibleProgressBar::minimumValue()
+QVariant QAccessibleProgressBar::minimumValue() const
{
return progressBar()->minimum();
}
diff --git a/src/plugins/accessible/widgets/simplewidgets.h b/src/plugins/accessible/widgets/simplewidgets.h
index 40386153be..88bc931336 100644
--- a/src/plugins/accessible/widgets/simplewidgets.h
+++ b/src/plugins/accessible/widgets/simplewidgets.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -109,9 +109,9 @@ public:
void *interface_cast(QAccessible::InterfaceType t);
// QAccessibleImageInterface
- QString imageDescription();
- QSize imageSize();
- QRect imagePosition(QAccessible2::CoordinateType coordType);
+ QString imageDescription() const;
+ QSize imageSize() const;
+ QRect imagePosition(QAccessible2::CoordinateType coordType) const;
};
#ifndef QT_NO_LINEEDIT
@@ -124,28 +124,27 @@ public:
QString text(QAccessible::Text t) const;
void setText(QAccessible::Text t, const QString &text);
QAccessible::State state() const;
- QVariant invokeMethod(QAccessible::Method method, const QVariantList &params);
void *interface_cast(QAccessible::InterfaceType t);
// QAccessibleTextInterface
void addSelection(int startOffset, int endOffset);
- QString attributes(int offset, int *startOffset, int *endOffset);
- int cursorPosition();
- QRect characterRect(int offset, QAccessible2::CoordinateType coordType);
- int selectionCount();
- int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType);
- void selection(int selectionIndex, int *startOffset, int *endOffset);
- QString text(int startOffset, int endOffset);
+ QString attributes(int offset, int *startOffset, int *endOffset) const;
+ int cursorPosition() const;
+ QRect characterRect(int offset, QAccessible2::CoordinateType coordType) const;
+ int selectionCount() const;
+ int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType) const;
+ void selection(int selectionIndex, int *startOffset, int *endOffset) const;
+ QString text(int startOffset, int endOffset) const;
QString textBeforeOffset (int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset);
+ int *startOffset, int *endOffset) const;
QString textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset);
+ int *startOffset, int *endOffset) const;
QString textAtOffset(int offset, QAccessible2::BoundaryType boundaryType,
- int *startOffset, int *endOffset);
+ int *startOffset, int *endOffset) const;
void removeSelection(int selectionIndex);
void setCursorPosition(int position);
void setSelection(int selectionIndex, int startOffset, int endOffset);
- int characterCount();
+ int characterCount() const;
void scrollToSubstring(int startIndex, int endIndex);
protected:
@@ -161,9 +160,9 @@ public:
void *interface_cast(QAccessible::InterfaceType t);
// QAccessibleValueInterface
- QVariant currentValue();
- QVariant maximumValue();
- QVariant minimumValue();
+ QVariant currentValue() const;
+ QVariant maximumValue() const;
+ QVariant minimumValue() const;
inline void setCurrentValue(const QVariant &) {}
protected:
diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro
index ead498e079..12b18ac1ea 100644
--- a/src/plugins/bearer/bearer.pro
+++ b/src/plugins/bearer/bearer.pro
@@ -1,12 +1,8 @@
TEMPLATE = subdirs
-contains(QT_CONFIG, dbus) {
- contains(QT_CONFIG, icd) {
- SUBDIRS += icd
- } else:linux* {
- SUBDIRS += generic
- SUBDIRS += connman networkmanager
- }
+linux*:contains(QT_CONFIG, dbus) {
+ SUBDIRS += generic
+ SUBDIRS += connman networkmanager
}
#win32:SUBDIRS += nla
diff --git a/src/plugins/bearer/connman/main.cpp b/src/plugins/bearer/connman/main.cpp
index a04f2a760f..730e6857ed 100644
--- a/src/plugins/bearer/connman/main.cpp
+++ b/src/plugins/bearer/connman/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
index de3985efd3..254a5ddd87 100644
--- a/src/plugins/bearer/connman/qconnmanengine.cpp
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h
index 0175112c80..ce944e3352 100644
--- a/src/plugins/bearer/connman/qconnmanengine.h
+++ b/src/plugins/bearer/connman/qconnmanengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
index edb8665039..81024e0e8b 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
index 00a8bd8087..0298459798 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h
+++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp
index 0980f79b99..b6670c98d6 100644
--- a/src/plugins/bearer/connman/qofonoservice_linux.cpp
+++ b/src/plugins/bearer/connman/qofonoservice_linux.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/connman/qofonoservice_linux_p.h b/src/plugins/bearer/connman/qofonoservice_linux_p.h
index e3282f1241..a6a64b8657 100644
--- a/src/plugins/bearer/connman/qofonoservice_linux_p.h
+++ b/src/plugins/bearer/connman/qofonoservice_linux_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/corewlan/main.cpp b/src/plugins/bearer/corewlan/main.cpp
index 781ec141b4..7cc8e9db29 100644
--- a/src/plugins/bearer/corewlan/main.cpp
+++ b/src/plugins/bearer/corewlan/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h
index 858d83a2f0..570640bc8f 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.h
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index c81f56a92c..5552252692 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/generic/main.cpp b/src/plugins/bearer/generic/main.cpp
index 838a6057f0..84d49a2365 100644
--- a/src/plugins/bearer/generic/main.cpp
+++ b/src/plugins/bearer/generic/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp
index 7e97ffef5b..1413514794 100644
--- a/src/plugins/bearer/generic/qgenericengine.cpp
+++ b/src/plugins/bearer/generic/qgenericengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
index 23abb2dbca..33af624ce0 100644
--- a/src/plugins/bearer/generic/qgenericengine.h
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp
deleted file mode 100644
index 60e4640f22..0000000000
--- a/src/plugins/bearer/icd/dbusdispatcher.cpp
+++ /dev/null
@@ -1,634 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QDebug>
-#include <QtCore>
-#include <poll.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <glib.h>
-#include "dbusdispatcher.h"
-
-namespace Maemo {
-
-/*!
- \class Maemo::DBusDispatcher
-
- \brief DBusDispatcher is a class that can send DBUS method call
- messages and receive unicast signals from DBUS objects.
-*/
-
-class DBusDispatcherPrivate
-{
-public:
- DBusDispatcherPrivate(const QString& service,
- const QString& path,
- const QString& interface,
- const QString& signalPath)
- : service(service), path(path), interface(interface),
- signalPath(signalPath), connection(0)
- {
- memset(&signal_vtable, 0, sizeof(signal_vtable));
- }
-
- ~DBusDispatcherPrivate()
- {
- foreach(DBusPendingCall *call, pending_calls) {
- dbus_pending_call_cancel(call);
- dbus_pending_call_unref(call);
- }
- }
-
- QString service;
- QString path;
- QString interface;
- QString signalPath;
- struct DBusConnection *connection;
- QList<DBusPendingCall *> pending_calls;
- struct DBusObjectPathVTable signal_vtable;
-};
-
-static bool constantVariantList(const QVariantList& variantList) {
- // Special case, empty list == empty struct
- if (variantList.isEmpty()) {
- return false;
- } else {
- QVariant::Type type = variantList[0].type();
- // Iterate items in the list and check if they are same type
- foreach(QVariant variant, variantList) {
- if (variant.type() != type) {
- return false;
- }
- }
- }
- return true;
-}
-
-static QString variantToSignature(const QVariant& argument,
- bool constantList = true) {
- switch (argument.type()) {
- case QVariant::Bool:
- return "b";
- case QVariant::ByteArray:
- return "ay";
- case QVariant::Char:
- return "y";
- case QVariant::Int:
- return "i";
- case QVariant::UInt:
- return "u";
- case QVariant::StringList:
- return "as";
- case QVariant::String:
- return "s";
- case QVariant::LongLong:
- return "x";
- case QVariant::ULongLong:
- return "t";
- case QVariant::List:
- {
- QString signature;
- QVariantList variantList = argument.toList();
- if (!constantList) {
- signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING;
- foreach(QVariant listItem, variantList) {
- signature += variantToSignature(listItem);
- }
- signature += DBUS_STRUCT_END_CHAR_AS_STRING;
- } else {
- if (variantList.isEmpty())
- return "";
- signature = "a" + variantToSignature(variantList[0]);
- }
-
- return signature;
- }
- default:
- qDebug() << "Unsupported variant type: " << argument.type();
- break;
- }
-
- return "";
-}
-
-static bool appendVariantToDBusMessage(const QVariant& argument,
- DBusMessageIter *dbus_iter) {
- int idx = 0;
- DBusMessageIter array_iter;
- QStringList str_list;
- dbus_bool_t bool_data;
- dbus_int32_t int32_data;
- dbus_uint32_t uint32_data;
- dbus_int64_t int64_data;
- dbus_uint64_t uint64_data;
- char *str_data;
- char char_data;
-
- switch (argument.type()) {
-
- case QVariant::Bool:
- bool_data = argument.toBool();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN,
- &bool_data);
- break;
-
- case QVariant::ByteArray:
- str_data = argument.toByteArray().data();
- dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
- DBUS_TYPE_BYTE_AS_STRING, &array_iter);
- dbus_message_iter_append_fixed_array(&array_iter,
- DBUS_TYPE_BYTE,
- &str_data,
- argument.toByteArray().size());
- dbus_message_iter_close_container(dbus_iter, &array_iter);
- break;
-
- case QVariant::Char:
- char_data = argument.toChar().toAscii();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE,
- &char_data);
- break;
-
- case QVariant::Int:
- int32_data = argument.toInt();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32,
- &int32_data);
- break;
-
- case QVariant::String: {
- QByteArray data = argument.toString().toLatin1();
- str_data = data.data();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING,
- &str_data);
- break;
- }
-
- case QVariant::StringList:
- str_list = argument.toStringList();
- dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
- "s", &array_iter);
- for (idx = 0; idx < str_list.size(); idx++) {
- QByteArray data = str_list.at(idx).toLatin1();
- str_data = data.data();
- dbus_message_iter_append_basic(&array_iter,
- DBUS_TYPE_STRING,
- &str_data);
- }
- dbus_message_iter_close_container(dbus_iter, &array_iter);
- break;
-
- case QVariant::UInt:
- uint32_data = argument.toUInt();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32,
- &uint32_data);
- break;
-
- case QVariant::ULongLong:
- uint64_data = argument.toULongLong();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64,
- &uint64_data);
- break;
-
- case QVariant::LongLong:
- int64_data = argument.toLongLong();
- dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64,
- &int64_data);
- break;
-
- case QVariant::List:
- {
- QVariantList variantList = argument.toList();
- bool constantList = constantVariantList(variantList);
- DBusMessageIter array_iter;
-
- // List is mapped either as an DBUS array (all items same type)
- // DBUS struct (variable types) depending on constantList
- if (constantList) {
- // Resolve the signature for the first item
- QString signature = "";
- if (!variantList.isEmpty()) {
- signature = variantToSignature(
- variantList[0],
- constantVariantList(variantList[0].toList()));
- }
-
- // Mapped as DBUS array
- dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
- signature.toAscii(),
- &array_iter);
-
- foreach(QVariant listItem, variantList) {
- appendVariantToDBusMessage(listItem, &array_iter);
- }
-
- dbus_message_iter_close_container(dbus_iter, &array_iter);
- } else {
- // Mapped as DBUS struct
- dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT,
- NULL,
- &array_iter);
-
- foreach(QVariant listItem, variantList) {
- appendVariantToDBusMessage(listItem, &array_iter);
- }
-
- dbus_message_iter_close_container(dbus_iter, &array_iter);
- }
-
- break;
- }
- default:
- qDebug() << "Unsupported variant type: " << argument.type();
- break;
- }
-
- return true;
-}
-
-static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) {
- dbus_bool_t bool_data;
- dbus_int32_t int32_data;
- dbus_uint32_t uint32_data;
- dbus_int64_t int64_data;
- dbus_uint64_t uint64_data;
- char *str_data;
- char char_data;
- int argtype = dbus_message_iter_get_arg_type(iter);
-
- switch (argtype) {
-
- case DBUS_TYPE_BOOLEAN:
- {
- dbus_message_iter_get_basic(iter, &bool_data);
- QVariant variant((bool)bool_data);
- return variant;
- }
-
- case DBUS_TYPE_ARRAY:
- {
- // Handle all arrays here
- int elem_type = dbus_message_iter_get_element_type(iter);
- DBusMessageIter array_iter;
-
- dbus_message_iter_recurse(iter, &array_iter);
-
- if (elem_type == DBUS_TYPE_BYTE) {
- QByteArray byte_array;
- do {
- dbus_message_iter_get_basic(&array_iter, &char_data);
- byte_array.append(char_data);
- } while (dbus_message_iter_next(&array_iter));
- QVariant variant(byte_array);
- return variant;
- } else if (elem_type == DBUS_TYPE_STRING) {
- QStringList str_list;
- do {
- dbus_message_iter_get_basic(&array_iter, &str_data);
- str_list.append(str_data);
- } while (dbus_message_iter_next(&array_iter));
- QVariant variant(str_list);
- return variant;
- } else {
- QVariantList variantList;
- do {
- variantList << getVariantFromDBusMessage(&array_iter);
- } while (dbus_message_iter_next(&array_iter));
- QVariant variant(variantList);
- return variant;
- }
- break;
- }
-
- case DBUS_TYPE_BYTE:
- {
- dbus_message_iter_get_basic(iter, &char_data);
- QChar ch(char_data);
- QVariant variant(ch);
- return variant;
- }
-
- case DBUS_TYPE_INT32:
- {
- dbus_message_iter_get_basic(iter, &int32_data);
- QVariant variant((int)int32_data);
- return variant;
- }
-
- case DBUS_TYPE_UINT32:
- {
- dbus_message_iter_get_basic(iter, &uint32_data);
- QVariant variant((uint)uint32_data);
- return variant;
- }
-
- case DBUS_TYPE_STRING:
- {
- dbus_message_iter_get_basic(iter, &str_data);
- QString str(str_data);
- QVariant variant(str);
- return variant;
- }
-
- case DBUS_TYPE_INT64:
- {
- dbus_message_iter_get_basic(iter, &int64_data);
- QVariant variant((qlonglong)int64_data);
- return variant;
- }
-
- case DBUS_TYPE_UINT64:
- {
- dbus_message_iter_get_basic(iter, &uint64_data);
- QVariant variant((qulonglong)uint64_data);
- return variant;
- }
-
- case DBUS_TYPE_STRUCT:
- {
- // Handle all structs here
- DBusMessageIter struct_iter;
- dbus_message_iter_recurse(iter, &struct_iter);
-
- QVariantList variantList;
- do {
- variantList << getVariantFromDBusMessage(&struct_iter);
- } while (dbus_message_iter_next(&struct_iter));
- QVariant variant(variantList);
- return variant;
- }
-
- default:
- qDebug() << "Unsupported DBUS type: " << argtype;
- }
-
- return QVariant();
-}
-
-static DBusHandlerResult signalHandler (DBusConnection *connection,
- DBusMessage *message,
- void *object_ref) {
- (void)connection;
- QString interface;
- QString signal;
- DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref;
-
- if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) {
- interface = dbus_message_get_interface(message);
- signal = dbus_message_get_member(message);
-
- QList<QVariant> arglist;
- DBusMessageIter dbus_iter;
-
- if (dbus_message_iter_init(message, &dbus_iter)) {
- // Read return arguments
- while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
- arglist << getVariantFromDBusMessage(&dbus_iter);
- dbus_message_iter_next(&dbus_iter);
- }
- }
-
- dispatcher->emitSignalReceived(interface, signal, arglist);
- return DBUS_HANDLER_RESULT_HANDLED;
- }
- (void)message;
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-}
-
-DBusDispatcher::DBusDispatcher(const QString& service,
- const QString& path,
- const QString& interface,
- QObject *parent)
- : QObject(parent),
- d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) {
- setupDBus();
-}
-
-DBusDispatcher::DBusDispatcher(const QString& service,
- const QString& path,
- const QString& interface,
- const QString& signalPath,
- QObject *parent)
- : QObject(parent),
- d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) {
- setupDBus();
-}
-
-DBusDispatcher::~DBusDispatcher()
-{
- if (d_ptr->connection) {
- dbus_connection_close(d_ptr->connection);
- dbus_connection_unref(d_ptr->connection);
- }
- delete d_ptr;
-}
-
-void DBusDispatcher::setupDBus()
-{
- d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL);
-
- if (d_ptr->connection == NULL)
- qDebug() << "Unable to get DBUS connection!";
- else {
- d_ptr->signal_vtable.message_function = signalHandler;
-
- dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE);
- dbus_connection_setup_with_g_main(d_ptr->connection, g_main_context_get_thread_default());
- dbus_connection_register_object_path(d_ptr->connection,
- d_ptr->signalPath.toLatin1(),
- &d_ptr->signal_vtable,
- this);
- }
-}
-
-static DBusMessage *prepareDBusCall(const QString& service,
- const QString& path,
- const QString& interface,
- const QString& method,
- const QVariant& arg1 = QVariant(),
- const QVariant& arg2 = QVariant(),
- const QVariant& arg3 = QVariant(),
- const QVariant& arg4 = QVariant(),
- const QVariant& arg5 = QVariant(),
- const QVariant& arg6 = QVariant(),
- const QVariant& arg7 = QVariant(),
- const QVariant& arg8 = QVariant())
-{
- DBusMessage *message = dbus_message_new_method_call(service.toLatin1(),
- path.toLatin1(),
- interface.toLatin1(),
- method.toLatin1());
- DBusMessageIter dbus_iter;
-
- // Append variants to DBUS message
- QList<QVariant> arglist;
- if (arg1.isValid()) arglist << arg1;
- if (arg2.isValid()) arglist << arg2;
- if (arg3.isValid()) arglist << arg3;
- if (arg4.isValid()) arglist << arg4;
- if (arg5.isValid()) arglist << arg5;
- if (arg6.isValid()) arglist << arg6;
- if (arg7.isValid()) arglist << arg7;
- if (arg8.isValid()) arglist << arg8;
-
- dbus_message_iter_init_append (message, &dbus_iter);
-
- while (!arglist.isEmpty()) {
- QVariant argument = arglist.takeFirst();
- appendVariantToDBusMessage(argument, &dbus_iter);
- }
-
- return message;
-}
-
-QList<QVariant> DBusDispatcher::call(const QString& method,
- const QVariant& arg1,
- const QVariant& arg2,
- const QVariant& arg3,
- const QVariant& arg4,
- const QVariant& arg5,
- const QVariant& arg6,
- const QVariant& arg7,
- const QVariant& arg8) {
- DBusMessageIter dbus_iter;
- DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path,
- d_ptr->interface, method,
- arg1, arg2, arg3, arg4, arg5,
- arg6, arg7, arg8);
- DBusMessage *reply = dbus_connection_send_with_reply_and_block(
- d_ptr->connection,
- message, -1, NULL);
- dbus_message_unref(message);
-
- QList<QVariant> replylist;
- if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) {
- // Read return arguments
- while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
- replylist << getVariantFromDBusMessage(&dbus_iter);
- dbus_message_iter_next(&dbus_iter);
- }
- }
- if (reply != NULL) dbus_message_unref(reply);
- return replylist;
-}
-
-class PendingCallInfo {
-public:
- QString method;
- DBusDispatcher *dispatcher;
- DBusDispatcherPrivate *priv;
-};
-
-static void freePendingCallInfo(void *memory) {
- PendingCallInfo *info = (PendingCallInfo *)memory;
- delete info;
-}
-
-static void pendingCallFunction (DBusPendingCall *pending,
- void *memory) {
- PendingCallInfo *info = (PendingCallInfo *)memory;
- QString errorStr;
- QList<QVariant> replyList;
- DBusMessage *reply = dbus_pending_call_steal_reply (pending);
-
- Q_ASSERT(reply != NULL);
-
- if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
- errorStr = dbus_message_get_error_name (reply);
- } else {
- DBusMessageIter dbus_iter;
- dbus_message_iter_init(reply, &dbus_iter);
- // Read return arguments
- while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
- replyList << getVariantFromDBusMessage(&dbus_iter);
- dbus_message_iter_next(&dbus_iter);
- }
- }
-
- info->priv->pending_calls.removeOne(pending);
- info->dispatcher->emitCallReply(info->method, replyList, errorStr);
- dbus_message_unref(reply);
- dbus_pending_call_unref(pending);
-}
-
-bool DBusDispatcher::callAsynchronous(const QString& method,
- const QVariant& arg1,
- const QVariant& arg2,
- const QVariant& arg3,
- const QVariant& arg4,
- const QVariant& arg5,
- const QVariant& arg6,
- const QVariant& arg7,
- const QVariant& arg8) {
- DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path,
- d_ptr->interface, method,
- arg1, arg2, arg3, arg4, arg5,
- arg6, arg7, arg8);
- DBusPendingCall *call = NULL;
- dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection,
- message, &call, -1);
- PendingCallInfo *info = new PendingCallInfo;
- info->method = method;
- info->dispatcher = this;
- info->priv = d_ptr;
-
- dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo);
- d_ptr->pending_calls.append(call);
- return (bool)ret;
-}
-
-void DBusDispatcher::emitSignalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args) {
- emit signalReceived(interface, signal, args); }
-
-void DBusDispatcher::emitCallReply(const QString& method,
- const QList<QVariant>& args,
- const QString& error) {
- emit callReply(method, args, error); }
-
-void DBusDispatcher::synchronousDispatch(int timeout_ms)
-{
- dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms);
-}
-
-} // Maemo namespace
-
diff --git a/src/plugins/bearer/icd/dbusdispatcher.h b/src/plugins/bearer/icd/dbusdispatcher.h
deleted file mode 100644
index bba63662fe..0000000000
--- a/src/plugins/bearer/icd/dbusdispatcher.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef DBUSDISPATCHER_H
-#define DBUSDISPATCHER_H
-
-#include <QObject>
-#include <QVariant>
-
-namespace Maemo {
-
-class DBusDispatcherPrivate;
-class DBusDispatcher : public QObject
-{
- Q_OBJECT
-
-public:
- DBusDispatcher(const QString& service,
- const QString& path,
- const QString& interface,
- QObject *parent = 0);
- DBusDispatcher(const QString& service,
- const QString& path,
- const QString& interface,
- const QString& signalPath,
- QObject *parent = 0);
- ~DBusDispatcher();
-
- QList<QVariant> call(const QString& method,
- const QVariant& arg1 = QVariant(),
- const QVariant& arg2 = QVariant(),
- const QVariant& arg3 = QVariant(),
- const QVariant& arg4 = QVariant(),
- const QVariant& arg5 = QVariant(),
- const QVariant& arg6 = QVariant(),
- const QVariant& arg7 = QVariant(),
- const QVariant& arg8 = QVariant());
- bool callAsynchronous(const QString& method,
- const QVariant& arg1 = QVariant(),
- const QVariant& arg2 = QVariant(),
- const QVariant& arg3 = QVariant(),
- const QVariant& arg4 = QVariant(),
- const QVariant& arg5 = QVariant(),
- const QVariant& arg6 = QVariant(),
- const QVariant& arg7 = QVariant(),
- const QVariant& arg8 = QVariant());
- void emitSignalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args);
- void emitCallReply(const QString& method,
- const QList<QVariant>& args,
- const QString& error = "");
- void synchronousDispatch(int timeout_ms);
-
-Q_SIGNALS:
- void signalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args);
- void callReply(const QString& method,
- const QList<QVariant>& args,
- const QString& error);
-
-protected:
- void setupDBus();
-
-private:
- DBusDispatcherPrivate *d_ptr;
-};
-
-} // Maemo namespace
-
-#endif
diff --git a/src/plugins/bearer/icd/iapconf.cpp b/src/plugins/bearer/icd/iapconf.cpp
deleted file mode 100644
index a29e326a22..0000000000
--- a/src/plugins/bearer/icd/iapconf.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <stdlib.h>
-#include <string.h>
-#include <conn_settings.h>
-
-#include "iapconf.h"
-
-#define QSTRING_TO_CONST_CSTR(str) \
- str.toUtf8().constData()
-
-namespace Maemo {
-
-class IAPConfPrivate {
-public:
- ConnSettings *settings;
-
- ConnSettingsValue *variantToValue(const QVariant &variant);
- QVariant valueToVariant(ConnSettingsValue *value);
-};
-
-ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant)
-{
- // Convert variant to ConnSettingsValue
- ConnSettingsValue *value = conn_settings_value_new();
- if (value == 0) {
- qWarning("IAPConf: Unable to create new ConnSettingsValue");
- return 0;
- }
-
- switch(variant.type()) {
-
- case QVariant::Invalid:
- value->type = CONN_SETTINGS_VALUE_INVALID;
- break;
-
- case QVariant::String: {
- char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString()));
- value->type = CONN_SETTINGS_VALUE_STRING;
- value->value.string_val = valueStr;
- break;
- }
-
- case QVariant::Int:
- value->type = CONN_SETTINGS_VALUE_INT;
- value->value.int_val = variant.toInt();
- break;
-
- case QMetaType::Float:
- case QVariant::Double:
- value->type = CONN_SETTINGS_VALUE_DOUBLE;
- value->value.double_val = variant.toDouble();
- break;
-
- case QVariant::Bool:
- value->type = CONN_SETTINGS_VALUE_BOOL;
- value->value.bool_val = variant.toBool() ? 1 : 0;
- break;
-
- case QVariant::ByteArray: {
- QByteArray array = variant.toByteArray();
- value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY;
- value->value.byte_array.len = array.size();
- value->value.byte_array.val = (unsigned char *)malloc(array.size());
- memcpy(value->value.byte_array.val, array.constData(), array.size());
- break;
- }
-
- case QVariant::List: {
- QVariantList list = variant.toList();
- ConnSettingsValue **list_val = (ConnSettingsValue **)malloc(
- (list.size() + 1) * sizeof(ConnSettingsValue *));
-
- for (int idx = 0; idx < list.size(); idx++) {
- list_val[idx] = variantToValue(list.at(idx));
- }
- list_val[list.size()] = 0;
-
- value->type = CONN_SETTINGS_VALUE_LIST;
- value->value.list_val = list_val;
- break;
- }
-
- default:
- qWarning("IAPConf: Can not handle QVariant of type %d",
- variant.type());
- conn_settings_value_destroy(value);
- return 0;
- }
-
- return value;
-}
-
-QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value)
-{
- if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) {
- return QVariant();
- }
-
- switch(value->type) {
-
- case CONN_SETTINGS_VALUE_BOOL:
- return QVariant(value->value.bool_val ? true : false);
-
- case CONN_SETTINGS_VALUE_STRING:
- return QVariant(QString(value->value.string_val));
-
- case CONN_SETTINGS_VALUE_DOUBLE:
- return QVariant(value->value.double_val);
-
- case CONN_SETTINGS_VALUE_INT:
- return QVariant(value->value.int_val);
-
- case CONN_SETTINGS_VALUE_LIST: {
- // At least with GConf backend connsettings returns byte array as list
- // of ints, first check for that case
- if (value->value.list_val && value->value.list_val[0]) {
- bool canBeConvertedToByteArray = true;
- for (int idx = 0; value->value.list_val[idx]; idx++) {
- ConnSettingsValue *val = value->value.list_val[idx];
- if (val->type != CONN_SETTINGS_VALUE_INT
- || val->value.int_val > 255
- || val->value.int_val < 0) {
- canBeConvertedToByteArray = false;
- break;
- }
- }
-
- if (canBeConvertedToByteArray) {
- QByteArray array;
- for (int idx = 0; value->value.list_val[idx]; idx++) {
- array.append(value->value.list_val[idx]->value.int_val);
- }
- return array;
- }
-
- // Create normal list
- QVariantList list;
- for (int idx = 0; value->value.list_val[idx]; idx++) {
- list.append(valueToVariant(value->value.list_val[idx]));
- }
- return list;
- }
- }
-
- case CONN_SETTINGS_VALUE_BYTE_ARRAY:
- return QByteArray::fromRawData((char *)value->value.byte_array.val,
- value->value.byte_array.len);
-
- default:
- return QVariant();
- }
-}
-
-// Public class implementation
-
-IAPConf::IAPConf(const QString &iap_id)
- : d_ptr(new IAPConfPrivate)
-{
- d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION,
- QSTRING_TO_CONST_CSTR(iap_id));
- if (d_ptr->settings == 0) {
- qWarning("IAPConf: Unable to open ConnSettings for %s",
- QSTRING_TO_CONST_CSTR(iap_id));
- }
-}
-
-IAPConf::~IAPConf()
-{
- conn_settings_close(d_ptr->settings);
- delete d_ptr;
-}
-
-
-QVariant IAPConf::value(const QString& key) const
-{
- ConnSettingsValue *val = conn_settings_get(d_ptr->settings,
- QSTRING_TO_CONST_CSTR(key));
-
- QVariant variant = d_ptr->valueToVariant(val);
- conn_settings_value_destroy(val);
- return variant;
-}
-
-
-void IAPConf::getAll(QList<QString> &all_iaps, bool return_path)
-{
- Q_UNUSED(return_path); // We don't use return path currently
-
- // Go through all available connections and add them to the list
- char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION);
- if (ids == 0) {
- // No ids found - nothing to do
- return;
- }
-
- for (int idx = 0; ids[idx]; idx++) {
- all_iaps.append(QString(ids[idx]));
- free(ids[idx]);
- }
- free(ids);
-}
-
-
-} // namespace Maemo
diff --git a/src/plugins/bearer/icd/iapconf.h b/src/plugins/bearer/icd/iapconf.h
deleted file mode 100644
index f7b0ca316c..0000000000
--- a/src/plugins/bearer/icd/iapconf.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef IAPCONF_H
-#define IAPCONF_H
-
-#include <QString>
-#include <QVariant>
-
-namespace Maemo {
-
-class IAPConfPrivate;
-class IAPConf {
-public:
- IAPConf(const QString &iap_id);
- virtual ~IAPConf();
-
- /**
- Get one IAP value.
- */
- QVariant value(const QString& key) const;
-
- /**
- Return all the IAPs found in the system. If return_path is true,
- then do not strip the IAP path away.
- */
- static void getAll(QList<QString> &all_iaps, bool return_path=false);
-
-private:
- IAPConfPrivate *d_ptr;
-};
-
-} // namespace Maemo
-
-#endif
diff --git a/src/plugins/bearer/icd/iapmonitor.cpp b/src/plugins/bearer/icd/iapmonitor.cpp
deleted file mode 100644
index ba20778861..0000000000
--- a/src/plugins/bearer/icd/iapmonitor.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QStringList>
-
-#include <conn_settings.h>
-#include "iapmonitor.h"
-
-namespace Maemo {
-
-
-void conn_settings_notify_func (ConnSettingsType type,
- const char *id,
- const char *key,
- ConnSettingsValue *value,
- void *user_data);
-
-class IAPMonitorPrivate {
-private:
- IAPMonitor *monitor;
- ConnSettings *settings;
-
-public:
-
- IAPMonitorPrivate(IAPMonitor *monitor)
- : monitor(monitor)
- {
- settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL);
- conn_settings_add_notify(
- settings,
- (ConnSettingsNotifyFunc *)conn_settings_notify_func,
- this);
- }
-
- ~IAPMonitorPrivate()
- {
- conn_settings_del_notify(settings);
- conn_settings_close(settings);
- }
-
- void iapAdded(const QString &iap)
- {
- monitor->iapAdded(iap);
- }
-
- void iapRemoved(const QString &iap)
- {
- monitor->iapRemoved(iap);
- }
-};
-
-void conn_settings_notify_func (ConnSettingsType type,
- const char *id,
- const char *key,
- ConnSettingsValue *value,
- void *user_data)
-{
- Q_UNUSED(id);
-
- if (type != CONN_SETTINGS_CONNECTION) return;
- IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data;
-
- QString iapId(key);
- iapId = iapId.split("/")[0];
- if (value != 0) {
- priv->iapAdded(iapId);
- } else if (iapId == QString(key)) {
- // IAP is removed only when the directory gets removed
- priv->iapRemoved(iapId);
- }
-}
-
-IAPMonitor::IAPMonitor()
- : d_ptr(new IAPMonitorPrivate(this))
-{
-}
-
-IAPMonitor::~IAPMonitor()
-{
- delete d_ptr;
-}
-
-void IAPMonitor::iapAdded(const QString &id)
-{
- Q_UNUSED(id);
- // By default do nothing
-}
-
-void IAPMonitor::iapRemoved(const QString &id)
-{
- Q_UNUSED(id);
- // By default do nothing
-}
-
-} // namespace Maemo
diff --git a/src/plugins/bearer/icd/icd.pro b/src/plugins/bearer/icd/icd.pro
deleted file mode 100644
index 8cbf86d548..0000000000
--- a/src/plugins/bearer/icd/icd.pro
+++ /dev/null
@@ -1,33 +0,0 @@
-TARGET = qicdbearer
-load(qt_plugin)
-
-QT = core network network-private dbus
-
-QMAKE_CXXFLAGS *= $$QT_CFLAGS_DBUS $$QT_CFLAGS_CONNSETTINGS
-LIBS += $$QT_LIBS_CONNSETTINGS
-
-HEADERS += qicdengine.h \
- qnetworksession_impl.h \
- dbusdispatcher.h \
- iapconf.h \
- iapmonitor.h \
- maemo_icd.h \
- proxyconf.h \
- wlan-utils.h
-
-SOURCES += main.cpp \
- qicdengine.cpp \
- qnetworksession_impl.cpp \
- dbusdispatcher.cpp \
- iapmonitor.cpp \
- iapconf.cpp \
- maemo_icd.cpp \
- proxyconf.cpp
-
-#DEFINES += BEARER_MANAGEMENT_DEBUG
-
-include(../../../3rdparty/libgq.pri)
-
-DESTDIR = $$QT.network.plugins/bearer
-target.path += $$[QT_INSTALL_PLUGINS]/bearer
-INSTALLS += target
diff --git a/src/plugins/bearer/icd/maemo_icd.cpp b/src/plugins/bearer/icd/maemo_icd.cpp
deleted file mode 100644
index 2ab416ac5a..0000000000
--- a/src/plugins/bearer/icd/maemo_icd.cpp
+++ /dev/null
@@ -1,855 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include "maemo_icd.h"
-#include "dbusdispatcher.h"
-
-#include <QObject>
-#include <QTimer>
-#include <QCoreApplication>
-#include <QEventLoop>
-#include <QDebug>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-namespace Maemo {
-
-#undef PRINT_DEBUGINFO
-#ifdef PRINT_DEBUGINFO
- static FILE *fdebug = NULL;
-#define PDEBUG(fmt, args...) \
- do { \
- struct timeval tv; \
- gettimeofday(&tv, 0); \
- fprintf(fdebug, "DEBUG[%d]:%ld.%ld:%s:%s():%d: " fmt, \
- getpid(), \
- tv.tv_sec, tv.tv_usec, \
- __FILE__, __FUNCTION__, __LINE__, args); \
- fflush(fdebug); \
- } while(0)
-#else
-#define PDEBUG(fmt...)
-#endif
-
-
-class IcdPrivate
-{
-public:
- IcdPrivate(Icd *myfriend)
- {
- init(10000, IcdNewDbusInterface, myfriend);
- }
-
- IcdPrivate(unsigned int timeout, Icd *myfriend)
- {
- init(timeout, IcdNewDbusInterface, myfriend);
- }
-
- IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend)
- {
- Q_UNUSED(ver);
-
- /* Note that the old Icd interface is currently disabled and
- * the new one is always used.
- */
- init(timeout, IcdNewDbusInterface, myfriend);
- }
-
- ~IcdPrivate()
- {
- QObject::disconnect(mDBus,
- SIGNAL(signalReceived(const QString&,
- const QString&,
- const QList<QVariant>&)),
- icd,
- SLOT(icdSignalReceived(const QString&,
- const QString&,
- const QList<QVariant>&)));
-
- QObject::disconnect(mDBus,
- SIGNAL(callReply(const QString&,
- const QList<QVariant>&,
- const QString&)),
- icd,
- SLOT(icdCallReply(const QString&,
- const QList<QVariant>&,
- const QString&)));
-
- delete mDBus;
- mDBus = 0;
- }
-
- /* Icd2 dbus API functions */
- QStringList scan(icd_scan_request_flags flags,
- QStringList &network_types,
- QList<IcdScanResult>& scan_results,
- QString& error);
-
- uint state(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdStateResult &state_result);
-
- uint addrinfo(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdAddressInfoResult& addr_result);
-
- uint state(QList<IcdStateResult>& state_results);
- uint statistics(QList<IcdStatisticsResult>& stats_results);
- uint addrinfo(QList<IcdAddressInfoResult>& addr_results);
-
- void signalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args);
- void callReply(const QString& method,
- const QList<QVariant>& args,
- const QString& error);
-
-public:
- DBusDispatcher *mDBus;
- QString mMethod;
- QString mInterface;
- QString mSignal;
- QString mError;
- QList<QVariant> mArgs;
- QList<QVariant> receivedSignals;
- unsigned int timeout;
- IcdDbusInterfaceVer icd_dbus_version;
- Icd *icd;
-
- void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver,
- Icd *myfriend)
- {
- if (ver == IcdNewDbusInterface) {
- mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE);
- } else {
- mDBus = new DBusDispatcher(ICD_DBUS_SERVICE,
- ICD_DBUS_PATH,
- ICD_DBUS_INTERFACE);
- }
- icd_dbus_version = ver;
-
- /* This connect has a side effect as it means that only one
- * Icd object can exists in one time. This should be fixed!
- */
- QObject::connect(mDBus,
- SIGNAL(signalReceived(const QString&,
- const QString&,
- const QList<QVariant>&)),
- myfriend,
- SLOT(icdSignalReceived(const QString&,
- const QString&,
- const QList<QVariant>&)));
-
- QObject::connect(mDBus,
- SIGNAL(callReply(const QString&,
- const QList<QVariant>&,
- const QString&)),
- myfriend,
- SLOT(icdCallReply(const QString&,
- const QList<QVariant>&,
- const QString&)));
-
- icd = myfriend;
- timeout = dbus_timeout;
-
-#ifdef PRINT_DEBUGINFO
- if (!fdebug) {
- fdebug = fopen("/tmp/maemoicd.log", "a+");
- }
- PDEBUG("created %s\n", "IcdPrivate");
-#endif
- }
-
- void clearState()
- {
- mMethod.clear();
- mInterface.clear();
- mSignal.clear();
- mError.clear();
- mArgs.clear();
- receivedSignals.clear();
- }
-
- bool doState();
-};
-
-
-void IcdPrivate::signalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args)
-{
- // Signal handler, which simply records what has been signalled
- mInterface = interface;
- mSignal = signal;
- mArgs = args;
-
- //qDebug() << "signal" << signal << "received:" << args;
- receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args);
-}
-
-
-void IcdPrivate::callReply(const QString& method,
- const QList<QVariant>& /*args*/,
- const QString& error)
-{
- mMethod = method;
- mError = error;
-}
-
-
-static void get_scan_result(QList<QVariant>& args,
- IcdScanResult& ret)
-{
- int i=0;
-
- if (args.isEmpty())
- return;
-
- ret.status = args[i++].toUInt();
- ret.timestamp = args[i++].toUInt();
- ret.scan.service_type = args[i++].toString();
- ret.service_name = args[i++].toString();
- ret.scan.service_attrs = args[i++].toUInt();
- ret.scan.service_id = args[i++].toString();
- ret.service_priority = args[i++].toInt();
- ret.scan.network_type = args[i++].toString();
- ret.network_name = args[i++].toString();
- ret.scan.network_attrs = args[i++].toUInt();
- ret.scan.network_id = args[i++].toByteArray();
- ret.network_priority = args[i++].toInt();
- ret.signal_strength = args[i++].toInt();
- ret.station_id = args[i++].toString();
- ret.signal_dB = args[i++].toInt();
-}
-
-
-QStringList IcdPrivate::scan(icd_scan_request_flags flags,
- QStringList &network_types,
- QList<IcdScanResult>& scan_results,
- QString& error)
-{
- Q_UNUSED(network_types);
-
- QStringList scanned_types;
- QTimer timer;
- QVariant reply;
- QVariantList vl;
- bool last_result = false;
- IcdScanResult result;
- int all_waited;
-
- clearState();
- reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags);
- if (reply.type() != QVariant::List)
- return scanned_types;
- vl = reply.toList();
- if (vl.isEmpty()) {
- error = "Scan did not return anything.";
- return scanned_types;
- }
- reply = vl.first();
- scanned_types = reply.toStringList();
- //qDebug() << "Scanning:" << scanned_types;
- all_waited = scanned_types.size();
-
- timer.setSingleShot(true);
- timer.start(timeout);
-
- scan_results.clear();
- while (!last_result) {
- while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) {
- QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
- }
-
- if (!timer.isActive()) {
- //qDebug() << "Timeout happened";
- break;
- }
-
- if (mSignal != ICD_DBUS_API_SCAN_SIG) {
- //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring";
- mInterface.clear();
- continue;
- }
-
- if (mError.isEmpty()) {
- QString msgInterface = receivedSignals.takeFirst().toString();
- QString msgSignal = receivedSignals.takeFirst().toString();
- QList<QVariant> msgArgs = receivedSignals.takeFirst().toList();
- //qDebug() << "Signal" << msgSignal << "received.";
- //qDebug() << "Params:" << msgArgs;
-
- while (!msgSignal.isEmpty()) {
- get_scan_result(msgArgs, result);
-
-#if 0
- qDebug() << "Received: " <<
- "status =" << result.status <<
- ", timestamp =" << result.timestamp <<
- ", service_type =" << result.scan.service_type <<
- ", service_name =" << result.service_name <<
- ", service_attrs =" << result.scan.service_attrs <<
- ", service_id =" << result.scan.service_id <<
- ", service_priority =" << result.service_priority <<
- ", network_type =" << result.scan.network_type <<
- ", network_name =" << result.network_name <<
- ", network_attrs =" << result.scan.network_attrs <<
- ", network_id =" << "-" <<
- ", network_priority =" << result.network_priority <<
- ", signal_strength =" << result.signal_strength <<
- ", station_id =" << result.station_id <<
- ", signal_dB =" << result.signal_dB;
-#endif
-
- if (result.status == ICD_SCAN_COMPLETE) {
- //qDebug() << "waited =" << all_waited;
- if (--all_waited == 0) {
- last_result = true;
- break;
- }
- } else
- scan_results << result;
-
- if (receivedSignals.isEmpty())
- break;
-
- msgInterface = receivedSignals.takeFirst().toString();
- msgSignal = receivedSignals.takeFirst().toString();
- msgArgs = receivedSignals.takeFirst().toList();
- }
- mInterface.clear();
-
- } else {
- qWarning() << "Error while scanning:" << mError;
- break;
- }
- }
- timer.stop();
-
- error = mError;
- return scanned_types;
-}
-
-
-static void get_state_all_result(QList<QVariant>& args,
- IcdStateResult& ret)
-{
- int i=0;
-
- ret.params.service_type = args[i++].toString();
- ret.params.service_attrs = args[i++].toUInt();
- ret.params.service_id = args[i++].toString();
- ret.params.network_type = args[i++].toString();
- ret.params.network_attrs = args[i++].toUInt();
- ret.params.network_id = args[i++].toByteArray();
- ret.error = args[i++].toString();
- ret.state = args[i++].toInt();
-}
-
-
-static void get_state_all_result2(QList<QVariant>& args,
- IcdStateResult& ret)
-{
- int i=0;
-
- ret.params.network_type = args[i++].toString();
- ret.state = args[i++].toInt();
-
- // Initialize the other values so that the caller can
- // notice we only returned partial status
- ret.params.service_type = QString();
- ret.params.service_attrs = 0;
- ret.params.service_id = QString();
- ret.params.network_attrs = 0;
- ret.params.network_id = QByteArray();
- ret.error = QString();
-}
-
-
-uint IcdPrivate::state(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdStateResult& state_result)
-{
- QTimer timer;
- QVariant reply;
- uint total_signals;
- QVariantList vl;
-
- clearState();
-
- reply = mDBus->call(ICD_DBUS_API_STATE_REQ,
- service_type, service_attrs, service_id,
- network_type, network_attrs, network_id);
- if (reply.type() != QVariant::List)
- return 0;
- vl = reply.toList();
- if (vl.isEmpty())
- return 0;
- reply = vl.first();
- total_signals = reply.toUInt();
- if (!total_signals)
- return 0;
-
- timer.setSingleShot(true);
- timer.start(timeout);
-
- mInterface.clear();
- while (timer.isActive() && mInterface.isEmpty()) {
- QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
-
- if (mSignal != ICD_DBUS_API_STATE_SIG) {
- mInterface.clear();
- continue;
- }
- }
-
- timer.stop();
-
- if (mError.isEmpty()) {
- if (!mArgs.isEmpty()) {
- if (mArgs.size()>2)
- get_state_all_result(mArgs, state_result);
- else {
- // We are not connected as we did not get the status we asked
- return 0;
- }
- }
- } else {
- qWarning() << "Error:" << mError;
- }
-
- // The returned value should be one because we asked for one state
- return total_signals;
-}
-
-
-/* Special version of the state() call which does not call event loop.
- * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event
- * loop is run when webkit does not expect it. This function is called from
- * bearer management API syncStateWithInterface() in QNetworkSession
- * constructor.
- */
-uint IcdPrivate::state(QList<IcdStateResult>& state_results)
-{
- QVariant reply;
- QVariantList vl;
- uint signals_left, total_signals;
- IcdStateResult result;
- time_t started;
- int timeout_secs = timeout / 1000;
-
- PDEBUG("%s\n", "state_results");
-
- clearState();
- reply = mDBus->call(ICD_DBUS_API_STATE_REQ);
- if (reply.type() != QVariant::List)
- return 0;
- vl = reply.toList();
- if (vl.isEmpty())
- return 0;
- reply = vl.first();
- signals_left = total_signals = reply.toUInt();
- if (!signals_left)
- return 0;
-
- started = time(0);
- state_results.clear();
- mError.clear();
- while (signals_left) {
- mInterface.clear();
- while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) {
- mDBus->synchronousDispatch(1000);
- QCoreApplication::sendPostedEvents(icd, QEvent::MetaCall);
- }
-
- if (time(0)>(started+timeout_secs)) {
- total_signals = 0;
- break;
- }
-
- if (mSignal != ICD_DBUS_API_STATE_SIG) {
- continue;
- }
-
- if (mError.isEmpty()) {
- if (!mArgs.isEmpty()) {
- if (mArgs.size()==2)
- get_state_all_result2(mArgs, result);
- else
- get_state_all_result(mArgs, result);
- state_results << result;
- }
- signals_left--;
- } else {
- qWarning() << "Error:" << mError;
- break;
- }
- }
-
- PDEBUG("total_signals=%d\n", total_signals);
- return total_signals;
-}
-
-
-static void get_statistics_all_result(QList<QVariant>& args,
- IcdStatisticsResult& ret)
-{
- int i=0;
-
- if (args.isEmpty())
- return;
-
- ret.params.service_type = args[i++].toString();
- ret.params.service_attrs = args[i++].toUInt();
- ret.params.service_id = args[i++].toString();
- ret.params.network_type = args[i++].toString();
- ret.params.network_attrs = args[i++].toUInt();
- ret.params.network_id = args[i++].toByteArray();
- ret.time_active = args[i++].toUInt();
- ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt();
- ret.bytes_sent = args[i++].toUInt();
- ret.bytes_received = args[i++].toUInt();
-}
-
-
-uint IcdPrivate::statistics(QList<IcdStatisticsResult>& stats_results)
-{
- QTimer timer;
- QVariant reply;
- QVariantList vl;
- uint signals_left, total_signals;
- IcdStatisticsResult result;
-
- clearState();
- reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ);
- if (reply.type() != QVariant::List)
- return 0;
- vl = reply.toList();
- if (vl.isEmpty())
- return 0;
- reply = vl.first();
- if (reply.type() != QVariant::UInt)
- return 0;
- signals_left = total_signals = reply.toUInt();
-
- if (!signals_left)
- return 0;
-
- timer.setSingleShot(true);
- timer.start(timeout);
- stats_results.clear();
- while (signals_left) {
- mInterface.clear();
- while (timer.isActive() && mInterface.isEmpty()) {
- QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
- }
-
- if (!timer.isActive()) {
- total_signals = 0;
- break;
- }
-
- if (mSignal != ICD_DBUS_API_STATISTICS_SIG) {
- continue;
- }
-
- if (mError.isEmpty()) {
- get_statistics_all_result(mArgs, result);
- stats_results << result;
- signals_left--;
- } else {
- qWarning() << "Error:" << mError;
- break;
- }
- }
- timer.stop();
-
- return total_signals;
-}
-
-
-static void get_addrinfo_all_result(QList<QVariant>& args,
- IcdAddressInfoResult& ret)
-{
- int i=0;
-
- if (args.isEmpty())
- return;
-
- ret.params.service_type = args[i++].toString();
- ret.params.service_attrs = args[i++].toUInt();
- ret.params.service_id = args[i++].toString();
- ret.params.network_type = args[i++].toString();
- ret.params.network_attrs = args[i++].toUInt();
- ret.params.network_id = args[i++].toByteArray();
-
- QVariantList vl = args[i].toList();
- QVariant reply = vl.first();
- QList<QVariant> lst = reply.toList();
- for (int k=0; k<lst.size()/6; k=k+6) {
- IcdIPInformation ip_info;
- ip_info.address = lst[k].toString();
- ip_info.netmask = lst[k++].toString();
- ip_info.default_gateway = lst[k++].toString();
- ip_info.dns1 = lst[k++].toString();
- ip_info.dns2 = lst[k++].toString();
- ip_info.dns3 = lst[k++].toString();
-
- ret.ip_info << ip_info;
- }
-}
-
-
-/* Special version of the addrinfo() call which does not call event loop.
- * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event
- * loop is run when webkit does not expect it. This function is called from
- * bearer management API syncStateWithInterface() in QNetworkSession
- * constructor.
- */
-uint IcdPrivate::addrinfo(QList<IcdAddressInfoResult>& addr_results)
-{
- QVariant reply;
- QVariantList vl;
- uint signals_left, total_signals;
- IcdAddressInfoResult result;
- time_t started;
- int timeout_secs = timeout / 1000;
-
- PDEBUG("%s\n", "addr_results");
-
- clearState();
- reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ);
- if (reply.type() != QVariant::List)
- return 0;
- vl = reply.toList();
- if (vl.isEmpty())
- return 0;
- reply = vl.first();
- if (reply.type() != QVariant::UInt)
- return 0;
- signals_left = total_signals = reply.toUInt();
- if (!signals_left)
- return 0;
-
- started = time(0);
- addr_results.clear();
- while (signals_left) {
- mInterface.clear();
- while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) {
- mDBus->synchronousDispatch(1000);
- QCoreApplication::sendPostedEvents(icd, QEvent::MetaCall);
- }
-
- if (time(0)>(started+timeout_secs)) {
- total_signals = 0;
- break;
- }
-
- if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
- continue;
- }
-
- if (mError.isEmpty()) {
- get_addrinfo_all_result(mArgs, result);
- addr_results << result;
- signals_left--;
- } else {
- qWarning() << "Error:" << mError;
- break;
- }
- }
-
- PDEBUG("total_signals=%d\n", total_signals);
- return total_signals;
-}
-
-
-uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdAddressInfoResult& addr_result)
-{
- QTimer timer;
- QVariant reply;
- uint total_signals;
- QVariantList vl;
-
- clearState();
-
- reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ,
- service_type, service_attrs, service_id,
- network_type, network_attrs, network_id);
- if (reply.type() != QVariant::List)
- return 0;
- vl = reply.toList();
- if (vl.isEmpty())
- return 0;
- reply = vl.first();
- total_signals = reply.toUInt();
-
- if (!total_signals)
- return 0;
-
- timer.setSingleShot(true);
- timer.start(timeout);
-
- mInterface.clear();
- while (timer.isActive() && mInterface.isEmpty()) {
- QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
-
- if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
- mInterface.clear();
- continue;
- }
- }
-
- timer.stop();
-
- if (mError.isEmpty()) {
- get_addrinfo_all_result(mArgs, addr_result);
- } else {
- qWarning() << "Error:" << mError;
- }
-
- // The returned value should be one because we asked for one addrinfo
- return total_signals;
-}
-
-
-Icd::Icd(QObject *parent)
- : QObject(parent), d(new IcdPrivate(this))
-{
-}
-
-Icd::Icd(unsigned int timeout, QObject *parent)
- : QObject(parent), d(new IcdPrivate(timeout, this))
-{
-}
-
-Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent)
- : QObject(parent), d(new IcdPrivate(timeout, ver, this))
-{
-}
-
-Icd::~Icd()
-{
- delete d;
-}
-
-
-QStringList Icd::scan(icd_scan_request_flags flags,
- QStringList &network_types,
- QList<IcdScanResult>& scan_results,
- QString& error)
-{
- return d->scan(flags, network_types, scan_results, error);
-}
-
-
-uint Icd::state(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdStateResult &state_result)
-{
- return d->state(service_type, service_attrs, service_id,
- network_type, network_attrs, network_id,
- state_result);
-}
-
-
-uint Icd::addrinfo(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdAddressInfoResult& addr_result)
-{
- return d->addrinfo(service_type, service_attrs, service_id,
- network_type, network_attrs, network_id,
- addr_result);
-}
-
-
-uint Icd::state(QList<IcdStateResult>& state_results)
-{
- return d->state(state_results);
-}
-
-
-uint Icd::statistics(QList<IcdStatisticsResult>& stats_results)
-{
- return d->statistics(stats_results);
-}
-
-
-uint Icd::addrinfo(QList<IcdAddressInfoResult>& addr_results)
-{
- return d->addrinfo(addr_results);
-}
-
-
-void Icd::icdSignalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args)
-{
- d->signalReceived(interface, signal, args);
-}
-
-
-void Icd::icdCallReply(const QString& method,
- const QList<QVariant>& args,
- const QString& error)
-{
- d->callReply(method, args, error);
-}
-
-} // Maemo namespace
-
-
diff --git a/src/plugins/bearer/icd/maemo_icd.h b/src/plugins/bearer/icd/maemo_icd.h
deleted file mode 100644
index 367a171189..0000000000
--- a/src/plugins/bearer/icd/maemo_icd.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef MAEMO_ICD_H
-#define MAEMO_ICD_H
-
-#include <QObject>
-#include <QStringList>
-#include <QByteArray>
-#include <QMetaType>
-#include <QtDBus>
-#include <QDBusArgument>
-
-#include <glib.h>
-#include <icd/dbus_api.h>
-#include <icd/osso-ic.h>
-#include <icd/osso-ic-dbus.h>
-#include <icd/network_api_defines.h>
-
-#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */
-#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */
-#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */
-#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */
-
-namespace Maemo {
-
-struct CommonParams {
- QString service_type;
- uint service_attrs;
- QString service_id;
- QString network_type;
- uint network_attrs;
- QByteArray network_id;
-};
-
-struct IcdScanResult {
- uint status; // see #icd_scan_status
- uint timestamp; // when last seen
- QString service_name;
- uint service_priority; // within a service type
- QString network_name;
- uint network_priority;
- struct CommonParams scan;
- uint signal_strength; // quality, 0 (none) - 10 (good)
- QString station_id; // e.g. MAC address or similar id
- uint signal_dB; // use signal strength above unless you know what you are doing
-
- IcdScanResult() {
- status = timestamp = scan.service_attrs = service_priority =
- scan.network_attrs = network_priority = signal_strength =
- signal_dB = 0;
- }
-};
-
-struct IcdStateResult {
- struct CommonParams params;
- QString error;
- uint state;
-};
-
-struct IcdStatisticsResult {
- struct CommonParams params;
- uint time_active; // in seconds
- enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package
- uint bytes_sent;
- uint bytes_received;
-};
-
-struct IcdIPInformation {
- QString address;
- QString netmask;
- QString default_gateway;
- QString dns1;
- QString dns2;
- QString dns3;
-};
-
-struct IcdAddressInfoResult {
- struct CommonParams params;
- QList<IcdIPInformation> ip_info;
-};
-
-enum IcdDbusInterfaceVer {
- IcdOldDbusInterface = 0, // use the old OSSO-IC interface
- IcdNewDbusInterface // use the new Icd2 interface (default)
-};
-
-
-class IcdPrivate;
-class Icd : public QObject
-{
- Q_OBJECT
-
-public:
- Icd(QObject *parent = 0);
- Icd(unsigned int timeout, QObject *parent = 0);
- Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0);
- ~Icd();
-
- /* Icd2 dbus API functions */
- QStringList scan(icd_scan_request_flags flags,
- QStringList &network_types,
- QList<IcdScanResult>& scan_results,
- QString& error);
-
- uint state(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdStateResult &state_result);
-
- uint addrinfo(QString& service_type, uint service_attrs,
- QString& service_id, QString& network_type,
- uint network_attrs, QByteArray& network_id,
- IcdAddressInfoResult& addr_result);
-
- uint state(QList<IcdStateResult>& state_results);
- uint statistics(QList<IcdStatisticsResult>& stats_results);
- uint addrinfo(QList<IcdAddressInfoResult>& addr_results);
-
-private Q_SLOTS:
- void icdSignalReceived(const QString& interface,
- const QString& signal,
- const QList<QVariant>& args);
- void icdCallReply(const QString& method,
- const QList<QVariant>& args,
- const QString& error);
-
-private:
- IcdPrivate *d;
- friend class IcdPrivate;
-};
-
-} // Maemo namespace
-
-#endif
diff --git a/src/plugins/bearer/icd/proxyconf.cpp b/src/plugins/bearer/icd/proxyconf.cpp
deleted file mode 100644
index 904fabca94..0000000000
--- a/src/plugins/bearer/icd/proxyconf.cpp
+++ /dev/null
@@ -1,422 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QVariant>
-#include <QStringList>
-#include <QDebug>
-#include <QWriteLocker>
-#include <QNetworkProxyFactory>
-#include <QNetworkProxy>
-#include <gconf/gconf-value.h>
-#include <gconf/gconf-client.h>
-#include "proxyconf.h"
-
-#define CONF_PROXY "/system/proxy"
-#define HTTP_PROXY "/system/http_proxy"
-
-
-namespace Maemo {
-
-static QString convertKey(const char *key)
-{
- return QString::fromUtf8(key);
-}
-
-static QVariant convertValue(GConfValue *src)
-{
- if (!src) {
- return QVariant();
- } else {
- switch (src->type) {
- case GCONF_VALUE_INVALID:
- return QVariant(QVariant::Invalid);
- case GCONF_VALUE_BOOL:
- return QVariant((bool)gconf_value_get_bool(src));
- case GCONF_VALUE_INT:
- return QVariant(gconf_value_get_int(src));
- case GCONF_VALUE_FLOAT:
- return QVariant(gconf_value_get_float(src));
- case GCONF_VALUE_STRING:
- return QVariant(QString::fromUtf8(gconf_value_get_string(src)));
- case GCONF_VALUE_LIST:
- switch (gconf_value_get_list_type(src)) {
- case GCONF_VALUE_STRING:
- {
- QStringList result;
- for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next)
- result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data)));
- return QVariant(result);
- }
- default:
- {
- QList<QVariant> result;
- for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next)
- result.append(convertValue((GConfValue *)elts->data));
- return QVariant(result);
- }
- }
- case GCONF_VALUE_SCHEMA:
- default:
- return QVariant();
- }
- }
-}
-
-
-/* Fast version of GConfItem, allows reading subtree at a time */
-class GConfItemFast {
-public:
- GConfItemFast(const QString &k) : key(k) {}
- QHash<QString,QVariant> getEntries() const;
-
-private:
- QString key;
-};
-
-#define withClient(c) for (GConfClient *c = gconf_client_get_default(); c; c=0)
-
-
-QHash<QString,QVariant> GConfItemFast::getEntries() const
-{
- QHash<QString,QVariant> children;
-
- withClient(client) {
- QByteArray k = key.toUtf8();
- GSList *entries = gconf_client_all_entries(client, k.data(), NULL);
- for (GSList *e = entries; e; e = e->next) {
- char *key_name = strrchr(((GConfEntry *)e->data)->key, '/');
- if (!key_name)
- key_name = ((GConfEntry *)e->data)->key;
- else
- key_name++;
- QString key(convertKey(key_name));
- QVariant value = convertValue(((GConfEntry *)e->data)->value);
- gconf_entry_unref((GConfEntry *)e->data);
- //qDebug()<<"key="<<key<<"value="<<value;
- children.insert(key, value);
- }
- g_slist_free (entries);
- }
-
- return children;
-}
-
-
-
-class NetworkProxyFactory : QNetworkProxyFactory
-{
- ProxyConf proxy_conf;
- bool proxy_data_read;
-
-public:
- NetworkProxyFactory() : proxy_data_read(false) { }
- QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery());
-};
-
-
-QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)
-{
- if (proxy_data_read == false) {
- proxy_data_read = true;
- proxy_conf.readProxyData();
- }
-
- QList<QNetworkProxy> result = proxy_conf.flush(query);
- if (result.isEmpty())
- result << QNetworkProxy::NoProxy;
-
- return result;
-}
-
-
-class ProxyConfPrivate {
-private:
- // proxy values from gconf
- QString mode;
- bool use_http_host;
- QString autoconfig_url;
- QString http_proxy;
- quint16 http_port;
- QList<QVariant> ignore_hosts;
- QString secure_host;
- quint16 secure_port;
- QString ftp_host;
- quint16 ftp_port;
- QString socks_host;
- quint16 socks_port;
- QString rtsp_host;
- quint16 rtsp_port;
-
- bool isHostExcluded(const QString &host);
-
-public:
- QString prefix;
- QString http_prefix;
-
- void readProxyData();
- QList<QNetworkProxy> flush(const QNetworkProxyQuery &query);
-};
-
-
-static QHash<QString,QVariant> getValues(const QString& prefix)
-{
- GConfItemFast item(prefix);
- return item.getEntries();
-}
-
-static QHash<QString,QVariant> getHttpValues(const QString& prefix)
-{
- GConfItemFast item(prefix);
- return item.getEntries();
-}
-
-#define GET(var, type) \
- do { \
- QVariant v = values.value(#var); \
- if (v.isValid()) \
- var = v.to##type (); \
- } while(0)
-
-#define GET_HTTP(var, name, type) \
- do { \
- QVariant v = httpValues.value(#name); \
- if (v.isValid()) \
- var = v.to##type (); \
- } while(0)
-
-
-void ProxyConfPrivate::readProxyData()
-{
- QHash<QString,QVariant> values = getValues(prefix);
- QHash<QString,QVariant> httpValues = getHttpValues(http_prefix);
-
- //qDebug()<<"values="<<values;
-
- /* Read the proxy settings from /system/proxy* */
- GET_HTTP(http_proxy, host, String);
- GET_HTTP(http_port, port, Int);
- GET_HTTP(ignore_hosts, ignore_hosts, List);
-
- GET(mode, String);
- GET(autoconfig_url, String);
- GET(secure_host, String);
- GET(secure_port, Int);
- GET(ftp_host, String);
- GET(ftp_port, Int);
- GET(socks_host, String);
- GET(socks_port, Int);
- GET(rtsp_host, String);
- GET(rtsp_port, Int);
-
- if (http_proxy.isEmpty())
- use_http_host = false;
- else
- use_http_host = true;
-}
-
-
-bool ProxyConfPrivate::isHostExcluded(const QString &host)
-{
- if (host.isEmpty())
- return true;
-
- if (ignore_hosts.isEmpty())
- return false;
-
- QHostAddress ipAddress;
- bool isIpAddress = ipAddress.setAddress(host);
-
- foreach (QVariant h, ignore_hosts) {
- QString entry = h.toString();
- if (isIpAddress && ipAddress.isInSubnet(QHostAddress::parseSubnet(entry))) {
- return true; // excluded
- } else {
- // do wildcard matching
- QRegExp rx(entry, Qt::CaseInsensitive, QRegExp::Wildcard);
- if (rx.exactMatch(host))
- return true;
- }
- }
-
- // host was not excluded
- return false;
-}
-
-
-QList<QNetworkProxy> ProxyConfPrivate::flush(const QNetworkProxyQuery &query)
-{
- QList<QNetworkProxy> result;
-
-#if 0
- qDebug()<<"http_proxy" << http_proxy;
- qDebug()<<"http_port" << http_port;
- qDebug()<<"ignore_hosts" << ignore_hosts;
- qDebug()<<"use_http_host" << use_http_host;
- qDebug()<<"mode" << mode;
- qDebug()<<"autoconfig_url" << autoconfig_url;
- qDebug()<<"secure_host" << secure_host;
- qDebug()<<"secure_port" << secure_port;
- qDebug()<<"ftp_host" << ftp_host;
- qDebug()<<"ftp_port" << ftp_port;
- qDebug()<<"socks_host" << socks_host;
- qDebug()<<"socks_port" << socks_port;
- qDebug()<<"rtsp_host" << rtsp_host;
- qDebug()<<"rtsp_port" << rtsp_port;
-#endif
-
- if (isHostExcluded(query.peerHostName()))
- return result; // no proxy for this host
-
- if (mode == QLatin1String("AUTO")) {
- // TODO: pac currently not supported, fix me
- return result;
- }
-
- if (mode == QLatin1String("MANUAL")) {
- bool isHttps = false;
- QString protocol = query.protocolTag().toLower();
-
- // try the protocol-specific proxy
- QNetworkProxy protocolSpecificProxy;
-
- if (protocol == QLatin1String("ftp")) {
- if (!ftp_host.isEmpty()) {
- protocolSpecificProxy.setType(QNetworkProxy::FtpCachingProxy);
- protocolSpecificProxy.setHostName(ftp_host);
- protocolSpecificProxy.setPort(ftp_port);
- }
- } else if (protocol == QLatin1String("http")) {
- if (!http_proxy.isEmpty()) {
- protocolSpecificProxy.setType(QNetworkProxy::HttpProxy);
- protocolSpecificProxy.setHostName(http_proxy);
- protocolSpecificProxy.setPort(http_port);
- }
- } else if (protocol == QLatin1String("https")) {
- isHttps = true;
- if (!secure_host.isEmpty()) {
- protocolSpecificProxy.setType(QNetworkProxy::HttpProxy);
- protocolSpecificProxy.setHostName(secure_host);
- protocolSpecificProxy.setPort(secure_port);
- }
- }
-
- if (protocolSpecificProxy.type() != QNetworkProxy::DefaultProxy)
- result << protocolSpecificProxy;
-
-
- if (!socks_host.isEmpty()) {
- QNetworkProxy proxy;
- proxy.setType(QNetworkProxy::Socks5Proxy);
- proxy.setHostName(socks_host);
- proxy.setPort(socks_port);
- result << proxy;
- }
-
-
- // Add the HTTPS proxy if present (and if we haven't added yet)
- if (!isHttps) {
- QNetworkProxy https;
- if (!secure_host.isEmpty()) {
- https.setType(QNetworkProxy::HttpProxy);
- https.setHostName(secure_host);
- https.setPort(secure_port);
- }
-
- if (https.type() != QNetworkProxy::DefaultProxy &&
- https != protocolSpecificProxy)
- result << https;
- }
- }
-
- return result;
-}
-
-
-ProxyConf::ProxyConf()
- : d_ptr(new ProxyConfPrivate)
-{
- g_type_init();
- d_ptr->prefix = CONF_PROXY;
- d_ptr->http_prefix = HTTP_PROXY;
-}
-
-ProxyConf::~ProxyConf()
-{
- delete d_ptr;
-}
-
-void ProxyConf::readProxyData()
-{
- d_ptr->readProxyData();
-}
-
-QList<QNetworkProxy> ProxyConf::flush(const QNetworkProxyQuery &query)
-{
- return d_ptr->flush(query);
-}
-
-
-static int refcount = 0;
-static QReadWriteLock lock;
-
-void ProxyConf::update()
-{
- QWriteLocker locker(&lock);
- NetworkProxyFactory *factory = new NetworkProxyFactory();
- QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory);
- refcount++;
-}
-
-
-void ProxyConf::clear(void)
-{
- QWriteLocker locker(&lock);
- refcount--;
- if (refcount == 0)
- QNetworkProxyFactory::setApplicationProxyFactory(NULL);
-
- if (refcount<0)
- refcount = 0;
-}
-
-
-} // namespace Maemo
diff --git a/src/plugins/bearer/icd/proxyconf.h b/src/plugins/bearer/icd/proxyconf.h
deleted file mode 100644
index 9f657f87ba..0000000000
--- a/src/plugins/bearer/icd/proxyconf.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef PROXYCONF_H
-#define PROXYCONF_H
-
-#include <QString>
-#include <QNetworkProxy>
-
-namespace Maemo {
-
-class ProxyConfPrivate;
-class ProxyConf {
-private:
- ProxyConfPrivate *d_ptr;
-
-public:
- ProxyConf();
- virtual ~ProxyConf();
-
- QList<QNetworkProxy> flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db
- void readProxyData();
-
- /* Note that for each update() call there should be corresponding
- * clear() call because the ProxyConf class implements a reference
- * counting mechanism. The factory is removed only when there is
- * no one using the factory any more.
- */
- static void update(void); // this builds QNetworkProxy factory
- static void clear(void); // this removes QNetworkProxy factory
-};
-
-} // namespace Maemo
-
-#endif
diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp
deleted file mode 100644
index d79a513ec4..0000000000
--- a/src/plugins/bearer/icd/qicdengine.cpp
+++ /dev/null
@@ -1,1126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qicdengine.h"
-#include "qnetworksession_impl.h"
-
-#include <wlancond.h>
-#include <wlan-utils.h>
-#include <iapconf.h>
-#include <iapmonitor.h>
-
-#ifndef QT_NO_BEARERMANAGEMENT
-
-QT_BEGIN_NAMESPACE
-
-IcdNetworkConfigurationPrivate::IcdNetworkConfigurationPrivate()
-: service_attrs(0), network_attrs(0)
-{
-}
-
-IcdNetworkConfigurationPrivate::~IcdNetworkConfigurationPrivate()
-{
-}
-
-QString IcdNetworkConfigurationPrivate::bearerTypeName() const
-{
- QMutexLocker locker(&mutex);
-
- return iap_type;
-}
-
-/******************************************************************************/
-/** IapAddTimer specific */
-/******************************************************************************/
-
-/* The IapAddTimer is a helper class that makes sure we update
- * the configuration only after all db additions to certain
- * iap are finished (after a certain timeout)
- */
-class _IapAddTimer : public QObject
-{
- Q_OBJECT
-
-public:
- _IapAddTimer() {}
- ~_IapAddTimer()
- {
- if (timer.isActive()) {
- QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
- timer.stop();
- }
- }
-
- void add(QString& iap_id, QIcdEngine *d);
-
- QString iap_id;
- QTimer timer;
- QIcdEngine *d;
-
-public Q_SLOTS:
- void timeout();
-};
-
-
-void _IapAddTimer::add(QString& id, QIcdEngine *d_ptr)
-{
- iap_id = id;
- d = d_ptr;
-
- if (timer.isActive()) {
- QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
- timer.stop();
- }
- timer.setSingleShot(true);
- QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
- timer.start(1500);
-}
-
-
-void _IapAddTimer::timeout()
-{
- d->addConfiguration(iap_id);
-}
-
-
-class IapAddTimer {
- QHash<QString, _IapAddTimer* > timers;
-
-public:
- IapAddTimer() {}
- ~IapAddTimer() {}
-
- void add(QString& iap_id, QIcdEngine *d);
- void del(QString& iap_id);
- void removeAll();
-};
-
-
-void IapAddTimer::removeAll()
-{
- QHashIterator<QString, _IapAddTimer* > i(timers);
- while (i.hasNext()) {
- i.next();
- _IapAddTimer *t = i.value();
- delete t;
- }
- timers.clear();
-}
-
-
-void IapAddTimer::add(QString& iap_id, QIcdEngine *d)
-{
- if (timers.contains(iap_id)) {
- _IapAddTimer *iap = timers.value(iap_id);
- iap->add(iap_id, d);
- } else {
- _IapAddTimer *iap = new _IapAddTimer;
- iap->add(iap_id, d);
- timers.insert(iap_id, iap);
- }
-}
-
-void IapAddTimer::del(QString& iap_id)
-{
- if (timers.contains(iap_id)) {
- _IapAddTimer *iap = timers.take(iap_id);
- delete iap;
- }
-}
-
-/******************************************************************************/
-/** IAPMonitor specific */
-/******************************************************************************/
-
-class IapMonitor : public Maemo::IAPMonitor
-{
-public:
- IapMonitor() : first_call(true) { }
-
- void setup(QIcdEngine *d);
- void cleanup();
-
-protected:
- void iapAdded(const QString &iapId);
- void iapRemoved(const QString &iapId);
-
-private:
- bool first_call;
-
- QIcdEngine *d;
- IapAddTimer timers;
-};
-
-void IapMonitor::setup(QIcdEngine *d_ptr)
-{
- if (first_call) {
- d = d_ptr;
- first_call = false;
- }
-}
-
-
-void IapMonitor::cleanup()
-{
- if (!first_call) {
- timers.removeAll();
- first_call = true;
- }
-}
-
-
-void IapMonitor::iapAdded(const QString &iap_id)
-{
- /* We cannot know when the IAP is fully added to db, so a timer is
- * installed instead. When the timer expires we hope that IAP is added ok.
- */
- QString id = iap_id;
- timers.add(id, d);
-}
-
-
-void IapMonitor::iapRemoved(const QString &iap_id)
-{
- QString id = iap_id;
- d->deleteConfiguration(id);
-}
-
-
-/******************************************************************************/
-/** QIcdEngine implementation */
-/******************************************************************************/
-
-QIcdEngine::QIcdEngine(QObject *parent)
-: QBearerEngine(parent), iapMonitor(0), m_dbusInterface(0), m_icdServiceWatcher(0),
- firstUpdate(true), m_scanGoingOn(false)
-{
-}
-
-QIcdEngine::~QIcdEngine()
-{
- cleanup();
- delete iapMonitor;
-}
-
-QNetworkConfigurationManager::Capabilities QIcdEngine::capabilities() const
-{
- return QNetworkConfigurationManager::CanStartAndStopInterfaces |
- QNetworkConfigurationManager::DataStatistics |
- QNetworkConfigurationManager::ForcedRoaming |
- QNetworkConfigurationManager::NetworkSessionRequired;
-}
-
-bool QIcdEngine::ensureDBusConnection()
-{
- if (m_dbusInterface)
- return true;
-
- // Setup DBus Interface for ICD
- m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE,
- QDBusConnection::systemBus(),
- this);
-
- if (!m_dbusInterface->isValid()) {
- delete m_dbusInterface;
- m_dbusInterface = 0;
-
- if (!m_icdServiceWatcher) {
- m_icdServiceWatcher = new QDBusServiceWatcher(ICD_DBUS_API_INTERFACE,
- QDBusConnection::systemBus(),
- QDBusServiceWatcher::WatchForOwnerChange,
- this);
-
- connect(m_icdServiceWatcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)),
- this, SLOT(icdServiceOwnerChanged(QString,QString,QString)));
- }
-
- return false;
- }
-
- connect(&m_scanTimer, SIGNAL(timeout()), this, SLOT(finishAsyncConfigurationUpdate()));
- m_scanTimer.setSingleShot(true);
-
- /* Turn on IAP state monitoring */
- startListeningStateSignalsForAllConnections();
-
- /* Turn on IAP add/remove monitoring */
- iapMonitor = new IapMonitor;
- iapMonitor->setup(this);
-
- /* We create a default configuration which is a pseudo config */
- QNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate;
- cpPriv->name = "UserChoice";
- cpPriv->state = QNetworkConfiguration::Discovered;
- cpPriv->isValid = true;
- cpPriv->id = OSSO_IAP_ANY;
- cpPriv->type = QNetworkConfiguration::UserChoice;
- cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
- cpPriv->roamingSupported = false;
-
- QNetworkConfigurationPrivatePointer ptr(cpPriv);
- userChoiceConfigurations.insert(cpPriv->id, ptr);
-
- doRequestUpdate();
-
- getIcdInitialState();
-
- return true;
-}
-
-void QIcdEngine::initialize()
-{
- QMutexLocker locker(&mutex);
-
- if (!ensureDBusConnection()) {
- locker.unlock();
- emit updateCompleted();
- locker.relock();
- }
-}
-
-static inline QString network_attrs_to_security(uint network_attrs)
-{
- uint cap = 0;
- nwattr2cap(network_attrs, &cap); /* from libicd-network-wlan-dev.h */
- if (cap & WLANCOND_OPEN)
- return "NONE";
- else if (cap & WLANCOND_WEP)
- return "WEP";
- else if (cap & WLANCOND_WPA_PSK)
- return "WPA_PSK";
- else if (cap & WLANCOND_WPA_EAP)
- return "WPA_EAP";
- return "";
-}
-
-
-struct SSIDInfo {
- QString iap_id;
- QString wlan_security;
-};
-
-
-void QIcdEngine::deleteConfiguration(const QString &iap_id)
-{
- QMutexLocker locker(&mutex);
-
- /* Called when IAPs are deleted in db, in this case we do not scan
- * or read all the IAPs from db because it might take too much power
- * (multiple applications would need to scan and read all IAPs from db)
- */
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(iap_id);
- if (ptr) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "IAP" << iap_id << "was removed from storage.";
-#endif
-
- locker.unlock();
- emit configurationRemoved(ptr);
- } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug("IAP: %s, already missing from the known list", iap_id.toAscii().data());
-#endif
- }
-}
-
-
-static quint32 getNetworkAttrs(bool is_iap_id,
- const QString &iap_id,
- const QString &iap_type,
- QString security_method)
-{
- guint network_attr = 0;
- dbus_uint32_t cap = 0;
-
- if (iap_type == "WLAN_INFRA")
- cap |= WLANCOND_INFRA;
- else if (iap_type == "WLAN_ADHOC")
- cap |= WLANCOND_ADHOC;
-
- if (security_method.isEmpty() && (cap & (WLANCOND_INFRA | WLANCOND_ADHOC))) {
- Maemo::IAPConf saved_ap(iap_id);
- security_method = saved_ap.value("wlan_security").toString();
- }
-
- if (!security_method.isEmpty()) {
- if (security_method == "WEP")
- cap |= WLANCOND_WEP;
- else if (security_method == "WPA_PSK")
- cap |= WLANCOND_WPA_PSK;
- else if (security_method == "WPA_EAP")
- cap |= WLANCOND_WPA_EAP;
- else if (security_method == "NONE")
- cap |= WLANCOND_OPEN;
-
- if (cap & (WLANCOND_WPA_PSK | WLANCOND_WPA_EAP)) {
- Maemo::IAPConf saved_iap(iap_id);
- bool wpa2_only = saved_iap.value("EAP_wpa2_only_mode").toBool();
- if (wpa2_only) {
- cap |= WLANCOND_WPA2;
- }
- }
- }
-
- cap2nwattr(cap, &network_attr);
- if (is_iap_id)
- network_attr |= ICD_NW_ATTR_IAPNAME;
-
- return quint32(network_attr);
-}
-
-
-void QIcdEngine::addConfiguration(QString& iap_id)
-{
- // Note: When new IAP is created, this function gets called multiple times
- // in a row.
- // For example: Empty type & name for WLAN was stored into newly
- // created IAP data in gconf when this function gets
- // called for the first time.
- // WLAN type & name are updated into IAP data in gconf
- // as soon as WLAN connection is up and running.
- // => And this function gets called again.
-
- QMutexLocker locker(&mutex);
-
- if (!accessPointConfigurations.contains(iap_id)) {
- Maemo::IAPConf saved_iap(iap_id);
- QString iap_type = saved_iap.value("type").toString();
- QString iap_name = saved_iap.value("name").toString();
- QByteArray ssid = saved_iap.value("wlan_ssid").toByteArray();
- if (!iap_type.isEmpty() && !iap_name.isEmpty()) {
- // Check if new IAP is actually Undefined WLAN configuration
- // Note: SSID is used as an iap id for Undefined WLAN configurations
- // => configuration must be searched using SSID
- if (!ssid.isEmpty() && accessPointConfigurations.contains(ssid)) {
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(ssid);
- if (ptr) {
- ptr->mutex.lock();
- ptr->id = iap_id;
- toIcdConfig(ptr)->iap_type = iap_type;
- ptr->bearerType = bearerTypeFromIapType(iap_type);
- toIcdConfig(ptr)->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
- toIcdConfig(ptr)->network_id = ssid;
- toIcdConfig(ptr)->service_id = saved_iap.value("service_id").toString();
- toIcdConfig(ptr)->service_type = saved_iap.value("service_type").toString();
- if (m_onlineIapId == iap_id) {
- ptr->state = QNetworkConfiguration::Active;
- } else {
- ptr->state = QNetworkConfiguration::Defined;
- }
- ptr->mutex.unlock();
- accessPointConfigurations.insert(iap_id, ptr);
-
- locker.unlock();
- emit configurationChanged(ptr);
- locker.relock();
- }
- } else {
- IcdNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate;
- cpPriv->name = saved_iap.value("name").toString();
- if (cpPriv->name.isEmpty())
- cpPriv->name = iap_id;
- cpPriv->isValid = true;
- cpPriv->id = iap_id;
- cpPriv->iap_type = iap_type;
- cpPriv->bearerType = bearerTypeFromIapType(iap_type);
- cpPriv->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
- cpPriv->service_id = saved_iap.value("service_id").toString();
- cpPriv->service_type = saved_iap.value("service_type").toString();
- if (iap_type.startsWith(QLatin1String("WLAN"))) {
- QByteArray ssid = saved_iap.value("wlan_ssid").toByteArray();
- if (ssid.isEmpty()) {
- qWarning() << "Cannot get ssid for" << iap_id;
- }
- cpPriv->network_id = ssid;
- }
- cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
- if (m_onlineIapId == iap_id) {
- cpPriv->state = QNetworkConfiguration::Active;
- } else {
- cpPriv->state = QNetworkConfiguration::Defined;
- }
-
- QNetworkConfigurationPrivatePointer ptr(cpPriv);
- accessPointConfigurations.insert(iap_id, ptr);
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug("IAP: %s, name: %s, added to known list", iap_id.toAscii().data(), cpPriv->name.toAscii().data());
-#endif
- locker.unlock();
- emit configurationAdded(ptr);
- locker.relock();
- }
- } else {
- qWarning("IAP %s does not have \"type\" or \"name\" fields defined, skipping this IAP.", iap_id.toAscii().data());
- }
- } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "IAP" << iap_id << "already in db.";
-#endif
-
- /* Check if the data in db changed and update configuration accordingly
- */
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iap_id);
- if (ptr) {
- Maemo::IAPConf changed_iap(iap_id);
- QString iap_type = changed_iap.value("type").toString();
- bool update_needed = false; /* if IAP type or ssid changed, we need to change the state */
-
- QMutexLocker configLocker(&ptr->mutex);
-
- toIcdConfig(ptr)->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
- toIcdConfig(ptr)->service_id = changed_iap.value("service_id").toString();
- toIcdConfig(ptr)->service_type = changed_iap.value("service_type").toString();
-
- if (!iap_type.isEmpty()) {
- ptr->name = changed_iap.value("name").toString();
- if (ptr->name.isEmpty())
- ptr->name = iap_id;
- ptr->isValid = true;
- if (toIcdConfig(ptr)->iap_type != iap_type) {
- toIcdConfig(ptr)->iap_type = iap_type;
- ptr->bearerType = bearerTypeFromIapType(iap_type);
- update_needed = true;
- }
- if (iap_type.startsWith(QLatin1String("WLAN"))) {
- QByteArray ssid = changed_iap.value("wlan_ssid").toByteArray();
- if (ssid.isEmpty()) {
- qWarning() << "Cannot get ssid for" << iap_id;
- }
- if (toIcdConfig(ptr)->network_id != ssid) {
- toIcdConfig(ptr)->network_id = ssid;
- update_needed = true;
- }
- }
- }
-
- if (update_needed) {
- ptr->type = QNetworkConfiguration::InternetAccessPoint;
- if (m_onlineIapId == iap_id) {
- if (ptr->state < QNetworkConfiguration::Active) {
- ptr->state = QNetworkConfiguration::Active;
-
- configLocker.unlock();
- locker.unlock();
- emit configurationChanged(ptr);
- locker.relock();
- }
- } else if (ptr->state < QNetworkConfiguration::Defined) {
- ptr->state = QNetworkConfiguration::Defined;
-
- configLocker.unlock();
- locker.unlock();
- emit configurationChanged(ptr);
- locker.relock();
- }
- }
- } else {
- qWarning("Cannot find IAP %s from current configuration although it should be there.", iap_id.toAscii().data());
- }
- }
-}
-
-void QIcdEngine::doRequestUpdate(QList<Maemo::IcdScanResult> scanned)
-{
- /* Contains all known iap_ids from storage */
- QList<QString> knownConfigs = accessPointConfigurations.keys();
-
- /* Contains all known WLAN network ids (like ssid) from storage */
- QMultiHash<QByteArray, SSIDInfo* > notDiscoveredWLANConfigs;
-
- QList<QString> all_iaps;
- Maemo::IAPConf::getAll(all_iaps);
-
- foreach (const QString &iap_id, all_iaps) {
- QByteArray ssid;
-
- Maemo::IAPConf saved_ap(iap_id);
- bool is_temporary = saved_ap.value("temporary").toBool();
- if (is_temporary) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "IAP" << iap_id << "is temporary, skipping it.";
-#endif
- continue;
- }
-
- QString iap_type = saved_ap.value("type").toString();
- if (iap_type.startsWith(QLatin1String("WLAN"))) {
- ssid = saved_ap.value("wlan_ssid").toByteArray();
- if (ssid.isEmpty())
- continue;
-
- QString security_method = saved_ap.value("wlan_security").toString();
- SSIDInfo *info = new SSIDInfo;
- info->iap_id = iap_id;
- info->wlan_security = security_method;
- notDiscoveredWLANConfigs.insert(ssid, info);
- } else if (iap_type.isEmpty()) {
- continue;
- } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "IAP" << iap_id << "network type is" << iap_type;
-#endif
- ssid.clear();
- }
-
- if (!accessPointConfigurations.contains(iap_id)) {
- IcdNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate;
-
- cpPriv->name = saved_ap.value("name").toString();
- if (cpPriv->name.isEmpty()) {
- if (!ssid.isEmpty() && ssid.size() > 0)
- cpPriv->name = ssid.data();
- else
- cpPriv->name = iap_id;
- }
- cpPriv->isValid = true;
- cpPriv->id = iap_id;
- cpPriv->network_id = ssid;
- cpPriv->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
- cpPriv->iap_type = iap_type;
- cpPriv->bearerType = bearerTypeFromIapType(iap_type);
- cpPriv->service_id = saved_ap.value("service_id").toString();
- cpPriv->service_type = saved_ap.value("service_type").toString();
- cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
- cpPriv->state = QNetworkConfiguration::Defined;
-
- QNetworkConfigurationPrivatePointer ptr(cpPriv);
- accessPointConfigurations.insert(iap_id, ptr);
-
- mutex.unlock();
- emit configurationAdded(ptr);
- mutex.lock();
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug("IAP: %s, name: %s, ssid: %s, added to known list",
- iap_id.toAscii().data(), ptr->name.toAscii().data(),
- !ssid.isEmpty() ? ssid.data() : "-");
-#endif
- } else {
- knownConfigs.removeOne(iap_id);
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug("IAP: %s, ssid: %s, already exists in the known list",
- iap_id.toAscii().data(), !ssid.isEmpty() ? ssid.data() : "-");
-#endif
- }
- }
-
- /* This is skipped in the first update as scanned size is zero */
- if (!scanned.isEmpty()) {
- for (int i=0; i<scanned.size(); ++i) {
- const Maemo::IcdScanResult ap = scanned.at(i);
-
- if (ap.scan.network_attrs & ICD_NW_ATTR_IAPNAME) {
- /* The network_id is IAP id, so the IAP is a known one */
- QString iapid = ap.scan.network_id.data();
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iapid);
- if (ptr) {
- bool changed = false;
-
- ptr->mutex.lock();
-
- if (!ptr->isValid) {
- ptr->isValid = true;
- changed = true;
- }
-
- /* If this config is the current active one, we do not set it
- * to discovered.
- */
- if ((ptr->state != QNetworkConfiguration::Discovered) &&
- (ptr->state != QNetworkConfiguration::Active)) {
- ptr->state = QNetworkConfiguration::Discovered;
- changed = true;
- }
-
- toIcdConfig(ptr)->network_attrs = ap.scan.network_attrs;
- toIcdConfig(ptr)->service_id = ap.scan.service_id;
- toIcdConfig(ptr)->service_type = ap.scan.service_type;
- toIcdConfig(ptr)->service_attrs = ap.scan.service_attrs;
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug("IAP: %s, ssid: %s, discovered",
- iapid.toAscii().data(), toIcdConfig(ptr)->network_id.data());
-#endif
-
- ptr->mutex.unlock();
-
- if (changed) {
- mutex.unlock();
- emit configurationChanged(ptr);
- mutex.lock();
- }
-
- if (!ap.scan.network_type.startsWith(QLatin1String("WLAN")))
- continue; // not a wlan AP
-
- /* Remove scanned AP from discovered WLAN configurations so that we can
- * emit configurationRemoved signal later
- */
- ptr->mutex.lock();
- QList<SSIDInfo* > known_iaps = notDiscoveredWLANConfigs.values(toIcdConfig(ptr)->network_id);
-rescan_list:
- if (!known_iaps.isEmpty()) {
- for (int k=0; k<known_iaps.size(); ++k) {
- SSIDInfo *iap = known_iaps.at(k);
-
- if (iap->wlan_security ==
- network_attrs_to_security(ap.scan.network_attrs)) {
- /* Remove IAP from the list */
- notDiscoveredWLANConfigs.remove(toIcdConfig(ptr)->network_id, iap);
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "Removed IAP" << iap->iap_id << "from unknown config";
-#endif
- known_iaps.removeAt(k);
- delete iap;
- goto rescan_list;
- }
- }
- }
- ptr->mutex.unlock();
- }
- } else {
- /* Non saved access point data */
- QByteArray scanned_ssid = ap.scan.network_id;
- if (!accessPointConfigurations.contains(scanned_ssid)) {
- IcdNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate;
- QString hrs = scanned_ssid.data();
-
- cpPriv->name = ap.network_name.isEmpty() ? hrs : ap.network_name;
- cpPriv->isValid = true;
- cpPriv->id = scanned_ssid.data(); // Note: id is now ssid, it should be set to IAP id if the IAP is saved
- cpPriv->network_id = scanned_ssid;
- cpPriv->iap_type = ap.scan.network_type;
- cpPriv->bearerType = bearerTypeFromIapType(cpPriv->iap_type);
- cpPriv->network_attrs = ap.scan.network_attrs;
- cpPriv->service_id = ap.scan.service_id;
- cpPriv->service_type = ap.scan.service_type;
- cpPriv->service_attrs = ap.scan.service_attrs;
-
- cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
- cpPriv->state = QNetworkConfiguration::Undefined;
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "IAP with network id" << cpPriv->id << "was found in the scan.";
-#endif
-
- QNetworkConfigurationPrivatePointer ptr(cpPriv);
- accessPointConfigurations.insert(ptr->id, ptr);
-
- mutex.unlock();
- emit configurationAdded(ptr);
- mutex.lock();
- } else {
- knownConfigs.removeOne(scanned_ssid);
- }
- }
- }
- }
-
- if (!firstUpdate) {
- // Update Defined status to all defined WLAN IAPs which
- // could not be found when access points were scanned
- QHashIterator<QByteArray, SSIDInfo* > i(notDiscoveredWLANConfigs);
- while (i.hasNext()) {
- i.next();
- SSIDInfo *iap = i.value();
- QString iap_id = iap->iap_id;
- //qDebug() << i.key() << ": " << iap_id;
-
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iap_id);
- if (ptr) {
- QMutexLocker configLocker(&ptr->mutex);
-
- // WLAN AccessPoint configuration could not be Discovered
- // => Make sure that configuration state is Defined
- if (ptr->state > QNetworkConfiguration::Defined) {
- ptr->state = QNetworkConfiguration::Defined;
-
- configLocker.unlock();
- mutex.unlock();
- emit configurationChanged(ptr);
- mutex.lock();
- }
- }
- }
-
- /* Remove non existing iaps since last update */
- foreach (const QString &oldIface, knownConfigs) {
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(oldIface);
- if (ptr) {
- mutex.unlock();
- emit configurationRemoved(ptr);
- mutex.lock();
- //if we would have SNAP support we would have to remove the references
- //from existing ServiceNetworks to the removed access point configuration
- }
- }
- }
-
- QMutableHashIterator<QByteArray, SSIDInfo* > i(notDiscoveredWLANConfigs);
- while (i.hasNext()) {
- i.next();
- SSIDInfo *iap = i.value();
- delete iap;
- i.remove();
- }
-
- if (!firstUpdate) {
- mutex.unlock();
- emit updateCompleted();
- mutex.lock();
- }
-
- if (firstUpdate)
- firstUpdate = false;
-}
-
-QNetworkConfigurationPrivatePointer QIcdEngine::defaultConfiguration()
-{
- QMutexLocker locker(&mutex);
-
- if (!ensureDBusConnection())
- return QNetworkConfigurationPrivatePointer();
-
- // Here we just return [ANY] request to icd and let the icd decide which IAP to connect.
- return userChoiceConfigurations.value(OSSO_IAP_ANY);
-}
-
-void QIcdEngine::startListeningStateSignalsForAllConnections()
-{
- // Start listening ICD_DBUS_API_STATE_SIG signals
- m_dbusInterface->connection().connect(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_STATE_SIG,
- this, SLOT(connectionStateSignalsSlot(QDBusMessage)));
-}
-
-void QIcdEngine::getIcdInitialState()
-{
- /* Instead of requesting ICD status asynchronously, we ask it synchronously.
- * It ensures that we always get right icd status BEFORE initialize() ends.
- * If not, initialize() might end before we got icd status and
- * QNetworkConfigurationManager::updateConfigurations()
- * call from user might also end before receiving icd status.
- * In such case, we come up to a bug:
- * QNetworkConfigurationManagerPrivate::isOnline() will be false even
- * if we are connected.
- */
- Maemo::Icd icd;
- QList<Maemo::IcdStateResult> state_results;
- QNetworkConfigurationPrivatePointer ptr;
-
- if (icd.state(state_results) && !state_results.isEmpty()) {
-
- if (!(state_results.first().params.network_attrs == 0 &&
- state_results.first().params.network_id.isEmpty())) {
-
- switch (state_results.first().state) {
- case ICD_STATE_CONNECTED:
- m_onlineIapId = state_results.first().params.network_id;
-
- ptr = accessPointConfigurations.value(m_onlineIapId);
- if (ptr) {
- QMutexLocker configLocker(&ptr->mutex);
- ptr->state = QNetworkConfiguration::Active;
- configLocker.unlock();
-
- mutex.unlock();
- emit configurationChanged(ptr);
- mutex.lock();
- }
- break;
- default:
- break;
- }
- }
- }
-}
-
-void QIcdEngine::connectionStateSignalsSlot(QDBusMessage msg)
-{
- QMutexLocker locker(&mutex);
-
- QList<QVariant> arguments = msg.arguments();
- if (arguments.count() < 8 || arguments.at(1).toUInt() != 0) {
- return;
- }
-
- QString iapid = arguments[5].toByteArray().data();
- uint icd_connection_state = arguments.at(7).toUInt();
-
- switch (icd_connection_state) {
- case ICD_STATE_CONNECTED:
- {
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iapid);
- if (ptr) {
- QMutexLocker configLocker(&ptr->mutex);
-
- ptr->type = QNetworkConfiguration::InternetAccessPoint;
- if (ptr->state != QNetworkConfiguration::Active) {
- ptr->state = QNetworkConfiguration::Active;
-
- configLocker.unlock();
- locker.unlock();
- emit configurationChanged(ptr);
- locker.relock();
-
- m_onlineIapId = iapid;
- }
- } else {
- // This gets called when new WLAN IAP is created using Connection dialog
- // At this point Undefined WLAN configuration has SSID as iap id
- // => Because of that configuration can not be found from
- // accessPointConfigurations using correct iap id
- m_onlineIapId = iapid;
- }
- break;
- }
- case ICD_STATE_DISCONNECTED:
- {
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iapid);
- if (ptr) {
- QMutexLocker configLocker(&ptr->mutex);
-
- ptr->type = QNetworkConfiguration::InternetAccessPoint;
- if (ptr->state == QNetworkConfiguration::Active) {
- ptr->state = QNetworkConfiguration::Discovered;
-
- configLocker.unlock();
- locker.unlock();
- emit configurationChanged(ptr);
- locker.relock();
-
- // Note: If ICD switches used IAP from one to another:
- // 1) new IAP is reported to be online first
- // 2) old IAP is reported to be offline then
- // => Device can be reported to be offline only
- // if last known online IAP is reported to be disconnected
- if (iapid == m_onlineIapId) {
- // It's known that there is only one global ICD connection
- // => Because ICD state was reported to be DISCONNECTED, Device is offline
- m_onlineIapId.clear();
- }
- }
- } else {
- // Disconnected IAP was not found from accessPointConfigurations
- // => Reason: Online IAP was removed which resulted ICD to disconnect
- if (iapid == m_onlineIapId) {
- // It's known that there is only one global ICD connection
- // => Because ICD state was reported to be DISCONNECTED, Device is offline
- m_onlineIapId.clear();
- }
- }
- break;
- }
- default:
- break;
- }
-
- locker.unlock();
- emit iapStateChanged(iapid, icd_connection_state);
- locker.relock();
-}
-
-void QIcdEngine::icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner,
- const QString &newOwner)
-{
- Q_UNUSED(serviceName);
- Q_UNUSED(oldOwner);
-
- QMutexLocker locker(&mutex);
-
- if (newOwner.isEmpty()) {
- // Disconnected from ICD, remove all configurations
- cleanup();
- delete iapMonitor;
- iapMonitor = 0;
- delete m_dbusInterface;
- m_dbusInterface = 0;
-
- QMutableHashIterator<QString, QNetworkConfigurationPrivatePointer> i(accessPointConfigurations);
- while (i.hasNext()) {
- i.next();
-
- QNetworkConfigurationPrivatePointer ptr = i.value();
- i.remove();
-
- locker.unlock();
- emit configurationRemoved(ptr);
- locker.relock();
- }
-
- userChoiceConfigurations.clear();
- } else {
- // Connected to ICD ensure connection.
- ensureDBusConnection();
- }
-}
-
-void QIcdEngine::requestUpdate()
-{
- QMutexLocker locker(&mutex);
-
- if (!ensureDBusConnection()) {
- locker.unlock();
- emit updateCompleted();
- locker.relock();
- return;
- }
-
- if (m_scanGoingOn)
- return;
-
- m_scanGoingOn = true;
-
- m_dbusInterface->connection().connect(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_SCAN_SIG,
- this, SLOT(asyncUpdateConfigurationsSlot(QDBusMessage)));
-
- QDBusMessage msg = m_dbusInterface->call(ICD_DBUS_API_SCAN_REQ,
- (uint)ICD_SCAN_REQUEST_ACTIVE);
- m_typesToBeScanned = msg.arguments()[0].value<QStringList>();
- m_scanTimer.start(ICD_SHORT_SCAN_TIMEOUT);
-}
-
-void QIcdEngine::cancelAsyncConfigurationUpdate()
-{
- if (!ensureDBusConnection())
- return;
-
- if (!m_scanGoingOn)
- return;
-
- m_scanGoingOn = false;
-
- if (m_scanTimer.isActive())
- m_scanTimer.stop();
-
- m_dbusInterface->connection().disconnect(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_SCAN_SIG,
- this, SLOT(asyncUpdateConfigurationsSlot(QDBusMessage)));
-
- // Stop scanning rounds by calling ICD_DBUS_API_SCAN_CANCEL
- // <=> If ICD_DBUS_API_SCAN_CANCEL is not called, new scanning round will
- // be started after the module scan timeout.
- m_dbusInterface->call(ICD_DBUS_API_SCAN_CANCEL);
-}
-
-void QIcdEngine::finishAsyncConfigurationUpdate()
-{
- QMutexLocker locker(&mutex);
-
- cancelAsyncConfigurationUpdate();
- doRequestUpdate(m_scanResult);
- m_scanResult.clear();
-}
-
-void QIcdEngine::asyncUpdateConfigurationsSlot(QDBusMessage msg)
-{
- QMutexLocker locker(&mutex);
-
- QList<QVariant> arguments = msg.arguments();
- uint icd_scan_status = arguments.takeFirst().toUInt();
- if (icd_scan_status == ICD_SCAN_COMPLETE) {
- m_typesToBeScanned.removeOne(arguments[6].toString());
- if (!m_typesToBeScanned.count()) {
- locker.unlock();
- finishAsyncConfigurationUpdate();
- locker.relock();
- }
- } else {
- Maemo::IcdScanResult scanResult;
- scanResult.status = icd_scan_status;
- scanResult.timestamp = arguments.takeFirst().toUInt();
- scanResult.scan.service_type = arguments.takeFirst().toString();
- scanResult.service_name = arguments.takeFirst().toString();
- scanResult.scan.service_attrs = arguments.takeFirst().toUInt();
- scanResult.scan.service_id = arguments.takeFirst().toString();
- scanResult.service_priority = arguments.takeFirst().toInt();
- scanResult.scan.network_type = arguments.takeFirst().toString();
- scanResult.network_name = arguments.takeFirst().toString();
- scanResult.scan.network_attrs = arguments.takeFirst().toUInt();
- scanResult.scan.network_id = arguments.takeFirst().toByteArray();
- scanResult.network_priority = arguments.takeFirst().toInt();
- scanResult.signal_strength = arguments.takeFirst().toInt();
- scanResult.station_id = arguments.takeFirst().toString();
- scanResult.signal_dB = arguments.takeFirst().toInt();
-
- m_scanResult.append(scanResult);
- }
-}
-
-void QIcdEngine::cleanup()
-{
- if (m_scanGoingOn) {
- m_scanTimer.stop();
- m_dbusInterface->call(ICD_DBUS_API_SCAN_CANCEL);
- }
- if (iapMonitor)
- iapMonitor->cleanup();
-}
-
-bool QIcdEngine::hasIdentifier(const QString &id)
-{
- QMutexLocker locker(&mutex);
-
- return accessPointConfigurations.contains(id) ||
- snapConfigurations.contains(id) ||
- userChoiceConfigurations.contains(id);
-}
-
-QNetworkSessionPrivate *QIcdEngine::createSessionBackend()
-{
- return new QNetworkSessionPrivateImpl(this);
-}
-
-#include "qicdengine.moc"
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
deleted file mode 100644
index a72cc72b8e..0000000000
--- a/src/plugins/bearer/icd/qicdengine.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QICDENGINE_H
-#define QICDENGINE_H
-
-#include <QtNetwork/private/qbearerengine_p.h>
-
-#include <QtCore/qtimer.h>
-
-#include "maemo_icd.h"
-
-QT_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-class IapMonitor;
-class QDBusInterface;
-class QDBusServiceWatcher;
-
-inline QNetworkConfiguration::BearerType bearerTypeFromIapType(const QString &iapType)
-{
- if (iapType == QLatin1String("WLAN_INFRA") ||
- iapType == QLatin1String("WLAN_ADHOC")) {
- return QNetworkConfiguration::BearerWLAN;
- } else if (iapType == QLatin1String("GPRS")) {
- return QNetworkConfiguration::BearerHSPA;
- } else {
- return QNetworkConfiguration::BearerUnknown;
- }
-}
-
-class IcdNetworkConfigurationPrivate : public QNetworkConfigurationPrivate
-{
-public:
- IcdNetworkConfigurationPrivate();
- ~IcdNetworkConfigurationPrivate();
-
- virtual QString bearerTypeName() const;
-
- // In Maemo the id field (defined in QNetworkConfigurationPrivate)
- // is the IAP id (which typically is UUID)
- QByteArray network_id; // typically WLAN ssid or similar
- QString iap_type; // is this one WLAN or GPRS
-
- QString service_type;
- QString service_id;
- quint32 service_attrs;
-
- // Network attributes for this IAP, this is the value returned by icd and
- // passed to it when connecting.
- quint32 network_attrs;
-};
-
-inline IcdNetworkConfigurationPrivate *toIcdConfig(QNetworkConfigurationPrivatePointer ptr)
-{
- return static_cast<IcdNetworkConfigurationPrivate *>(ptr.data());
-}
-
-class QIcdEngine : public QBearerEngine
-{
- Q_OBJECT
-
-public:
- QIcdEngine(QObject *parent = 0);
- ~QIcdEngine();
-
- bool hasIdentifier(const QString &id);
-
- Q_INVOKABLE void initialize();
- Q_INVOKABLE void requestUpdate();
-
- QNetworkConfigurationManager::Capabilities capabilities() const;
-
- QNetworkSessionPrivate *createSessionBackend();
-
- QNetworkConfigurationPrivatePointer defaultConfiguration();
-
- void deleteConfiguration(const QString &iap_id);
-
- inline QNetworkConfigurationPrivatePointer configuration(const QString &id)
- {
- QMutexLocker locker(&mutex);
-
- return accessPointConfigurations.value(id);
- }
-
- inline void addSessionConfiguration(QNetworkConfigurationPrivatePointer ptr)
- {
- QMutexLocker locker(&mutex);
-
- accessPointConfigurations.insert(ptr->id, ptr);
-
- locker.unlock();
- emit configurationAdded(ptr);
- }
-
- inline void changedSessionConfiguration(QNetworkConfigurationPrivatePointer ptr)
- {
- emit configurationChanged(ptr);
- }
-
- void cleanup();
-
- void addConfiguration(QString &iap_id);
-
-Q_SIGNALS:
- void iapStateChanged(const QString& iapid, uint icd_connection_state);
-
-private Q_SLOTS:
- void finishAsyncConfigurationUpdate();
- void asyncUpdateConfigurationsSlot(QDBusMessage msg);
- void connectionStateSignalsSlot(QDBusMessage msg);
- void icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner,
- const QString &newOwner);
-
-private:
- void startListeningStateSignalsForAllConnections();
- void doRequestUpdate(QList<Maemo::IcdScanResult> scanned = QList<Maemo::IcdScanResult>());
- void cancelAsyncConfigurationUpdate();
- void getIcdInitialState();
- bool ensureDBusConnection();
-
-private:
- IapMonitor *iapMonitor;
- QDBusInterface *m_dbusInterface;
- QTimer m_scanTimer;
- QString m_onlineIapId;
- QStringList m_typesToBeScanned;
- QList<Maemo::IcdScanResult> m_scanResult;
-
- QDBusServiceWatcher *m_icdServiceWatcher;
-
- bool firstUpdate;
- bool m_scanGoingOn;
-};
-
-QT_END_NAMESPACE
-
-#endif // QICDENGINE_H
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
deleted file mode 100644
index f08d8bf363..0000000000
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ /dev/null
@@ -1,1072 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworksession_impl.h"
-#include "qicdengine.h"
-
-#include <QHash>
-
-#include <maemo_icd.h>
-#include <iapconf.h>
-#include <proxyconf.h>
-
-#include <ifaddrs.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#ifndef QT_NO_BEARERMANAGEMENT
-
-QT_BEGIN_NAMESPACE
-
-QDBusArgument &operator<<(QDBusArgument &argument,
- const ICd2DetailsDBusStruct &icd2)
-{
- argument.beginStructure();
-
- argument << icd2.serviceType;
- argument << icd2.serviceAttributes;
- argument << icd2.setviceId;
- argument << icd2.networkType;
- argument << icd2.networkAttributes;
- argument << icd2.networkId;
-
- argument.endStructure();
-
- return argument;
-}
-
-const QDBusArgument &operator>>(const QDBusArgument &argument,
- ICd2DetailsDBusStruct &icd2)
-{
- argument.beginStructure();
-
- argument >> icd2.serviceType;
- argument >> icd2.serviceAttributes;
- argument >> icd2.setviceId;
- argument >> icd2.networkType;
- argument >> icd2.networkAttributes;
- argument >> icd2.networkId;
-
- argument.endStructure();
-
- return argument;
-}
-
-const QDBusArgument &operator>>(const QDBusArgument &argument,
- ICd2DetailsList &detailsList)
-{
- argument.beginArray();
- detailsList.clear();
-
- while (!argument.atEnd()) {
- ICd2DetailsDBusStruct element;
- argument >> element;
- detailsList.append(element);
- }
-
- argument.endArray();
- return argument;
-}
-
-QDBusArgument &operator<<(QDBusArgument &argument,
- const ICd2DetailsList &detailsList)
-{
- argument.beginArray(qMetaTypeId<ICd2DetailsDBusStruct>());
-
- for (int i = 0; i < detailsList.count(); ++i)
- argument << detailsList[i];
-
- argument.endArray();
-
- return argument;
-}
-
-static QHash<QString, QVariant> properties;
-
-static QString get_network_interface();
-
-void QNetworkSessionPrivateImpl::iapStateChanged(const QString& iapid, uint icd_connection_state)
-{
-
- if (((publicConfig.type() == QNetworkConfiguration::UserChoice) &&
- (activeConfig.identifier() == iapid)) ||
- (publicConfig.identifier() == iapid)) {
- switch (icd_connection_state) {
- case ICD_STATE_CONNECTING:
- updateState(QNetworkSession::Connecting);
- break;
- case ICD_STATE_CONNECTED:
- updateState(QNetworkSession::Connected);
- break;
- case ICD_STATE_DISCONNECTING:
- updateState(QNetworkSession::Closing);
- break;
- case ICD_STATE_DISCONNECTED:
- updateState(QNetworkSession::Disconnected);
- break;
- default:
- break;
- }
- }
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- updateIdentifier(iapid);
- }
-}
-
-void QNetworkSessionPrivateImpl::cleanupSession(void)
-{
- QObject::disconnect(q, SIGNAL(stateChanged(QNetworkSession::State)),
- this, SLOT(updateProxies(QNetworkSession::State)));
-}
-
-
-void QNetworkSessionPrivateImpl::updateState(QNetworkSession::State newState)
-{
- if (newState != state) {
- if (newState == QNetworkSession::Disconnected) {
- if (isOpen) {
- // The Session was aborted by the user or system
- lastError = QNetworkSession::SessionAbortedError;
- emit QNetworkSessionPrivate::error(lastError);
- emit closed();
- }
- if (m_stopTimer.isActive()) {
- // Session was closed by calling stop()
- m_stopTimer.stop();
- }
- isOpen = false;
- opened = false;
- currentNetworkInterface.clear();
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- copyConfig(publicConfig, activeConfig);
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(activeConfig));
-
- icdConfig->mutex.lock();
- icdConfig->state = QNetworkConfiguration::Defined;
- icdConfig->mutex.unlock();
- } else {
- if (!activeConfig.isValid()) {
- // Active configuration (IAP) was removed from system
- // => Connection was disconnected and configuration became
- // invalid
- // => Also Session state must be changed to invalid
- newState = QNetworkSession::Invalid;
- }
- }
- } else if (newState == QNetworkSession::Connected) {
- if (opened) {
- isOpen = true;
- }
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(activeConfig));
-
- icdConfig->mutex.lock();
- icdConfig->state = QNetworkConfiguration::Active;
- icdConfig->type = QNetworkConfiguration::InternetAccessPoint;
- icdConfig->mutex.unlock();
- }
-
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(publicConfig));
-
- icdConfig->mutex.lock();
- icdConfig->state = QNetworkConfiguration::Active;
- icdConfig->mutex.unlock();
- }
-
- if (newState != state) {
- state = newState;
- emit stateChanged(newState);
- }
- }
-}
-
-
-void QNetworkSessionPrivateImpl::updateIdentifier(const QString &newId)
-{
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(activeConfig));
-
- icdConfig->mutex.lock();
- icdConfig->network_attrs |= ICD_NW_ATTR_IAPNAME;
- icdConfig->id = newId;
- icdConfig->mutex.unlock();
- } else {
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(publicConfig));
-
- icdConfig->mutex.lock();
- icdConfig->network_attrs |= ICD_NW_ATTR_IAPNAME;
- if (icdConfig->id != newId)
- icdConfig->id = newId;
- icdConfig->mutex.unlock();
- }
-}
-
-
-QNetworkSessionPrivateImpl::Statistics QNetworkSessionPrivateImpl::getStatistics() const
-{
- /* This could be also implemented by using the Maemo::Icd::statistics()
- * that gets the statistics data for a specific IAP. Change if
- * necessary.
- */
- Maemo::Icd icd;
- QList<Maemo::IcdStatisticsResult> stats_results;
- Statistics stats = { 0, 0, 0};
-
- if (!icd.statistics(stats_results))
- return stats;
-
- foreach (const Maemo::IcdStatisticsResult &res, stats_results) {
- if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) {
- /* network_id is the IAP UUID */
- if (QString(res.params.network_id.data()) == activeConfig.identifier()) {
- stats.txData = res.bytes_sent;
- stats.rxData = res.bytes_received;
- stats.activeTime = res.time_active;
- }
- } else {
- /* We probably will never get to this branch */
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(activeConfig));
-
- icdConfig->mutex.lock();
- if (res.params.network_id == icdConfig->network_id) {
- stats.txData = res.bytes_sent;
- stats.rxData = res.bytes_received;
- stats.activeTime = res.time_active;
- }
- icdConfig->mutex.unlock();
- }
- }
-
- return stats;
-}
-
-
-quint64 QNetworkSessionPrivateImpl::bytesWritten() const
-{
- return getStatistics().txData;
-}
-
-quint64 QNetworkSessionPrivateImpl::bytesReceived() const
-{
- return getStatistics().rxData;
-}
-
-quint64 QNetworkSessionPrivateImpl::activeTime() const
-{
- return getStatistics().activeTime;
-}
-
-
-QNetworkConfiguration& QNetworkSessionPrivateImpl::copyConfig(QNetworkConfiguration &fromConfig,
- QNetworkConfiguration &toConfig,
- bool deepCopy)
-{
- IcdNetworkConfigurationPrivate *cpPriv;
- if (deepCopy) {
- cpPriv = new IcdNetworkConfigurationPrivate;
- setPrivateConfiguration(toConfig, QNetworkConfigurationPrivatePointer(cpPriv));
- } else {
- cpPriv = toIcdConfig(privateConfiguration(toConfig));
- }
-
- IcdNetworkConfigurationPrivate *fromPriv = toIcdConfig(privateConfiguration(fromConfig));
-
- QMutexLocker toLocker(&cpPriv->mutex);
- QMutexLocker fromLocker(&fromPriv->mutex);
-
- cpPriv->name = fromPriv->name;
- cpPriv->isValid = fromPriv->isValid;
- // Note that we do not copy id field here as the publicConfig does
- // not contain a valid IAP id.
- cpPriv->state = fromPriv->state;
- cpPriv->type = fromPriv->type;
- cpPriv->roamingSupported = fromPriv->roamingSupported;
- cpPriv->purpose = fromPriv->purpose;
- cpPriv->network_id = fromPriv->network_id;
- cpPriv->iap_type = fromPriv->iap_type;
- cpPriv->bearerType = fromPriv->bearerType;
- cpPriv->network_attrs = fromPriv->network_attrs;
- cpPriv->service_type = fromPriv->service_type;
- cpPriv->service_id = fromPriv->service_id;
- cpPriv->service_attrs = fromPriv->service_attrs;
-
- return toConfig;
-}
-
-
-/* This is called by QNetworkSession constructor and it updates the current
- * state of the configuration.
- */
-void QNetworkSessionPrivateImpl::syncStateWithInterface()
-{
- /* Initially we are not active although the configuration might be in
- * connected state.
- */
- isOpen = false;
- opened = false;
-
- connect(engine, SIGNAL(iapStateChanged(const QString&, uint)),
- this, SLOT(iapStateChanged(const QString&, uint)));
-
- QObject::connect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State)));
-
- state = QNetworkSession::Invalid;
- lastError = QNetworkSession::UnknownSessionError;
-
- switch (publicConfig.type()) {
- case QNetworkConfiguration::InternetAccessPoint:
- activeConfig = publicConfig;
- break;
- case QNetworkConfiguration::ServiceNetwork:
- serviceConfig = publicConfig;
- break;
- case QNetworkConfiguration::UserChoice:
- // active config will contain correct data after open() has succeeded
- copyConfig(publicConfig, activeConfig);
-
- /* We create new configuration that holds the actual configuration
- * returned by icd. This way publicConfig still contains the
- * original user specified configuration.
- *
- * Note that the new activeConfig configuration is not inserted
- * to configurationManager as manager class will get the newly
- * connected configuration from gconf when the IAP is saved.
- * This configuration manager update is done by IapMonitor class.
- * If the ANY connection fails in open(), then the configuration
- * data is not saved to gconf and will not be added to
- * configuration manager IAP list.
- */
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug()<<"New configuration created for" << publicConfig.identifier();
-#endif
- break;
- default:
- /* Invalid configuration, no point continuing */
- return;
- }
-
- if (!activeConfig.isValid())
- return;
-
- /* Get the initial state from icd */
- Maemo::Icd icd;
- QList<Maemo::IcdStateResult> state_results;
-
- /* Update the active config from first connection, this is ok as icd
- * supports only one connection anyway.
- */
- if (icd.state(state_results) && !state_results.isEmpty()) {
- /* If we did not get full state back, then we are not
- * connected and can skip the next part.
- */
- if (!(state_results.first().params.network_attrs == 0 &&
- state_results.first().params.network_id.isEmpty())) {
-
- /* If we try to connect to specific IAP and we get results back
- * that tell the icd is actually connected to another IAP,
- * then do not update current state etc.
- */
- if (publicConfig.type() == QNetworkConfiguration::UserChoice ||
- publicConfig.identifier() == state_results.first().params.network_id) {
- switch (state_results.first().state) {
- case ICD_STATE_DISCONNECTED:
- state = QNetworkSession::Disconnected;
- if (QNetworkConfigurationPrivatePointer ptr = privateConfiguration(activeConfig)) {
- ptr->mutex.lock();
- ptr->isValid = true;
- ptr->mutex.unlock();
- }
- break;
- case ICD_STATE_CONNECTING:
- state = QNetworkSession::Connecting;
- if (QNetworkConfigurationPrivatePointer ptr = privateConfiguration(activeConfig)) {
- ptr->mutex.lock();
- ptr->isValid = true;
- ptr->mutex.unlock();
- }
- break;
- case ICD_STATE_CONNECTED:
- {
- if (!state_results.first().error.isEmpty())
- break;
-
- const QString id = state_results.first().params.network_id;
-
- QNetworkConfiguration config = manager.configurationFromIdentifier(id);
- if (config.isValid()) {
- //we don't want the copied data if the config is already known by the manager
- //just reuse it so that existing references to the old data get the same update
- setPrivateConfiguration(activeConfig, privateConfiguration(config));
- }
-
- QNetworkConfigurationPrivatePointer ptr = privateConfiguration(activeConfig);
-
- QMutexLocker configLocker(&ptr->mutex);
-
- state = QNetworkSession::Connected;
- toIcdConfig(ptr)->network_id = state_results.first().params.network_id;
- ptr->id = toIcdConfig(ptr)->network_id;
- toIcdConfig(ptr)->network_attrs = state_results.first().params.network_attrs;
- toIcdConfig(ptr)->iap_type = state_results.first().params.network_type;
- ptr->bearerType = bearerTypeFromIapType(toIcdConfig(ptr)->iap_type);
- toIcdConfig(ptr)->service_type = state_results.first().params.service_type;
- toIcdConfig(ptr)->service_id = state_results.first().params.service_id;
- toIcdConfig(ptr)->service_attrs = state_results.first().params.service_attrs;
- ptr->type = QNetworkConfiguration::InternetAccessPoint;
- ptr->state = QNetworkConfiguration::Active;
- ptr->isValid = true;
- currentNetworkInterface = get_network_interface();
-
- Maemo::IAPConf iap_name(ptr->id);
- QString name_value = iap_name.value("name").toString();
- if (!name_value.isEmpty())
- ptr->name = name_value;
- else
- ptr->name = ptr->id;
-
- const QString identifier = ptr->id;
-
- configLocker.unlock();
-
- // Add the new active configuration to manager or update the old config
- if (!engine->hasIdentifier(identifier))
- engine->addSessionConfiguration(ptr);
- else
- engine->changedSessionConfiguration(ptr);
- }
- break;
-
- case ICD_STATE_DISCONNECTING:
- state = QNetworkSession::Closing;
- if (QNetworkConfigurationPrivatePointer ptr = privateConfiguration(activeConfig)) {
- ptr->mutex.lock();
- ptr->isValid = true;
- ptr->mutex.unlock();
- }
- break;
- default:
- break;
- }
- }
- } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "status_req tells icd is not connected";
-#endif
- }
- } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "status_req did not return any results from icd";
-#endif
- }
-
- networkConfigurationsChanged();
-}
-
-
-void QNetworkSessionPrivateImpl::networkConfigurationsChanged()
-{
- if (serviceConfig.isValid())
- updateStateFromServiceNetwork();
- else
- updateStateFromActiveConfig();
-}
-
-
-void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
-{
- QNetworkSession::State oldState = state;
-
- foreach (const QNetworkConfiguration &config, serviceConfig.children()) {
- if ((config.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active)
- continue;
-
- if (activeConfig != config) {
- activeConfig = config;
- emit newConfigurationActivated();
- }
-
- state = QNetworkSession::Connected;
- if (state != oldState)
- emit stateChanged(state);
-
- return;
- }
-
- if (serviceConfig.children().isEmpty())
- state = QNetworkSession::NotAvailable;
- else
- state = QNetworkSession::Disconnected;
-
- if (state != oldState)
- emit stateChanged(state);
-}
-
-
-void QNetworkSessionPrivateImpl::clearConfiguration(QNetworkConfiguration &config)
-{
- IcdNetworkConfigurationPrivate *icdConfig = toIcdConfig(privateConfiguration(config));
-
- QMutexLocker locker(&icdConfig->mutex);
-
- icdConfig->network_id.clear();
- icdConfig->iap_type.clear();
- icdConfig->network_attrs = 0;
- icdConfig->service_type.clear();
- icdConfig->service_id.clear();
- icdConfig->service_attrs = 0;
-}
-
-
-void QNetworkSessionPrivateImpl::updateStateFromActiveConfig()
-{
- QNetworkSession::State oldState = state;
-
- bool newActive = false;
-
- if (!activeConfig.isValid())
- return;
-
- if (!activeConfig.isValid()) {
- state = QNetworkSession::Invalid;
- clearConfiguration(activeConfig);
- } else if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
- state = QNetworkSession::Connected;
- newActive = opened;
- } else if ((activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
- state = QNetworkSession::Disconnected;
- } else if ((activeConfig.state() & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
- state = QNetworkSession::NotAvailable;
- } else if ((activeConfig.state() & QNetworkConfiguration::Undefined) == QNetworkConfiguration::Undefined) {
- state = QNetworkSession::NotAvailable;
- }
-
- bool oldActive = isOpen;
- isOpen = newActive;
-
- if (!oldActive && isOpen)
- emit quitPendingWaitsForOpened();
-
- if (oldActive && !isOpen)
- emit closed();
-
- if (oldState != state) {
- emit stateChanged(state);
-
- if (state == QNetworkSession::Disconnected && oldActive) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- //qDebug()<<"session aborted error emitted for"<<activeConfig.identifier();
-#endif
- lastError = QNetworkSession::SessionAbortedError;
- emit QNetworkSessionPrivate::error(lastError);
- }
- }
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- //qDebug()<<"oldState ="<<oldState<<" state ="<<state<<" oldActive ="<<oldActive<<" newActive ="<<newActive<<" opened ="<<opened;
-#endif
-}
-
-static QString get_network_interface()
-{
- Maemo::Icd icd;
- QList<Maemo::IcdAddressInfoResult> addr_results;
- uint ret;
- QString iface;
-
- ret = icd.addrinfo(addr_results);
- if (ret == 0) {
- /* No results */
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
-#endif
- return iface;
- }
-
- if (addr_results.first().ip_info.isEmpty())
- return QString();
-
- QByteArray data = addr_results.first().ip_info.first().address.toAscii();
- struct in_addr addr;
- if (inet_aton(data.constData(), &addr) == 0) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "address" << data.constData() << "invalid";
-#endif
- return iface;
- }
-
- struct ifaddrs *ifaddr, *ifa;
- int family;
-
- if (getifaddrs(&ifaddr) == -1) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "getifaddrs() failed";
-#endif
- return iface;
- }
-
- for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr) {
- family = ifa->ifa_addr->sa_family;
- if (family != AF_INET) {
- continue; /* Currently only IPv4 is supported by icd dbus interface */
- }
- if (((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr == addr.s_addr) {
- iface = QString(ifa->ifa_name);
- break;
- }
- }
- }
-
- freeifaddrs(ifaddr);
- return iface;
-}
-
-
-void QNetworkSessionPrivateImpl::open()
-{
- if (m_stopTimer.isActive()) {
- m_stopTimer.stop();
- }
- if (!publicConfig.isValid()) {
- lastError = QNetworkSession::InvalidConfigurationError;
- emit QNetworkSessionPrivate::error(lastError);
- return;
- }
- if (serviceConfig.isValid()) {
- lastError = QNetworkSession::OperationNotSupportedError;
- emit QNetworkSessionPrivate::error(lastError);
- } else if (!opened) {
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- /* Caller is trying to connect to default IAP.
- * At this time we will not know the IAP details so we just
- * connect and update the active config when the IAP is
- * connected.
- */
- opened = true;
- state = QNetworkSession::Connecting;
- emit stateChanged(state);
- QTimer::singleShot(0, this, SLOT(do_open()));
- return;
- }
-
- /* User is connecting to one specific IAP. If that IAP is not
- * in discovered state we cannot continue.
- */
- if ((activeConfig.state() & QNetworkConfiguration::Discovered) !=
- QNetworkConfiguration::Discovered) {
- lastError =QNetworkSession::InvalidConfigurationError;
- emit QNetworkSessionPrivate::error(lastError);
- return;
- }
- opened = true;
-
- if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active) {
- state = QNetworkSession::Connecting;
- emit stateChanged(state);
- QTimer::singleShot(0, this, SLOT(do_open()));
- return;
- }
- isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
- if (isOpen)
- emit quitPendingWaitsForOpened();
- } else {
- /* We seem to be active so inform caller */
- emit quitPendingWaitsForOpened();
- }
-}
-
-void QNetworkSessionPrivateImpl::do_open()
-{
- icd_connection_flags flags = connectFlags;
- QString iap = publicConfig.identifier();
-
- if (state == QNetworkSession::Connected) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "Already connected to" << activeConfig.identifier();
-#endif
- emit stateChanged(QNetworkSession::Connected);
- emit quitPendingWaitsForOpened();
- return;
- }
-
- if (publicConfig.type() == QNetworkConfiguration::UserChoice)
- config = activeConfig;
- else
- config = publicConfig;
-
- if (iap == OSSO_IAP_ANY) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "connecting to default IAP" << iap;
-#endif
- m_connectRequestTimer.start(ICD_LONG_CONNECT_TIMEOUT);
- m_dbusInterface->asyncCall(ICD_DBUS_API_CONNECT_REQ, (uint)flags); // Return value ignored
- m_asynchCallActive = true;
- } else {
- IcdNetworkConfigurationPrivate *icdConfig = toIcdConfig(privateConfiguration(config));
-
- icdConfig->mutex.lock();
- ICd2DetailsDBusStruct icd2;
- icd2.serviceType = icdConfig->service_type;
- icd2.serviceAttributes = icdConfig->service_attrs;
- icd2.setviceId = icdConfig->service_id;
- icd2.networkType = icdConfig->iap_type;
- icd2.networkAttributes = icdConfig->network_attrs;
- if (icdConfig->network_attrs & ICD_NW_ATTR_IAPNAME) {
- icd2.networkId = QByteArray(iap.toLatin1());
- } else {
- icd2.networkId = icdConfig->network_id;
- }
- icdConfig->mutex.unlock();
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug("connecting to %s/%s/0x%x/%s/0x%x/%s",
- icd2.networkId.data(),
- icd2.networkType.toAscii().constData(),
- icd2.networkAttributes,
- icd2.serviceType.toAscii().constData(),
- icd2.serviceAttributes,
- icd2.setviceId.toAscii().constData());
-#endif
-
- ICd2DetailsList paramArray;
- paramArray.append(icd2);
- m_connectRequestTimer.start(ICD_LONG_CONNECT_TIMEOUT);
- m_dbusInterface->asyncCall(ICD_DBUS_API_CONNECT_REQ, (uint)flags, QVariant::fromValue(paramArray)); // Return value ignored
- m_asynchCallActive = true;
- }
-}
-
-void QNetworkSessionPrivateImpl::stateChange(const QDBusMessage& rep)
-{
- if (m_asynchCallActive == true) {
- if (m_connectRequestTimer.isActive())
- m_connectRequestTimer.stop();
- m_asynchCallActive = false;
-
- QString result = rep.arguments().at(5).toString(); // network id or empty string
- QString connected_iap = result;
- if (connected_iap.isEmpty()) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "connect to"<< publicConfig.identifier() << "failed, result is empty";
-#endif
- updateState(QNetworkSession::Disconnected);
- emit QNetworkSessionPrivate::error(QNetworkSession::SessionAbortedError);
- if (publicConfig.type() == QNetworkConfiguration::UserChoice)
- copyConfig(publicConfig, activeConfig);
- return;
- }
-
- /* If the user tried to connect to some specific connection (foo)
- * and we were already connected to some other connection (bar),
- * then we cannot activate this session although icd has a valid
- * connection to somewhere.
- */
- if ((publicConfig.type() != QNetworkConfiguration::UserChoice) &&
- (connected_iap != config.identifier())) {
- updateState(QNetworkSession::Disconnected);
- emit QNetworkSessionPrivate::error(QNetworkSession::UnknownSessionError);
- return;
- }
-
- IcdNetworkConfigurationPrivate *icdConfig = toIcdConfig(privateConfiguration(config));
-
- /* Did we connect to non saved IAP? */
- icdConfig->mutex.lock();
- if (!(icdConfig->network_attrs & ICD_NW_ATTR_IAPNAME)) {
- /* Because the connection succeeded, the IAP is now known.
- */
- icdConfig->network_attrs |= ICD_NW_ATTR_IAPNAME;
- icdConfig->id = connected_iap;
- }
-
- /* User might have changed the IAP name when a new IAP was saved */
- Maemo::IAPConf iap_name(icdConfig->id);
- QString name = iap_name.value("name").toString();
- if (!name.isEmpty())
- icdConfig->name = name;
-
- icdConfig->iap_type = rep.arguments().at(3).toString(); // connect_result.connect.network_type;
- icdConfig->bearerType = bearerTypeFromIapType(icdConfig->iap_type);
- icdConfig->isValid = true;
- icdConfig->state = QNetworkConfiguration::Active;
- icdConfig->type = QNetworkConfiguration::InternetAccessPoint;
-
- icdConfig->mutex.unlock();
-
- startTime = QDateTime::currentDateTime();
- updateState(QNetworkSession::Connected);
- //currentNetworkInterface = get_network_interface();
-#ifdef BEARER_MANAGEMENT_DEBUG
- //qDebug() << "connected to" << result << config.name() << "at" << currentNetworkInterface;
-#endif
-
- /* We first check if the configuration already exists in the manager
- * and if it is not found there, we then insert it. Note that this
- * is only done for user choice config only because it can be missing
- * from config manager list.
- */
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- if (!engine->hasIdentifier(result)) {
- engine->addSessionConfiguration(privateConfiguration(config));
- } else {
- QNetworkConfigurationPrivatePointer priv = engine->configuration(result);
- QNetworkConfiguration reference;
- setPrivateConfiguration(reference, priv);
- copyConfig(config, reference, false);
- privateConfiguration(reference)->id = result; // Note: Id was not copied in copyConfig() function
- config = reference;
- activeConfig = reference;
- engine->changedSessionConfiguration(privateConfiguration(config));
-
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug()<<"Existing configuration"<<result<<"updated in manager in open";
-#endif
- }
- }
-
- emit quitPendingWaitsForOpened();
- }
-}
-
-void QNetworkSessionPrivateImpl::connectTimeout()
-{
- updateState(QNetworkSession::Disconnected);
- if (publicConfig.type() == QNetworkConfiguration::UserChoice)
- copyConfig(publicConfig, activeConfig);
- emit QNetworkSessionPrivate::error(QNetworkSession::UnknownSessionError);
-}
-
-void QNetworkSessionPrivateImpl::close()
-{
- if (m_connectRequestTimer.isActive())
- m_connectRequestTimer.stop();
-
- if (serviceConfig.isValid()) {
- lastError = QNetworkSession::OperationNotSupportedError;
- emit QNetworkSessionPrivate::error(lastError);
- } else if (isOpen) {
- if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
- // We will not wait any disconnect from icd as it might never come
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "closing session" << publicConfig.identifier();
-#endif
- state = QNetworkSession::Closing;
- emit stateChanged(state);
-
- // we fake a disconnection, session error is sent
- updateState(QNetworkSession::Disconnected);
-
- opened = false;
- isOpen = false;
-
- m_dbusInterface->call(ICD_DBUS_API_DISCONNECT_REQ, ICD_CONNECTION_FLAG_APPLICATION_EVENT);
- startTime = QDateTime();
- } else {
- opened = false;
- isOpen = false;
- emit closed();
- }
- }
-}
-
-
-void QNetworkSessionPrivateImpl::stop()
-{
- if (m_connectRequestTimer.isActive())
- m_connectRequestTimer.stop();
-
- if (serviceConfig.isValid()) {
- lastError = QNetworkSession::OperationNotSupportedError;
- emit QNetworkSessionPrivate::error(lastError);
- } else {
- if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "stopping session" << publicConfig.identifier();
-#endif
- state = QNetworkSession::Closing;
- emit stateChanged(state);
-
- // we fake a disconnection, a session error is sent also
- updateState(QNetworkSession::Disconnected);
-
- opened = false;
- isOpen = false;
-
- m_dbusInterface->call(ICD_DBUS_API_DISCONNECT_REQ, ICD_CONNECTION_FLAG_APPLICATION_EVENT);
- startTime = QDateTime();
- } else {
- opened = false;
- isOpen = false;
- emit closed();
- }
- }
-}
-
-void QNetworkSessionPrivateImpl::finishStopBySendingClosedSignal()
-{
- if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
- state = QNetworkSession::Connected;
- emit stateChanged(state);
- }
-
- emit closed();
-}
-
-void QNetworkSessionPrivateImpl::migrate()
-{
-}
-
-
-void QNetworkSessionPrivateImpl::accept()
-{
-}
-
-
-void QNetworkSessionPrivateImpl::ignore()
-{
-}
-
-
-void QNetworkSessionPrivateImpl::reject()
-{
-}
-
-#ifndef QT_NO_NETWORKINTERFACE
-QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
-{
- if (!publicConfig.isValid() || state != QNetworkSession::Connected)
- return QNetworkInterface();
-
- if (currentNetworkInterface.isEmpty())
- return QNetworkInterface();
-
- return QNetworkInterface::interfaceFromName(currentNetworkInterface);
-}
-#endif
-
-void QNetworkSessionPrivateImpl::setSessionProperty(const QString& key, const QVariant& value)
-{
- if (value.isValid()) {
- properties.insert(key, value);
-
- if (key == "ConnectInBackground") {
- bool v = value.toBool();
- if (v)
- connectFlags = ICD_CONNECTION_FLAG_APPLICATION_EVENT;
- else
- connectFlags = ICD_CONNECTION_FLAG_USER_EVENT;
- }
- } else {
- properties.remove(key);
-
- /* Set default value when property is removed */
- if (key == "ConnectInBackground")
- connectFlags = ICD_CONNECTION_FLAG_USER_EVENT;
- }
-}
-
-
-QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString& key) const
-{
- return properties.value(key);
-}
-
-
-QString QNetworkSessionPrivateImpl::errorString() const
-{
- QString errorStr;
- switch(q->error()) {
- case QNetworkSession::RoamingError:
- errorStr = QNetworkSessionPrivateImpl::tr("Roaming error");
- break;
- case QNetworkSession::SessionAbortedError:
- errorStr = QNetworkSessionPrivateImpl::tr("Session aborted by user or system");
- break;
- case QNetworkSession::InvalidConfigurationError:
- errorStr = QNetworkSessionPrivateImpl::tr("The specified configuration cannot be used.");
- break;
- default:
- case QNetworkSession::UnknownSessionError:
- errorStr = QNetworkSessionPrivateImpl::tr("Unidentified Error");
- break;
- }
- return errorStr;
-}
-
-
-QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
-{
- return QNetworkSession::UnknownSessionError;
-}
-
-void QNetworkSessionPrivateImpl::updateProxies(QNetworkSession::State newState)
-{
- if ((newState == QNetworkSession::Connected) &&
- (newState != currentState))
- updateProxyInformation();
- else if ((newState == QNetworkSession::Disconnected) &&
- (currentState == QNetworkSession::Closing))
- clearProxyInformation();
-
- currentState = newState;
-}
-
-
-void QNetworkSessionPrivateImpl::updateProxyInformation()
-{
- Maemo::ProxyConf::update();
-}
-
-
-void QNetworkSessionPrivateImpl::clearProxyInformation()
-{
- Maemo::ProxyConf::clear();
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h
deleted file mode 100644
index b47396b8e1..0000000000
--- a/src/plugins/bearer/icd/qnetworksession_impl.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSION_IMPL_H
-#define QNETWORKSESSION_IMPL_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of the QLibrary class. This header file may change from
-// version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtNetwork/private/qnetworksession_p.h>
-#include <QtNetwork/qnetworkconfigmanager.h>
-
-#include <QtCore/qdatetime.h>
-#include <QtCore/qtimer.h>
-#include <QtCore/quuid.h>
-
-#include <QtDBus/qdbusconnection.h>
-#include <QtDBus/qdbusinterface.h>
-#include <QtDBus/qdbusmessage.h>
-#include <QtDBus/qdbusmetatype.h>
-
-#include <icd/dbus_api.h>
-
-#ifndef QT_NO_BEARERMANAGEMENT
-
-QT_BEGIN_NAMESPACE
-
-class QIcdEngine;
-
-struct ICd2DetailsDBusStruct
-{
- QString serviceType;
- uint serviceAttributes;
- QString setviceId;
- QString networkType;
- uint networkAttributes;
- QByteArray networkId;
-};
-
-typedef QList<ICd2DetailsDBusStruct> ICd2DetailsList;
-
-class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
-{
- Q_OBJECT
-
-public:
- QNetworkSessionPrivateImpl(QIcdEngine *engine)
- : engine(engine),
- connectFlags(ICD_CONNECTION_FLAG_USER_EVENT),
- currentState(QNetworkSession::Invalid),
- m_asynchCallActive(false)
- {
- m_stopTimer.setSingleShot(true);
- connect(&m_stopTimer, SIGNAL(timeout()), this, SLOT(finishStopBySendingClosedSignal()));
-
- QDBusConnection systemBus = QDBusConnection::connectToBus(
- QDBusConnection::SystemBus,
- QUuid::createUuid().toString());
-
- m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE,
- systemBus,
- this);
-
- systemBus.connect(ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_CONNECT_SIG,
- this,
- SLOT(stateChange(const QDBusMessage&)));
-
- qDBusRegisterMetaType<ICd2DetailsDBusStruct>();
- qDBusRegisterMetaType<ICd2DetailsList>();
-
- m_connectRequestTimer.setSingleShot(true);
- connect(&m_connectRequestTimer, SIGNAL(timeout()), this, SLOT(connectTimeout()));
- }
-
- ~QNetworkSessionPrivateImpl()
- {
- cleanupSession();
-
- QDBusConnection::disconnectFromBus(m_dbusInterface->connection().name());
- }
-
- //called by QNetworkSession constructor and ensures
- //that the state is immediately updated (w/o actually opening
- //a session). Also this function should take care of
- //notification hooks to discover future state changes.
- void syncStateWithInterface();
-
-#ifndef QT_NO_NETWORKINTERFACE
- QNetworkInterface currentInterface() const;
-#endif
- QVariant sessionProperty(const QString& key) const;
- void setSessionProperty(const QString& key, const QVariant& value);
-
- void open();
- void close();
- void stop();
-
- void migrate();
- void accept();
- void ignore();
- void reject();
-
- QString errorString() const; //must return translated string
- QNetworkSession::SessionError error() const;
-
- quint64 bytesWritten() const;
- quint64 bytesReceived() const;
- quint64 activeTime() const;
-
-private:
- void updateStateFromServiceNetwork();
- void updateStateFromActiveConfig();
-
-private Q_SLOTS:
- void do_open();
- void networkConfigurationsChanged();
- void iapStateChanged(const QString& iapid, uint icd_connection_state);
- void updateProxies(QNetworkSession::State newState);
- void finishStopBySendingClosedSignal();
- void stateChange(const QDBusMessage& rep);
- void connectTimeout();
-
-private:
- QNetworkConfigurationManager manager;
- QIcdEngine *engine;
-
- struct Statistics {
- quint64 txData;
- quint64 rxData;
- quint64 activeTime;
- };
-
- // The config set on QNetworkSession.
- QNetworkConfiguration config;
-
- QNetworkConfiguration& copyConfig(QNetworkConfiguration &fromConfig, QNetworkConfiguration &toConfig, bool deepCopy = true);
- void clearConfiguration(QNetworkConfiguration &config);
-
- bool opened;
- icd_connection_flags connectFlags;
-
- QNetworkSession::SessionError lastError;
-
- QDateTime startTime;
- QString currentNetworkInterface;
- friend class IcdListener;
- void updateState(QNetworkSession::State);
- void updateIdentifier(const QString &newId);
- Statistics getStatistics() const;
- void cleanupSession(void);
-
- void updateProxyInformation();
- void clearProxyInformation();
- QNetworkSession::State currentState;
-
- QDBusInterface *m_dbusInterface;
-
- QTimer m_stopTimer;
-
- bool m_asynchCallActive;
- QTimer m_connectRequestTimer;
-};
-
-// Marshall the ICd2DetailsDBusStruct data into a D-Bus argument
-QDBusArgument &operator<<(QDBusArgument &argument, const ICd2DetailsDBusStruct &icd2);
-
-// Retrieve the ICd2DetailsDBusStruct data from the D-Bus argument
-const QDBusArgument &operator>>(const QDBusArgument &argument, ICd2DetailsDBusStruct &icd2);
-
-Q_DECLARE_METATYPE(ICd2DetailsDBusStruct);
-Q_DECLARE_METATYPE(ICd2DetailsList);
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_BEARERMANAGEMENT
-
-#endif //QNETWORKSESSIONPRIVATE_H
-
diff --git a/src/plugins/bearer/icd/wlan-utils.h b/src/plugins/bearer/icd/wlan-utils.h
deleted file mode 100644
index b98ee7e64c..0000000000
--- a/src/plugins/bearer/icd/wlan-utils.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef WLAN_UTILS_H
-#define WLAN_UTILS_H
-
-/** Originally taken from: libicd-network-wlan-dev.h*/
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <wlancond.h>
-#include <icd/network_api_defines.h>
-
-/* capability bits inside network attributes var */
-#define NWATTR_WPS_MASK 0x0000F000
-#define NWATTR_ALGORITHM_MASK 0x00000F00
-#define NWATTR_WPA2_MASK 0x00000080
-#define NWATTR_METHOD_MASK 0x00000078
-#define NWATTR_MODE_MASK 0x00000007
-
-#define CAP_LOCALMASK 0x0FFFE008
-
-/* how much to shift between capability and network attributes var */
-#define CAP_SHIFT_WPS 3
-#define CAP_SHIFT_ALGORITHM 20
-#define CAP_SHIFT_WPA2 1
-#define CAP_SHIFT_METHOD 1
-#define CAP_SHIFT_MODE 0
-#define CAP_SHIFT_ALWAYS_ONLINE 26
-
-/* ------------------------------------------------------------------------- */
-/* From combined to capability */
-static inline dbus_uint32_t nwattr2cap(guint nwattrs, dbus_uint32_t *cap)
-{
- guint oldval = *cap;
-
- *cap &= CAP_LOCALMASK; /* clear old capabilities */
- *cap |=
- ((nwattrs & ICD_NW_ATTR_ALWAYS_ONLINE) >> CAP_SHIFT_ALWAYS_ONLINE) |
- ((nwattrs & NWATTR_WPS_MASK) >> CAP_SHIFT_WPS) |
- ((nwattrs & NWATTR_ALGORITHM_MASK) << CAP_SHIFT_ALGORITHM) |
- ((nwattrs & NWATTR_WPA2_MASK) << CAP_SHIFT_WPA2) |
- ((nwattrs & NWATTR_METHOD_MASK) << CAP_SHIFT_METHOD) |
- (nwattrs & NWATTR_MODE_MASK);
-
- return oldval;
-}
-
-
-/* ------------------------------------------------------------------------- */
-/* From capability to combined */
-static inline guint cap2nwattr(dbus_uint32_t cap, guint *nwattrs)
-{
- guint oldval = *nwattrs;
-
- *nwattrs &= ~ICD_NW_ATTR_LOCALMASK; /* clear old capabilities */
- *nwattrs |=
-#ifdef WLANCOND_WPS_MASK
- ((cap & WLANCOND_WPS_MASK) << CAP_SHIFT_WPS) |
-#endif
- ((cap & (WLANCOND_ENCRYPT_ALG_MASK |
- WLANCOND_ENCRYPT_GROUP_ALG_MASK)) >> CAP_SHIFT_ALGORITHM)|
- ((cap & WLANCOND_ENCRYPT_WPA2_MASK) >> CAP_SHIFT_WPA2) |
- ((cap & WLANCOND_ENCRYPT_METHOD_MASK) >> CAP_SHIFT_METHOD) |
- (cap & WLANCOND_MODE_MASK);
-
- return oldval;
-}
-
-
-#endif
diff --git a/src/plugins/bearer/nativewifi/main.cpp b/src/plugins/bearer/nativewifi/main.cpp
index ce7d9063c2..5e9fb6ed7d 100644
--- a/src/plugins/bearer/nativewifi/main.cpp
+++ b/src/plugins/bearer/nativewifi/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/nativewifi/platformdefs.h b/src/plugins/bearer/nativewifi/platformdefs.h
index 41ff30a165..62ea55c6b2 100644
--- a/src/plugins/bearer/nativewifi/platformdefs.h
+++ b/src/plugins/bearer/nativewifi/platformdefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
index 48f5536eda..6bde5d46de 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.h b/src/plugins/bearer/nativewifi/qnativewifiengine.h
index c38b43ad97..2307538028 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.h
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/main.cpp b/src/plugins/bearer/networkmanager/main.cpp
index 5377bb0d58..01932429b1 100644
--- a/src/plugins/bearer/networkmanager/main.cpp
+++ b/src/plugins/bearer/networkmanager/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 43c1d28c9b..dd845314f5 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index 24c170d52f..445c316627 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
index 8ca94b97d8..126d3da891 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
index e8fd0d0284..2c2f35a06c 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
index e66be4c51a..86b6376ca7 100644
--- a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
+++ b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.h b/src/plugins/bearer/networkmanager/qnmdbushelper.h
index 0b84c5153a..93f141b7a6 100644
--- a/src/plugins/bearer/networkmanager/qnmdbushelper.h
+++ b/src/plugins/bearer/networkmanager/qnmdbushelper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/nla/main.cpp b/src/plugins/bearer/nla/main.cpp
index 963fbaa1df..e70a3e381e 100644
--- a/src/plugins/bearer/nla/main.cpp
+++ b/src/plugins/bearer/nla/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp
index c155623140..a9ee4b4bb3 100644
--- a/src/plugins/bearer/nla/qnlaengine.cpp
+++ b/src/plugins/bearer/nla/qnlaengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/nla/qnlaengine.h b/src/plugins/bearer/nla/qnlaengine.h
index 72b3db8241..c0b6311f7d 100644
--- a/src/plugins/bearer/nla/qnlaengine.h
+++ b/src/plugins/bearer/nla/qnlaengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/platformdefs_win.h b/src/plugins/bearer/platformdefs_win.h
index 1d8a8426e1..a4c9bac11b 100644
--- a/src/plugins/bearer/platformdefs_win.h
+++ b/src/plugins/bearer/platformdefs_win.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/qbearerengine_impl.h b/src/plugins/bearer/qbearerengine_impl.h
index 6a61c1bee0..01bce7bf72 100644
--- a/src/plugins/bearer/qbearerengine_impl.h
+++ b/src/plugins/bearer/qbearerengine_impl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index 4a14dcc990..ab0c44321e 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index a15ef9a44b..e022c7b7d2 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/cn/cn.pro b/src/plugins/codecs/cn/cn.pro
index fc2e94b5a6..11a3dd0e6c 100644
--- a/src/plugins/codecs/cn/cn.pro
+++ b/src/plugins/codecs/cn/cn.pro
@@ -12,5 +12,3 @@ SOURCES = qgb18030codec.cpp \
target.path += $$[QT_INSTALL_PLUGINS]/codecs
INSTALLS += target
-
-symbian:TARGET.UID3=0x2001E615
diff --git a/src/plugins/codecs/cn/main.cpp b/src/plugins/codecs/cn/main.cpp
index 11be817289..fb1e61a451 100644
--- a/src/plugins/codecs/cn/main.cpp
+++ b/src/plugins/codecs/cn/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/cn/qgb18030codec.cpp b/src/plugins/codecs/cn/qgb18030codec.cpp
index e647c5e78a..28d42e0983 100644
--- a/src/plugins/codecs/cn/qgb18030codec.cpp
+++ b/src/plugins/codecs/cn/qgb18030codec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/cn/qgb18030codec.h b/src/plugins/codecs/cn/qgb18030codec.h
index 4aacc42c8e..492f59b295 100644
--- a/src/plugins/codecs/cn/qgb18030codec.h
+++ b/src/plugins/codecs/cn/qgb18030codec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/jp.pro b/src/plugins/codecs/jp/jp.pro
index 834ca31ad6..f2e51cd57d 100644
--- a/src/plugins/codecs/jp/jp.pro
+++ b/src/plugins/codecs/jp/jp.pro
@@ -23,5 +23,3 @@ unix {
target.path += $$[QT_INSTALL_PLUGINS]/codecs
INSTALLS += target
-
-symbian:TARGET.UID3=0x2001E614
diff --git a/src/plugins/codecs/jp/main.cpp b/src/plugins/codecs/jp/main.cpp
index 2891f55671..e4b22935db 100644
--- a/src/plugins/codecs/jp/main.cpp
+++ b/src/plugins/codecs/jp/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qeucjpcodec.cpp b/src/plugins/codecs/jp/qeucjpcodec.cpp
index 1154f443c4..4ff555220b 100644
--- a/src/plugins/codecs/jp/qeucjpcodec.cpp
+++ b/src/plugins/codecs/jp/qeucjpcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qeucjpcodec.h b/src/plugins/codecs/jp/qeucjpcodec.h
index e40ba9506c..af02ed95e4 100644
--- a/src/plugins/codecs/jp/qeucjpcodec.h
+++ b/src/plugins/codecs/jp/qeucjpcodec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qfontjpcodec.cpp b/src/plugins/codecs/jp/qfontjpcodec.cpp
index e73f67801b..8c9d78087c 100644
--- a/src/plugins/codecs/jp/qfontjpcodec.cpp
+++ b/src/plugins/codecs/jp/qfontjpcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qfontjpcodec.h b/src/plugins/codecs/jp/qfontjpcodec.h
index 37940440db..1f577498fb 100644
--- a/src/plugins/codecs/jp/qfontjpcodec.h
+++ b/src/plugins/codecs/jp/qfontjpcodec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qjiscodec.cpp b/src/plugins/codecs/jp/qjiscodec.cpp
index e9b3691174..99c756e859 100644
--- a/src/plugins/codecs/jp/qjiscodec.cpp
+++ b/src/plugins/codecs/jp/qjiscodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qjiscodec.h b/src/plugins/codecs/jp/qjiscodec.h
index eabbeca786..aaf02a90d0 100644
--- a/src/plugins/codecs/jp/qjiscodec.h
+++ b/src/plugins/codecs/jp/qjiscodec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qjpunicode.cpp b/src/plugins/codecs/jp/qjpunicode.cpp
index 8e1c5e52c7..feb0f410c1 100644
--- a/src/plugins/codecs/jp/qjpunicode.cpp
+++ b/src/plugins/codecs/jp/qjpunicode.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qjpunicode.h b/src/plugins/codecs/jp/qjpunicode.h
index a0ff5a453e..069f49a137 100644
--- a/src/plugins/codecs/jp/qjpunicode.h
+++ b/src/plugins/codecs/jp/qjpunicode.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qsjiscodec.cpp b/src/plugins/codecs/jp/qsjiscodec.cpp
index 2a732ffc42..ac89b333c4 100644
--- a/src/plugins/codecs/jp/qsjiscodec.cpp
+++ b/src/plugins/codecs/jp/qsjiscodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/jp/qsjiscodec.h b/src/plugins/codecs/jp/qsjiscodec.h
index e61cc9136c..c56a103366 100644
--- a/src/plugins/codecs/jp/qsjiscodec.h
+++ b/src/plugins/codecs/jp/qsjiscodec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/kr/cp949codetbl.h b/src/plugins/codecs/kr/cp949codetbl.h
index f54db8dc3f..25723c7999 100644
--- a/src/plugins/codecs/kr/cp949codetbl.h
+++ b/src/plugins/codecs/kr/cp949codetbl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,6 +39,9 @@
**
****************************************************************************/
+#ifndef CP949CODETBL_H
+#define CP494CODETBL_H
+
static const unsigned short cp949_icode_to_unicode[] = {
0xac02, 0xac03, 0xac05, 0xac06, 0xac0b, 0xac0c, 0xac0d, 0xac0e, 0xac0f, 0xac18, 0xac1e, 0xac1f, 0xac21, 0xac22, 0xac23,
0xac25, 0xac26, 0xac27, 0xac28, 0xac29, 0xac2a, 0xac2b, 0xac2e, 0xac32, 0xac33, 0xac34, 0xac35, 0xac36, 0xac37, 0xac3a,
@@ -630,3 +633,5 @@ static const unsigned short cp949_icode_to_unicode[] = {
0xd78e, 0xd78f, 0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, 0xd797, 0xd79a, 0xd79c, 0xd79e, 0xd79f, 0xd7a0, 0xd7a1,
0xd7a2, 0xd7a3
};
+
+#endif // CP494CODETBL_H
diff --git a/src/plugins/codecs/kr/kr.pro b/src/plugins/codecs/kr/kr.pro
index f5aea6554f..6c0ea3d415 100644
--- a/src/plugins/codecs/kr/kr.pro
+++ b/src/plugins/codecs/kr/kr.pro
@@ -16,5 +16,3 @@ wince*: {
target.path += $$[QT_INSTALL_PLUGINS]/codecs
INSTALLS += target
-
-symbian:TARGET.UID3=0x2001B2E5
diff --git a/src/plugins/codecs/kr/main.cpp b/src/plugins/codecs/kr/main.cpp
index 683dee3f74..16c49b6eea 100644
--- a/src/plugins/codecs/kr/main.cpp
+++ b/src/plugins/codecs/kr/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/kr/qeuckrcodec.cpp b/src/plugins/codecs/kr/qeuckrcodec.cpp
index ec6395adeb..979b9bb8bc 100644
--- a/src/plugins/codecs/kr/qeuckrcodec.cpp
+++ b/src/plugins/codecs/kr/qeuckrcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/kr/qeuckrcodec.h b/src/plugins/codecs/kr/qeuckrcodec.h
index 0a86c274e8..d5be33e74b 100644
--- a/src/plugins/codecs/kr/qeuckrcodec.h
+++ b/src/plugins/codecs/kr/qeuckrcodec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/tw/main.cpp b/src/plugins/codecs/tw/main.cpp
index cb2792f232..159752cc26 100644
--- a/src/plugins/codecs/tw/main.cpp
+++ b/src/plugins/codecs/tw/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/tw/qbig5codec.cpp b/src/plugins/codecs/tw/qbig5codec.cpp
index 9ec7c75220..f337dd8d8a 100644
--- a/src/plugins/codecs/tw/qbig5codec.cpp
+++ b/src/plugins/codecs/tw/qbig5codec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/tw/qbig5codec.h b/src/plugins/codecs/tw/qbig5codec.h
index 495e378ef5..c5b649ef6f 100644
--- a/src/plugins/codecs/tw/qbig5codec.h
+++ b/src/plugins/codecs/tw/qbig5codec.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/codecs/tw/tw.pro b/src/plugins/codecs/tw/tw.pro
index f76cba4dbc..d63876c5d8 100644
--- a/src/plugins/codecs/tw/tw.pro
+++ b/src/plugins/codecs/tw/tw.pro
@@ -12,5 +12,3 @@ SOURCES = qbig5codec.cpp \
target.path += $$[QT_INSTALL_PLUGINS]/codecs
INSTALLS += target
-
-symbian:TARGET.UID3=0x2001B2E4
diff --git a/src/plugins/generic/linuxinput/main.cpp b/src/plugins/generic/linuxinput/main.cpp
index 20391901bf..d86fa12543 100644
--- a/src/plugins/generic/linuxinput/main.cpp
+++ b/src/plugins/generic/linuxinput/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/generic/linuxinput/qlinuxinput.cpp b/src/plugins/generic/linuxinput/qlinuxinput.cpp
index 943b213ce0..497ae7d3bf 100644
--- a/src/plugins/generic/linuxinput/qlinuxinput.cpp
+++ b/src/plugins/generic/linuxinput/qlinuxinput.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/generic/linuxinput/qlinuxinput.h b/src/plugins/generic/linuxinput/qlinuxinput.h
index b9475a1bf5..9f35397fd3 100644
--- a/src/plugins/generic/linuxinput/qlinuxinput.h
+++ b/src/plugins/generic/linuxinput/qlinuxinput.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/generic/touchscreen/README b/src/plugins/generic/touchscreen/README
index bed9016329..ac73f5f147 100644
--- a/src/plugins/generic/touchscreen/README
+++ b/src/plugins/generic/touchscreen/README
@@ -1,6 +1,8 @@
-Generic plug-in for evdev touch events
+Generic plug-in for evdev touch events.
-(a) Using as a QPA generic plug-in
+Tested with the following drivers: bcm5974, hid_magicmouse.
+
+(1) Using as a QPA generic plug-in
1. set up and connect the touch device
2. install libudev-dev or similar
@@ -18,26 +20,26 @@ screen. If this is not desired, pass force_window in the plugin
specification as shown in the example above. This will cause mapping
the touch surface to the active window instead.
-Only touch events are generated, mouse events are not. This is because
-on desktop the touch device will usually act as a single-point mouse
-replacement by default. For embedded systems the code could to be
-extended to generate also mouse events (by calling handleMouseEvent
-for the primary touch point for example).
+Only touch events are generated, mouse events are not. Be aware however
+that ignored touch events will generate a mouse event from the first
+touch point by default. See AA_SynthesizeMouseForUnhandledTouchEvents.
-(b) Using in a compositor
+(2) Using in a compositor
The classes (QTouchScreenHandler, QTouchScreenHandlerThread) are also
suitable for direct inclusion into an application, e.g. a Wayland
-compositor. The compositor will then usually register its own
+compositor. The compositor may then register its own
QTouchScreenObserver because relying on the QTouchEvents generated by
-the QPA event sender is often not satisfactory, as some low-level
-details may get lost, and due to performance reasons.
-
+the QPA event sender may not always be satisfactory as some low-level
+details get lost, and due to performance reasons.
-Known issues:
+(3) Possible issues and solutions
The udev rule matches any touchpad device. If there are multiple ones,
specify the device as described above.
-If no evdev events are read, remove 50-synaptics.conf from
-/usr/share/X11/xorg.conf.d and restart X.
+If no evdev events are read, remove 50-synaptics.conf (or similar)
+from /usr/share/X11/xorg.conf.d and restart X. Or at least temporarily
+disable the device by running xinput set-prop <device> <device enabled
+property> 0. Use xinput list and xinput list-props to figure out the
+values.
diff --git a/src/plugins/generic/touchscreen/main.cpp b/src/plugins/generic/touchscreen/main.cpp
index ff476d1648..8ecd924950 100644
--- a/src/plugins/generic/touchscreen/main.cpp
+++ b/src/plugins/generic/touchscreen/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
index 08db058e10..ced72e1599 100644
--- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
+++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -47,8 +47,6 @@
QT_BEGIN_NAMESPACE
-//#define POINT_DEBUG
-
QTouchEventSenderQPA::QTouchEventSenderQPA(const QString &spec)
{
m_forceToActiveWindow = spec.split(QLatin1Char(':')).contains(QLatin1String("force_window"));
@@ -58,16 +56,25 @@ QTouchEventSenderQPA::QTouchEventSenderQPA(const QString &spec)
QWindowSystemInterface::registerTouchDevice(m_device);
}
-void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int y_max)
+void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int y_max,
+ int pressure_min, int pressure_max,
+ const QString &dev_name)
{
hw_range_x_min = x_min;
hw_range_x_max = x_max;
hw_range_y_min = y_min;
hw_range_y_max = y_max;
+
+ hw_pressure_min = pressure_min;
+ hw_pressure_max = pressure_max;
+
+ m_device->setName(dev_name);
+
+ if (hw_pressure_max > hw_pressure_min)
+ m_device->setCapabilities(m_device->capabilities() | QTouchDevice::Pressure);
}
-void QTouchEventSenderQPA::touch_point(QEvent::Type state,
- const QList<QWindowSystemInterface::TouchPoint> &points)
+void QTouchEventSenderQPA::touch_point(const QList<QWindowSystemInterface::TouchPoint> &points)
{
QRect winRect;
if (m_forceToActiveWindow) {
@@ -79,35 +86,31 @@ void QTouchEventSenderQPA::touch_point(QEvent::Type state,
winRect = QGuiApplication::primaryScreen()->geometry();
}
-#ifdef POINT_DEBUG
- qDebug() << "QPA: Mapping" << points.size() << "points to" << winRect << state;
-#endif
+ const int hw_w = hw_range_x_max - hw_range_x_min;
+ const int hw_h = hw_range_y_max - hw_range_y_min;
QList<QWindowSystemInterface::TouchPoint> touchPoints = points;
- // Translate the coordinates and set the normalized position. QPA expects
- // 'area' to be in screen coordinates, while the device reports them in its
- // own system with (0, 0) being the center point of the device.
+ // Map the coordinates based on the normalized position. QPA expects 'area'
+ // to be in screen coordinates.
for (int i = 0; i < touchPoints.size(); ++i) {
QWindowSystemInterface::TouchPoint &tp(touchPoints[i]);
- const int hw_w = hw_range_x_max - hw_range_x_min;
- const int hw_h = hw_range_y_max - hw_range_y_min;
-
- qreal nx = tp.normalPosition.x();
- qreal ny = tp.normalPosition.y();
-
- // Generate a screen position that is always inside the active window or the default screen.
- const int wx = winRect.left() + int(nx * winRect.width());
- const int wy = winRect.top() + int(ny * winRect.height());
+ // Generate a screen position that is always inside the active window
+ // or the primary screen.
+ const int wx = winRect.left() + int(tp.normalPosition.x() * winRect.width());
+ const int wy = winRect.top() + int(tp.normalPosition.y() * winRect.height());
const qreal sizeRatio = (winRect.width() + winRect.height()) / qreal(hw_w + hw_h);
- tp.area = QRect(wx, wy, tp.area.width() * sizeRatio, tp.area.height() * sizeRatio);
+ tp.area = QRect(0, 0, tp.area.width() * sizeRatio, tp.area.height() * sizeRatio);
+ tp.area.moveCenter(QPoint(wx, wy));
-#ifdef POINT_DEBUG
- qDebug() << " " << i << tp.area << tp.state << tp.id << tp.isPrimary << tp.pressure;
-#endif
+ // Calculate normalized pressure.
+ if (!hw_pressure_min && !hw_pressure_max)
+ tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1;
+ else
+ tp.pressure = (tp.pressure - hw_pressure_min) / qreal(hw_pressure_max - hw_pressure_min);
}
- QWindowSystemInterface::handleTouchEvent(0, state, m_device, touchPoints);
+ QWindowSystemInterface::handleTouchEvent(0, m_device, touchPoints);
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h
index b6e1613b24..1eee273159 100644
--- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h
+++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,8 +54,9 @@ class QTouchEventSenderQPA : public QTouchScreenObserver
{
public:
QTouchEventSenderQPA(const QString &spec = QString());
- void touch_configure(int x_min, int x_max, int y_min, int y_max);
- void touch_point(QEvent::Type state, const QList<QWindowSystemInterface::TouchPoint> &points);
+ void touch_configure(int x_min, int x_max, int y_min, int y_max,
+ int pressure_min, int pressure_max, const QString &dev_name);
+ void touch_point(const QList<QWindowSystemInterface::TouchPoint> &points);
private:
bool m_forceToActiveWindow;
@@ -63,6 +64,9 @@ private:
int hw_range_x_max;
int hw_range_y_min;
int hw_range_y_max;
+ int hw_pressure_min;
+ int hw_pressure_max;
+ QString hw_dev_name;
QTouchDevice *m_device;
};
diff --git a/src/plugins/generic/touchscreen/qtouchscreen.cpp b/src/plugins/generic/touchscreen/qtouchscreen.cpp
index fd2de62d6b..8f37bab0c4 100644
--- a/src/plugins/generic/touchscreen/qtouchscreen.cpp
+++ b/src/plugins/generic/touchscreen/qtouchscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,28 +41,23 @@
#include "qtouchscreen.h"
#include <QStringList>
+#include <QHash>
#include <QSocketNotifier>
-#include <QDebug>
#include <QtCore/private/qcore_unix_p.h>
#include <linux/input.h>
#include <libudev.h>
QT_BEGIN_NAMESPACE
-//#define POINT_DEBUG
-
class QTouchScreenData
{
public:
QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList &args);
void processInputEvent(input_event *data);
-
- void dump();
+ void assignIds();
QTouchScreenHandler *q;
- QEvent::Type m_state;
- QEvent::Type m_prevState;
int m_lastEventType;
QList<QWindowSystemInterface::TouchPoint> m_touchPoints;
@@ -71,17 +66,24 @@ public:
int x;
int y;
int maj;
+ int pressure;
Qt::TouchPointState state;
- bool primary;
- Contact() : trackingId(0), x(0), y(0), maj(1), state(Qt::TouchPointPressed), primary(false) { }
+ QTouchEvent::TouchPoint::InfoFlags flags;
+ Contact() : trackingId(-1),
+ x(0), y(0), maj(1), pressure(0),
+ state(Qt::TouchPointPressed), flags(0) { }
};
- QMap<int, Contact> m_contacts, m_lastContacts;
+ QHash<int, Contact> m_contacts, m_lastContacts;
Contact m_currentData;
+ int findClosestContact(const QHash<int, Contact> &contacts, int x, int y, int *dist);
+
int hw_range_x_min;
int hw_range_x_max;
int hw_range_y_min;
int hw_range_y_max;
+ int hw_pressure_min;
+ int hw_pressure_max;
QString hw_name;
QList<QTouchScreenObserver *> m_observers;
@@ -89,11 +91,10 @@ public:
QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList &args)
: q(q_ptr),
- m_state(QEvent::TouchBegin),
- m_prevState(m_state),
m_lastEventType(-1),
hw_range_x_min(0), hw_range_x_max(0),
- hw_range_y_min(0), hw_range_y_max(0)
+ hw_range_y_min(0), hw_range_y_max(0),
+ hw_pressure_min(0), hw_pressure_max(0)
{
Q_UNUSED(args);
}
@@ -101,7 +102,7 @@ QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList
QTouchScreenHandler::QTouchScreenHandler(const QString &spec)
: m_notify(0), m_fd(-1), d(0)
{
- setObjectName(QLatin1String("LinuxInputSubsystem Touch Handler"));
+ setObjectName(QLatin1String("Linux Touch Handler"));
QString dev = QLatin1String("/dev/input/event5");
try_udev(&dev);
@@ -126,16 +127,23 @@ QTouchScreenHandler::QTouchScreenHandler(const QString &spec)
input_absinfo absInfo;
memset(&absInfo, 0, sizeof(input_absinfo));
- if (!ioctl(m_fd, EVIOCGABS(ABS_X), &absInfo) >= 0) {
+ if (ioctl(m_fd, EVIOCGABS(ABS_MT_POSITION_X), &absInfo) >= 0) {
qDebug("min X: %d max X: %d", absInfo.minimum, absInfo.maximum);
d->hw_range_x_min = absInfo.minimum;
d->hw_range_x_max = absInfo.maximum;
}
- if (!ioctl(m_fd, EVIOCGABS(ABS_Y), &absInfo) >= 0) {
+ if (ioctl(m_fd, EVIOCGABS(ABS_MT_POSITION_Y), &absInfo) >= 0) {
qDebug("min Y: %d max Y: %d", absInfo.minimum, absInfo.maximum);
d->hw_range_y_min = absInfo.minimum;
d->hw_range_y_max = absInfo.maximum;
}
+ if (ioctl(m_fd, EVIOCGABS(ABS_PRESSURE), &absInfo) >= 0) {
+ qDebug("min pressure: %d max pressure: %d", absInfo.minimum, absInfo.maximum);
+ if (absInfo.maximum > absInfo.minimum) {
+ d->hw_pressure_min = absInfo.minimum;
+ d->hw_pressure_max = absInfo.maximum;
+ }
+ }
char name[1024];
if (ioctl(m_fd, EVIOCGNAME(sizeof(name) - 1), name) >= 0) {
d->hw_name = QString::fromLocal8Bit(name);
@@ -157,11 +165,14 @@ void QTouchScreenHandler::addObserver(QTouchScreenObserver *observer)
return;
d->m_observers.append(observer);
observer->touch_configure(d->hw_range_x_min, d->hw_range_x_max,
- d->hw_range_y_min, d->hw_range_y_max);
+ d->hw_range_y_min, d->hw_range_y_max,
+ d->hw_pressure_min, d->hw_pressure_max,
+ d->hw_name);
}
void QTouchScreenHandler::try_udev(QString *path)
{
+ *path = QString();
udev *u = udev_new();
udev_enumerate *ue = udev_enumerate_new(u);
udev_enumerate_add_match_subsystem(ue, "input");
@@ -171,9 +182,10 @@ void QTouchScreenHandler::try_udev(QString *path)
udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(ue)) {
const char *syspath = udev_list_entry_get_name(entry);
udev_device *udevice = udev_device_new_from_syspath(u, syspath);
- *path = QString::fromLocal8Bit(udev_device_get_devnode(udevice));
- qDebug("from udev: %s", qPrintable(*path));
+ QString candidate = QString::fromLocal8Bit(udev_device_get_devnode(udevice));
udev_device_unref(udevice);
+ if (path->isEmpty() && candidate.startsWith("/dev/input/event"))
+ *path = candidate;
}
udev_enumerate_unref(ue);
udev_unref(u);
@@ -213,136 +225,148 @@ void QTouchScreenData::processInputEvent(input_event *data)
{
if (data->type == EV_ABS) {
- if (data->code == ABS_MT_POSITION_X) {
- m_currentData.x = data->value;
- } else if (data->code == ABS_MT_POSITION_Y) {
- m_currentData.y = data->value;
- } else if (data->code == ABS_MT_TRACKING_ID) {
- m_currentData.trackingId = data->value;
- m_currentData.primary = m_contacts.isEmpty();
- } else if (data->code == ABS_MT_TOUCH_MAJOR) {
- m_currentData.maj = data->value;
- if (data->value == 0)
- m_currentData.state = Qt::TouchPointReleased;
- }
+ if (data->code == ABS_MT_POSITION_X) {
+ m_currentData.x = qBound(hw_range_x_min, data->value, hw_range_x_max);
+ } else if (data->code == ABS_MT_POSITION_Y) {
+ m_currentData.y = qBound(hw_range_y_min, data->value, hw_range_y_max);
+ } else if (data->code == ABS_MT_TRACKING_ID) {
+ m_currentData.trackingId = data->value;
+ } else if (data->code == ABS_MT_TOUCH_MAJOR) {
+ m_currentData.maj = data->value;
+ if (data->value == 0)
+ m_currentData.state = Qt::TouchPointReleased;
+ } else if (data->code == ABS_PRESSURE) {
+ m_currentData.pressure = qBound(hw_pressure_min, data->value, hw_pressure_max);
+ }
} else if (data->type == EV_SYN && data->code == SYN_MT_REPORT && m_lastEventType != EV_SYN) {
- m_contacts.insert(m_currentData.trackingId, m_currentData);
+ // If there is no tracking id, one will be generated later.
+ // Until that use a temporary key.
+ int key = m_currentData.trackingId;
+ if (key == -1)
+ key = m_contacts.count();
+
+ m_contacts.insert(key, m_currentData);
m_currentData = Contact();
} else if (data->type == EV_SYN && data->code == SYN_REPORT) {
+ // Ensure valid IDs even when the driver does not report ABS_MT_TRACKING_ID.
+ if (!m_contacts.isEmpty() && m_contacts.constBegin().value().trackingId == -1)
+ assignIds();
+
m_touchPoints.clear();
- for (QMap<int, Contact>::iterator it = m_contacts.begin(), ite = m_contacts.end();
- it != ite; ++it) {
+ Qt::TouchPointStates combinedStates;
+ QMutableHashIterator<int, Contact> it(m_contacts);
+ while (it.hasNext()) {
+ it.next();
QWindowSystemInterface::TouchPoint tp;
- tp.id = it->trackingId;
- tp.isPrimary = it->primary;
- tp.pressure = it->state == Qt::TouchPointReleased ? 0 : 1;
+ Contact &contact(it.value());
+ tp.id = contact.trackingId;
+ tp.flags = contact.flags;
- if (m_lastContacts.contains(it->trackingId)) {
- const Contact &prev(m_lastContacts.value(it->trackingId));
- if (it->state == Qt::TouchPointReleased) {
+ if (m_lastContacts.contains(contact.trackingId)) {
+ const Contact &prev(m_lastContacts.value(contact.trackingId));
+ if (contact.state == Qt::TouchPointReleased) {
// Copy over the previous values for released points, just in case.
- it->x = prev.x;
- it->y = prev.y;
- it->maj = prev.maj;
+ contact.x = prev.x;
+ contact.y = prev.y;
+ contact.maj = prev.maj;
} else {
- it->state = (prev.x == it->x && prev.y == it->y) ? Qt::TouchPointStationary : Qt::TouchPointMoved;
+ contact.state = (prev.x == contact.x && prev.y == contact.y)
+ ? Qt::TouchPointStationary : Qt::TouchPointMoved;
}
}
- tp.state = it->state;
- tp.area = QRectF(it->x, it->y, it->maj, it->maj);
+ // Avoid reporting a contact in released state more than once.
+ if (contact.state == Qt::TouchPointReleased
+ && !m_lastContacts.contains(contact.trackingId)) {
+ it.remove();
+ continue;
+ }
+
+ tp.state = contact.state;
+ combinedStates |= tp.state;
+
+ // Store the HW coordinates. Observers can then map it to screen space or something else.
+ tp.area = QRectF(0, 0, contact.maj, contact.maj);
+ tp.area.moveCenter(QPoint(contact.x, contact.y));
+ tp.pressure = contact.pressure;
- // Translate so that (0, 0) is the top-left corner.
- const int hw_x = qBound(hw_range_x_min, int(tp.area.left()), hw_range_x_max) - hw_range_x_min;
- const int hw_y = qBound(hw_range_y_min, int(tp.area.top()), hw_range_y_max) - hw_range_y_min;
// Get a normalized position in range 0..1.
- const int hw_w = hw_range_x_max - hw_range_x_min;
- const int hw_h = hw_range_y_max - hw_range_y_min;
- tp.normalPosition = QPointF(hw_x / qreal(hw_w),
- hw_y / qreal(hw_h));
+ tp.normalPosition = QPointF((contact.x - hw_range_x_min) / qreal(hw_range_x_max - hw_range_x_min),
+ (contact.y - hw_range_y_min) / qreal(hw_range_y_max - hw_range_y_min));
m_touchPoints.append(tp);
- }
- if (m_contacts.isEmpty())
- m_state = QEvent::TouchEnd;
+ if (contact.state == Qt::TouchPointReleased)
+ it.remove();
+ }
m_lastContacts = m_contacts;
m_contacts.clear();
- // No need to deliver if all points are stationary.
- bool skip = false;
- if (m_state == QEvent::TouchUpdate) {
- skip = true;
- for (int i = 0; i < m_touchPoints.count(); ++i)
- if (m_touchPoints.at(i).state != Qt::TouchPointStationary) {
- skip = false;
- break;
- }
- }
-
-#ifdef POINT_DEBUG
- dump();
-#endif
-
- if (!skip && !(m_state == m_prevState && m_state == QEvent::TouchEnd))
+ if (!m_touchPoints.isEmpty() && combinedStates != Qt::TouchPointStationary) {
for (int i = 0; i < m_observers.count(); ++i)
- m_observers.at(i)->touch_point(m_state, m_touchPoints);
-
- m_prevState = m_state;
- if (m_state == QEvent::TouchBegin)
- m_state = QEvent::TouchUpdate;
- else if (m_state == QEvent::TouchEnd)
- m_state = QEvent::TouchBegin;
+ m_observers.at(i)->touch_point(m_touchPoints);
+ }
}
m_lastEventType = data->type;
}
-void QTouchScreenData::dump()
+int QTouchScreenData::findClosestContact(const QHash<int, Contact> &contacts, int x, int y, int *dist)
{
- const char *eventType;
- switch (m_state) {
- case QEvent::TouchBegin:
- eventType = "TouchBegin";
- break;
- case QEvent::TouchUpdate:
- eventType = "TouchUpdate";
- break;
- case QEvent::TouchEnd:
- eventType = "TouchEnd";
- break;
- default:
- eventType = "unknown";
- break;
+ int minDist = -1, id = -1;
+ for (QHash<int, Contact>::const_iterator it = contacts.constBegin(), ite = contacts.constEnd();
+ it != ite; ++it) {
+ const Contact &contact(it.value());
+ int dx = x - contact.x;
+ int dy = y - contact.y;
+ int dist = dx * dx + dy * dy;
+ if (minDist == -1 || dist < minDist) {
+ minDist = dist;
+ id = contact.trackingId;
+ }
}
- qDebug() << "touch event" << eventType;
- foreach (const QWindowSystemInterface::TouchPoint &tp, m_touchPoints) {
- const char *pointState;
- switch (tp.state & Qt::TouchPointStateMask) {
- case Qt::TouchPointPressed:
- pointState = "pressed";
- break;
- case Qt::TouchPointMoved:
- pointState = "moved";
- break;
- case Qt::TouchPointStationary:
- pointState = "stationary";
- break;
- case Qt::TouchPointReleased:
- pointState = "released";
- break;
- default:
- pointState = "unknown";
- break;
+ if (dist)
+ *dist = minDist;
+ return id;
+}
+
+void QTouchScreenData::assignIds()
+{
+ QHash<int, Contact> candidates = m_lastContacts, pending = m_contacts, newContacts;
+ int maxId = -1;
+ QHash<int, Contact>::iterator it, ite, bestMatch;
+ while (!pending.isEmpty() && !candidates.isEmpty()) {
+ int bestDist = -1, bestId;
+ for (it = pending.begin(), ite = pending.end(); it != ite; ++it) {
+ int dist;
+ int id = findClosestContact(candidates, it->x, it->y, &dist);
+ if (id >= 0 && (bestDist == -1 || dist < bestDist)) {
+ bestDist = dist;
+ bestId = id;
+ bestMatch = it;
+ }
+ }
+ if (bestDist >= 0) {
+ bestMatch->trackingId = bestId;
+ newContacts.insert(bestId, *bestMatch);
+ candidates.remove(bestId);
+ pending.erase(bestMatch);
+ if (bestId > maxId)
+ maxId = bestId;
+ }
+ }
+ if (candidates.isEmpty()) {
+ for (it = pending.begin(), ite = pending.end(); it != ite; ++it) {
+ it->trackingId = ++maxId;
+ newContacts.insert(it->trackingId, *it);
}
- qDebug() << " " << tp.id << tp.area << pointState << tp.normalPosition
- << tp.pressure << tp.isPrimary << tp.area.center();
}
+ m_contacts = newContacts;
}
diff --git a/src/plugins/generic/touchscreen/qtouchscreen.h b/src/plugins/generic/touchscreen/qtouchscreen.h
index 3c35b0012f..546826c8db 100644
--- a/src/plugins/generic/touchscreen/qtouchscreen.h
+++ b/src/plugins/generic/touchscreen/qtouchscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,8 +58,9 @@ class QTouchScreenData;
class QTouchScreenObserver
{
public:
- virtual void touch_configure(int x_min, int x_max, int y_min, int y_max) = 0;
- virtual void touch_point(QEvent::Type state, const QList<QWindowSystemInterface::TouchPoint> &points) = 0;
+ virtual void touch_configure(int x_min, int x_max, int y_min, int y_max,
+ int pressure_min, int pressure_max, const QString &dev_name) = 0;
+ virtual void touch_point(const QList<QWindowSystemInterface::TouchPoint> &points) = 0;
};
class QTouchScreenHandler : public QObject
diff --git a/src/plugins/generic/tslib/main.cpp b/src/plugins/generic/tslib/main.cpp
index 9e86e26ece..49bc60a615 100644
--- a/src/plugins/generic/tslib/main.cpp
+++ b/src/plugins/generic/tslib/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/generic/tslib/qtslib.cpp b/src/plugins/generic/tslib/qtslib.cpp
index 1349b9dbba..5b08ec8a34 100644
--- a/src/plugins/generic/tslib/qtslib.cpp
+++ b/src/plugins/generic/tslib/qtslib.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/generic/tslib/qtslib.h b/src/plugins/generic/tslib/qtslib.h
index ea7e227c3c..5e595b5a0c 100644
--- a/src/plugins/generic/tslib/qtslib.h
+++ b/src/plugins/generic/tslib/qtslib.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/gif/main.cpp b/src/plugins/imageformats/gif/main.cpp
index 7a7cc0a995..b006d56fd7 100644
--- a/src/plugins/imageformats/gif/main.cpp
+++ b/src/plugins/imageformats/gif/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/ico/main.cpp b/src/plugins/imageformats/ico/main.cpp
index 1d572fbe5d..ac9ceb037c 100644
--- a/src/plugins/imageformats/ico/main.cpp
+++ b/src/plugins/imageformats/ico/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index da6b8a75bc..c05ee12671 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/ico/qicohandler.h b/src/plugins/imageformats/ico/qicohandler.h
index 8a338018bb..d6bf97f319 100644
--- a/src/plugins/imageformats/ico/qicohandler.h
+++ b/src/plugins/imageformats/ico/qicohandler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/jpeg/main.cpp b/src/plugins/imageformats/jpeg/main.cpp
index 785b77b646..ed457ca7ec 100644
--- a/src/plugins/imageformats/jpeg/main.cpp
+++ b/src/plugins/imageformats/jpeg/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/mng/main.cpp b/src/plugins/imageformats/mng/main.cpp
index ae4909fa69..9fed507ce4 100644
--- a/src/plugins/imageformats/mng/main.cpp
+++ b/src/plugins/imageformats/mng/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/imageformats/tiff/main.cpp b/src/plugins/imageformats/tiff/main.cpp
index 6323b387f7..4bfd07b836 100644
--- a/src/plugins/imageformats/tiff/main.cpp
+++ b/src/plugins/imageformats/tiff/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/ibus/main.cpp b/src/plugins/platforminputcontexts/ibus/main.cpp
index 9d2dbc6b2a..c93fef670a 100644
--- a/src/plugins/platforminputcontexts/ibus/main.cpp
+++ b/src/plugins/platforminputcontexts/ibus/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.cpp b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.cpp
index 7adffbc2e2..9d64b78862 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.cpp
@@ -2,7 +2,7 @@
* This file was generated by qdbusxml2cpp version 0.7
* Command line was: qdbusxml2cpp -N -p qibusinputcontextproxy -c QIBusInputContextProxy interfaces/org.freedesktop.IBus.InputContext.xml
*
- * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
index 9a91c4e484..56e194c66b 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
@@ -2,7 +2,7 @@
* This file was generated by qdbusxml2cpp version 0.7
* Command line was: qdbusxml2cpp -N -p qibusinputcontextproxy -c QIBusInputContextProxy interfaces/org.freedesktop.IBus.InputContext.xml
*
- * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index 6ab142ce25..ed858c8853 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -160,6 +160,8 @@ void QIBusPlatformInputContext::cursorRectChanged()
return;
QWindow *inputWindow = qApp->inputPanel()->inputWindow();
+ if (!inputWindow)
+ return;
r.moveTopLeft(inputWindow->mapToGlobal(r.topLeft()));
if (debug)
qDebug() << "microFocus" << r;
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
index 5f0b4d4691..0f57bcd5a5 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp b/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
index 9d64b603f3..c177c4f04a 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
@@ -2,7 +2,7 @@
* This file was generated by qdbusxml2cpp version 0.7
* Command line was: qdbusxml2cpp -N -p qibusproxy -c QIBusProxy interfaces/org.freedesktop.IBus.xml
*
- * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/src/plugins/platforminputcontexts/ibus/qibusproxy.h b/src/plugins/platforminputcontexts/ibus/qibusproxy.h
index 389eec3175..7d7d174162 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusproxy.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusproxy.h
@@ -2,7 +2,7 @@
* This file was generated by qdbusxml2cpp version 0.7
* Command line was: qdbusxml2cpp -N -p qibusproxy -c QIBusProxy interfaces/org.freedesktop.IBus.xml
*
- * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
diff --git a/src/plugins/platforminputcontexts/ibus/qibustypes.cpp b/src/plugins/platforminputcontexts/ibus/qibustypes.cpp
index c6dcfb10b9..424ea02fe3 100644
--- a/src/plugins/platforminputcontexts/ibus/qibustypes.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibustypes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/ibus/qibustypes.h b/src/plugins/platforminputcontexts/ibus/qibustypes.h
index 6848149c8b..1c9c33e159 100644
--- a/src/plugins/platforminputcontexts/ibus/qibustypes.h
+++ b/src/plugins/platforminputcontexts/ibus/qibustypes.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/contextadaptor.cpp b/src/plugins/platforminputcontexts/meego/contextadaptor.cpp
index 45b1102a98..da5920c396 100644
--- a/src/plugins/platforminputcontexts/meego/contextadaptor.cpp
+++ b/src/plugins/platforminputcontexts/meego/contextadaptor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/contextadaptor.h b/src/plugins/platforminputcontexts/meego/contextadaptor.h
index 8f134a5cb0..2150cd1e57 100644
--- a/src/plugins/platforminputcontexts/meego/contextadaptor.h
+++ b/src/plugins/platforminputcontexts/meego/contextadaptor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/main.cpp b/src/plugins/platforminputcontexts/meego/main.cpp
index f8558b498d..5c87a9caed 100644
--- a/src/plugins/platforminputcontexts/meego/main.cpp
+++ b/src/plugins/platforminputcontexts/meego/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.cpp b/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.cpp
index c66ea4a178..cab0be4067 100644
--- a/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.h b/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.h
index 04eb28eab2..4e6e724bdc 100644
--- a/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.h
+++ b/src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/serverproxy.cpp b/src/plugins/platforminputcontexts/meego/serverproxy.cpp
index 5715d8f19a..8f20238405 100644
--- a/src/plugins/platforminputcontexts/meego/serverproxy.cpp
+++ b/src/plugins/platforminputcontexts/meego/serverproxy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforminputcontexts/meego/serverproxy.h b/src/plugins/platforminputcontexts/meego/serverproxy.h
index 3ad589409c..31cb82ba07 100644
--- a/src/plugins/platforminputcontexts/meego/serverproxy.h
+++ b/src/plugins/platforminputcontexts/meego/serverproxy.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index d59a0f1a0d..09b708d9a1 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -66,3 +66,6 @@ contains(QT_CONFIG,release):CONFIG -= debug
# Acccessibility debug support
# DEFINES += QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
# include ($$PWD/../../../../util/accessibilityinspector/accessibilityinspector.pri)
+
+# Window debug support
+#DEFINES += QT_COCOA_ENABLE_WINDOW_DEBUG
diff --git a/src/plugins/platforms/cocoa/main.mm b/src/plugins/platforms/cocoa/main.mm
index 0be6ebd682..f88e1b7786 100644
--- a/src/plugins/platforms/cocoa/main.mm
+++ b/src/plugins/platforms/cocoa/main.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.h b/src/plugins/platforms/cocoa/qcocoaaccessibility.h
index 7f4a840b15..c3376ad5c5 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,6 +45,8 @@
#include <QtGui>
+namespace QCocoaAccessible {
+
/*
Qt Cocoa Accessibility Overview
@@ -64,5 +66,11 @@
*/
NSString *macRole(QAccessible::Role);
+bool shouldBeIgnrored(QAccessibleInterface *interface);
+NSString *getTranslatedAction(const QString &qtAction);
+NSMutableArray *createTranslatedActionsList(const QStringList &qtActions);
+QString translateAction(NSString *nsAction);
+
+}
#endif
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index a2ce743804..436d27eddf 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,6 +40,8 @@
****************************************************************************/
#include "qcocoaaccessibility.h"
+namespace QCocoaAccessible {
+
typedef QMap<QAccessible::Role, NSString *> QMacAccessibiltyRoleMap;
Q_GLOBAL_STATIC(QMacAccessibiltyRoleMap, qMacAccessibiltyRoleMap);
@@ -111,3 +113,109 @@ NSString *macRole(QAccessible::Role qtRole)
return NSAccessibilityUnknownRole;
}
+/*
+ Mac accessibility supports ignoring elements, which means that
+ the elements are still present in the accessibility tree but is
+ not used by the screen reader.
+*/
+bool shouldBeIgnrored(QAccessibleInterface *interface)
+{
+ // Mac accessibility does not have an attribute that corresponds to the Invisible/Offscreen
+ // state. Ignore interfaces with those flags set.
+ const QAccessible::State state = interface->state();
+ if (state.invisible ||
+ state.offscreen)
+ return true;
+
+ // Some roles are not interesting. In particular, container roles should be
+ // ignored in order to flatten the accessibility tree as seen by the user.
+ const QAccessible::Role role = interface->role();
+ if (role == QAccessible::Border || // QFrame
+ role == QAccessible::Application || // We use the system-provided application element.
+ role == QAccessible::MenuItem || // The system also provides the menu items.
+ role == QAccessible::ToolBar) // Access the tool buttons directly.
+ return true;
+
+ NSString *mac_role = macRole(interface->role());
+ if (mac_role == NSAccessibilityWindowRole || // We use the system-provided window elements.
+ mac_role == NSAccessibilityGroupRole ||
+ mac_role == NSAccessibilityUnknownRole)
+ return true;
+
+ // Client is a generic role returned by plain QWidgets or other
+ // widgets that does not have separate QAccessible interface, such
+ // as the TabWidget. Return false unless macRole gives the interface
+ // a special role.
+ if (role == QAccessible::Client && mac_role == NSAccessibilityUnknownRole)
+ return true;
+
+ if (QObject * const object = interface->object()) {
+ const QString className = QLatin1String(object->metaObject()->className());
+
+ // VoiceOver focusing on tool tips can be confusing. The contents of the
+ // tool tip is available through the description attribute anyway, so
+ // we disable accessibility for tool tips.
+ if (className == QLatin1String("QTipLabel"))
+ return true;
+ }
+
+ return false;
+}
+
+/*
+ Translates a predefined QAccessibleActionInterface action to a Mac action constant.
+ Returns 0 if the Qt Action has no mac equivalent. Ownership of the NSString is
+ not transferred.
+*/
+NSString *getTranslatedAction(const QString &qtAction)
+{
+ if (qtAction == QAccessibleActionInterface::pressAction())
+ return NSAccessibilityPressAction;
+ else if (qtAction == QAccessibleActionInterface::increaseAction())
+ return NSAccessibilityIncrementAction;
+ else if (qtAction == QAccessibleActionInterface::decreaseAction())
+ return NSAccessibilityDecrementAction;
+ else if (qtAction == QAccessibleActionInterface::showMenuAction())
+ return NSAccessibilityShowMenuAction;
+ else if (qtAction == QAccessibleActionInterface::setFocusAction()) // Not 100% sure on this one
+ return NSAccessibilityRaiseAction;
+
+ // Not translated:
+ //
+ // Qt:
+ // static const QString &checkAction();
+ // static const QString &uncheckAction();
+ //
+ // Cocoa:
+ // NSAccessibilityConfirmAction;
+ // NSAccessibilityPickAction;
+ // NSAccessibilityCancelAction;
+ // NSAccessibilityDeleteAction;
+
+ return 0;
+}
+
+
+/*
+ Translates between a Mac action constant and a QAccessibleActionInterface action
+ Returns an empty QString if there is no Qt predefined equivalent.
+*/
+QString translateAction(NSString *nsAction)
+{
+ if ([nsAction compare: NSAccessibilityPressAction] == NSOrderedSame)
+ return QAccessibleActionInterface::pressAction();
+ else if ([nsAction compare: NSAccessibilityIncrementAction] == NSOrderedSame)
+ return QAccessibleActionInterface::increaseAction();
+ else if ([nsAction compare: NSAccessibilityDecrementAction] == NSOrderedSame)
+ return QAccessibleActionInterface::decreaseAction();
+ else if ([nsAction compare: NSAccessibilityShowMenuAction] == NSOrderedSame)
+ return QAccessibleActionInterface::showMenuAction();
+ else if ([nsAction compare: NSAccessibilityRaiseAction] == NSOrderedSame)
+ return QAccessibleActionInterface::setFocusAction();
+
+ // See getTranslatedAction for not matched translations.
+
+ return QString();
+}
+
+} // namespace QCocoaAccessible
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
index 76509f9e43..2136d6628a 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index 332577d6e9..830e6860b7 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,7 @@ static QAccessibleInterface *acast(void *ptr)
if (self) {
index = aIndex;
accessibleInterface = anQAccessibleInterface;
- role = macRole(acast(accessibleInterface)->role());
+ role = QCocoaAccessible::macRole(acast(accessibleInterface)->role());
parent = aParent;
}
@@ -177,41 +177,62 @@ static QAccessibleInterface *acast(void *ptr)
// actions
- (NSArray *)accessibilityActionNames {
- return [NSArray arrayWithObject:NSAccessibilityPressAction];
+ NSMutableArray * nsActions = [NSMutableArray new];
+
+ QAccessibleActionInterface *actionInterface = acast(accessibleInterface)->actionInterface();
+ if (actionInterface) {
+ QStringList supportedActionNames = actionInterface->actionNames();
+
+ foreach (const QString &qtAction, supportedActionNames) {
+ NSString *nsAction = QCocoaAccessible::getTranslatedAction(qtAction);
+ if (nsAction)
+ [nsActions addObject : nsAction];
+ }
+ }
+
+ return nsActions;
}
- (NSString *)accessibilityActionDescription:(NSString *)action {
+ QAccessibleActionInterface *actionInterface = acast(accessibleInterface)->actionInterface();
+ if (actionInterface) {
+ QString qtAction = QCocoaAccessible::translateAction(action);
+ QString description = actionInterface->localizedActionDescription(qtAction);
+ if (!description.isEmpty())
+ return qt_mac_QStringToNSString(description);
+ }
+
return NSAccessibilityActionDescription(action);
}
- (void)accessibilityPerformAction:(NSString *)action {
- Q_UNUSED(action);
- if (acast(accessibleInterface)->actionInterface())
- acast(accessibleInterface)->actionInterface()->doAction(0);
+ QAccessibleActionInterface *actionInterface = acast(accessibleInterface)->actionInterface();
+ if (actionInterface) {
+ QString qtAction = QCocoaAccessible::translateAction(action);
+ actionInterface->doAction(QAccessibleActionInterface::pressAction());
+ }
}
// misc
- (BOOL)accessibilityIsIgnored {
- return NO;
+ return QCocoaAccessible::shouldBeIgnrored(acast(accessibleInterface));
}
- (id)accessibilityHitTest:(NSPoint)point {
- int index = acast(accessibleInterface)->childAt(point.x, qt_mac_flipYCoordinate(point.y));
- // hit outside
- if (index == -1) {
- return 0;
- }
+ if (!accessibleInterface)
+ return NSAccessibilityUnignoredAncestor(self);
+ QAccessibleInterface *childInterface = acast(accessibleInterface)->childAt(point.x, qt_mac_flipYCoordinate(point.y));
- // hit this element
- if (index == 0) {
+ // No child found, meaning we hit this element.
+ if (!childInterface) {
return NSAccessibilityUnignoredAncestor(self);
}
// hit a child, forward to child accessible interface.
- QAccessibleInterface *childInterface = acast(accessibleInterface)->child(index - 1);
- QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithIndex:index - 1 parent:self accessibleInterface: childInterface];
+ int childIndex = acast(accessibleInterface)->indexOfChild(childInterface);
+ QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithIndex:childIndex parent:self accessibleInterface: childInterface];
return [accessibleElement accessibilityHitTest:point];
}
diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.h b/src/plugins/platforms/cocoa/qcocoaapplication.h
index 5b6b2f48f2..edd50958de 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplication.h
+++ b/src/plugins/platforms/cocoa/qcocoaapplication.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.mm b/src/plugins/platforms/cocoa/qcocoaapplication.mm
index 388e56db8e..b389635eaa 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplication.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplication.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -143,7 +143,7 @@ QT_USE_NAMESPACE
{
Q_UNUSED(event);
/*
- if (qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
+ if (qApp && qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
return true;
if ([event type] == NSApplicationDefined) {
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h
index 7f8d1dfacd..00546d6fe5 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index debda91243..26928d0df5 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaautoreleasepool.h b/src/plugins/platforms/cocoa/qcocoaautoreleasepool.h
index 359b5d34d0..1ce2c1bd05 100644
--- a/src/plugins/platforms/cocoa/qcocoaautoreleasepool.h
+++ b/src/plugins/platforms/cocoa/qcocoaautoreleasepool.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaautoreleasepool.mm b/src/plugins/platforms/cocoa/qcocoaautoreleasepool.mm
index d97793634e..e6d7ecc82b 100644
--- a/src/plugins/platforms/cocoa/qcocoaautoreleasepool.mm
+++ b/src/plugins/platforms/cocoa/qcocoaautoreleasepool.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.h b/src/plugins/platforms/cocoa/qcocoabackingstore.h
index 938e27347c..70ac8e109c 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.h
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
index 0cde19644e..8f7b0aafde 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qcocoabackingstore.h"
+#include "qcocoaautoreleasepool.h"
#include <QtCore/qdebug.h>
#include <QtGui/QPainter>
@@ -80,6 +81,7 @@ void QCocoaBackingStore::flush(QWindow *widget, const QRegion &region, const QPo
{
Q_UNUSED(widget);
Q_UNUSED(offset);
+ QCocoaAutoReleasePool pool;
QRect geo = region.boundingRect();
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.h b/src/plugins/platforms/cocoa/qcocoacursor.h
index dd66185f70..2c58994119 100644
--- a/src/plugins/platforms/cocoa/qcocoacursor.h
+++ b/src/plugins/platforms/cocoa/qcocoacursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm
index 67386c78e1..cd0a173596 100644
--- a/src/plugins/platforms/cocoa/qcocoacursor.mm
+++ b/src/plugins/platforms/cocoa/qcocoacursor.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
index 7184db84fa..823a5626fe 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -87,10 +87,12 @@
// We mean it.
//
+#include <QtCore/qabstracteventdispatcher.h>
#include <QtCore/qhash.h>
#include <QtCore/qstack.h>
#include <QtGui/qwindowdefs.h>
-#include <QtCore/private/qeventdispatcher_unix_p.h>
+#include <QtCore/private/qabstracteventdispatcher_p.h>
+#include <QtCore/private/qtimerinfo_unix_p.h>
#include <CoreFoundation/CoreFoundation.h>
@@ -104,7 +106,7 @@ typedef struct _QCocoaModalSessionInfo {
} QCocoaModalSessionInfo;
class QCocoaEventDispatcherPrivate;
-class QCocoaEventDispatcher : public QEventDispatcherUNIX
+class QCocoaEventDispatcher : public QAbstractEventDispatcher
{
Q_OBJECT
Q_DECLARE_PRIVATE(QCocoaEventDispatcher)
@@ -121,31 +123,15 @@ public:
void registerSocketNotifier(QSocketNotifier *notifier);
void unregisterSocketNotifier(QSocketNotifier *notifier);
- void registerTimer(int timerId, int interval, QObject *object);
+ void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object);
bool unregisterTimer(int timerId);
bool unregisterTimers(QObject *object);
QList<TimerInfo> registeredTimers(QObject *object) const;
void wakeUp();
void interrupt();
-
-private:
- //friend void qt_mac_select_timer_callbk(__EventLoopTimer*, void*);
- friend class QApplicationPrivate;
-};
-
-struct MacTimerInfo {
- int id;
- int interval;
- QObject *obj;
- bool pending;
- CFRunLoopTimerRef runLoopTimer;
- bool operator==(const MacTimerInfo &other)
- {
- return (id == other.id);
- }
+ void flush();
};
-typedef QHash<int, MacTimerInfo *> MacTimerHash;
struct MacSocketInfo {
MacSocketInfo() : socket(0), runloop(0), readNotifier(0), writeNotifier(0) {}
@@ -156,33 +142,39 @@ struct MacSocketInfo {
};
typedef QHash<int, MacSocketInfo *> MacSocketHash;
-class QCocoaEventDispatcherPrivate : public QEventDispatcherUNIXPrivate
+class QCocoaEventDispatcherPrivate : public QAbstractEventDispatcherPrivate
{
Q_DECLARE_PUBLIC(QCocoaEventDispatcher)
public:
QCocoaEventDispatcherPrivate();
- static MacTimerHash macTimerHash;
+ // timer handling
+ QTimerInfoList timerInfoList;
+ CFRunLoopTimerRef runLoopTimerRef;
+ void maybeStartCFRunLoopTimer();
+ void maybeStopCFRunLoopTimer();
+ static void activateTimer(CFRunLoopTimerRef, void *info);
+
// Set 'blockSendPostedEvents' to true if you _really_ need
// to make sure that qt events are not posted while calling
// low-level cocoa functions (like beginModalForWindow). And
// use a QBoolBlocker to be safe:
- static bool blockSendPostedEvents;
+ bool blockSendPostedEvents;
// The following variables help organizing modal sessions:
- static QStack<QCocoaModalSessionInfo> cocoaModalSessionStack;
- static bool currentExecIsNSAppRun;
- static bool nsAppRunCalledByQt;
- static bool cleanupModalSessionsNeeded;
- static NSModalSession currentModalSessionCached;
- static NSModalSession currentModalSession();
- static void updateChildrenWorksWhenModal();
- static void temporarilyStopAllModalSessions();
- static void beginModalSession(QWindow *widget);
- static void endModalSession(QWindow *widget);
- static void cancelWaitForMoreEvents();
- static void cleanupModalSessions();
- static void ensureNSAppInitialized();
+ QStack<QCocoaModalSessionInfo> cocoaModalSessionStack;
+ bool currentExecIsNSAppRun;
+ bool nsAppRunCalledByQt;
+ bool cleanupModalSessionsNeeded;
+ NSModalSession currentModalSessionCached;
+ NSModalSession currentModalSession();
+ void updateChildrenWorksWhenModal();
+ void temporarilyStopAllModalSessions();
+ void beginModalSession(QWindow *widget);
+ void endModalSession(QWindow *widget);
+ void cancelWaitForMoreEvents();
+ void cleanupModalSessions();
+ void ensureNSAppInitialized();
MacSocketHash macSockets;
QList<void *> queuedUserInputEvents; // NSEvent *
@@ -191,15 +183,14 @@ public:
CFRunLoopObserverRef firstTimeObserver;
QAtomicInt serialNumber;
int lastSerial;
- static bool interrupt;
-private:
+ bool interrupt;
+
static Boolean postedEventSourceEqualCallback(const void *info1, const void *info2);
static void postedEventsSourcePerformCallback(void *info);
- static void activateTimer(CFRunLoopTimerRef, void *info);
static void waitingObserverCallback(CFRunLoopObserverRef observer,
CFRunLoopActivity activity, void *info);
static void firstLoopEntry(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info);
- friend void processPostedEvents(QCocoaEventDispatcherPrivate *const d, const bool blockSendPostedEvents);
+ void processPostedEvents();
};
class QtCocoaInterruptDispatcher : public QObject
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index 8cdf40be78..5c22050711 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -111,39 +111,79 @@ static inline CFRunLoopRef mainRunLoop()
/* timer call back */
void QCocoaEventDispatcherPrivate::activateTimer(CFRunLoopTimerRef, void *info)
{
- int timerID =
-#ifdef Q_OS_MAC64
- qint64(info);
-#else
- int(info);
-#endif
+ QCocoaEventDispatcherPrivate *d = static_cast<QCocoaEventDispatcherPrivate *>(info);
+ (void) d->timerInfoList.activateTimers();
+ d->maybeStartCFRunLoopTimer();
+}
+
+void QCocoaEventDispatcherPrivate::maybeStartCFRunLoopTimer()
+{
+ if (timerInfoList.isEmpty()) {
+ // no active timers, so the CFRunLoopTimerRef should not be active either
+ Q_ASSERT(runLoopTimerRef == 0);
+ return;
+ }
- MacTimerInfo *tmr;
- tmr = macTimerHash.value(timerID);
- if (tmr == 0 || tmr->pending == true)
- return; // Can't send another timer event if it's pending.
+ if (runLoopTimerRef == 0) {
+ // start the CFRunLoopTimer
+ CFAbsoluteTime ttf = CFAbsoluteTimeGetCurrent();
+ CFTimeInterval interval;
+ CFTimeInterval oneyear = CFTimeInterval(3600. * 24. * 365.);
+
+ // Q: when should the CFRunLoopTimer fire for the first time?
+ struct timeval tv;
+ if (timerInfoList.timerWait(tv)) {
+ // A: when we have timers to fire, of course
+ interval = qMax(tv.tv_sec + tv.tv_usec / 1000000., 0.0000001);
+ } else {
+ // this shouldn't really happen, but in case it does, set the timer to fire a some point in the distant future
+ interval = oneyear;
+ }
+ ttf += interval;
+ CFRunLoopTimerContext info = { 0, this, 0, 0, 0 };
+ // create the timer with a large interval, as recommended by the CFRunLoopTimerSetNextFireDate()
+ // documentation, since we will adjust the timer's time-to-fire as needed to keep Qt timers working
+ runLoopTimerRef = CFRunLoopTimerCreate(0, ttf, oneyear, 0, 0, QCocoaEventDispatcherPrivate::activateTimer, &info);
+ Q_ASSERT(runLoopTimerRef != 0);
- if (blockSendPostedEvents) {
- QCoreApplication::postEvent(tmr->obj, new QTimerEvent(tmr->id));
+ CFRunLoopAddTimer(mainRunLoop(), runLoopTimerRef, kCFRunLoopCommonModes);
} else {
- tmr->pending = true;
- QTimerEvent e(tmr->id);
-
- QCoreApplication::sendSpontaneousEvent(tmr->obj, &e);
- // Get the value again in case the timer gets unregistered during the sendEvent.
- tmr = macTimerHash.value(timerID);
- if (tmr != 0)
- tmr->pending = false;
+ // calculate when we need to wake up to process timers again
+ CFAbsoluteTime ttf = CFAbsoluteTimeGetCurrent();
+ CFTimeInterval interval;
+
+ // Q: when should the timer first next?
+ struct timeval tv;
+ if (timerInfoList.timerWait(tv)) {
+ // A: when we have timers to fire, of course
+ interval = qMax(tv.tv_sec + tv.tv_usec / 1000000., 0.0000001);
+ } else {
+ // no timers can fire, but we cannot stop the CFRunLoopTimer, set the timer to fire at some
+ // point in the distant future (the timer interval is one year)
+ interval = CFRunLoopTimerGetInterval(runLoopTimerRef);
+ }
+
+ ttf += interval;
+ CFRunLoopTimerSetNextFireDate(runLoopTimerRef, ttf);
}
+}
+void QCocoaEventDispatcherPrivate::maybeStopCFRunLoopTimer()
+{
+ if (runLoopTimerRef == 0)
+ return;
+
+ CFRunLoopTimerInvalidate(runLoopTimerRef);
+ CFRelease(runLoopTimerRef);
+ runLoopTimerRef = 0;
}
-void QCocoaEventDispatcher::registerTimer(int timerId, int interval, QObject *obj)
+void QCocoaEventDispatcher::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *obj)
{
#ifndef QT_NO_DEBUG
if (timerId < 1 || interval < 0 || !obj) {
- qWarning("QEventDispatcherMac::registerTimer: invalid arguments");
+ qWarning("QCocoaEventDispatcher::registerTimer: invalid arguments");
return;
} else if (obj->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QObject::startTimer: timers cannot be started from another thread");
@@ -151,58 +191,37 @@ void QCocoaEventDispatcher::registerTimer(int timerId, int interval, QObject *ob
}
#endif
- MacTimerInfo *t = new MacTimerInfo();
- t->id = timerId;
- t->interval = interval;
- t->obj = obj;
- t->runLoopTimer = 0;
- t->pending = false;
-
- CFAbsoluteTime fireDate = CFAbsoluteTimeGetCurrent();
- CFTimeInterval cfinterval = qMax(CFTimeInterval(interval) / 1000, 0.0000001);
- fireDate += cfinterval;
- QCocoaEventDispatcherPrivate::macTimerHash.insert(timerId, t);
- CFRunLoopTimerContext info = { 0, (void *)timerId, 0, 0, 0 };
- t->runLoopTimer = CFRunLoopTimerCreate(0, fireDate, cfinterval, 0, 0,
- QCocoaEventDispatcherPrivate::activateTimer, &info);
- if (t->runLoopTimer == 0) {
- qFatal("QEventDispatcherMac::registerTimer: Cannot create timer");
- }
- CFRunLoopAddTimer(mainRunLoop(), t->runLoopTimer, kCFRunLoopCommonModes);
+ Q_D(QCocoaEventDispatcher);
+ d->timerInfoList.registerTimer(timerId, interval, timerType, obj);
+ d->maybeStartCFRunLoopTimer();
}
-bool QCocoaEventDispatcher::unregisterTimer(int identifier)
+bool QCocoaEventDispatcher::unregisterTimer(int timerId)
{
#ifndef QT_NO_DEBUG
- if (identifier < 1) {
- qWarning("QEventDispatcherMac::unregisterTimer: invalid argument");
+ if (timerId < 1) {
+ qWarning("QCocoaEventDispatcher::unregisterTimer: invalid argument");
return false;
} else if (thread() != QThread::currentThread()) {
qWarning("QObject::killTimer: timers cannot be stopped from another thread");
return false;
}
#endif
- if (identifier <= 0)
- return false; // not init'd or invalid timer
-
- MacTimerInfo *timerInfo = QCocoaEventDispatcherPrivate::macTimerHash.take(identifier);
- if (timerInfo == 0)
- return false;
-
- if (!QObjectPrivate::get(timerInfo->obj)->inThreadChangeEvent)
- QAbstractEventDispatcherPrivate::releaseTimerId(identifier);
- CFRunLoopTimerInvalidate(timerInfo->runLoopTimer);
- CFRelease(timerInfo->runLoopTimer);
- delete timerInfo;
- return true;
+ Q_D(QCocoaEventDispatcher);
+ bool returnValue = d->timerInfoList.unregisterTimer(timerId);
+ if (!d->timerInfoList.isEmpty())
+ d->maybeStartCFRunLoopTimer();
+ else
+ d->maybeStopCFRunLoopTimer();
+ return returnValue;
}
bool QCocoaEventDispatcher::unregisterTimers(QObject *obj)
{
#ifndef QT_NO_DEBUG
if (!obj) {
- qWarning("QEventDispatcherMac::unregisterTimers: invalid argument");
+ qWarning("QCocoaEventDispatcher::unregisterTimers: invalid argument");
return false;
} else if (obj->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QObject::killTimers: timers cannot be stopped from another thread");
@@ -210,41 +229,27 @@ bool QCocoaEventDispatcher::unregisterTimers(QObject *obj)
}
#endif
- MacTimerHash::iterator it = QCocoaEventDispatcherPrivate::macTimerHash.begin();
- while (it != QCocoaEventDispatcherPrivate::macTimerHash.end()) {
- MacTimerInfo *timerInfo = it.value();
- if (timerInfo->obj != obj) {
- ++it;
- } else {
- if (!QObjectPrivate::get(timerInfo->obj)->inThreadChangeEvent)
- QAbstractEventDispatcherPrivate::releaseTimerId(timerInfo->id);
- CFRunLoopTimerInvalidate(timerInfo->runLoopTimer);
- CFRelease(timerInfo->runLoopTimer);
- delete timerInfo;
- it = QCocoaEventDispatcherPrivate::macTimerHash.erase(it);
- }
- }
- return true;
+ Q_D(QCocoaEventDispatcher);
+ bool returnValue = d->timerInfoList.unregisterTimers(obj);
+ if (!d->timerInfoList.isEmpty())
+ d->maybeStartCFRunLoopTimer();
+ else
+ d->maybeStopCFRunLoopTimer();
+ return returnValue;
}
QList<QCocoaEventDispatcher::TimerInfo>
QCocoaEventDispatcher::registeredTimers(QObject *object) const
{
+#ifndef QT_NO_DEBUG
if (!object) {
- qWarning("QEventDispatcherMac:registeredTimers: invalid argument");
+ qWarning("QCocoaEventDispatcher:registeredTimers: invalid argument");
return QList<TimerInfo>();
}
+#endif
- QList<TimerInfo> list;
-
- MacTimerHash::const_iterator it = QCocoaEventDispatcherPrivate::macTimerHash.constBegin();
- while (it != QCocoaEventDispatcherPrivate::macTimerHash.constEnd()) {
- MacTimerInfo *t = it.value();
- if (t->obj == object)
- list << TimerInfo(t->id, t->interval);
- ++it;
- }
- return list;
+ Q_D(const QCocoaEventDispatcher);
+ return d->timerInfoList.registeredTimers(object);
}
/**************************************************************************
@@ -692,16 +697,6 @@ void QCocoaEventDispatcher::wakeUp()
/*****************************************************************************
QEventDispatcherMac Implementation
*****************************************************************************/
-MacTimerHash QCocoaEventDispatcherPrivate::macTimerHash;
-bool QCocoaEventDispatcherPrivate::blockSendPostedEvents = false;
-bool QCocoaEventDispatcherPrivate::interrupt = false;
-
-
-QStack<QCocoaModalSessionInfo> QCocoaEventDispatcherPrivate::cocoaModalSessionStack;
-bool QCocoaEventDispatcherPrivate::currentExecIsNSAppRun = false;
-bool QCocoaEventDispatcherPrivate::nsAppRunCalledByQt = false;
-bool QCocoaEventDispatcherPrivate::cleanupModalSessionsNeeded = false;
-NSModalSession QCocoaEventDispatcherPrivate::currentModalSessionCached = 0;
void QCocoaEventDispatcherPrivate::ensureNSAppInitialized()
{
@@ -899,11 +894,18 @@ void QCocoaEventDispatcherPrivate::endModalSession(QWindow *window)
}
QCocoaEventDispatcherPrivate::QCocoaEventDispatcherPrivate()
+ : runLoopTimerRef(0),
+ blockSendPostedEvents(false),
+ currentExecIsNSAppRun(false),
+ nsAppRunCalledByQt(false),
+ cleanupModalSessionsNeeded(false),
+ currentModalSessionCached(0),
+ interrupt(false)
{
}
QCocoaEventDispatcher::QCocoaEventDispatcher(QObject *parent)
- : QEventDispatcherUNIX(*new QCocoaEventDispatcherPrivate, parent)
+ : QAbstractEventDispatcher(*new QCocoaEventDispatcherPrivate, parent)
{
Q_D(QCocoaEventDispatcher);
CFRunLoopSourceContext context;
@@ -955,38 +957,38 @@ Boolean QCocoaEventDispatcherPrivate::postedEventSourceEqualCallback(const void
return info1 == info2;
}
-void processPostedEvents(QCocoaEventDispatcherPrivate *const d, const bool blockSendPostedEvents)
+void QCocoaEventDispatcherPrivate::processPostedEvents()
{
if (blockSendPostedEvents) {
// We're told to not send posted events (because the event dispatcher
// is currently working on setting up the correct session to run). But
// we still need to make sure that we don't fall asleep until pending events
// are sendt, so we just signal this need, and return:
- CFRunLoopSourceSignal(d->postedEventsSource);
+ CFRunLoopSourceSignal(postedEventsSource);
return;
}
- if (d->cleanupModalSessionsNeeded)
- d->cleanupModalSessions();
+ if (cleanupModalSessionsNeeded)
+ cleanupModalSessions();
- if (d->interrupt) {
- if (d->currentExecIsNSAppRun) {
+ if (interrupt) {
+ if (currentExecIsNSAppRun) {
// The event dispatcher has been interrupted. But since
// [NSApplication run] is running the event loop, we
// delayed stopping it until now (to let cocoa process
// pending cocoa events first).
- if (d->currentModalSessionCached)
- d->temporarilyStopAllModalSessions();
+ if (currentModalSessionCached)
+ temporarilyStopAllModalSessions();
[NSApp stop:NSApp];
- d->cancelWaitForMoreEvents();
+ cancelWaitForMoreEvents();
}
return;
}
- int serial = d->serialNumber.load();
- if (!d->threadData->canWait || (serial != d->lastSerial)) {
- d->lastSerial = serial;
- QWindowSystemInterface::sendWindowSystemEvents(d->q_func(), QEventLoop::AllEvents);
+ int serial = serialNumber.load();
+ if (!threadData->canWait || (serial != lastSerial)) {
+ lastSerial = serial;
+ QWindowSystemInterface::sendWindowSystemEvents(q_func(), QEventLoop::AllEvents);
}
}
@@ -1016,12 +1018,12 @@ void QCocoaEventDispatcherPrivate::firstLoopEntry(CFRunLoopObserverRef ref,
forEventClass:kInternetEventClass andEventID:kAEGetURL];
*/
- processPostedEvents(static_cast<QCocoaEventDispatcherPrivate *>(info), blockSendPostedEvents);
+ static_cast<QCocoaEventDispatcherPrivate *>(info)->processPostedEvents();
}
void QCocoaEventDispatcherPrivate::postedEventsSourcePerformCallback(void *info)
{
- processPostedEvents(static_cast<QCocoaEventDispatcherPrivate *>(info), blockSendPostedEvents);
+ static_cast<QCocoaEventDispatcherPrivate *>(info)->processPostedEvents();
}
void QCocoaEventDispatcherPrivate::cancelWaitForMoreEvents()
@@ -1050,21 +1052,15 @@ void QCocoaEventDispatcher::interrupt()
d->cancelWaitForMoreEvents();
}
+void QCocoaEventDispatcher::flush()
+{ }
+
QCocoaEventDispatcher::~QCocoaEventDispatcher()
{
Q_D(QCocoaEventDispatcher);
- //timer cleanup
- MacTimerHash::iterator it = QCocoaEventDispatcherPrivate::macTimerHash.begin();
- while (it != QCocoaEventDispatcherPrivate::macTimerHash.end()) {
- MacTimerInfo *t = it.value();
- if (t->runLoopTimer) {
- CFRunLoopTimerInvalidate(t->runLoopTimer);
- CFRelease(t->runLoopTimer);
- }
- delete t;
- ++it;
- }
- QCocoaEventDispatcherPrivate::macTimerHash.clear();
+
+ qDeleteAll(d->timerInfoList);
+ d->maybeStopCFRunLoopTimer();
// Remove CFSockets from the runloop.
for (MacSocketHash::ConstIterator it = d->macSockets.constBegin(); it != d->macSockets.constEnd(); ++it) {
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
index c5c40c69a1..e99fe58570 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -62,7 +62,7 @@ public:
bool defaultNameFilterDisables() const;
void deleteNativeDialog_sys();
- bool show_sys(QWindow *parent);
+ bool show_sys(ShowFlags flags, Qt::WindowFlags windowFlags, QWindow *parent);
void hide_sys();
QPlatformFileDialogHelper::DialogCode dialogResultCode_sys();
void setDirectory_sys(const QString &directory);
@@ -70,12 +70,11 @@ public:
void selectFile_sys(const QString &filename);
QStringList selectedFiles_sys() const;
void setFilter_sys();
- void setNameFilters_sys(const QStringList &filters);
void selectNameFilter_sys(const QString &filter);
QString selectedNameFilter_sys() const;
public:
- bool showCocoaFilePanel();
+ bool showCocoaFilePanel(QWindow *parent);
bool hideCocoaFilePanel();
void createNSOpenSavePanelDelegate();
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 820a5dcbd0..a513237977 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,8 +72,11 @@ QT_FORWARD_DECLARE_CLASS(QStringList)
QT_FORWARD_DECLARE_CLASS(QWidget)
QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QFileInfo)
+QT_FORWARD_DECLARE_CLASS(QWindow)
QT_USE_NAMESPACE
+typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions;
+
@class QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate);
@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate)
@@ -92,14 +95,10 @@ QT_USE_NAMESPACE
QFileDialog *mFileDialog;
QCocoaFileDialogHelper *mHelper;
NSString *mCurrentDir;
- bool mConfirmOverwrite;
- int mReturnCode;
- QT_PREPEND_NAMESPACE(QFileDialog::AcceptMode) mAcceptMode;
- QT_PREPEND_NAMESPACE(QDir::Filters) *mQDirFilter;
- QT_PREPEND_NAMESPACE(QFileDialog::FileMode) mFileMode;
- QT_PREPEND_NAMESPACE(QFileDialog::Options) *mFileOptions;
+ int mReturnCode;
+ SharedPointerFileDialogOptions mOptions;
QString *mLastFilterCheckPath;
QString *mCurrentSelection;
QStringList *mQDirFilterEntryList;
@@ -112,7 +111,7 @@ QT_USE_NAMESPACE
- (void)filterChanged:(id)sender;
- (void)showModelessPanel;
- (BOOL)runApplicationModalPanel;
-- (void)showWindowModalSheet:(QWidget *)docWidget;
+- (void)showWindowModalSheet:(QWindow *)docWidget;
- (void)updateProperties;
- (QStringList)acceptableExtensionsForSave;
- (QString)removeExtensions:(const QString &)filter;
@@ -125,39 +124,31 @@ QT_USE_NAMESPACE
@implementation QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate)
-- (id)initWithAcceptMode:(QT_PREPEND_NAMESPACE(QFileDialog::AcceptMode))acceptMode
- title:(const QString &)title
- hideNameFilterDetails:(bool)hideNameFilterDetails
- qDirFilter:(QT_PREPEND_NAMESPACE(QDir::Filters))qDirFilter
- fileOptions:(QT_PREPEND_NAMESPACE(QFileDialog::Options))fileOptions
- fileMode:(QT_PREPEND_NAMESPACE(QFileDialog::FileMode))fileMode
- selectFile:(const QString &)selectFile
- confirmOverwrite:(bool)confirm
+- (id)initWithAcceptMode:
+ (const QString &)selectFile
fileDialog:(QFileDialog *)fileDialog
+ options:(SharedPointerFileDialogOptions)options
helper:(QCocoaFileDialogHelper *)helper
{
self = [super init];
mFileDialog = fileDialog;
- mAcceptMode = acceptMode;
- if (mAcceptMode == QT_PREPEND_NAMESPACE(QFileDialog::AcceptOpen)){
+ mOptions = options;
+ if (mOptions->acceptMode() == QT_PREPEND_NAMESPACE(QFileDialogOptions::AcceptOpen)){
mOpenPanel = [NSOpenPanel openPanel];
mSavePanel = mOpenPanel;
} else {
mSavePanel = [NSSavePanel savePanel];
+ [mSavePanel setCanSelectHiddenExtension:YES];
mOpenPanel = 0;
}
[mSavePanel setLevel:NSModalPanelWindowLevel];
[mSavePanel setDelegate:self];
- mQDirFilter = new QT_PREPEND_NAMESPACE(QDir::Filters)(qDirFilter);
- mFileOptions = new QT_PREPEND_NAMESPACE(QFileDialog::Options)(fileOptions);
- mFileMode = fileMode;
- mConfirmOverwrite = confirm;
mReturnCode = -1;
mHelper = helper;
mLastFilterCheckPath = new QString;
mQDirFilterEntryList = new QStringList;
- mNameFilterDropDownList = new QStringList(mFileDialog->nameFilters());
+ mNameFilterDropDownList = new QStringList(mOptions->nameFilters());
QString selectedVisualNameFilter = mFileDialog->selectedNameFilter();
mSelectedNameFilter = new QStringList([self findStrippedFilterWithVisualFilterName:selectedVisualNameFilter]);
@@ -170,16 +161,17 @@ QT_USE_NAMESPACE
mCurrentSelection = new QString(sel.absoluteFilePath());
}
- [mSavePanel setTitle:qt_mac_QStringToNSString(title)];
- [self createPopUpButton:selectedVisualNameFilter hideDetails:hideNameFilterDetails];
+ [mSavePanel setTitle:qt_mac_QStringToNSString(options->windowTitle())];
+ [self createPopUpButton:selectedVisualNameFilter hideDetails:options->testOption(QFileDialogOptions::HideNameFilterDetails)];
[self createTextField];
[self createAccessory];
[mSavePanel setAccessoryView:mNameFilterDropDownList->size() > 1 ? mAccessoryView : nil];
- [mSavePanel setPrompt:[self strip:mFileDialog->labelText(QFileDialog::Accept)]];
- if (false) // ### fixme mPriv->fileNameLabelExplicitlySat)
- [mSavePanel setNameFieldLabel:[self strip:mFileDialog->labelText(QFileDialog::FileName)]];
+ if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
+ [mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
+ if (mOptions->isLabelExplicitlySet(QFileDialogOptions::FileName))
+ [mSavePanel setNameFieldLabel:[self strip:options->labelText(QFileDialogOptions::FileName)]];
[self updateProperties];
[mSavePanel retain];
@@ -188,8 +180,6 @@ QT_USE_NAMESPACE
- (void)dealloc
{
- delete mQDirFilter;
- delete mFileOptions;
delete mLastFilterCheckPath;
delete mQDirFilterEntryList;
delete mNameFilterDropDownList;
@@ -225,7 +215,7 @@ QT_USE_NAMESPACE
QFileInfo info(*mCurrentSelection);
NSString *filename = QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(info.fileName());
NSString *filepath = QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(info.filePath());
- bool selectable = (mAcceptMode == QFileDialog::AcceptSave)
+ bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|| [self panel:nil shouldShowFilename:filepath];
[mOpenPanel
beginForDirectory:mCurrentDir
@@ -242,7 +232,7 @@ QT_USE_NAMESPACE
QFileInfo info(*mCurrentSelection);
NSString *filename = QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(info.fileName());
NSString *filepath = QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(info.filePath());
- bool selectable = (mAcceptMode == QFileDialog::AcceptSave)
+ bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|| [self panel:nil shouldShowFilename:filepath];
mReturnCode = [mSavePanel
runModalForDirectory:mCurrentDir
@@ -257,13 +247,13 @@ QT_USE_NAMESPACE
return (mReturnCode == NSOKButton) ? QT_PREPEND_NAMESPACE(QPlatformDialogHelper::Accepted) : QT_PREPEND_NAMESPACE(QPlatformDialogHelper::Rejected);
}
-- (void)showWindowModalSheet:(QWidget *)docWidget
+- (void)showWindowModalSheet:(QWindow *)docWidget
{
Q_UNUSED(docWidget);
QFileInfo info(*mCurrentSelection);
NSString *filename = QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(info.fileName());
NSString *filepath = QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(info.filePath());
- bool selectable = (mAcceptMode == QFileDialog::AcceptSave)
+ bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|| [self panel:nil shouldShowFilename:filepath];
[mSavePanel
beginSheetForDirectory:mCurrentDir
@@ -295,7 +285,7 @@ QT_USE_NAMESPACE
QString path = info.absolutePath();
if (path != *mLastFilterCheckPath){
*mLastFilterCheckPath = path;
- *mQDirFilterEntryList = info.dir().entryList(*mQDirFilter);
+ *mQDirFilterEntryList = info.dir().entryList(mOptions->filter());
}
// Check if the QDir filter accepts the file:
if (!mQDirFilterEntryList->contains(info.fileName()))
@@ -317,7 +307,7 @@ QT_USE_NAMESPACE
Q_UNUSED(sender);
if (!okFlag)
return filename;
- if (mConfirmOverwrite)
+ if (!mOptions->testOption(QFileDialogOptions::DontConfirmOverwrite))
return filename;
// User has clicked save, and no overwrite confirmation should occur.
@@ -376,20 +366,21 @@ QT_USE_NAMESPACE
// Call this functions if mFileMode, mFileOptions,
// mNameFilterDropDownList or mQDirFilter changes.
// The savepanel does not contain the neccessary functions for this.
- bool chooseFilesOnly = mFileMode == QT_PREPEND_NAMESPACE(QFileDialog::ExistingFile)
- || mFileMode == QT_PREPEND_NAMESPACE(QFileDialog::ExistingFiles);
- bool chooseDirsOnly = mFileMode == QT_PREPEND_NAMESPACE(QFileDialog::Directory)
- || mFileMode == QT_PREPEND_NAMESPACE(QFileDialog::DirectoryOnly)
- || *mFileOptions & QT_PREPEND_NAMESPACE(QFileDialog::ShowDirsOnly);
+ const QT_PREPEND_NAMESPACE(QFileDialogOptions::FileMode) fileMode = mOptions->fileMode();
+ bool chooseFilesOnly = fileMode == QT_PREPEND_NAMESPACE(QFileDialogOptions::ExistingFile)
+ || fileMode == QT_PREPEND_NAMESPACE(QFileDialogOptions::ExistingFiles);
+ bool chooseDirsOnly = fileMode == QT_PREPEND_NAMESPACE(QFileDialogOptions::Directory)
+ || fileMode == QT_PREPEND_NAMESPACE(QFileDialogOptions::DirectoryOnly)
+ || mOptions->testOption(QT_PREPEND_NAMESPACE(QFileDialogOptions::ShowDirsOnly));
[mOpenPanel setCanChooseFiles:!chooseDirsOnly];
[mOpenPanel setCanChooseDirectories:!chooseFilesOnly];
- [mSavePanel setCanCreateDirectories:!(*mFileOptions & QT_PREPEND_NAMESPACE(QFileDialog::ReadOnly))];
- [mOpenPanel setAllowsMultipleSelection:(mFileMode == QT_PREPEND_NAMESPACE(QFileDialog::ExistingFiles))];
- [mOpenPanel setResolvesAliases:!(*mFileOptions & QT_PREPEND_NAMESPACE(QFileDialog::DontResolveSymlinks))];
+ [mSavePanel setCanCreateDirectories:!(mOptions->testOption(QT_PREPEND_NAMESPACE(QFileDialogOptions::ReadOnly)))];
+ [mOpenPanel setAllowsMultipleSelection:(fileMode == QT_PREPEND_NAMESPACE(QFileDialogOptions::ExistingFiles))];
+ [mOpenPanel setResolvesAliases:!(mOptions->testOption(QT_PREPEND_NAMESPACE(QFileDialogOptions::DontResolveSymlinks)))];
QStringList ext = [self acceptableExtensionsForSave];
- const QString defaultSuffix = mFileDialog->defaultSuffix();
+ const QString defaultSuffix = mOptions->defaultSuffix();
if (!ext.isEmpty() && !defaultSuffix.isEmpty())
ext.prepend(defaultSuffix);
[mSavePanel setAllowedFileTypes:ext.isEmpty() ? nil : QT_PREPEND_NAMESPACE(qt_mac_QStringListToNSMutableArray(ext))];
@@ -473,7 +464,8 @@ QT_USE_NAMESPACE
[mTextField setSelectable:false];
[mTextField setBordered:false];
[mTextField setDrawsBackground:false];
- [mTextField setStringValue:[self strip:mFileDialog->labelText(QFileDialog::FileType)]];
+ if (mOptions->isLabelExplicitlySet(QFileDialogOptions::FileType))
+ [mTextField setStringValue:[self strip:mOptions->labelText(QFileDialogOptions::FileType)]];
}
- (void)createPopUpButton:(const QString &)selectedFilter hideDetails:(BOOL)hideDetails
@@ -538,15 +530,16 @@ QCocoaFileDialogHelper::~QCocoaFileDialogHelper()
void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_selectionChanged(const QString &newPath)
{
- qtFileDialog->metaObject()->invokeMethod(qtFileDialog, "currentChanged", Q_ARG(QString, newPath));
+ emit currentChanged(newPath);
}
void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_panelClosed(bool accepted)
{
- if (accepted)
- qtFileDialog->metaObject()->invokeMethod(qtFileDialog, "accept");
- else
- qtFileDialog->metaObject()->invokeMethod(qtFileDialog, "reject");
+ if (accepted) {
+ emit accept();
+ } else {
+ emit reject();
+ }
}
void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_directoryEntered(const QString &newDir)
@@ -557,7 +550,7 @@ void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_directoryEntered(const QSt
void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_filterSelected(int menuIndex)
{
- const QStringList filters = qtFileDialog->nameFilters();
+ const QStringList filters = options()->nameFilters();
emit filterSelected(menuIndex >= 0 && menuIndex < filters.size() ? filters.at(menuIndex) : QString());
}
@@ -593,29 +586,22 @@ QStringList QCocoaFileDialogHelper::selectedFiles_sys() const
return [delegate selectedFiles];
}
-void QCocoaFileDialogHelper::setNameFilters_sys(const QStringList &filters)
-{
- QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
- bool hideDetails = qtFileDialog->testOption(QFileDialog::HideNameFilterDetails);
- [delegate setNameFilters:filters hideDetails:hideDetails];
-}
-
void QCocoaFileDialogHelper::setFilter_sys()
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
- *(delegate->mQDirFilter) = qtFileDialog->filter();
- delegate->mFileMode = qtFileDialog->fileMode();
- [delegate->mSavePanel setTitle:qt_mac_QStringToNSString(qtFileDialog->windowTitle())];
- [delegate->mSavePanel setPrompt:[delegate strip:qtFileDialog->labelText(QFileDialog::Accept)]];
- if (false) // ### fixme priv->fileNameLabelExplicitlySat)
- [delegate->mSavePanel setNameFieldLabel:[delegate strip:qtFileDialog->labelText(QFileDialog::FileName)]];
+ const SharedPointerFileDialogOptions &opts = options();
+ [delegate->mSavePanel setTitle:qt_mac_QStringToNSString(opts->windowTitle())];
+ if (opts->isLabelExplicitlySet(QFileDialogOptions::Accept))
+ [delegate->mSavePanel setPrompt:[delegate strip:opts->labelText(QFileDialogOptions::Accept)]];
+ if (opts->isLabelExplicitlySet(QFileDialogOptions::FileName))
+ [delegate->mSavePanel setNameFieldLabel:[delegate strip:opts->labelText(QFileDialogOptions::FileName)]];
[delegate updateProperties];
}
void QCocoaFileDialogHelper::selectNameFilter_sys(const QString &filter)
{
- const int index = qtFileDialog->nameFilters().indexOf(filter);
+ const int index = options()->nameFilters().indexOf(filter);
if (index != -1) {
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate->mPopUpButton selectItemAtIndex:index];
@@ -627,7 +613,7 @@ QString QCocoaFileDialogHelper::selectedNameFilter_sys() const
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
int index = [delegate->mPopUpButton indexOfSelectedItem];
- return index != -1 ? qtFileDialog->nameFilters().at(index) : QString();
+ return index != -1 ? options()->nameFilters().at(index) : QString();
}
void QCocoaFileDialogHelper::deleteNativeDialog_sys()
@@ -642,13 +628,13 @@ void QCocoaFileDialogHelper::hide_sys()
hideCocoaFilePanel();
}
-bool QCocoaFileDialogHelper::show_sys(QWindow * /* parent */)
+bool QCocoaFileDialogHelper::show_sys(ShowFlags /* flags */, Qt::WindowFlags windowFlags, QWindow *parent)
{
// Q_Q(QFileDialog);
if (!qtFileDialog->isHidden())
return false;
- if (qtFileDialog->windowFlags() & Qt::WindowStaysOnTopHint) {
+ if (windowFlags & Qt::WindowStaysOnTopHint) {
// The native file dialog tries all it can to stay
// on the NSModalPanel level. And it might also show
// its own "create directory" dialog that we cannot control.
@@ -656,38 +642,35 @@ bool QCocoaFileDialogHelper::show_sys(QWindow * /* parent */)
return false;
}
- return showCocoaFilePanel();
+ return showCocoaFilePanel(parent);
}
void QCocoaFileDialogHelper::createNSOpenSavePanelDelegate()
{
if (mDelegate)
return;
-
- bool selectDir = qtFileDialog->selectedFiles().isEmpty();
- QString selection(selectDir ? qtFileDialog->directory().absolutePath() : qtFileDialog->selectedFiles().value(0));
+ const SharedPointerFileDialogOptions &opts = options();
+ const QStringList selectedFiles = opts->initiallySelectedFiles();
+ const QString directory = opts->initialDirectory();
+ const bool selectDir = selectedFiles.isEmpty();
+ QString selection(selectDir ? directory : selectedFiles.front());
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) alloc]
- initWithAcceptMode:qtFileDialog->acceptMode()
- title:qtFileDialog->windowTitle()
- hideNameFilterDetails:qtFileDialog->testOption(QFileDialog::HideNameFilterDetails)
- qDirFilter:qtFileDialog->filter()
- fileOptions:qtFileDialog->options()
- fileMode:qtFileDialog->fileMode()
- selectFile:selection
- confirmOverwrite:!qtFileDialog->testOption(QFileDialog::DontConfirmOverwrite)
- fileDialog:qtFileDialog
- helper:this];
+ initWithAcceptMode:
+ selection
+ fileDialog:qtFileDialog
+ options:opts
+ helper:this];
mDelegate = delegate;
}
-bool QCocoaFileDialogHelper::showCocoaFilePanel()
+bool QCocoaFileDialogHelper::showCocoaFilePanel(QWindow *parent)
{
// Q_Q(QFileDialog);
createNSOpenSavePanelDelegate();
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
if (qt_mac_is_macsheet(qtFileDialog))
- [delegate showWindowModalSheet:qtFileDialog->parentWidget()];
+ [delegate showWindowModalSheet:parent];
else
[delegate showModelessPanel];
return true;
@@ -717,7 +700,7 @@ void QCocoaFileDialogHelper::platformNativeDialogModalHelp()
// running (which is the case if e.g a top-most QEventLoop has been
// interrupted, and the second-most event loop has not yet been reactivated (regardless
// if [NSApp run] is still on the stack)), showing a native modal dialog will fail.
- QTimer::singleShot(1, qtFileDialog, SLOT(_q_platformRunNativeAppModalPanel()));
+ QTimer::singleShot(1, this, SIGNAL(launchNativeAppModalPanel()));
}
void QCocoaFileDialogHelper::_q_platformRunNativeAppModalPanel()
@@ -729,9 +712,9 @@ void QCocoaFileDialogHelper::_q_platformRunNativeAppModalPanel()
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate runApplicationModalPanel];
if (dialogResultCode_sys() == QPlatformDialogHelper::Accepted)
- qtFileDialog->metaObject()->invokeMethod(qtFileDialog, "accept");
+ emit accept();
else
- qtFileDialog->metaObject()->invokeMethod(qtFileDialog, "reject");
+ emit reject();
}
QPlatformDialogHelper::DialogCode QCocoaFileDialogHelper::dialogResultCode_sys()
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h
index dc8a428a91..652c3b33c8 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.h
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index 2b21f08601..08c0ce61a8 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h
index 4ab19ee3fd..61076aadd4 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.h
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
index 1ac6911461..45aa90c296 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,6 +45,7 @@
#include <QtCore>
#include <QtGui>
+#include <private/qguiapplication_p.h>
QT_BEGIN_NAMESPACE
@@ -264,7 +265,7 @@ Qt::Key qt_mac_cocoaKey2QtKey(QChar keyCode)
{
const KeyPair *i = qBinaryFind(entries, end, keyCode);
if (i == end)
- return Qt::Key(keyCode.unicode());
+ return Qt::Key(keyCode.toUpper().unicode());
return i->qtKey;
}
@@ -441,7 +442,7 @@ QString qt_mac_applicationName()
appName = QCFString::toQString(static_cast<CFStringRef>(string));
if (appName.isEmpty()) {
- QString arg0 = qApp->arguments().at(0);
+ QString arg0 = QGuiApplicationPrivate::instance()->appName();
if (arg0.contains("/")) {
QStringList parts = arg0.split("/");
appName = parts.at(parts.count() - 1);
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 1852173b5b..46e8925ba7 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -47,6 +47,7 @@
#include "qcocoaautoreleasepool.h"
#include "qcocoacursor.h"
+#include <QtCore/QScopedPointer>
#include <QtGui/QPlatformIntegration>
QT_BEGIN_NAMESPACE
@@ -90,11 +91,12 @@ public:
QPlatformTheme *platformTheme() const;
private:
- QPlatformFontDatabase *mFontDb;
+
+ QScopedPointer<QPlatformFontDatabase> mFontDb;
QAbstractEventDispatcher *mEventDispatcher;
- QPlatformAccessibility *mAccessibility;
- QPlatformTheme *mPlatformTheme;
+ QScopedPointer<QPlatformAccessibility> mAccessibility;
+ QScopedPointer<QPlatformTheme> mPlatformTheme;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 6d7770fecc..685b640843 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -89,7 +89,12 @@ QCocoaScreen::~QCocoaScreen()
QCocoaIntegration::QCocoaIntegration()
: mFontDb(new QCoreTextFontDatabase())
, mEventDispatcher(new QCocoaEventDispatcher())
+ , mAccessibility(new QPlatformAccessibility)
+ , mPlatformTheme(new QCocoaTheme)
+
{
+ QCocoaAutoReleasePool pool;
+
qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);
NSApplication *cocoaApplication = [NSApplication sharedApplication];
@@ -132,13 +137,11 @@ QCocoaIntegration::QCocoaIntegration()
screenAdded(screen);
}
- mAccessibility = new QPlatformAccessibility;
- mPlatformTheme = new QCocoaTheme;
}
QCocoaIntegration::~QCocoaIntegration()
{
- delete mAccessibility;
+ [[NSApplication sharedApplication] setDelegate: 0];
}
bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) const
@@ -175,7 +178,7 @@ QAbstractEventDispatcher *QCocoaIntegration::guiThreadEventDispatcher() const
QPlatformFontDatabase *QCocoaIntegration::fontDatabase() const
{
- return mFontDb;
+ return mFontDb.data();
}
QPlatformNativeInterface *QCocoaIntegration::nativeInterface() const
@@ -185,12 +188,12 @@ QPlatformNativeInterface *QCocoaIntegration::nativeInterface() const
QPlatformAccessibility *QCocoaIntegration::accessibility() const
{
- return mAccessibility;
+ return mAccessibility.data();
}
QPlatformTheme *QCocoaIntegration::platformTheme() const
{
- return mPlatformTheme;
+ return mPlatformTheme.data();
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.h b/src/plugins/platforms/cocoa/qcocoamenu.h
index 4e8ce20580..e0ba8a116f 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.h
+++ b/src/plugins/platforms/cocoa/qcocoamenu.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index 1bb5f45a94..5f695eb07a 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.h b/src/plugins/platforms/cocoa/qcocoamenuloader.h
index 2fcda512f0..c4b56a6d19 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuloader.h
+++ b/src/plugins/platforms/cocoa/qcocoamenuloader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm
index 353808655f..3c7d3c8bff 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h
index f8216d8e61..3c190aedb2 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
index c6aa0d39e6..426ac1e494 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,8 +52,15 @@
void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
{
+ if (!window->handle()) {
+ qWarning("QCocoaNativeInterface::nativeResourceForWindow: Native window has not been created.");
+ return 0;
+ }
+
if (resourceString == "nsopenglcontext") {
return static_cast<QCocoaWindow *>(window->handle())->currentContext()->nsOpenGLContext();
+ } else if (resourceString == "nsview") {
+ return static_cast<QCocoaWindow *>(window->handle())->m_contentView;
}
return 0;
}
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.h b/src/plugins/platforms/cocoa/qcocoatheme.h
index 8a7add73a8..901f6443f9 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.h
+++ b/src/plugins/platforms/cocoa/qcocoatheme.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index ef73cc2abe..db333417a9 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index 9fa04a0ca2..d3dc7d5f91 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -65,6 +65,25 @@
@end
QT_BEGIN_NAMESPACE
+// QCocoaWindow
+//
+// QCocoaWindow is an NSView (not an NSWindow!) in the sense
+// that it relies on a NSView for all event handling and
+// graphics output and does not require a NSWindow, except for
+// for the window-related functions like setWindowTitle.
+//
+// As a consequence of this it is possible to embed the QCocoaWindow
+// in an NSView hierarchy by getting a pointer to the "backing"
+// NSView and not calling QCocoaWindow::show():
+//
+// QWindow *qtWindow = new MyWindow();
+// qtWindow->create();
+// QPlatformNativeInterface *platformNativeInterface = QGuiApplication::platformNativeInterface();
+// NSView *qtView = (NSView *)platformNativeInterface->nativeResourceForWindow("nsview", qtWindow);
+// [parentView addSubview:qtView];
+//
+// See the qt_on_cocoa manual tests for a working example, located
+// in tests/manual/cocoa at the time of writing.
class QCocoaWindow : public QPlatformWindow
{
@@ -97,12 +116,17 @@ protected:
QRect windowGeometry() const;
QCocoaWindow *parentCocoaWindow() const;
-private:
+// private:
+public: // for QNSView
friend class QCocoaBackingStore;
- NSWindow *m_nsWindow;
+ friend class QCocoaNativeInterface;
+
QNSView *m_contentView;
+ QNSWindow *m_nsWindow;
+
quint32 m_windowAttributes;
quint32 m_windowClass;
+ bool m_inConstructor;
QCocoaGLContext *m_glContext;
};
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index de38db5fab..66f4b602d9 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -81,6 +81,7 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
, m_windowAttributes(0)
, m_windowClass(0)
, m_glContext(0)
+ , m_inConstructor(true)
{
QCocoaAutoReleasePool pool;
@@ -97,7 +98,17 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
// QCocoaWindow is deleted by Qt.
[m_nsWindow setReleasedWhenClosed : NO];
- m_contentView = [[QNSView alloc] initWithQWindow:tlw];
+ m_contentView = [[QNSView alloc] initWithQWindow:tlw platformWindow:this];
+
+ [[NSNotificationCenter defaultCenter] addObserver:m_contentView
+ selector:@selector(windowDidBecomeKey)
+ name:NSWindowDidBecomeKeyNotification
+ object:m_nsWindow];
+
+ [[NSNotificationCenter defaultCenter] addObserver:m_contentView
+ selector:@selector(windowDidResignKey)
+ name:NSWindowDidResignKeyNotification
+ object:m_nsWindow];
// ### Accept touch events by default.
// Beware that enabling touch events has a negative impact on the overall performance.
@@ -107,10 +118,13 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
setGeometry(tlw->geometry());
[m_nsWindow setContentView:m_contentView];
+ m_inConstructor = false;
}
QCocoaWindow::~QCocoaWindow()
{
+ [[NSNotificationCenter defaultCenter] removeObserver:m_contentView];
+ [m_contentView release];
[m_nsWindow release];
}
@@ -118,17 +132,22 @@ void QCocoaWindow::setGeometry(const QRect &rect)
{
if (geometry() == rect)
return;
+#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
+ qDebug() << "QCocoaWindow::setGeometry" << this << rect;
+#endif
QPlatformWindow::setGeometry(rect);
NSRect bounds = qt_mac_flipRect(rect, window());
-
- [[m_nsWindow contentView] setFrameSize:bounds.size];
[m_nsWindow setContentSize : bounds.size];
[m_nsWindow setFrameOrigin : bounds.origin];
}
void QCocoaWindow::setVisible(bool visible)
{
+ QCocoaAutoReleasePool pool;
+#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
+ qDebug() << "QCocoaWindow::setVisible" << this << visible;
+#endif
if (visible) {
// The parent window might have moved while this window was hidden,
// update the window geometry if there is a parent.
@@ -146,6 +165,8 @@ void QCocoaWindow::setVisible(bool visible)
void QCocoaWindow::setWindowTitle(const QString &title)
{
+ QCocoaAutoReleasePool pool;
+
CFStringRef windowTitle = QCFString::toCFStringRef(title);
[m_nsWindow setTitle: const_cast<NSString *>(reinterpret_cast<const NSString *>(windowTitle))];
CFRelease(windowTitle);
@@ -164,21 +185,24 @@ void QCocoaWindow::lower()
void QCocoaWindow::propagateSizeHints()
{
+ QCocoaAutoReleasePool pool;
+
[m_nsWindow setMinSize : qt_mac_toNSSize(window()->minimumSize())];
[m_nsWindow setMaxSize : qt_mac_toNSSize(window()->maximumSize())];
+#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
+ qDebug() << "QCocoaWindow::propagateSizeHints" << this;
+ qDebug() << " min/max " << window()->minimumSize() << window()->maximumSize();
+ qDebug() << " basesize" << window()->baseSize();
+ qDebug() << " geometry" << geometry();
+#endif
+
if (!window()->sizeIncrement().isNull())
[m_nsWindow setResizeIncrements : qt_mac_toNSSize(window()->sizeIncrement())];
- // We must set the window frame after setting the minimum size to prevent the window
- // from being resized to the minimum size. Use QWindow::baseSize if set, otherwise
- // use the current size.
QSize baseSize = window()->baseSize();
- QRect rect = geometry();
if (!baseSize.isNull()) {
- [m_nsWindow setFrame : NSMakeRect(rect.x(), rect.y(), baseSize.width(), baseSize.height()) display : YES];
- } else {
- [m_nsWindow setFrame : NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height()) display : YES];
+ [m_nsWindow setFrameSize : NSMakeSize(baseSize.width(), baseSize.height()) display : YES];
}
}
@@ -212,25 +236,16 @@ NSView *QCocoaWindow::contentView() const
void QCocoaWindow::windowDidMove()
{
- NSRect rect = [[m_nsWindow contentView]frame];
- NSRect windowRect = [m_nsWindow frame];
-
- QRect geo(windowRect.origin.x, qt_mac_flipYCoordinate(windowRect.origin.y + rect.size.height), rect.size.width, rect.size.height);
- setGeometry(geo);
- QWindowSystemInterface::handleSynchronousGeometryChange(window(), geo);
+ [m_contentView updateGeometry];
}
void QCocoaWindow::windowDidResize()
{
NSRect rect = [[m_nsWindow contentView]frame];
- NSRect windowRect = [m_nsWindow frame];
-
- QRect geo(windowRect.origin.x, qt_mac_flipYCoordinate(windowRect.origin.y + rect.size.height), rect.size.width, rect.size.height);
- setGeometry(geo);
- QWindowSystemInterface::handleSynchronousGeometryChange(window(), geo);
+ // Call setFrameSize which will trigger a frameDidChangeNotification on QNSView.
+ [[m_nsWindow contentView] setFrameSize:rect.size];
}
-
void QCocoaWindow::windowWillClose()
{
QWindowSystemInterface::handleSynchronousCloseEvent(window());
diff --git a/src/plugins/platforms/cocoa/qmenu_mac.h b/src/plugins/platforms/cocoa/qmenu_mac.h
index 0bca25ff5f..1e72b2fa41 100644
--- a/src/plugins/platforms/cocoa/qmenu_mac.h
+++ b/src/plugins/platforms/cocoa/qmenu_mac.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qmenu_mac.mm b/src/plugins/platforms/cocoa/qmenu_mac.mm
index dde6464392..db6dda79f1 100644
--- a/src/plugins/platforms/cocoa/qmenu_mac.mm
+++ b/src/plugins/platforms/cocoa/qmenu_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qmultitouch_mac.mm b/src/plugins/platforms/cocoa/qmultitouch_mac.mm
index 855bfc2a06..43767b09b2 100644
--- a/src/plugins/platforms/cocoa/qmultitouch_mac.mm
+++ b/src/plugins/platforms/cocoa/qmultitouch_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,7 +73,6 @@ QCocoaTouch::~QCocoaTouch()
void QCocoaTouch::updateTouchData(NSTouch *nstouch, NSTouchPhase phase)
{
_touchPoint.state = toTouchPointState(phase);
- _touchPoint.isPrimary = (_touchCount == 1);
// From the normalized position on the trackpad, calculate
// where on screen the touchpoint should be according to the
diff --git a/src/plugins/platforms/cocoa/qmultitouch_mac_p.h b/src/plugins/platforms/cocoa/qmultitouch_mac_p.h
index 811813c963..146c21d53c 100644
--- a/src/plugins/platforms/cocoa/qmultitouch_mac_p.h
+++ b/src/plugins/platforms/cocoa/qmultitouch_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index eddc1aa7e9..73c8030e1d 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -47,18 +47,23 @@
#include <QtGui/QImage>
#include <QtGui/QAccessible>
+class QCocoaWindow;
@interface QNSView : NSView {
CGImageRef m_cgImage;
QWindow *m_window;
+ QCocoaWindow *m_platformWindow;
Qt::MouseButtons m_buttons;
QAccessibleInterface *m_accessibleRoot;
}
- (id)init;
-- (id)initWithQWindow:(QWindow *)window;
+- (id)initWithQWindow:(QWindow *)window platformWindow:(QCocoaWindow *) platformWindow;
- (void)setImage:(QImage *)image;
- (void)drawRect:(NSRect)dirtyRect;
+- (void)updateGeometry;
+- (void)windowDidBecomeKey;
+- (void)windowDidResignKey;
- (BOOL)isFlipped;
- (BOOL)acceptsFirstResponder;
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 4ae268dda5..26ddd44aa6 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,6 +44,7 @@
#include <Carbon/Carbon.h>
#include "qnsview.h"
+#include "qcocoawindow.h"
#include "qcocoahelpers.h"
#include "qmultitouch_mac_p.h"
@@ -81,12 +82,14 @@ static QTouchDevice *touchDevice = 0;
return self;
}
-- (id)initWithQWindow:(QWindow *)window {
+- (id)initWithQWindow:(QWindow *)window platformWindow:(QCocoaWindow *) platformWindow
+{
self = [self init];
if (!self)
return 0;
m_window = window;
+ m_platformWindow = platformWindow;
m_accessibleRoot = 0;
#ifdef QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
@@ -106,9 +109,45 @@ static QTouchDevice *touchDevice = 0;
m_accessibleRoot = window->accessibleRoot();
#endif
+ [self setPostsFrameChangedNotifications : YES];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(updateGeometry)
+ name:NSViewFrameDidChangeNotification
+ object:self];
+
return self;
}
+- (void)updateGeometry
+{
+ NSRect rect = [self frame];
+ NSRect windowRect = [[self window] frame];
+ QRect geo(windowRect.origin.x, qt_mac_flipYCoordinate(windowRect.origin.y + rect.size.height), rect.size.width, rect.size.height);
+
+#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
+ qDebug() << "QNSView::udpateGeometry" << geo;
+#endif
+
+ // Call setGeometry on QPlatformWindow. (not on QCocoaWindow,
+ // doing that will initiate a geometry change it and possibly create
+ // an infinite loop when this notification is triggered again.)
+ m_platformWindow->QPlatformWindow::setGeometry(geo);
+
+ // Send a geometry change event to Qt, if it's ready to handle events
+ if (!m_platformWindow->m_inConstructor)
+ QWindowSystemInterface::handleSynchronousGeometryChange(m_window, geo);
+}
+
+- (void)windowDidBecomeKey
+{
+ QWindowSystemInterface::handleWindowActivated(m_window);
+}
+
+- (void)windowDidResignKey
+{
+ QWindowSystemInterface::handleWindowActivated(0);
+}
+
- (void) setImage:(QImage *)image
{
CGImageRelease(m_cgImage);
@@ -178,6 +217,11 @@ static QTouchDevice *touchDevice = 0;
return YES;
}
+- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
+{
+ return YES;
+}
+
- (void)handleMouseEvent:(NSEvent *)theEvent
{
// Calculate the mouse position in the QWindow and Qt screen coordinate system,
@@ -204,14 +248,19 @@ static QTouchDevice *touchDevice = 0;
QPoint qtWindowPoint(nsViewPoint.x, nsViewPoint.y); // NSView/QWindow coordinates
QPoint qtScreenPoint;
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6
- NSRect screenRect = [[self window] convertRectToScreen : NSMakeRect(nsWindowPoint.x, nsWindowPoint.y, 0, 0)]; // OS X screen coordinates
- qtScreenPoint = QPoint(screenRect.origin.x, qt_mac_flipYCoordinate(screenRect.origin.y)); // Qt screen coordinates
-#else
- NSPoint screenPoint = [[self window] convertBaseToScreen : NSMakePoint(nsWindowPoint.x, nsWindowPoint.y)];
- qtScreenPoint = QPoint(screenPoint.x, qt_mac_flipYCoordinate(screenPoint.y));
-#endif
+ NSWindow *window = [self window];
+ // Use convertRectToScreen if available (added in 10.7).
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ if ([window respondsToSelector:@selector(convertRectToScreen:)]) {
+ NSRect screenRect = [window convertRectToScreen : NSMakeRect(nsWindowPoint.x, nsWindowPoint.y, 0, 0)]; // OS X screen coordinates
+ qtScreenPoint = QPoint(screenRect.origin.x, qt_mac_flipYCoordinate(screenRect.origin.y)); // Qt screen coordinates
+ } else
+#endif
+ {
+ NSPoint screenPoint = [window convertBaseToScreen : NSMakePoint(nsWindowPoint.x, nsWindowPoint.y)];
+ qtScreenPoint = QPoint(screenPoint.x, qt_mac_flipYCoordinate(screenPoint.y));
+ }
ulong timestamp = [theEvent timestamp] * 1000;
QWindowSystemInterface::handleMouseEvent(m_window, timestamp, qtWindowPoint, qtScreenPoint, m_buttons);
@@ -295,28 +344,28 @@ static QTouchDevice *touchDevice = 0;
{
const NSTimeInterval timestamp = [event timestamp];
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, /*acceptSingleTouch= ### true or false?*/false);
- QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, QEvent::TouchBegin, touchDevice, points);
+ QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, touchDevice, points);
}
- (void)touchesMovedWithEvent:(NSEvent *)event
{
const NSTimeInterval timestamp = [event timestamp];
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, /*acceptSingleTouch= ### true or false?*/false);
- QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, QEvent::TouchUpdate, touchDevice, points);
+ QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, touchDevice, points);
}
- (void)touchesEndedWithEvent:(NSEvent *)event
{
const NSTimeInterval timestamp = [event timestamp];
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, /*acceptSingleTouch= ### true or false?*/false);
- QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, QEvent::TouchEnd, touchDevice, points);
+ QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, touchDevice, points);
}
- (void)touchesCancelledWithEvent:(NSEvent *)event
{
const NSTimeInterval timestamp = [event timestamp];
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, /*acceptSingleTouch= ### true or false?*/false);
- QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, QEvent::TouchEnd, touchDevice, points);
+ QWindowSystemInterface::handleTouchEvent(m_window, timestamp * 1000, touchDevice, points);
}
#ifndef QT_NO_WHEELEVENT
@@ -337,9 +386,20 @@ static QTouchDevice *touchDevice = 0;
// It looks like 1/4 degrees per pixel behaves most native.
// (NB: Qt expects the unit for delta to be 8 per degree):
const int pixelsToDegrees = 2; // 8 * 1/4
- deltaX = [theEvent deviceDeltaX] * pixelsToDegrees;
- deltaY = [theEvent deviceDeltaY] * pixelsToDegrees;
- deltaZ = [theEvent deviceDeltaZ] * pixelsToDegrees;
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ if ([theEvent respondsToSelector:@selector(scrollingDeltaX)]) {
+ deltaX = [theEvent scrollingDeltaX] * pixelsToDegrees;
+ deltaY = [theEvent scrollingDeltaY] * pixelsToDegrees;
+ // scrollingDeltaZ API is missing.
+ } else
+#endif
+ {
+ deltaX = [theEvent deviceDeltaX] * pixelsToDegrees;
+ deltaY = [theEvent deviceDeltaY] * pixelsToDegrees;
+ deltaZ = [theEvent deviceDeltaZ] * pixelsToDegrees;
+ }
+
} else {
// carbonEventKind == kEventMouseWheelMoved
// Remove acceleration, and use either -120 or 120 as delta:
diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
index 327bace123..da6e4d0481 100644
--- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,14 +53,16 @@
@implementation QNSView (QNSViewAccessibility)
+// The QNSView is a container that the user does not interact directly with:
+// Remove it from the user-visible accessibility tree.
- (BOOL)accessibilityIsIgnored {
- return NO;
+ return YES;
}
- (id)accessibilityAttributeValue:(NSString *)attribute {
if ([attribute isEqualToString:NSAccessibilityRoleAttribute]) {
if (m_accessibleRoot)
- return macRole(m_accessibleRoot->role());
+ return QCocoaAccessible::macRole(m_accessibleRoot->role());
return NSAccessibilityUnknownRole;
} else if ([attribute isEqualToString:NSAccessibilityRoleDescriptionAttribute]) {
return NSAccessibilityRoleDescriptionForUIElement(self);
@@ -83,34 +85,19 @@
}
- (id)accessibilityHitTest:(NSPoint)point {
+ if (!m_accessibleRoot)
+ return [super accessibilityHitTest:point];
NSPoint windowPoint = [[self window] convertScreenToBase:point];
- NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
-
- int index = -1;
- if (m_accessibleRoot) {
- index = m_accessibleRoot->childAt(point.x, qt_mac_flipYCoordinate(point.y));
-
- // qDebug() << "root rect" << m_accessibleRoot->rect();
- // qDebug() << "hit screen" << point.x << qt_mac_flipYCoordinate(point.y) << index;
- // if (index > 0) {
- // qDebug() << "child name" << m_accessibleRoot->child(index - 1)->text(QAccessible::Name);
- // qDebug() << "child rect" << m_accessibleRoot->child(index - 1)->rect();
- // }
- }
- // hit outside
- if (index == -1) {
+ QAccessibleInterface *childInterface = m_accessibleRoot->childAt(point.x, qt_mac_flipYCoordinate(point.y));
+ // No child found, meaning we hit the NSView
+ if (!childInterface) {
return [super accessibilityHitTest:point];
}
- // hit the NSView / top-level window
- if (index == 0) {
- QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithIndex:index parent:self accessibleInterface:(void*)m_accessibleRoot];
- return [accessibleElement accessibilityHitTest:point];
- }
-
- // hit a child, forward to child accessible interface.
- QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithIndex:index - 1 parent:self accessibleInterface:(void*)m_accessibleRoot->child(index -1)];
+ // Hit a child, forward to child accessible interface.
+ int childIndex = m_accessibleRoot->indexOfChild(childInterface);
+ QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithIndex:childIndex -1 parent:self accessibleInterface: childInterface];
return [accessibleElement accessibilityHitTest:point];
}
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.h b/src/plugins/platforms/cocoa/qnswindowdelegate.h
index 5cd226a71d..c41477cc49 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.h
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 869ef7840b..ddbff031c9 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/main.cpp b/src/plugins/platforms/directfb/main.cpp
index 1a254e4fe7..77d8a7e519 100644
--- a/src/plugins/platforms/directfb/main.cpp
+++ b/src/plugins/platforms/directfb/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfb_egl.cpp b/src/plugins/platforms/directfb/qdirectfb_egl.cpp
index 958a3be5e3..0736b284c9 100644
--- a/src/plugins/platforms/directfb/qdirectfb_egl.cpp
+++ b/src/plugins/platforms/directfb/qdirectfb_egl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfb_egl.h b/src/plugins/platforms/directfb/qdirectfb_egl.h
index 9e53939232..652a5b53da 100644
--- a/src/plugins/platforms/directfb/qdirectfb_egl.h
+++ b/src/plugins/platforms/directfb/qdirectfb_egl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp b/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
index 9666deb1c7..8e03cde101 100644
--- a/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbbackingstore.h b/src/plugins/platforms/directfb/qdirectfbbackingstore.h
index 2b129d547e..d51237e7e8 100644
--- a/src/plugins/platforms/directfb/qdirectfbbackingstore.h
+++ b/src/plugins/platforms/directfb/qdirectfbbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.cpp b/src/plugins/platforms/directfb/qdirectfbblitter.cpp
index 63b98a3fcb..bb5fa0b288 100644
--- a/src/plugins/platforms/directfb/qdirectfbblitter.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbblitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.h b/src/plugins/platforms/directfb/qdirectfbblitter.h
index d1c6a0d6ee..99120dd25f 100644
--- a/src/plugins/platforms/directfb/qdirectfbblitter.h
+++ b/src/plugins/platforms/directfb/qdirectfbblitter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbconvenience.cpp b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp
index a448cc7f6f..9df56ac66a 100644
--- a/src/plugins/platforms/directfb/qdirectfbconvenience.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbconvenience.h b/src/plugins/platforms/directfb/qdirectfbconvenience.h
index 3a6176a216..1dfce81eab 100644
--- a/src/plugins/platforms/directfb/qdirectfbconvenience.h
+++ b/src/plugins/platforms/directfb/qdirectfbconvenience.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
index 1d3b2b37a3..3967630fde 100644
--- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.h b/src/plugins/platforms/directfb/qdirectfbcursor.h
index ec0c7446fa..8a95f03d61 100644
--- a/src/plugins/platforms/directfb/qdirectfbcursor.h
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp
index 7c888ddcac..91ae24d976 100644
--- a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbglcontext.h b/src/plugins/platforms/directfb/qdirectfbglcontext.h
index 2311ff2d04..4a6018a99a 100644
--- a/src/plugins/platforms/directfb/qdirectfbglcontext.h
+++ b/src/plugins/platforms/directfb/qdirectfbglcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbinput.cpp b/src/plugins/platforms/directfb/qdirectfbinput.cpp
index 3b803537ba..bcb291cdde 100644
--- a/src/plugins/platforms/directfb/qdirectfbinput.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbinput.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbinput.h b/src/plugins/platforms/directfb/qdirectfbinput.h
index 5641943970..ab9aa912a1 100644
--- a/src/plugins/platforms/directfb/qdirectfbinput.h
+++ b/src/plugins/platforms/directfb/qdirectfbinput.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
index b40e64e25a..6c579f0dc7 100644
--- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.h b/src/plugins/platforms/directfb/qdirectfbintegration.h
index 42a085261d..58372b4178 100644
--- a/src/plugins/platforms/directfb/qdirectfbintegration.h
+++ b/src/plugins/platforms/directfb/qdirectfbintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbscreen.cpp b/src/plugins/platforms/directfb/qdirectfbscreen.cpp
index c903a2995c..6b9855e489 100644
--- a/src/plugins/platforms/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbscreen.h b/src/plugins/platforms/directfb/qdirectfbscreen.h
index b9d53beaa5..a3e1f1eebf 100644
--- a/src/plugins/platforms/directfb/qdirectfbscreen.h
+++ b/src/plugins/platforms/directfb/qdirectfbscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/directfb/qdirectfbwindow.cpp b/src/plugins/platforms/directfb/qdirectfbwindow.cpp
index 4648ed42f0..b18970cb50 100644
--- a/src/plugins/platforms/directfb/qdirectfbwindow.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -82,7 +82,7 @@ QDirectFbWindow::QDirectFbWindow(QWindow *tlw, QDirectFbInput *inputhandler)
DFBResult result = layer->CreateWindow(layer, &description, m_dfbWindow.outPtr());
if (result != DFB_OK) {
- DirectFBError("QDirectFbGraphicsSystemScreen: failed to create window",result);
+ DirectFBError("QDirectFbWindow: failed to create window", result);
}
m_dfbWindow->SetOpacity(m_dfbWindow.data(), 0xff);
diff --git a/src/plugins/platforms/directfb/qdirectfbwindow.h b/src/plugins/platforms/directfb/qdirectfbwindow.h
index 35b44ca8df..bf009a1441 100644
--- a/src/plugins/platforms/directfb/qdirectfbwindow.h
+++ b/src/plugins/platforms/directfb/qdirectfbwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/eglfs/main.cpp b/src/plugins/platforms/eglfs/main.cpp
index 050dc62ac7..f88ef1c928 100644
--- a/src/plugins/platforms/eglfs/main.cpp
+++ b/src/plugins/platforms/eglfs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
index 1d27be7fb3..448958758a 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -79,18 +79,18 @@ QEglFSBackingStore::QEglFSBackingStore(QWindow *window)
: QPlatformBackingStore(window)
{
#ifdef QEGL_EXTRA_DEBUG
- qWarning("QEglBackingStore %p, %p", window, screen);
+ qWarning("QEglBackingStore %p, %p", window, window->screen());
#endif
m_paintDevice = new QEglFSPaintDevice(static_cast<QEglFSScreen *>(window->screen()->handle()));
}
-void QEglFSBackingStore::flush(QWindow *widget, const QRegion &region, const QPoint &offset)
+void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)
{
- Q_UNUSED(widget);
+ Q_UNUSED(window);
Q_UNUSED(region);
Q_UNUSED(offset);
#ifdef QEGL_EXTRA_DEBUG
- qWarning("QEglBackingStore::flush %p",widget);
+ qWarning("QEglBackingStore::flush %p", window);
#endif
static_cast<QEglFSPaintDevice *>(m_paintDevice)->context()->swapBuffers();
}
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.h b/src/plugins/platforms/eglfs/qeglfsbackingstore.h
index d6a28a7665..7057544174 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.h
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index 57579e8fef..47d5bd49eb 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -90,7 +90,7 @@ QPlatformWindow *QEglFSIntegration::createPlatformWindow(QWindow *window) const
QPlatformBackingStore *QEglFSIntegration::createPlatformBackingStore(QWindow *window) const
{
#ifdef QEGL_EXTRA_DEBUG
- qWarning("QEglIntegration::createWindowSurface %p\n",widget);
+ qWarning("QEglIntegration::createWindowSurface %p\n", window);
#endif
return new QEglFSBackingStore(window);
}
@@ -110,4 +110,12 @@ QAbstractEventDispatcher *QEglFSIntegration::guiThreadEventDispatcher() const
return createUnixEventDispatcher();
}
+QVariant QEglFSIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
+{
+ if (hint == QPlatformIntegration::ShowIsFullScreen)
+ return true;
+
+ return QPlatformIntegration::styleHint(hint);
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.h b/src/plugins/platforms/eglfs/qeglfsintegration.h
index 9538850faf..58af1462b0 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.h
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -66,6 +66,8 @@ public:
QAbstractEventDispatcher *guiThreadEventDispatcher() const;
+ QVariant styleHint(QPlatformIntegration::StyleHint hint) const;
+
private:
QPlatformFontDatabase *mFontDb;
};
diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp
index abbe0d951f..ad1db3cd1c 100644
--- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.h b/src/plugins/platforms/eglfs/qeglfsscreen.h
index 41465d871c..c9b9ecd442 100644
--- a/src/plugins/platforms/eglfs/qeglfsscreen.h
+++ b/src/plugins/platforms/eglfs/qeglfsscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index a6115cc829..7c5df8b197 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.h b/src/plugins/platforms/eglfs/qeglfswindow.h
index 09f553d3b7..83ad7886b3 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.h
+++ b/src/plugins/platforms/eglfs/qeglfswindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/main.cpp b/src/plugins/platforms/kms/main.cpp
index a07f1645dc..743b82dbf4 100644
--- a/src/plugins/platforms/kms/main.cpp
+++ b/src/plugins/platforms/kms/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsbackingstore.cpp b/src/plugins/platforms/kms/qkmsbackingstore.cpp
index eb682e8ab3..7d6e709c4d 100644
--- a/src/plugins/platforms/kms/qkmsbackingstore.cpp
+++ b/src/plugins/platforms/kms/qkmsbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsbackingstore.h b/src/plugins/platforms/kms/qkmsbackingstore.h
index e270d04db0..6d06697cf1 100644
--- a/src/plugins/platforms/kms/qkmsbackingstore.h
+++ b/src/plugins/platforms/kms/qkmsbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsbuffermanager.cpp b/src/plugins/platforms/kms/qkmsbuffermanager.cpp
index 0c2eec0f3b..743c592383 100644
--- a/src/plugins/platforms/kms/qkmsbuffermanager.cpp
+++ b/src/plugins/platforms/kms/qkmsbuffermanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsbuffermanager.h b/src/plugins/platforms/kms/qkmsbuffermanager.h
index 59db7ebeb1..1a0a41cf47 100644
--- a/src/plugins/platforms/kms/qkmsbuffermanager.h
+++ b/src/plugins/platforms/kms/qkmsbuffermanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmscontext.cpp b/src/plugins/platforms/kms/qkmscontext.cpp
index f27673a24d..5a966deca4 100644
--- a/src/plugins/platforms/kms/qkmscontext.cpp
+++ b/src/plugins/platforms/kms/qkmscontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmscontext.h b/src/plugins/platforms/kms/qkmscontext.h
index 2f4f44c3d0..e1c636d925 100644
--- a/src/plugins/platforms/kms/qkmscontext.h
+++ b/src/plugins/platforms/kms/qkmscontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmscursor.cpp b/src/plugins/platforms/kms/qkmscursor.cpp
index 91c23b0f1c..825c884a98 100644
--- a/src/plugins/platforms/kms/qkmscursor.cpp
+++ b/src/plugins/platforms/kms/qkmscursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmscursor.h b/src/plugins/platforms/kms/qkmscursor.h
index 96be88e991..b4276c7b0c 100644
--- a/src/plugins/platforms/kms/qkmscursor.h
+++ b/src/plugins/platforms/kms/qkmscursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsdevice.cpp b/src/plugins/platforms/kms/qkmsdevice.cpp
index e0fac5611d..ed33829baa 100644
--- a/src/plugins/platforms/kms/qkmsdevice.cpp
+++ b/src/plugins/platforms/kms/qkmsdevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsdevice.h b/src/plugins/platforms/kms/qkmsdevice.h
index 4868a72ede..5b4583a03b 100644
--- a/src/plugins/platforms/kms/qkmsdevice.h
+++ b/src/plugins/platforms/kms/qkmsdevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsintegration.cpp b/src/plugins/platforms/kms/qkmsintegration.cpp
index d0055f258a..5d219d7327 100644
--- a/src/plugins/platforms/kms/qkmsintegration.cpp
+++ b/src/plugins/platforms/kms/qkmsintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsintegration.h b/src/plugins/platforms/kms/qkmsintegration.h
index 15bbd1b827..4b3f5dc74b 100644
--- a/src/plugins/platforms/kms/qkmsintegration.h
+++ b/src/plugins/platforms/kms/qkmsintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsscreen.cpp b/src/plugins/platforms/kms/qkmsscreen.cpp
index 9ea20ae505..26189b2d13 100644
--- a/src/plugins/platforms/kms/qkmsscreen.cpp
+++ b/src/plugins/platforms/kms/qkmsscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmsscreen.h b/src/plugins/platforms/kms/qkmsscreen.h
index 5807366f8b..f78663dbf4 100644
--- a/src/plugins/platforms/kms/qkmsscreen.h
+++ b/src/plugins/platforms/kms/qkmsscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmswindow.cpp b/src/plugins/platforms/kms/qkmswindow.cpp
index 63271c4ef5..5d540a8eb6 100644
--- a/src/plugins/platforms/kms/qkmswindow.cpp
+++ b/src/plugins/platforms/kms/qkmswindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/kms/qkmswindow.h b/src/plugins/platforms/kms/qkmswindow.h
index 789d42e6f8..6433ab7fd9 100644
--- a/src/plugins/platforms/kms/qkmswindow.h
+++ b/src/plugins/platforms/kms/qkmswindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/linuxfb/main.cpp b/src/plugins/platforms/linuxfb/main.cpp
index aca8110c77..99efc68a32 100644
--- a/src/plugins/platforms/linuxfb/main.cpp
+++ b/src/plugins/platforms/linuxfb/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
index 1c098a0ffc..7f76b045de 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
index f972a30452..1c10a6b8fc 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
+++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/minimal/main.cpp b/src/plugins/platforms/minimal/main.cpp
index 2627855ea0..4d9b24edc1 100644
--- a/src/plugins/platforms/minimal/main.cpp
+++ b/src/plugins/platforms/minimal/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/minimal/qminimalbackingstore.cpp b/src/plugins/platforms/minimal/qminimalbackingstore.cpp
index 08281405a4..c564e8eff0 100644
--- a/src/plugins/platforms/minimal/qminimalbackingstore.cpp
+++ b/src/plugins/platforms/minimal/qminimalbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/minimal/qminimalbackingstore.h b/src/plugins/platforms/minimal/qminimalbackingstore.h
index 9b61275e9d..717474cd27 100644
--- a/src/plugins/platforms/minimal/qminimalbackingstore.h
+++ b/src/plugins/platforms/minimal/qminimalbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp
index 7d882caecf..05fd28a08b 100644
--- a/src/plugins/platforms/minimal/qminimalintegration.cpp
+++ b/src/plugins/platforms/minimal/qminimalintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/minimal/qminimalintegration.h b/src/plugins/platforms/minimal/qminimalintegration.h
index 0835c39ab6..01118c32ee 100644
--- a/src/plugins/platforms/minimal/qminimalintegration.h
+++ b/src/plugins/platforms/minimal/qminimalintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/main.cpp b/src/plugins/platforms/openkode/main.cpp
index a93ee780f8..7b857d288c 100644
--- a/src/plugins/platforms/openkode/main.cpp
+++ b/src/plugins/platforms/openkode/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/openkodekeytranslator.h b/src/plugins/platforms/openkode/openkodekeytranslator.h
index cd99daf1fa..37f697a787 100644
--- a/src/plugins/platforms/openkode/openkodekeytranslator.h
+++ b/src/plugins/platforms/openkode/openkodekeytranslator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp b/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp
index 418b3d7ae6..c4808790e0 100644
--- a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp
+++ b/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h b/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h
index 7dadc29148..1e9960f011 100644
--- a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h
+++ b/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/qopenkodeintegration.cpp b/src/plugins/platforms/openkode/qopenkodeintegration.cpp
index 38c4325bb4..c882cb96c7 100644
--- a/src/plugins/platforms/openkode/qopenkodeintegration.cpp
+++ b/src/plugins/platforms/openkode/qopenkodeintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/qopenkodeintegration.h b/src/plugins/platforms/openkode/qopenkodeintegration.h
index 43961add6d..c10aecb821 100644
--- a/src/plugins/platforms/openkode/qopenkodeintegration.h
+++ b/src/plugins/platforms/openkode/qopenkodeintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/qopenkodewindow.cpp b/src/plugins/platforms/openkode/qopenkodewindow.cpp
index e20904470f..14f7438b99 100644
--- a/src/plugins/platforms/openkode/qopenkodewindow.cpp
+++ b/src/plugins/platforms/openkode/qopenkodewindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/qopenkodewindow.h b/src/plugins/platforms/openkode/qopenkodewindow.h
index f48c3a2bc0..3142aa2faa 100644
--- a/src/plugins/platforms/openkode/qopenkodewindow.h
+++ b/src/plugins/platforms/openkode/qopenkodewindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/shaders/frag.glslf b/src/plugins/platforms/openkode/shaders/frag.glslf
index 2d54d90e46..a48a342679 100644
--- a/src/plugins/platforms/openkode/shaders/frag.glslf
+++ b/src/plugins/platforms/openkode/shaders/frag.glslf
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openkode/shaders/vert.glslv b/src/plugins/platforms/openkode/shaders/vert.glslv
index 22dee8c8ac..3eb8010773 100644
--- a/src/plugins/platforms/openkode/shaders/vert.glslv
+++ b/src/plugins/platforms/openkode/shaders/vert.glslv
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openvglite/main.cpp b/src/plugins/platforms/openvglite/main.cpp
index 19220a6574..de6b2e38b3 100644
--- a/src/plugins/platforms/openvglite/main.cpp
+++ b/src/plugins/platforms/openvglite/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
index d8e4cc984c..29a02fedb5 100644
--- a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
+++ b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
index 6dc6a38439..c661ad8ffe 100644
--- a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
+++ b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp b/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
index dad23c1638..17136b88a1 100644
--- a/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
+++ b/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openvglite/qwindowsurface_vglite.h b/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
index b6e22d820c..2bd7b9e417 100644
--- a/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
+++ b/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/main.cpp b/src/plugins/platforms/openwfd/main.cpp
index c0159e7218..c7c05718ad 100644
--- a/src/plugins/platforms/openwfd/main.cpp
+++ b/src/plugins/platforms/openwfd/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdbackingstore.cpp b/src/plugins/platforms/openwfd/qopenwfdbackingstore.cpp
index 9e2d86a618..b166d6e7f9 100644
--- a/src/plugins/platforms/openwfd/qopenwfdbackingstore.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdbackingstore.h b/src/plugins/platforms/openwfd/qopenwfdbackingstore.h
index c173de6c19..f7b2bb9734 100644
--- a/src/plugins/platforms/openwfd/qopenwfdbackingstore.h
+++ b/src/plugins/platforms/openwfd/qopenwfdbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfddevice.cpp b/src/plugins/platforms/openwfd/qopenwfddevice.cpp
index d3ff6d45d8..5c3049cfe4 100644
--- a/src/plugins/platforms/openwfd/qopenwfddevice.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfddevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfddevice.h b/src/plugins/platforms/openwfd/qopenwfddevice.h
index 83a5539124..32c3c0f74b 100644
--- a/src/plugins/platforms/openwfd/qopenwfddevice.h
+++ b/src/plugins/platforms/openwfd/qopenwfddevice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdevent.cpp b/src/plugins/platforms/openwfd/qopenwfdevent.cpp
index 748dde65e7..3a54210bf8 100644
--- a/src/plugins/platforms/openwfd/qopenwfdevent.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdevent.h b/src/plugins/platforms/openwfd/qopenwfdevent.h
index 3010fdb55b..e807afbe36 100644
--- a/src/plugins/platforms/openwfd/qopenwfdevent.h
+++ b/src/plugins/platforms/openwfd/qopenwfdevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp b/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp
index 0db717c4d6..e83c0da42c 100644
--- a/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdglcontext.h b/src/plugins/platforms/openwfd/qopenwfdglcontext.h
index 3287a853c7..bef8739fcb 100644
--- a/src/plugins/platforms/openwfd/qopenwfdglcontext.h
+++ b/src/plugins/platforms/openwfd/qopenwfdglcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdintegration.cpp b/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
index 3d57759183..ad9afb345d 100644
--- a/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdintegration.h b/src/plugins/platforms/openwfd/qopenwfdintegration.h
index b5315b31da..0359dc60d6 100644
--- a/src/plugins/platforms/openwfd/qopenwfdintegration.h
+++ b/src/plugins/platforms/openwfd/qopenwfdintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdnativeinterface.cpp b/src/plugins/platforms/openwfd/qopenwfdnativeinterface.cpp
index 758e0c4398..b9647ac9c4 100644
--- a/src/plugins/platforms/openwfd/qopenwfdnativeinterface.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdnativeinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdnativeinterface.h b/src/plugins/platforms/openwfd/qopenwfdnativeinterface.h
index cff49dc8b0..5311d75f0e 100644
--- a/src/plugins/platforms/openwfd/qopenwfdnativeinterface.h
+++ b/src/plugins/platforms/openwfd/qopenwfdnativeinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.cpp b/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.cpp
index fb3292c31a..da144b841e 100644
--- a/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.h b/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.h
index 1697f076a9..b852286061 100644
--- a/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.h
+++ b/src/plugins/platforms/openwfd/qopenwfdoutputbuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdport.cpp b/src/plugins/platforms/openwfd/qopenwfdport.cpp
index 5f38e48eed..7da54acbb7 100644
--- a/src/plugins/platforms/openwfd/qopenwfdport.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdport.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdport.h b/src/plugins/platforms/openwfd/qopenwfdport.h
index 497c43749e..9378c3bc6a 100644
--- a/src/plugins/platforms/openwfd/qopenwfdport.h
+++ b/src/plugins/platforms/openwfd/qopenwfdport.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdportmode.cpp b/src/plugins/platforms/openwfd/qopenwfdportmode.cpp
index 4e507a42a1..669ace68c3 100644
--- a/src/plugins/platforms/openwfd/qopenwfdportmode.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdportmode.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdportmode.h b/src/plugins/platforms/openwfd/qopenwfdportmode.h
index dd95339404..93297d5673 100644
--- a/src/plugins/platforms/openwfd/qopenwfdportmode.h
+++ b/src/plugins/platforms/openwfd/qopenwfdportmode.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdscreen.cpp b/src/plugins/platforms/openwfd/qopenwfdscreen.cpp
index 0d3361899b..0c6c888164 100644
--- a/src/plugins/platforms/openwfd/qopenwfdscreen.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdscreen.h b/src/plugins/platforms/openwfd/qopenwfdscreen.h
index fc65e504ac..5bd6cf243d 100644
--- a/src/plugins/platforms/openwfd/qopenwfdscreen.h
+++ b/src/plugins/platforms/openwfd/qopenwfdscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdwindow.cpp b/src/plugins/platforms/openwfd/qopenwfdwindow.cpp
index 15dc4b11c4..00f452a226 100644
--- a/src/plugins/platforms/openwfd/qopenwfdwindow.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/openwfd/qopenwfdwindow.h b/src/plugins/platforms/openwfd/qopenwfdwindow.h
index 3c97b014b1..10cdda650e 100644
--- a/src/plugins/platforms/openwfd/qopenwfdwindow.h
+++ b/src/plugins/platforms/openwfd/qopenwfdwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/qvfb/main.cpp b/src/plugins/platforms/qvfb/main.cpp
index 1c6b3907f4..a603f7a414 100644
--- a/src/plugins/platforms/qvfb/main.cpp
+++ b/src/plugins/platforms/qvfb/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/qvfb/qvfbintegration.cpp b/src/plugins/platforms/qvfb/qvfbintegration.cpp
index 1ddf934ee9..ae9b3ffebf 100644
--- a/src/plugins/platforms/qvfb/qvfbintegration.cpp
+++ b/src/plugins/platforms/qvfb/qvfbintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/qvfb/qvfbintegration.h b/src/plugins/platforms/qvfb/qvfbintegration.h
index c6bfcc519c..cea8fe0594 100644
--- a/src/plugins/platforms/qvfb/qvfbintegration.h
+++ b/src/plugins/platforms/qvfb/qvfbintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/qvfb/qvfbwindowsurface.cpp b/src/plugins/platforms/qvfb/qvfbwindowsurface.cpp
index 3fdfe29cb1..94b743ba16 100644
--- a/src/plugins/platforms/qvfb/qvfbwindowsurface.cpp
+++ b/src/plugins/platforms/qvfb/qvfbwindowsurface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/qvfb/qvfbwindowsurface.h b/src/plugins/platforms/qvfb/qvfbwindowsurface.h
index 2759fae848..450f87c646 100644
--- a/src/plugins/platforms/qvfb/qvfbwindowsurface.h
+++ b/src/plugins/platforms/qvfb/qvfbwindowsurface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/examples/qmltest/main.mm b/src/plugins/platforms/uikit/examples/qmltest/main.mm
index 662354e13c..33d10091d8 100644
--- a/src/plugins/platforms/uikit/examples/qmltest/main.mm
+++ b/src/plugins/platforms/uikit/examples/qmltest/main.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/examples/qmltest/qml/main.qml b/src/plugins/platforms/uikit/examples/qmltest/qml/main.qml
index 889a6d063f..9f787b79dd 100644
--- a/src/plugins/platforms/uikit/examples/qmltest/qml/main.qml
+++ b/src/plugins/platforms/uikit/examples/qmltest/qml/main.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/moc_qmlapplicationviewer.cpp b/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/moc_qmlapplicationviewer.cpp
index a5c02becf1..cdc4c78bae 100644
--- a/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/moc_qmlapplicationviewer.cpp
+++ b/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/moc_qmlapplicationviewer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.cpp b/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.cpp
index 47d08702ac..dca4013ee8 100644
--- a/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ b/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.h b/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.h
index d7d9fe2307..cde3bba4e4 100644
--- a/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.h
+++ b/src/plugins/platforms/uikit/examples/qmltest/qmlapplicationviewer/qmlapplicationviewer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/main.mm b/src/plugins/platforms/uikit/main.mm
index a0aa110508..812de5ab05 100644
--- a/src/plugins/platforms/uikit/main.mm
+++ b/src/plugins/platforms/uikit/main.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikiteventloop.h b/src/plugins/platforms/uikit/quikiteventloop.h
index 893ab233e9..4519f8b645 100644
--- a/src/plugins/platforms/uikit/quikiteventloop.h
+++ b/src/plugins/platforms/uikit/quikiteventloop.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikiteventloop.mm b/src/plugins/platforms/uikit/quikiteventloop.mm
index 8884f63475..eef5976aa9 100644
--- a/src/plugins/platforms/uikit/quikiteventloop.mm
+++ b/src/plugins/platforms/uikit/quikiteventloop.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitintegration.h b/src/plugins/platforms/uikit/quikitintegration.h
index b8a15b3807..53ade53d48 100644
--- a/src/plugins/platforms/uikit/quikitintegration.h
+++ b/src/plugins/platforms/uikit/quikitintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitintegration.mm b/src/plugins/platforms/uikit/quikitintegration.mm
index 37ba2b9a02..6d616a5317 100644
--- a/src/plugins/platforms/uikit/quikitintegration.mm
+++ b/src/plugins/platforms/uikit/quikitintegration.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitscreen.h b/src/plugins/platforms/uikit/quikitscreen.h
index bde4f89a1e..ca26b3d5f9 100644
--- a/src/plugins/platforms/uikit/quikitscreen.h
+++ b/src/plugins/platforms/uikit/quikitscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitscreen.mm b/src/plugins/platforms/uikit/quikitscreen.mm
index b938542df4..3955ba7e85 100644
--- a/src/plugins/platforms/uikit/quikitscreen.mm
+++ b/src/plugins/platforms/uikit/quikitscreen.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h b/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h
index 7e4f8e9ddc..9093e26049 100644
--- a/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h
+++ b/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h
@@ -2,7 +2,7 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitwindow.h b/src/plugins/platforms/uikit/quikitwindow.h
index 67f0242a48..b38cb877c9 100644
--- a/src/plugins/platforms/uikit/quikitwindow.h
+++ b/src/plugins/platforms/uikit/quikitwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitwindow.mm b/src/plugins/platforms/uikit/quikitwindow.mm
index cc17dbcbfb..ddf52a8ed6 100644
--- a/src/plugins/platforms/uikit/quikitwindow.mm
+++ b/src/plugins/platforms/uikit/quikitwindow.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitwindowsurface.h b/src/plugins/platforms/uikit/quikitwindowsurface.h
index be3f608c59..c0f486a4dd 100644
--- a/src/plugins/platforms/uikit/quikitwindowsurface.h
+++ b/src/plugins/platforms/uikit/quikitwindowsurface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/uikit/quikitwindowsurface.mm b/src/plugins/platforms/uikit/quikitwindowsurface.mm
index 54723f8a1a..a78a47c2ea 100644
--- a/src/plugins/platforms/uikit/quikitwindowsurface.mm
+++ b/src/plugins/platforms/uikit/quikitwindowsurface.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/main.cpp b/src/plugins/platforms/vnc/main.cpp
index 333c09fc80..9fd77ea87c 100644
--- a/src/plugins/platforms/vnc/main.cpp
+++ b/src/plugins/platforms/vnc/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/qvnccursor.cpp b/src/plugins/platforms/vnc/qvnccursor.cpp
index 5073f534d8..44f3bf45fa 100644
--- a/src/plugins/platforms/vnc/qvnccursor.cpp
+++ b/src/plugins/platforms/vnc/qvnccursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/qvnccursor.h b/src/plugins/platforms/vnc/qvnccursor.h
index 5ca603a2da..af9d6816e9 100644
--- a/src/plugins/platforms/vnc/qvnccursor.h
+++ b/src/plugins/platforms/vnc/qvnccursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/qvncintegration.cpp b/src/plugins/platforms/vnc/qvncintegration.cpp
index 7506bff307..06eb52529a 100644
--- a/src/plugins/platforms/vnc/qvncintegration.cpp
+++ b/src/plugins/platforms/vnc/qvncintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/qvncintegration.h b/src/plugins/platforms/vnc/qvncintegration.h
index 9787a59f0f..c594ffb142 100644
--- a/src/plugins/platforms/vnc/qvncintegration.h
+++ b/src/plugins/platforms/vnc/qvncintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/qvncserver.cpp b/src/plugins/platforms/vnc/qvncserver.cpp
index 37412b6bd1..832206c2ea 100644
--- a/src/plugins/platforms/vnc/qvncserver.cpp
+++ b/src/plugins/platforms/vnc/qvncserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/vnc/qvncserver.h b/src/plugins/platforms/vnc/qvncserver.h
index 1ff8945f44..c3042410f4 100644
--- a/src/plugins/platforms/vnc/qvncserver.h
+++ b/src/plugins/platforms/vnc/qvncserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/array.h b/src/plugins/platforms/windows/array.h
index 699bff5ac1..f098a77d00 100644
--- a/src/plugins/platforms/windows/array.h
+++ b/src/plugins/platforms/windows/array.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/main.cpp b/src/plugins/platforms/windows/main.cpp
index 69ef24be72..4d8d4e732e 100644
--- a/src/plugins/platforms/windows/main.cpp
+++ b/src/plugins/platforms/windows/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qtwindows_additional.h b/src/plugins/platforms/windows/qtwindows_additional.h
index 770da9e9c6..abb38a1bfd 100644
--- a/src/plugins/platforms/windows/qtwindows_additional.h
+++ b/src/plugins/platforms/windows/qtwindows_additional.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h
index 254463e445..599fb0d201 100644
--- a/src/plugins/platforms/windows/qtwindowsglobal.h
+++ b/src/plugins/platforms/windows/qtwindowsglobal.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/qwindowsaccessibility.cpp
index aa4507484d..fdf6c9116e 100644
--- a/src/plugins/platforms/windows/qwindowsaccessibility.cpp
+++ b/src/plugins/platforms/windows/qwindowsaccessibility.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -92,184 +92,9 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include <qdebug.h>
QT_END_INCLUDE_NAMESPACE
-static const char *roleString(QAccessible::Role role)
-{
- static const char *roles[] = {
- "NoRole" /* = 0x00000000 */,
- "TitleBar" /* = 0x00000001 */,
- "MenuBar" /* = 0x00000002 */,
- "ScrollBar" /* = 0x00000003 */,
- "Grip" /* = 0x00000004 */,
- "Sound" /* = 0x00000005 */,
- "Cursor" /* = 0x00000006 */,
- "Caret" /* = 0x00000007 */,
- "AlertMessage" /* = 0x00000008 */,
- "Window" /* = 0x00000009 */,
- "Client" /* = 0x0000000A */,
- "PopupMenu" /* = 0x0000000B */,
- "MenuItem" /* = 0x0000000C */,
- "ToolTip" /* = 0x0000000D */,
- "Application" /* = 0x0000000E */,
- "Document" /* = 0x0000000F */,
- "Pane" /* = 0x00000010 */,
- "Chart" /* = 0x00000011 */,
- "Dialog" /* = 0x00000012 */,
- "Border" /* = 0x00000013 */,
- "Grouping" /* = 0x00000014 */,
- "Separator" /* = 0x00000015 */,
- "ToolBar" /* = 0x00000016 */,
- "StatusBar" /* = 0x00000017 */,
- "Table" /* = 0x00000018 */,
- "ColumnHeader" /* = 0x00000019 */,
- "RowHeader" /* = 0x0000001A */,
- "Column" /* = 0x0000001B */,
- "Row" /* = 0x0000001C */,
- "Cell" /* = 0x0000001D */,
- "Link" /* = 0x0000001E */,
- "HelpBalloon" /* = 0x0000001F */,
- "Assistant" /* = 0x00000020 */,
- "List" /* = 0x00000021 */,
- "ListItem" /* = 0x00000022 */,
- "Tree" /* = 0x00000023 */,
- "TreeItem" /* = 0x00000024 */,
- "PageTab" /* = 0x00000025 */,
- "PropertyPage" /* = 0x00000026 */,
- "Indicator" /* = 0x00000027 */,
- "Graphic" /* = 0x00000028 */,
- "StaticText" /* = 0x00000029 */,
- "EditableText" /* = 0x0000002A */, // Editable, selectable, etc.
- "PushButton" /* = 0x0000002B */,
- "CheckBox" /* = 0x0000002C */,
- "RadioButton" /* = 0x0000002D */,
- "ComboBox" /* = 0x0000002E */,
- "DropList" /* = 0x0000002F */, // commented out
- "ProgressBar" /* = 0x00000030 */,
- "Dial" /* = 0x00000031 */,
- "HotkeyField" /* = 0x00000032 */,
- "Slider" /* = 0x00000033 */,
- "SpinBox" /* = 0x00000034 */,
- "Canvas" /* = 0x00000035 */,
- "Animation" /* = 0x00000036 */,
- "Equation" /* = 0x00000037 */,
- "ButtonDropDown" /* = 0x00000038 */,
- "ButtonMenu" /* = 0x00000039 */,
- "ButtonDropGrid" /* = 0x0000003A */,
- "Whitespace" /* = 0x0000003B */,
- "PageTabList" /* = 0x0000003C */,
- "Clock" /* = 0x0000003D */,
- "Splitter" /* = 0x0000003E */,
- "LayeredPane" /* = 0x0000003F */,
- "UserRole" /* = 0x0000ffff*/
- };
-
- if (role >=0x40)
- role = QAccessible::UserRole;
- return roles[int(role)];
-}
-
-static const char *eventString(QAccessible::Event ev)
-{
- static const char *events[] = {
- "null", // 0
- "SoundPlayed" /*= 0x0001*/,
- "Alert" /*= 0x0002*/,
- "ForegroundChanged" /*= 0x0003*/,
- "MenuStart" /*= 0x0004*/,
- "MenuEnd" /*= 0x0005*/,
- "PopupMenuStart" /*= 0x0006*/,
- "PopupMenuEnd" /*= 0x0007*/,
- "ContextHelpStart" /*= 0x000C*/, // 8
- "ContextHelpEnd" /*= 0x000D*/,
- "DragDropStart" /*= 0x000E*/,
- "DragDropEnd" /*= 0x000F*/,
- "DialogStart" /*= 0x0010*/,
- "DialogEnd" /*= 0x0011*/,
- "ScrollingStart" /*= 0x0012*/,
- "ScrollingEnd" /*= 0x0013*/,
- "MenuCommand" /*= 0x0018*/, // 16
-
- // Values from IAccessible2
- "ActionChanged" /*= 0x0101*/, // 17
- "ActiveDescendantChanged",
- "AttributeChanged",
- "DocumentContentChanged",
- "DocumentLoadComplete",
- "DocumentLoadStopped",
- "DocumentReload",
- "HyperlinkEndIndexChanged",
- "HyperlinkNumberOfAnchorsChanged",
- "HyperlinkSelectedLinkChanged",
- "HypertextLinkActivated",
- "HypertextLinkSelected",
- "HyperlinkStartIndexChanged",
- "HypertextChanged",
- "HypertextNLinksChanged",
- "ObjectAttributeChanged",
- "PageChanged",
- "SectionChanged",
- "TableCaptionChanged",
- "TableColumnDescriptionChanged",
- "TableColumnHeaderChanged",
- "TableModelChanged",
- "TableRowDescriptionChanged",
- "TableRowHeaderChanged",
- "TableSummaryChanged",
- "TextAttributeChanged",
- "TextCaretMoved",
- // TextChanged, deprecated, use TextUpdated
- //TextColumnChanged = TextCaretMoved + 2,
- "TextInserted",
- "TextRemoved",
- "TextUpdated",
- "TextSelectionChanged",
- "VisibleDataChanged", /*= 0x0101+32*/
- "ObjectCreated" /*= 0x8000*/, // 49
- "ObjectDestroyed" /*= 0x8001*/,
- "ObjectShow" /*= 0x8002*/,
- "ObjectHide" /*= 0x8003*/,
- "ObjectReorder" /*= 0x8004*/,
- "Focus" /*= 0x8005*/,
- "Selection" /*= 0x8006*/,
- "SelectionAdd" /*= 0x8007*/,
- "SelectionRemove" /*= 0x8008*/,
- "SelectionWithin" /*= 0x8009*/,
- "StateChanged" /*= 0x800A*/,
- "LocationChanged" /*= 0x800B*/,
- "NameChanged" /*= 0x800C*/,
- "DescriptionChanged" /*= 0x800D*/,
- "ValueChanged" /*= 0x800E*/,
- "ParentChanged" /*= 0x800F*/,
- "HelpChanged" /*= 0x80A0*/,
- "DefaultActionChanged" /*= 0x80B0*/,
- "AcceleratorChanged" /*= 0x80C0*/
- };
- int e = int(ev);
- if (e <= 0x80c0) {
- const int last = sizeof(events)/sizeof(char*) - 1;
-
- if (e <= 0x07)
- return events[e];
- else if (e <= 0x13)
- return events[e - 0x0c + 8];
- else if (e == 0x18)
- return events[16];
- else if (e <= 0x0101 + 32)
- return events[e - 0x101 + 17];
- else if (e <= 0x800f)
- return events[e - 0x8000 + 49];
- else if (e == 0x80a0)
- return events[last - 2];
- else if (e == 0x80b0)
- return events[last - 1];
- else if (e == 0x80c0)
- return events[last];
- }
- return "unknown";
-};
-
void showDebug(const char* funcName, const QAccessibleInterface *iface)
{
- qDebug() << "Role:" << roleString(iface->role(0))
+ qDebug() << "Role:" << qAccessibleRoleString(iface->role(0))
<< "Name:" << iface->text(QAccessible::Name, 0)
<< "State:" << QString::number(int(iface->state(0)), 16)
<< QLatin1String(funcName);
@@ -746,38 +571,52 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::Invoke(long dispIdMember, const _G
/*
IAccessible
+
+IAccessible::accHitTest documents the value returned in pvarID like this:
+
+| *Point location* | *vt member* | *Value member* |
++========================================================+=============+=========================+
+| Outside of the object's boundaries, and either inside | VT_EMPTY | None. |
+| or outside of the object's bounding rectangle. | | |
++--------------------------------------------------------+-------------+-------------------------+
+| Within the object but not within a child element or a | VT_I4 | lVal is CHILDID_SELF |
+| child object. | | |
++--------------------------------------------------------+-------------+-------------------------+
+| Within a child element. | VT_I4 | lVal contains |
+| | | the child ID. |
++--------------------------------------------------------+-------------+-------------------------+
+| Within a child object. | VT_DISPATCH | pdispVal is set to the |
+| | | child object's IDispatch|
+| | | interface pointer |
++--------------------------------------------------------+-------------+-------------------------+
*/
HRESULT STDMETHODCALLTYPE QWindowsAccessible::accHitTest(long xLeft, long yTop, VARIANT *pvarID)
{
+
showDebug(__FUNCTION__, accessible);
if (!accessible->isValid())
return E_FAIL;
- int control = accessible->childAt(xLeft, yTop);
- if (control == -1) {
- (*pvarID).vt = VT_EMPTY;
- return S_FALSE;
- }
- QAccessibleInterface *acc = 0;
- if (control)
- accessible->navigate(QAccessible::Child, control, &acc);
- if (!acc) {
- (*pvarID).vt = VT_I4;
- (*pvarID).lVal = control;
- return S_OK;
- }
-
- QWindowsAccessible* wacc = new QWindowsAccessible(acc);
- IDispatch *iface = 0;
- wacc->QueryInterface(IID_IDispatch, (void**)&iface);
- if (iface) {
- (*pvarID).vt = VT_DISPATCH;
- (*pvarID).pdispVal = iface;
- return S_OK;
+ QAccessibleInterface *child = accessible->childAt(xLeft, yTop);
+ if (child == 0) {
+ // no child found, return this item if it contains the coordinates
+ if (accessible->rect().contains(xLeft, yTop)) {
+ (*pvarID).vt = VT_I4;
+ (*pvarID).lVal = CHILDID_SELF;
+ return S_OK;
+ }
} else {
- delete wacc;
+ QWindowsAccessible* wacc = new QWindowsAccessible(child);
+ IDispatch *iface = 0;
+ wacc->QueryInterface(IID_IDispatch, (void**)&iface);
+ if (iface) {
+ (*pvarID).vt = VT_DISPATCH;
+ (*pvarID).pdispVal = iface;
+ return S_OK;
+ }
}
+ // Did not find anything
(*pvarID).vt = VT_EMPTY;
return S_FALSE;
}
@@ -823,13 +662,12 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
return E_FAIL;
QAccessibleInterface *acc = 0;
- int control = -1;
switch (navDir) {
case NAVDIR_FIRSTCHILD:
- control = accessible->navigate(QAccessible::Child, 1, &acc);
+ acc = accessible->child(0);
break;
case NAVDIR_LASTCHILD:
- control = accessible->navigate(QAccessible::Child, accessible->childCount(), &acc);
+ acc = accessible->child(accessible->childCount() - 1);
break;
case NAVDIR_NEXT:
case NAVDIR_PREVIOUS:
@@ -838,42 +676,108 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
if (parent) {
int index = parent->indexOfChild(accessible);
index += (navDir == NAVDIR_NEXT) ? 1 : -1;
- if (index > 0 && index <= parent->childCount())
- control = parent->navigate(QAccessible::Child, index, &acc);
+ if (index >= 0 && index < parent->childCount())
+ acc = parent->child(index);
delete parent;
}
} else {
int index = varStart.lVal;
index += (navDir == NAVDIR_NEXT) ? 1 : -1;
if (index > 0 && index <= accessible->childCount())
- control = accessible->navigate(QAccessible::Child, index, &acc);
+ acc = accessible->child(index - 1);
}
break;
+
+ // Geometrical
case NAVDIR_UP:
- control = accessible->navigate(QAccessible::Up, varStart.lVal, &acc);
- break;
case NAVDIR_DOWN:
- control = accessible->navigate(QAccessible::Down, varStart.lVal, &acc);
- break;
case NAVDIR_LEFT:
- control = accessible->navigate(QAccessible::Left, varStart.lVal, &acc);
- break;
case NAVDIR_RIGHT:
- control = accessible->navigate(QAccessible::Right, varStart.lVal, &acc);
+ if (QAccessibleInterface *pIface = accessible->parent()) {
+
+ QRect startg = accessible->rect();
+ QPoint startc = startg.center();
+ QAccessibleInterface *candidate = 0;
+ unsigned mindist = UINT_MAX; // will work on screen sizes at least up to 46340x46340
+ const int sibCount = pIface->childCount();
+ for (int i = 0; i < sibCount; ++i) {
+ QAccessibleInterface *sibling = 0;
+ sibling = pIface->child(i);
+ Q_ASSERT(sibling);
+ if ((accessible->relationTo(sibling) & QAccessible::Self) || sibling->state().invisible) {
+ //ignore ourself and invisible siblings
+ delete sibling;
+ continue;
+ }
+
+ QRect sibg = sibling->rect();
+ QPoint sibc = sibg.center();
+ QPoint sibp;
+ QPoint startp;
+ QPoint distp;
+ switch (navDir) {
+ case NAVDIR_LEFT:
+ startp = QPoint(startg.left(), startg.top() + startg.height() / 2);
+ sibp = QPoint(sibg.right(), sibg.top() + sibg.height() / 2);
+ if (QPoint(sibc - startc).x() >= 0) {
+ delete sibling;
+ continue;
+ }
+ distp = sibp - startp;
+ break;
+ case NAVDIR_RIGHT:
+ startp = QPoint(startg.right(), startg.top() + startg.height() / 2);
+ sibp = QPoint(sibg.left(), sibg.top() + sibg.height() / 2);
+ if (QPoint(sibc - startc).x() <= 0) {
+ delete sibling;
+ continue;
+ }
+ distp = sibp - startp;
+ break;
+ case NAVDIR_UP:
+ startp = QPoint(startg.left() + startg.width() / 2, startg.top());
+ sibp = QPoint(sibg.left() + sibg.width() / 2, sibg.bottom());
+ if (QPoint(sibc - startc).y() >= 0) {
+ delete sibling;
+ continue;
+ }
+ distp = sibp - startp;
+ break;
+ case NAVDIR_DOWN:
+ startp = QPoint(startg.left() + startg.width() / 2, startg.bottom());
+ sibp = QPoint(sibg.left() + sibg.width() / 2, sibg.top());
+ if (QPoint(sibc - startc).y() <= 0) {
+ delete sibling;
+ continue;
+ }
+ distp = sibp - startp;
+ break;
+ default:
+ break;
+ }
+
+ // Since we're *comparing* (and not measuring) distances, we can compare the
+ // squared distance, (thus, no need to take the sqrt()).
+ unsigned dist = distp.x() * distp.x() + distp.y() * distp.y();
+ if (dist < mindist) {
+ delete candidate;
+ candidate = sibling;
+ mindist = dist;
+ } else {
+ delete sibling;
+ }
+ }
+ delete pIface;
+ acc = candidate;
+ }
break;
default:
break;
}
- if (control == -1) {
+ if (!acc) {
(*pvarEnd).vt = VT_EMPTY;
return S_FALSE;
}
- if (!acc) {
- (*pvarEnd).vt = VT_I4;
- (*pvarEnd).lVal = control;
- return S_OK;
- }
-
QWindowsAccessible* wacc = new QWindowsAccessible(acc);
IDispatch *iface = 0;
@@ -911,18 +815,27 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accChild(VARIANT varChildID, I
acc = QAccessible::queryAccessibleInterface(ref.first);
if (acc && ref.second) {
if (ref.second) {
- QAccessibleInterface *res;
- int index = acc->navigate(QAccessible::Child, ref.second, &res);
+ QAccessibleInterface *res = acc->child(ref.second - 1);
delete acc;
- if (index == -1)
+ if (!res)
return E_INVALIDARG;
acc = res;
}
}
}
} else {
- QAccessible::RelationFlag rel = childIndex ? QAccessible::Child : QAccessible::Self;
- accessible->navigate(rel, childIndex, &acc);
+ if (childIndex) {
+ acc = accessible->child(childIndex - 1);
+ } else {
+ // Yes, some AT clients (Active Accessibility Object Inspector)
+ // actually ask for the same object. As a consequence, we need to clone ourselves:
+ if (QAccessibleInterface *par = accessible->parent()) {
+ const int indexOf = par->indexOfChild(accessible);
+ QAccessibleInterface *clone = par->child(indexOf);
+ delete par;
+ acc = clone;
+ }
+ }
}
if (acc) {
@@ -1151,8 +1064,62 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accState(VARIANT varID, VARIAN
state = accessible->state();
}
+ LONG st = 0;
+ if (state.animated)
+ st |= STATE_SYSTEM_ANIMATED;
+ if (state.busy)
+ st |= STATE_SYSTEM_BUSY;
+ if (state.checked)
+ st |= STATE_SYSTEM_CHECKED;
+ if (state.collapsed)
+ st |= STATE_SYSTEM_COLLAPSED;
+ if (state.defaultButton)
+ st |= STATE_SYSTEM_DEFAULT;
+ if (state.expanded)
+ st |= STATE_SYSTEM_EXPANDED;
+ if (state.extSelectable)
+ st |= STATE_SYSTEM_EXTSELECTABLE;
+ if (state.focusable)
+ st |= STATE_SYSTEM_FOCUSABLE;
+ if (state.focused)
+ st |= STATE_SYSTEM_FOCUSED;
+ if (state.hasPopup)
+ st |= STATE_SYSTEM_HASPOPUP;
+ if (state.hotTracked)
+ st |= STATE_SYSTEM_HOTTRACKED;
+ if (state.invisible)
+ st |= STATE_SYSTEM_INVISIBLE;
+ if (state.linked)
+ st |= STATE_SYSTEM_LINKED;
+ if (state.marqueed)
+ st |= STATE_SYSTEM_MARQUEED;
+ if (state.checkStateMixed)
+ st |= STATE_SYSTEM_MIXED;
+ if (state.movable)
+ st |= STATE_SYSTEM_MOVEABLE;
+ if (state.multiSelectable)
+ st |= STATE_SYSTEM_MULTISELECTABLE;
+ if (state.offscreen)
+ st |= STATE_SYSTEM_OFFSCREEN;
+ if (state.pressed)
+ st |= STATE_SYSTEM_PRESSED;
+ if (state.passwordEdit)
+ st |= STATE_SYSTEM_PROTECTED;
+ if (state.readOnly)
+ st |= STATE_SYSTEM_READONLY;
+ if (state.selectable)
+ st |= STATE_SYSTEM_SELECTABLE;
+ if (state.selected)
+ st |= STATE_SYSTEM_SELECTED;
+ if (state.selfVoicing)
+ st |= STATE_SYSTEM_SELFVOICING;
+ if (state.sizeable)
+ st |= STATE_SYSTEM_SIZEABLE;
+ if (state.traversed)
+ st |= STATE_SYSTEM_TRAVERSED;
+
(*pvarState).vt = VT_I4;
- (*pvarState).lVal = state;
+ (*pvarState).lVal = st;
return S_OK;
}
@@ -1187,6 +1154,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::put_accValue(VARIANT, BSTR)
// moz: [important]
HRESULT STDMETHODCALLTYPE QWindowsAccessible::accSelect(long flagsSelect, VARIANT varID)
{
+ Q_UNUSED(flagsSelect);
+ Q_UNUSED(varID);
showDebug(__FUNCTION__, accessible);
if (!accessible->isValid())
return E_FAIL;
@@ -1260,7 +1229,7 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accSelection(VARIANT *pvarChil
bool isSelected = false;
QAccessibleInterface *child = accessible->child(i);
if (child) {
- isSelected = child->state() & QAccessible::Selected;
+ isSelected = child->state().selected;
delete child;
}
if (isSelected)
@@ -1402,7 +1371,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QObject *o, int who, QAcce
// An event has to be associated with a window,
// so find the first parent that is a widget and that has a WId
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(o);
- QWindow *window = window_helper(iface);
+ QWindow *window = iface ? window_helper(iface) : 0;
if (!window) {
window = QGuiApplication::activeWindow();
diff --git a/src/plugins/platforms/windows/qwindowsaccessibility.h b/src/plugins/platforms/windows/qwindowsaccessibility.h
index aec3ffd4b1..892480ecf4 100644
--- a/src/plugins/platforms/windows/qwindowsaccessibility.h
+++ b/src/plugins/platforms/windows/qwindowsaccessibility.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
index ecabdcfcc7..56e74c5587 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.h b/src/plugins/platforms/windows/qwindowsbackingstore.h
index 72120abb34..60cc5ad787 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.h
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp
index bc70307015..e5edab3f4b 100644
--- a/src/plugins/platforms/windows/qwindowsclipboard.cpp
+++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -311,6 +311,8 @@ QMimeData *QWindowsClipboard::mimeData(QClipboard::Mode mode)
qDebug() << __FUNCTION__ << mode;
if (mode != QClipboard::Clipboard)
return 0;
+ if (ownsClipboard())
+ return m_data->mimeData();
return &m_retrievalData;
}
@@ -329,7 +331,8 @@ void QWindowsClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
const HRESULT src = OleSetClipboard(m_data);
if (src != S_OK) {
- qErrnoWarning("OleSetClipboard: Failed to set data on clipboard: %s",
+ qErrnoWarning("OleSetClipboard: Failed to set mime data (%s) on clipboard: %s",
+ qPrintable(mimeData->formats().join(QStringLiteral(", "))),
QWindowsContext::comErrorString(src).constData());
releaseIData();
return;
diff --git a/src/plugins/platforms/windows/qwindowsclipboard.h b/src/plugins/platforms/windows/qwindowsclipboard.h
index ffe441f732..321db201e8 100644
--- a/src/plugins/platforms/windows/qwindowsclipboard.h
+++ b/src/plugins/platforms/windows/qwindowsclipboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index f620cf8724..5e101d1869 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -164,11 +164,10 @@ void QWindowsUser32DLL::init()
// MinGW (g++ 3.4.5) accepts only C casts.
setLayeredWindowAttributes = (SetLayeredWindowAttributes)(library.resolve("SetLayeredWindowAttributes"));
updateLayeredWindow = (UpdateLayeredWindow)(library.resolve("UpdateLayeredWindow"));
- updateLayeredWindowIndirect = (UpdateLayeredWindowIndirect)(library.resolve("UpdateLayeredWindowIndirect"));
-
- Q_ASSERT(setLayeredWindowAttributes && updateLayeredWindow
- && updateLayeredWindowIndirect);
+ if (!setLayeredWindowAttributes || !updateLayeredWindow)
+ qFatal("This version of Windows is not supported (User32.dll is missing the symbols 'SetLayeredWindowAttributes', 'UpdateLayeredWindow').");
+ updateLayeredWindowIndirect = (UpdateLayeredWindowIndirect)(library.resolve("UpdateLayeredWindowIndirect"));
isHungAppWindow = (IsHungAppWindow)library.resolve("IsHungAppWindow");
}
@@ -543,8 +542,8 @@ QWindowsMimeConverter &QWindowsContext::mimeConverter() const
}
/*!
- \brief Convenience to create a non-visible dummy window
- for example used as clipboard watcher or for GL.
+ \brief Convenience to create a non-visible, message-only dummy
+ window for example used as clipboard watcher or for GL.
*/
HWND QWindowsContext::createDummyWindow(const QString &classNameIn,
@@ -558,7 +557,7 @@ HWND QWindowsContext::createDummyWindow(const QString &classNameIn,
windowName, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- 0, NULL, (HINSTANCE)GetModuleHandle(0), NULL);
+ HWND_MESSAGE, NULL, (HINSTANCE)GetModuleHandle(0), NULL);
}
/*!
diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
index 1ff93e2d88..9a8acbbb51 100644
--- a/src/plugins/platforms/windows/qwindowscontext.h
+++ b/src/plugins/platforms/windows/qwindowscontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -77,9 +77,9 @@ struct QWindowsUser32DLL
// Functions missing in Q_CC_GNU stub libraries.
SetLayeredWindowAttributes setLayeredWindowAttributes;
UpdateLayeredWindow updateLayeredWindow;
- UpdateLayeredWindowIndirect updateLayeredWindowIndirect;
// Functions missing in older versions of Windows
+ UpdateLayeredWindowIndirect updateLayeredWindowIndirect;
IsHungAppWindow isHungAppWindow;
// Touch functions from Windows 7 onwards (also for use with Q_CC_MSVC).
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp
index a3edd785d3..2b228e9fb8 100644
--- a/src/plugins/platforms/windows/qwindowscursor.cpp
+++ b/src/plugins/platforms/windows/qwindowscursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h
index 261aacc09e..61ed170af2 100644
--- a/src/plugins/platforms/windows/qwindowscursor.h
+++ b/src/plugins/platforms/windows/qwindowscursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 58352470a6..9023769b8b 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -416,8 +416,7 @@ protected:
*/
template <class BaseClass>
-QWindowsDialogHelperBase<BaseClass>::QWindowsDialogHelperBase(QDialog *dialog) :
- m_dialog(dialog),
+QWindowsDialogHelperBase<BaseClass>::QWindowsDialogHelperBase() :
m_nativeDialog(0),
m_ownerWindow(0)
{
@@ -437,11 +436,8 @@ template <class BaseClass>
QWindowsNativeDialogBase *QWindowsDialogHelperBase<BaseClass>::ensureNativeDialog()
{
// Create dialog and apply common settings.
- if (!m_nativeDialog) {
+ if (!m_nativeDialog)
m_nativeDialog = createNativeDialog();
- if (m_nativeDialog)
- m_nativeDialog->setWindowTitle(m_dialog->windowTitle());
- }
return m_nativeDialog;
}
@@ -487,9 +483,11 @@ void QWindowsDialogThread::run()
}
template <class BaseClass>
-bool QWindowsDialogHelperBase<BaseClass>::show_sys(QWindow *parent)
+bool QWindowsDialogHelperBase<BaseClass>::show_sys(QPlatformDialogHelper::ShowFlags flags,
+ Qt::WindowFlags,
+ QWindow *parent)
{
- const bool modal = m_dialog->isModal();
+ const bool modal = flags & QPlatformDialogHelper::ShowModal;
if (parent) {
m_ownerWindow = QWindowsWindow::handleOf(parent);
} else {
@@ -523,7 +521,8 @@ void QWindowsDialogHelperBase<BaseClass>::platformNativeDialogModalHelp()
if (QWindowsContext::verboseDialogs)
qDebug("%s" , __FUNCTION__);
if (QWindowsNativeDialogBase *nd =nativeDialog())
- nd->metaObject()->invokeMethod(m_dialog, "_q_platformRunNativeAppModalPanel",
+ nd->metaObject()->invokeMethod(this,
+ "emitLaunchNativeAppModalPanel",
Qt::QueuedConnection);
}
@@ -650,10 +649,10 @@ class QWindowsNativeFileDialogBase : public QWindowsNativeDialogBase
public:
~QWindowsNativeFileDialogBase();
- inline static QWindowsNativeFileDialogBase *create(QFileDialog::AcceptMode am);
+ inline static QWindowsNativeFileDialogBase *create(QFileDialogOptions::AcceptMode am);
virtual void setWindowTitle(const QString &title);
- inline void setMode(QFileDialog::FileMode mode, QFileDialog::Options options);
+ inline void setMode(QFileDialogOptions::FileMode mode, QFileDialogOptions::FileDialogOptions options);
inline void setDirectory(const QString &directory);
inline QString directory() const;
virtual void exec(HWND owner = 0);
@@ -662,6 +661,8 @@ public:
inline QString selectedNameFilter() const;
bool hideFiltersDetails() const { return m_hideFiltersDetails; }
void setHideFiltersDetails(bool h) { m_hideFiltersDetails = h; }
+ void setDefaultSuffix(const QString &s);
+ inline void setLabelText(QFileDialogOptions::DialogLabel l, const QString &text);
virtual QPlatformDialogHelper::DialogCode result() const
{ return fileResult(); }
@@ -785,25 +786,25 @@ void QWindowsNativeFileDialogBase::exec(HWND owner)
}
}
-void QWindowsNativeFileDialogBase::setMode(QFileDialog::FileMode mode, QFileDialog::Options options)
+void QWindowsNativeFileDialogBase::setMode(QFileDialogOptions::FileMode mode, QFileDialogOptions::FileDialogOptions options)
{
DWORD flags = FOS_PATHMUSTEXIST | FOS_FORCESHOWHIDDEN;
- if (options & QFileDialog::DontResolveSymlinks)
+ if (options & QFileDialogOptions::DontResolveSymlinks)
flags |= FOS_NODEREFERENCELINKS;
switch (mode) {
- case QFileDialog::AnyFile:
+ case QFileDialogOptions::AnyFile:
flags |= FOS_NOREADONLYRETURN;
- if (!(options & QFileDialog::DontConfirmOverwrite))
+ if (!(options & QFileDialogOptions::DontConfirmOverwrite))
flags |= FOS_OVERWRITEPROMPT;
break;
- case QFileDialog::ExistingFile:
+ case QFileDialogOptions::ExistingFile:
flags |= FOS_FILEMUSTEXIST;
break;
- case QFileDialog::Directory:
- case QFileDialog::DirectoryOnly:
+ case QFileDialogOptions::Directory:
+ case QFileDialogOptions::DirectoryOnly:
flags |= FOS_PICKFOLDERS | FOS_FILEMUSTEXIST;
break;
- case QFileDialog::ExistingFiles:
+ case QFileDialogOptions::ExistingFiles:
flags |= FOS_FILEMUSTEXIST | FOS_ALLOWMULTISELECT;
break;
}
@@ -905,6 +906,31 @@ void QWindowsNativeFileDialogBase::setNameFilters(const QStringList &filters)
m_fileDialog->SetFileTypes(size, comFilterSpec.data());
}
+void QWindowsNativeFileDialogBase::setDefaultSuffix(const QString &s)
+{
+ wchar_t *wSuffix = const_cast<wchar_t *>(reinterpret_cast<const wchar_t *>(s.utf16()));
+ m_fileDialog->SetDefaultExtension(wSuffix);
+}
+
+void QWindowsNativeFileDialogBase::setLabelText(QFileDialogOptions::DialogLabel l, const QString &text)
+{
+ wchar_t *wText = const_cast<wchar_t *>(reinterpret_cast<const wchar_t *>(text.utf16()));
+ switch (l) {
+ break;
+ case QFileDialogOptions::FileName:
+ m_fileDialog->SetFileNameLabel(wText);
+ break;
+ case QFileDialogOptions::Accept:
+ m_fileDialog->SetOkButtonLabel(wText);
+ break;
+ case QFileDialogOptions::LookIn:
+ case QFileDialogOptions::Reject:
+ case QFileDialogOptions::FileType:
+ case QFileDialogOptions::DialogLabelCount:
+ break;
+ }
+}
+
void QWindowsNativeFileDialogBase::selectNameFilter(const QString &filter)
{
const int index = m_nameFilters.indexOf(filter);
@@ -1052,10 +1078,10 @@ QStringList QWindowsNativeOpenFileDialog::selectedFiles() const
QFileDialog::AcceptMode.
*/
-QWindowsNativeFileDialogBase *QWindowsNativeFileDialogBase::create(QFileDialog::AcceptMode am)
+QWindowsNativeFileDialogBase *QWindowsNativeFileDialogBase::create(QFileDialogOptions::AcceptMode am)
{
QWindowsNativeFileDialogBase *result = 0;
- if (am == QFileDialog::AcceptOpen) {
+ if (am == QFileDialogOptions::AcceptOpen) {
result = new QWindowsNativeOpenFileDialog;
if (!result->init(CLSID_FileOpenDialog, IID_IFileOpenDialog)) {
delete result;
@@ -1081,10 +1107,7 @@ QWindowsNativeFileDialogBase *QWindowsNativeFileDialogBase::create(QFileDialog::
class QWindowsFileDialogHelper : public QWindowsDialogHelperBase<QPlatformFileDialogHelper>
{
public:
- explicit QWindowsFileDialogHelper(QDialog *dialog) :
- QWindowsDialogHelperBase<QPlatformFileDialogHelper>(dialog),
- m_fileDialog(qobject_cast<QFileDialog *>(dialog))
- { Q_ASSERT(m_fileDialog); }
+ QWindowsFileDialogHelper() {}
virtual bool defaultNameFilterDisables() const
{ return true; }
@@ -1101,18 +1124,16 @@ private:
virtual QWindowsNativeDialogBase *createNativeDialog();
inline QWindowsNativeFileDialogBase *nativeFileDialog() const
{ return static_cast<QWindowsNativeFileDialogBase *>(nativeDialog()); }
-
- QFileDialog *m_fileDialog;
};
QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog()
{
- QWindowsNativeFileDialogBase *result = QWindowsNativeFileDialogBase::create(m_fileDialog->acceptMode());
+ QWindowsNativeFileDialogBase *result = QWindowsNativeFileDialogBase::create(options()->acceptMode());
if (!result)
return 0;
- QObject::connect(result, SIGNAL(accepted()), m_fileDialog, SLOT(accept()),
+ QObject::connect(result, SIGNAL(accepted()), this, SIGNAL(accept()),
Qt::QueuedConnection);
- QObject::connect(result, SIGNAL(rejected()), m_fileDialog, SLOT(reject()),
+ QObject::connect(result, SIGNAL(rejected()), this, SIGNAL(reject()),
Qt::QueuedConnection);
QObject::connect(result, SIGNAL(directoryEntered(QString)),
this, SIGNAL(directoryEntered(QString)),
@@ -1125,18 +1146,26 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog()
Qt::QueuedConnection);
// Apply settings.
- result->setMode(m_fileDialog->fileMode(), m_fileDialog->options());
- const QDir directory = m_fileDialog->directory();
- if (directory.exists())
- result->setDirectory(directory.absolutePath());
- result->setHideFiltersDetails(m_fileDialog->testOption(QFileDialog::HideNameFilterDetails));
- const QStringList nameFilters = m_fileDialog->nameFilters();
- if (!nameFilters.isEmpty()) {
+ const QSharedPointer<QFileDialogOptions> &opts = options();
+ result->setWindowTitle(opts->windowTitle());
+ result->setMode(opts->fileMode(), opts->options());
+ result->setHideFiltersDetails(opts->testOption(QFileDialogOptions::HideNameFilterDetails));
+ const QStringList nameFilters = opts->nameFilters();
+ if (!nameFilters.isEmpty())
result->setNameFilters(nameFilters);
- const QString selectedNameFilter = m_fileDialog->selectedNameFilter();
- if (!selectedNameFilter.isEmpty())
- result->selectNameFilter(selectedNameFilter);
- }
+ if (opts->isLabelExplicitlySet(QFileDialogOptions::FileName))
+ result->setLabelText(QFileDialogOptions::FileName, opts->labelText(QFileDialogOptions::FileName));
+ if (opts->isLabelExplicitlySet(QFileDialogOptions::Accept))
+ result->setLabelText(QFileDialogOptions::Accept, opts->labelText(QFileDialogOptions::Accept));
+ const QString initialDirectory = opts->initialDirectory();
+ if (!initialDirectory.isEmpty())
+ result->setDirectory(initialDirectory);
+ const QString initialNameFilter = opts->initiallySelectedNameFilter();
+ if (!initialNameFilter.isEmpty())
+ result->selectNameFilter(initialNameFilter);
+ const QString defaultSuffix = opts->defaultSuffix();
+ if (!defaultSuffix.isEmpty())
+ result->setDefaultSuffix(defaultSuffix);
return result;
}
@@ -1218,6 +1247,8 @@ class QWindowsNativeColorDialog : public QWindowsNativeDialogBase
{
Q_OBJECT
public:
+ enum { CustomColorCount = 16 };
+
explicit QWindowsNativeColorDialog(const SharedPointerColor &color);
virtual void setWindowTitle(const QString &) {}
@@ -1228,7 +1259,7 @@ public slots:
virtual void close() {}
private:
- COLORREF m_customColors[16];
+ COLORREF m_customColors[CustomColorCount];
QPlatformDialogHelper::DialogCode m_code;
SharedPointerColor m_color;
};
@@ -1256,6 +1287,11 @@ void QWindowsNativeColorDialog::exec(HWND owner)
chooseColor.lStructSize = sizeof(chooseColor);
chooseColor.hwndOwner = owner;
chooseColor.lpCustColors = m_customColors;
+ QRgb *qCustomColors = QColorDialogOptions::customColors();
+ const int customColorCount = qMin(QColorDialogOptions::customColorCount(),
+ int(CustomColorCount));
+ for (int c= 0; c < customColorCount; ++c)
+ m_customColors[c] = qColorToCOLORREF(QColor(qCustomColors[c]));
chooseColor.rgbResult = qColorToCOLORREF(*m_color);
chooseColor.Flags = CC_FULLOPEN | CC_RGBINIT;
static ChooseColorWType chooseColorW = 0;
@@ -1272,6 +1308,8 @@ void QWindowsNativeColorDialog::exec(HWND owner)
}
if (m_code == QPlatformDialogHelper::Accepted) {
*m_color = COLORREFToQColor(chooseColor.rgbResult);
+ for (int c= 0; c < customColorCount; ++c)
+ qCustomColors[c] = COLORREFToQColor(m_customColors[c]).rgb();
emit accepted();
if (QWindowsContext::verboseDialogs)
qDebug() << '<' << __FUNCTION__ << m_color;
@@ -1295,8 +1333,7 @@ void QWindowsNativeColorDialog::exec(HWND owner)
class QWindowsColorDialogHelper : public QWindowsDialogHelperBase<QPlatformColorDialogHelper>
{
public:
- QWindowsColorDialogHelper(QDialog *dialog) :
- QWindowsDialogHelperBase<QPlatformColorDialogHelper>(dialog), m_currentColor(new QColor) { }
+ QWindowsColorDialogHelper() {}
virtual bool supportsNonModalDialog()
{ return false; }
@@ -1307,11 +1344,18 @@ public:
private:
inline QWindowsNativeColorDialog *nativeFileDialog() const
{ return static_cast<QWindowsNativeColorDialog *>(nativeDialog()); }
- virtual QWindowsNativeDialogBase *createNativeDialog()
- { return new QWindowsNativeColorDialog(m_currentColor); }
+ virtual QWindowsNativeDialogBase *createNativeDialog();
+
SharedPointerColor m_currentColor;
};
+QWindowsNativeDialogBase *QWindowsColorDialogHelper::createNativeDialog()
+{
+ QWindowsNativeColorDialog *nativeDialog = new QWindowsNativeColorDialog(m_currentColor);
+ nativeDialog->setWindowTitle(options()->windowTitle());
+ return nativeDialog;
+}
+
namespace QWindowsDialogs {
// QWindowsDialogHelperBase creation functions
@@ -1342,10 +1386,10 @@ QPlatformDialogHelper *createHelper(QDialog *dialog)
switch (QWindowsDialogs::dialogType(dialog)) {
case QWindowsDialogs::FileDialog:
- return new QWindowsFileDialogHelper(dialog);
+ return new QWindowsFileDialogHelper();
case QWindowsDialogs::ColorDialog:
#ifdef USE_NATIVE_COLOR_DIALOG
- return new QWindowsColorDialogHelper(dialog);
+ return new QWindowsColorDialogHelper();
#endif
case QWindowsDialogs::FontDialog:
case QWindowsDialogs::UnknownType:
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.h b/src/plugins/platforms/windows/qwindowsdialoghelpers.h
index 96c03bbaec..120076e58b 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.h
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,7 +73,9 @@ public:
virtual void platformNativeDialogModalHelp();
virtual void _q_platformRunNativeAppModalPanel();
virtual void deleteNativeDialog_sys();
- virtual bool show_sys(QWindow *parent);
+ virtual bool show_sys(QPlatformDialogHelper::ShowFlags flags,
+ Qt::WindowFlags windowFlags,
+ QWindow *parent);
virtual void hide_sys();
virtual QVariant styleHint(QPlatformDialogHelper::StyleHint) const;
@@ -82,14 +84,13 @@ public:
virtual bool supportsNonModalDialog() const { return true; }
protected:
- explicit QWindowsDialogHelperBase(QDialog *dialog);
+ QWindowsDialogHelperBase();
QWindowsNativeDialogBase *nativeDialog() const;
private:
virtual QWindowsNativeDialogBase *createNativeDialog() = 0;
inline QWindowsNativeDialogBase *ensureNativeDialog();
- QDialog *m_dialog;
QWindowsNativeDialogBase *m_nativeDialog;
HWND m_ownerWindow;
};
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp
index 56f3a6d906..cbd81b99a0 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.cpp
+++ b/src/plugins/platforms/windows/qwindowsdrag.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -61,6 +61,146 @@
QT_BEGIN_NAMESPACE
+// These pixmaps approximate the images in the Windows User Interface Guidelines.
+// XPM
+
+static const char * const moveDragCursorXpmC[] = {
+"11 20 3 1",
+". c None",
+"a c #FFFFFF",
+"X c #000000", // X11 cursor is traditionally black
+"aa.........",
+"aXa........",
+"aXXa.......",
+"aXXXa......",
+"aXXXXa.....",
+"aXXXXXa....",
+"aXXXXXXa...",
+"aXXXXXXXa..",
+"aXXXXXXXXa.",
+"aXXXXXXXXXa",
+"aXXXXXXaaaa",
+"aXXXaXXa...",
+"aXXaaXXa...",
+"aXa..aXXa..",
+"aa...aXXa..",
+"a.....aXXa.",
+"......aXXa.",
+".......aXXa",
+".......aXXa",
+"........aa."};
+
+
+/* XPM */
+static const char * const copyDragCursorXpmC[] = {
+"24 30 3 1",
+". c None",
+"a c #000000",
+"X c #FFFFFF",
+"XX......................",
+"XaX.....................",
+"XaaX....................",
+"XaaaX...................",
+"XaaaaX..................",
+"XaaaaaX.................",
+"XaaaaaaX................",
+"XaaaaaaaX...............",
+"XaaaaaaaaX..............",
+"XaaaaaaaaaX.............",
+"XaaaaaaXXXX.............",
+"XaaaXaaX................",
+"XaaXXaaX................",
+"XaX..XaaX...............",
+"XX...XaaX...............",
+"X.....XaaX..............",
+"......XaaX..............",
+".......XaaX.............",
+".......XaaX.............",
+"........XX...aaaaaaaaaaa",
+".............aXXXXXXXXXa",
+".............aXXXXXXXXXa",
+".............aXXXXaXXXXa",
+".............aXXXXaXXXXa",
+".............aXXaaaaaXXa",
+".............aXXXXaXXXXa",
+".............aXXXXaXXXXa",
+".............aXXXXXXXXXa",
+".............aXXXXXXXXXa",
+".............aaaaaaaaaaa"};
+
+/* XPM */
+static const char * const linkDragCursorXpmC[] = {
+"24 30 3 1",
+". c None",
+"a c #000000",
+"X c #FFFFFF",
+"XX......................",
+"XaX.....................",
+"XaaX....................",
+"XaaaX...................",
+"XaaaaX..................",
+"XaaaaaX.................",
+"XaaaaaaX................",
+"XaaaaaaaX...............",
+"XaaaaaaaaX..............",
+"XaaaaaaaaaX.............",
+"XaaaaaaXXXX.............",
+"XaaaXaaX................",
+"XaaXXaaX................",
+"XaX..XaaX...............",
+"XX...XaaX...............",
+"X.....XaaX..............",
+"......XaaX..............",
+".......XaaX.............",
+".......XaaX.............",
+"........XX...aaaaaaaaaaa",
+".............aXXXXXXXXXa",
+".............aXXXaaaaXXa",
+".............aXXXXaaaXXa",
+".............aXXXaaaaXXa",
+".............aXXaaaXaXXa",
+".............aXXaaXXXXXa",
+".............aXXaXXXXXXa",
+".............aXXXaXXXXXa",
+".............aXXXXXXXXXa",
+".............aaaaaaaaaaa"};
+
+static const char * const ignoreDragCursorXpmC[] = {
+"24 30 3 1",
+". c None",
+"a c #000000",
+"X c #FFFFFF",
+"aa......................",
+"aXa.....................",
+"aXXa....................",
+"aXXXa...................",
+"aXXXXa..................",
+"aXXXXXa.................",
+"aXXXXXXa................",
+"aXXXXXXXa...............",
+"aXXXXXXXXa..............",
+"aXXXXXXXXXa.............",
+"aXXXXXXaaaa.............",
+"aXXXaXXa................",
+"aXXaaXXa................",
+"aXa..aXXa...............",
+"aa...aXXa...............",
+"a.....aXXa..............",
+"......aXXa.....XXXX.....",
+".......aXXa..XXaaaaXX...",
+".......aXXa.XaaaaaaaaX..",
+"........aa.XaaaXXXXaaaX.",
+"...........XaaaaX..XaaX.",
+"..........XaaXaaaX..XaaX",
+"..........XaaXXaaaX.XaaX",
+"..........XaaX.XaaaXXaaX",
+"..........XaaX..XaaaXaaX",
+"...........XaaX..XaaaaX.",
+"...........XaaaXXXXaaaX.",
+"............XaaaaaaaaX..",
+".............XXaaaaXX...",
+"...............XXXX....."};
+
/*!
\class QWindowsDropMimeData
\brief Special mime data class for data retrieval from Drag operations.
@@ -139,7 +279,7 @@ static inline Qt::KeyboardModifiers toQtKeyboardModifiers(DWORD keyState)
class QWindowsOleDropSource : public IDropSource
{
public:
- QWindowsOleDropSource();
+ explicit QWindowsOleDropSource(QWindowsDrag *drag);
virtual ~QWindowsOleDropSource();
void createCursors();
@@ -158,6 +298,7 @@ private:
inline void clearCursors();
+ QWindowsDrag *m_drag;
Qt::MouseButtons m_currentButtons;
Qt::DropAction m_currentAction;
ActionCursorMap m_cursors;
@@ -165,8 +306,8 @@ private:
ULONG m_refs;
};
-QWindowsOleDropSource::QWindowsOleDropSource() :
- m_currentButtons(Qt::NoButton), m_currentAction(Qt::IgnoreAction),
+QWindowsOleDropSource::QWindowsOleDropSource(QWindowsDrag *drag) :
+ m_drag(drag), m_currentButtons(Qt::NoButton), m_currentAction(Qt::IgnoreAction),
m_refs(1)
{
if (QWindowsContext::verboseOLE)
@@ -196,7 +337,14 @@ void QWindowsOleDropSource::createCursors()
actions << Qt::IgnoreAction;
const QPoint hotSpot = manager->object->hotSpot();
for (int cnum = 0; cnum < actions.size(); ++cnum) {
- const QPixmap cpm = manager->dragCursor(actions.at(cnum));
+ const Qt::DropAction action = actions.at(cnum);
+ QPixmap cpm = manager->dragCursor(action);
+ if (cpm.isNull())
+ cpm = m_drag->defaultCursor(action);
+ if (cpm.isNull()) {
+ qWarning("%s: Unable to obtain drag cursor for %d.", __FUNCTION__, action);
+ continue;
+ }
int w = cpm.width();
int h = cpm.height();
@@ -210,13 +358,13 @@ void QWindowsOleDropSource::createCursors()
h = y2 - y1 + 1;
}
- const QRect srcRect = pixmap.rect();
- const QPoint pmDest = QPoint(qMax(0, -hotSpot.x()), qMax(0, -hotSpot.y()));
const QPoint newHotSpot = hotSpot;
QPixmap newCursor(w, h);
if (hasPixmap) {
newCursor.fill(QColor(0, 0, 0, 0));
QPainter p(&newCursor);
+ const QRect srcRect = pixmap.rect();
+ const QPoint pmDest = QPoint(qMax(0, -hotSpot.x()), qMax(0, -hotSpot.y()));
p.drawPixmap(pmDest, pixmap, srcRect);
p.drawPixmap(qMax(0,newHotSpot.x()),qMax(0,newHotSpot.y()),cpm);
} else {
@@ -227,7 +375,7 @@ void QWindowsOleDropSource::createCursors()
const int hotY = hasPixmap ? qMax(0,newHotSpot.y()) : 0;
if (const HCURSOR sysCursor = QWindowsCursor::createPixmapCursor(newCursor, hotX, hotY))
- m_cursors.insert(actions.at(cnum), sysCursor);
+ m_cursors.insert(action, sysCursor);
}
if (QWindowsContext::verboseOLE)
qDebug("%s %d cursors", __FUNCTION__, m_cursors.size());
@@ -638,6 +786,30 @@ QWindowsDrag::~QWindowsDrag()
{
}
+QPixmap QWindowsDrag::defaultCursor(Qt::DropAction action) const
+{
+ switch (action) {
+ case Qt::CopyAction:
+ if (m_copyDragCursor.isNull())
+ m_copyDragCursor = QPixmap(copyDragCursorXpmC);
+ return m_copyDragCursor;
+ case Qt::TargetMoveAction:
+ case Qt::MoveAction:
+ if (m_moveDragCursor.isNull())
+ m_moveDragCursor = QPixmap(moveDragCursorXpmC);
+ return m_moveDragCursor;
+ case Qt::LinkAction:
+ if (m_linkDragCursor.isNull())
+ m_linkDragCursor = QPixmap(linkDragCursorXpmC);
+ return m_linkDragCursor;
+ default:
+ break;
+ }
+ if (m_ignoreDragCursor.isNull())
+ m_ignoreDragCursor = QPixmap(ignoreDragCursorXpmC);
+ return m_ignoreDragCursor;
+}
+
void QWindowsDrag::startDrag()
{
// TODO: Accessibility handling?
@@ -646,7 +818,7 @@ void QWindowsDrag::startDrag()
m_dragBeingCancelled = false;
DWORD resultEffect;
- QWindowsOleDropSource *windowDropSource = new QWindowsOleDropSource();
+ QWindowsOleDropSource *windowDropSource = new QWindowsOleDropSource(this);
windowDropSource->createCursors();
QWindowsOleDataObject *dropDataObject = new QWindowsOleDataObject(dropData);
const Qt::DropActions possibleActions = dragManager->possible_actions;
diff --git a/src/plugins/platforms/windows/qwindowsdrag.h b/src/plugins/platforms/windows/qwindowsdrag.h
index 621b769d28..2f2aa569f1 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.h
+++ b/src/plugins/platforms/windows/qwindowsdrag.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -105,10 +105,17 @@ public:
bool dragBeingCancelled() const { return m_dragBeingCancelled; }
+ QPixmap defaultCursor(Qt::DropAction action) const;
+
private:
QWindowsDropMimeData m_dropData;
IDataObject *m_dropDataObject;
bool m_dragBeingCancelled;
+
+ mutable QPixmap m_copyDragCursor;
+ mutable QPixmap m_moveDragCursor;
+ mutable QPixmap m_linkDragCursor;
+ mutable QPixmap m_ignoreDragCursor;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index b96ae6f3da..5969fbf0ab 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,6 +51,8 @@
#include <QtCore/qmath.h>
#include <QtCore/QDebug>
+#include <wchar.h>
+
#if !defined(QT_NO_DIRECTWRITE)
# include <dwrite.h>
# include <d2d1.h>
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.h b/src/plugins/platforms/windows/qwindowsfontdatabase.h
index 2e25ccf1a1..c991aed5ca 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.h
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
index 1c4a855255..c7bd5ebbb1 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,6 +51,8 @@
#include <QtGui/QGuiApplication>
#include <QtGui/QFontDatabase>
+#include <wchar.h>
+
static inline QFontDatabase::WritingSystem writingSystemFromScript(const QString &scriptName)
{
if (scriptName == QStringLiteral("Western")
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h
index d9b8106227..94cf556925 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index b4faf597e1..f6c456bc7b 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h
index 9831d568ea..75968cc403 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.h
+++ b/src/plugins/platforms/windows/qwindowsfontengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 6f1e12a6d0..293c1c3b15 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
index 1dfa69e3b7..f995c49a60 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 1685adccec..1866faecd1 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index f2784f3d9b..17a33a7c14 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
index 06ee97278a..cd5d28317e 100644
--- a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
+++ b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsguieventdispatcher.h b/src/plugins/platforms/windows/qwindowsguieventdispatcher.h
index c385631a30..8d2bc1997b 100644
--- a/src/plugins/platforms/windows/qwindowsguieventdispatcher.h
+++ b/src/plugins/platforms/windows/qwindowsguieventdispatcher.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
index 8cd26f1efe..41c1a6c8f0 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.h b/src/plugins/platforms/windows/qwindowsinputcontext.h
index 17cae5b158..d735d1fd93 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.h
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index cebb17c9c7..8bb8bafe74 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -271,6 +271,14 @@ QPlatformFontDatabase *QWindowsIntegration::fontDatabase() const
return d->m_fontDatabase;
}
+static inline int keyBoardAutoRepeatRateMS()
+{
+ DWORD time = 0;
+ if (SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &time, 0))
+ return time ? 1000 / static_cast<int>(time) : 500;
+ return 30;
+}
+
QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
{
switch (hint) {
@@ -278,7 +286,8 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co
if (const unsigned timeMS = GetCaretBlinkTime())
return QVariant(int(timeMS));
break;
-
+ case KeyboardAutoRepeatRate:
+ return QVariant(keyBoardAutoRepeatRateMS());
case QPlatformIntegration::StartDragTime:
case QPlatformIntegration::StartDragDistance:
case QPlatformIntegration::MouseDoubleClickInterval:
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index 1c2a714fcb..fa133fa5de 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsinternalmimedata.h b/src/plugins/platforms/windows/qwindowsinternalmimedata.h
index 9997bddcf7..ceecd08f70 100644
--- a/src/plugins/platforms/windows/qwindowsinternalmimedata.h
+++ b/src/plugins/platforms/windows/qwindowsinternalmimedata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 8049b0832d..369deb7598 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.h b/src/plugins/platforms/windows/qwindowskeymapper.h
index 0eb743c924..e5e50c5886 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.h
+++ b/src/plugins/platforms/windows/qwindowskeymapper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index cd4da16cff..026ab94d32 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsmime.h b/src/plugins/platforms/windows/qwindowsmime.h
index 3b71e55cfa..adac573375 100644
--- a/src/plugins/platforms/windows/qwindowsmime.h
+++ b/src/plugins/platforms/windows/qwindowsmime.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index a2b6aa8d68..e491029ea1 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -240,7 +240,6 @@ bool QWindowsMouseHandler::translateTouchEvent(QWindow *window, HWND,
const TOUCHINPUT &winTouchInput = winTouchInputs[i];
QTouchPoint touchPoint;
touchPoint.pressure = 1.0;
- touchPoint.isPrimary = (winTouchInput.dwFlags & TOUCHEVENTF_PRIMARY) != 0;
touchPoint.id = m_touchInputIDToTouchPointID.value(winTouchInput.dwID, -1);
if (touchPoint.id == -1) {
touchPoint.id = m_touchInputIDToTouchPointID.size();
@@ -275,19 +274,18 @@ bool QWindowsMouseHandler::translateTouchEvent(QWindow *window, HWND,
QWindowsContext::user32dll.closeTouchInputHandle((HANDLE) msg.lParam);
// all touch points released, forget the ids we've seen, they may not be reused
- if ((allStates & Qt::TouchPointStateMask) == Qt::TouchPointReleased)
+ if (allStates == Qt::TouchPointReleased)
m_touchInputIDToTouchPointID.clear();
if (!m_touchDevice) {
m_touchDevice = new QTouchDevice;
+ // TODO: Device used to be hardcoded to screen in previous code.
m_touchDevice->setType(QTouchDevice::TouchScreen);
m_touchDevice->setCapabilities(QTouchDevice::Position | QTouchDevice::Area | QTouchDevice::NormalizedPosition);
QWindowSystemInterface::registerTouchDevice(m_touchDevice);
}
- // TODO: Device used to be hardcoded to screen in previous code.
- // What is the correct event type? Which parts of translateRawTouchEvent() are required?
- QWindowSystemInterface::handleTouchEvent(window, QEvent::TouchBegin,
+ QWindowSystemInterface::handleTouchEvent(window,
m_touchDevice,
touchPoints);
return true;
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.h b/src/plugins/platforms/windows/qwindowsmousehandler.h
index 178936e2ec..4885d82b84 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.h
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsnativeimage.cpp b/src/plugins/platforms/windows/qwindowsnativeimage.cpp
index 2b252842e2..353366db8f 100644
--- a/src/plugins/platforms/windows/qwindowsnativeimage.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsnativeimage.h b/src/plugins/platforms/windows/qwindowsnativeimage.h
index f2efca55f9..6d453b0509 100644
--- a/src/plugins/platforms/windows/qwindowsnativeimage.h
+++ b/src/plugins/platforms/windows/qwindowsnativeimage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsole.cpp b/src/plugins/platforms/windows/qwindowsole.cpp
index f7b84a7b66..fc61c2aa47 100644
--- a/src/plugins/platforms/windows/qwindowsole.cpp
+++ b/src/plugins/platforms/windows/qwindowsole.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsole.h b/src/plugins/platforms/windows/qwindowsole.h
index 0da55a8a88..47fc22526c 100644
--- a/src/plugins/platforms/windows/qwindowsole.h
+++ b/src/plugins/platforms/windows/qwindowsole.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index 08696a646b..c8966f2ecc 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h
index b424375694..dc1c8238d9 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.h
+++ b/src/plugins/platforms/windows/qwindowsscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index a7001719fe..31adcfa167 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,13 +41,46 @@
#include "qwindowstheme.h"
#include "qwindowsdialoghelpers.h"
+#include "qwindowscontext.h"
+#include "qt_windows.h"
+
+#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
+static inline bool booleanSystemParametersInfo(UINT what, bool defaultValue)
+{
+ BOOL result;
+ if (SystemParametersInfo(what, 0, &result, 0))
+ return result ? true : false;
+ return defaultValue;
+}
+
+static inline bool dWordSystemParametersInfo(UINT what, DWORD defaultValue)
+{
+ DWORD result;
+ if (SystemParametersInfo(what, 0, &result, 0))
+ return result;
+ return defaultValue;
+}
+
QWindowsTheme::QWindowsTheme()
{
}
+QVariant QWindowsTheme::themeHint(ThemeHint hint) const
+{
+ switch (hint) {
+ case TextCursorWidth:
+ return QVariant(int(dWordSystemParametersInfo(SPI_GETCARETWIDTH, 1u)));
+ case DropShadow:
+ return QVariant(booleanSystemParametersInfo(SPI_GETDROPSHADOW, false));
+ case MaximumScrollBarDragDistance:
+ return QVariant(qRound(qreal(QWindowsContext::instance()->defaultDPI()) * 1.375));
+ }
+ return QVariant();
+}
+
bool QWindowsTheme::usePlatformNativeDialog(const QDialog *dialog) const
{
return QWindowsDialogs::useHelper(dialog);
diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h
index 057e30d262..9bb937d607 100644
--- a/src/plugins/platforms/windows/qwindowstheme.h
+++ b/src/plugins/platforms/windows/qwindowstheme.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,6 +53,7 @@ public:
virtual bool usePlatformNativeDialog(const QDialog *dialog = 0) const;
virtual QPlatformDialogHelper *createPlatformDialogHelper(QDialog *dialog = 0) const;
+ virtual QVariant themeHint(ThemeHint) const;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index f61e15dded..282576105f 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -648,11 +648,11 @@ void QWindowsWindow::destroyWindow()
{
if (QWindowsContext::verboseIntegration || QWindowsContext::verboseWindows)
qDebug() << __FUNCTION__ << this << window() << m_data.hwnd;
- if (m_data.hwnd) {
+ if (m_data.hwnd) { // Stop event dispatching before Window is destroyed.
unregisterDropSite();
+ QWindowsContext::instance()->removeWindow(m_data.hwnd);
if (m_data.hwnd != GetDesktopWindow())
DestroyWindow(m_data.hwnd);
- QWindowsContext::instance()->removeWindow(m_data.hwnd);
m_data.hwnd = 0;
}
}
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 95e497acdb..364f3d0bc5 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/main.cpp b/src/plugins/platforms/xcb/main.cpp
index c544f7073d..16ef7628a7 100644
--- a/src/plugins/platforms/xcb/main.cpp
+++ b/src/plugins/platforms/xcb/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qdri2context.cpp b/src/plugins/platforms/xcb/qdri2context.cpp
index 31e613d4ba..c16052f021 100644
--- a/src/plugins/platforms/xcb/qdri2context.cpp
+++ b/src/plugins/platforms/xcb/qdri2context.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qdri2context.h b/src/plugins/platforms/xcb/qdri2context.h
index 6b93a0a93f..7c4dbb35c2 100644
--- a/src/plugins/platforms/xcb/qdri2context.h
+++ b/src/plugins/platforms/xcb/qdri2context.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index de41f862bd..86b7f09166 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qglxintegration.h b/src/plugins/platforms/xcb/qglxintegration.h
index 211a654c03..93c4805ec8 100644
--- a/src/plugins/platforms/xcb/qglxintegration.h
+++ b/src/plugins/platforms/xcb/qglxintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index fb8384212d..ad8b47c25a 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -124,7 +124,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI
m_shm_info.shmaddr = 0;
- m_xcb_image->data = (uint8_t *)qMalloc(segmentSize);
+ m_xcb_image->data = (uint8_t *)malloc(segmentSize);
} else {
if (shmctl(m_shm_info.shmid, IPC_RMID, 0) == -1)
qWarning() << "QXcbBackingStore: Error while marking the shared memory segment to be destroyed";
@@ -146,7 +146,7 @@ void QXcbShmImage::destroy()
shmdt(m_shm_info.shmaddr);
shmctl(m_shm_info.shmid, IPC_RMID, 0);
} else {
- qFree(m_xcb_image->data);
+ free(m_xcb_image->data);
}
}
@@ -182,17 +182,47 @@ void QXcbShmImage::put(xcb_window_t window, const QPoint &target, const QRect &s
source.height(),
false);
} else {
- xcb_image_t *subimage = xcb_image_subimage(m_xcb_image, source.x(), source.y(), source.width(), source.height(),
- 0, 0, 0);
- xcb_image_put(xcb_connection(),
- window,
- m_gc,
- subimage,
- target.x(),
- target.y(),
- 0);
-
- xcb_image_destroy(subimage);
+ // If we upload the whole image in a single chunk, the result might be
+ // larger than the server's maximum request size and stuff breaks.
+ // To work around that, we upload the image in chunks where each chunk
+ // is small enough for a single request.
+ int src_x = source.x();
+ int src_y = source.y();
+ int target_x = target.x();
+ int target_y = target.y();
+ int width = source.width();
+ int height = source.height();
+
+ // We must make sure that each request is not larger than max_req_size.
+ // Each request takes req_size + m_xcb_image->stride * height bytes.
+ uint32_t max_req_size = xcb_get_maximum_request_length(xcb_connection());
+ uint32_t req_size = sizeof(xcb_put_image_request_t);
+ int rows_per_put = (max_req_size - req_size) / m_xcb_image->stride;
+
+ // This assert could trigger if a single row has more pixels than fit in
+ // a single PutImage request. However, max_req_size is guaranteed to be
+ // at least 16384 bytes. That should be enough for quite large images.
+ Q_ASSERT(rows_per_put > 0);
+
+ while (height > 0) {
+ int rows = std::min(height, rows_per_put);
+
+ xcb_image_t *subimage = xcb_image_subimage(m_xcb_image, src_x, src_y, width, rows,
+ 0, 0, 0);
+ xcb_image_put(xcb_connection(),
+ window,
+ m_gc,
+ subimage,
+ target_x,
+ target_y,
+ 0);
+
+ xcb_image_destroy(subimage);
+
+ src_y += rows;
+ target_y += rows;
+ height -= rows;
+ }
}
Q_XCB_NOOP(connection());
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h
index a389f97ac3..70fed46563 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.h
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index 03ee054f59..14d802a8bd 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -208,11 +208,12 @@ QXcbClipboard::~QXcbClipboard()
connection()->sync();
// waiting until the clipboard manager fetches the content.
- if (!waitForClipboardEvent(m_owner, XCB_SELECTION_NOTIFY, 5000)) {
+ if (!waitForClipboardEvent(m_owner, XCB_SELECTION_NOTIFY, clipboard_timeout, true)) {
qWarning("QClipboard: Unable to receive an event from the "
"clipboard manager in a reasonable time");
}
}
+ free(reply);
}
}
@@ -595,6 +596,7 @@ bool QXcbClipboard::clipboardReadProperty(xcb_window_t win, xcb_atom_t property,
xcb_get_property_cookie_t cookie = Q_XCB_CALL(xcb_get_property(xcb_connection(), false, win, property, XCB_GET_PROPERTY_TYPE_ANY, 0, 0));
xcb_get_property_reply_t *reply = xcb_get_property_reply(xcb_connection(), cookie, 0);
if (!reply || reply->type == XCB_NONE) {
+ free(reply);
buffer->resize(0);
return false;
}
@@ -687,7 +689,7 @@ namespace
: window(win), type(t) {}
xcb_window_t window;
int type;
- bool check(xcb_generic_event_t *event) const {
+ bool checkEvent(xcb_generic_event_t *event) const {
if (!event)
return false;
int t = event->response_type & 0x7f;
@@ -710,7 +712,7 @@ namespace
ClipboardEvent(QXcbConnection *c)
{ clipboard = c->internAtom("CLIPBOARD"); }
xcb_atom_t clipboard;
- bool check(xcb_generic_event_t *e) const {
+ bool checkEvent(xcb_generic_event_t *e) const {
if (!e)
return false;
int type = e->response_type & 0x7f;
@@ -726,7 +728,7 @@ namespace
};
}
-xcb_generic_event_t *QXcbClipboard::waitForClipboardEvent(xcb_window_t win, int type, int timeout)
+xcb_generic_event_t *QXcbClipboard::waitForClipboardEvent(xcb_window_t win, int type, int timeout, bool checkManager)
{
QElapsedTimer timer;
timer.start();
@@ -736,6 +738,16 @@ xcb_generic_event_t *QXcbClipboard::waitForClipboardEvent(xcb_window_t win, int
if (e)
return e;
+ if (checkManager) {
+ xcb_get_selection_owner_cookie_t cookie = xcb_get_selection_owner(xcb_connection(), atom(QXcbAtom::CLIPBOARD_MANAGER));
+ xcb_get_selection_owner_reply_t *reply = xcb_get_selection_owner_reply(xcb_connection(), cookie, 0);
+ if (!reply || reply->owner == XCB_NONE) {
+ free(reply);
+ return 0;
+ }
+ free(reply);
+ }
+
// process other clipboard events, since someone is probably requesting data from us
ClipboardEvent clipboard(connection());
e = connection()->checkEvent(clipboard);
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h
index 3fd59964c1..c3b072984e 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.h
+++ b/src/plugins/platforms/xcb/qxcbclipboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -85,7 +85,7 @@ public:
QByteArray getSelection(xcb_atom_t selection, xcb_atom_t target, xcb_atom_t property);
private:
- xcb_generic_event_t *waitForClipboardEvent(xcb_window_t win, int type, int timeout);
+ xcb_generic_event_t *waitForClipboardEvent(xcb_window_t win, int type, int timeout, bool checkManager = false);
xcb_atom_t sendTargetsSelection(QMimeData *d, xcb_window_t window, xcb_atom_t property);
xcb_atom_t sendSelection(QMimeData *d, xcb_atom_t target, xcb_window_t window, xcb_atom_t property);
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 6969124b2a..ca21b1eb9d 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -86,13 +86,16 @@ extern "C" {
QT_BEGIN_NAMESPACE
+#ifdef XCB_USE_XLIB
static int nullErrorHandler(Display *, XErrorEvent *)
{
return 0;
}
+#endif
QXcbConnection::QXcbConnection(const char *displayName)
- : m_displayName(displayName ? QByteArray(displayName) : qgetenv("DISPLAY"))
+ : m_connection(0)
+ , m_displayName(displayName ? QByteArray(displayName) : qgetenv("DISPLAY"))
#ifdef XCB_USE_XINPUT2_MAEMO
, m_xinputData(0)
#endif
@@ -108,24 +111,26 @@ QXcbConnection::QXcbConnection(const char *displayName)
#ifdef XCB_USE_XLIB
Display *dpy = XOpenDisplay(m_displayName.constData());
- m_primaryScreen = DefaultScreen(dpy);
- m_connection = XGetXCBConnection(dpy);
- XSetEventQueueOwner(dpy, XCBOwnsEventQueue);
- XSetErrorHandler(nullErrorHandler);
- m_xlib_display = dpy;
+ if (dpy) {
+ m_primaryScreen = DefaultScreen(dpy);
+ m_connection = XGetXCBConnection(dpy);
+ XSetEventQueueOwner(dpy, XCBOwnsEventQueue);
+ XSetErrorHandler(nullErrorHandler);
+ m_xlib_display = dpy;
#ifdef XCB_USE_EGL
- EGLDisplay eglDisplay = eglGetDisplay(dpy);
- m_egl_display = eglDisplay;
- EGLint major, minor;
- eglBindAPI(EGL_OPENGL_ES_API);
- m_has_egl = eglInitialize(eglDisplay,&major,&minor);
+ EGLDisplay eglDisplay = eglGetDisplay(dpy);
+ m_egl_display = eglDisplay;
+ EGLint major, minor;
+ eglBindAPI(EGL_OPENGL_ES_API);
+ m_has_egl = eglInitialize(eglDisplay,&major,&minor);
#endif //XCB_USE_EGL
+ }
#else
m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreen);
#endif //XCB_USE_XLIB
- if (m_connection)
- qDebug("Successfully connected to display %s", m_displayName.constData());
+ if (!m_connection)
+ qFatal("Could not connect to display %s", m_displayName.constData());
m_reader = new QXcbEventReader(this);
#ifdef XCB_POLL_FOR_QUEUED_EVENT
@@ -568,13 +573,17 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
if (!handled) {
// Check if a custom XEvent constructor was registered in xlib for this event type, and call it discarding the constructed XEvent if any.
// XESetWireToEvent might be used by libraries to intercept messages from the X server e.g. the OpenGL lib waiting for DRI2 events.
- Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent((Display*)m_xlib_display, response_type, 0);
+
+ Display *xdisplay = (Display *)m_xlib_display;
+ XLockDisplay(xdisplay);
+ Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent(xdisplay, response_type, 0);
if (proc) {
- XESetWireToEvent((Display*)m_xlib_display, response_type, proc);
+ XESetWireToEvent(xdisplay, response_type, proc);
XEvent dummy;
event->sequence = LastKnownRequestProcessed(m_xlib_display);
- proc((Display*)m_xlib_display, &dummy, (xEvent*)event);
+ proc(xdisplay, &dummy, (xEvent*)event);
}
+ XUnlockDisplay(xdisplay);
}
#endif
@@ -615,7 +624,7 @@ void QXcbEventReader::addEvent(xcb_generic_event_t *event)
m_events << event;
}
-QList<xcb_generic_event_t *> *QXcbEventReader::lock()
+QXcbEventArray *QXcbEventReader::lock()
{
m_mutex.lock();
#ifndef XCB_POLL_FOR_QUEUED_EVENT
@@ -648,7 +657,7 @@ void QXcbConnection::sendConnectionEvent(QXcbAtom::Atom a, uint id)
void QXcbConnection::processXcbEvents()
{
- QList<xcb_generic_event_t *> *eventqueue = m_reader->lock();
+ QXcbEventArray *eventqueue = m_reader->lock();
for(int i = 0; i < eventqueue->size(); ++i) {
xcb_generic_event_t *event = eventqueue->at(i);
@@ -711,7 +720,7 @@ void QXcbConnection::handleClientMessageEvent(const xcb_client_message_event_t *
xcb_generic_event_t *QXcbConnection::checkEvent(int type)
{
- QList<xcb_generic_event_t *> *eventqueue = m_reader->lock();
+ QXcbEventArray *eventqueue = m_reader->lock();
for (int i = 0; i < eventqueue->size(); ++i) {
xcb_generic_event_t *event = eventqueue->at(i);
@@ -960,6 +969,7 @@ QByteArray QXcbConnection::atomName(xcb_atom_t atom)
xcb_get_atom_name_reply_t *reply = xcb_get_atom_name_reply(xcb_connection(), cookie, &error);
if (error) {
qWarning() << "QXcbConnection::atomName: bad Atom" << atom;
+ free(error);
}
if (reply) {
QByteArray result(xcb_get_atom_name_name(reply), xcb_get_atom_name_name_length(reply));
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index ebe95c0013..c227b4c863 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,12 +50,13 @@
#include <QObject>
#include <QThread>
#include <QVector>
+#include <QVarLengthArray>
#ifdef XCB_USE_XINPUT2_MAEMO
struct XInput2Data;
#endif
-#define Q_XCB_DEBUG
+//#define Q_XCB_DEBUG
QT_BEGIN_NAMESPACE
@@ -249,6 +250,8 @@ namespace QXcbAtom {
};
}
+typedef QVarLengthArray<xcb_generic_event_t *, 64> QXcbEventArray;
+
class QXcbConnection;
class QXcbEventReader : public QThread
{
@@ -263,7 +266,7 @@ public:
void run();
#endif
- QList<xcb_generic_event_t *> *lock();
+ QXcbEventArray *lock();
void unlock();
signals:
@@ -273,7 +276,7 @@ private:
void addEvent(xcb_generic_event_t *event);
QMutex m_mutex;
- QList<xcb_generic_event_t *> m_events;
+ QXcbEventArray m_events;
QXcbConnection *m_connection;
};
@@ -337,7 +340,7 @@ public:
xcb_generic_event_t *checkEvent(int type);
template<typename T>
- inline xcb_generic_event_t *checkEvent(const T &checker);
+ inline xcb_generic_event_t *checkEvent(T &checker);
typedef bool (*PeekFunc)(xcb_generic_event_t *);
void addPeekFunc(PeekFunc f);
@@ -425,13 +428,13 @@ private:
#define DISPLAY_FROM_XCB(object) ((Display *)(object->connection()->xlib_display()))
template<typename T>
-xcb_generic_event_t *QXcbConnection::checkEvent(const T &checker)
+xcb_generic_event_t *QXcbConnection::checkEvent(T &checker)
{
- QList<xcb_generic_event_t *> *eventqueue = m_reader->lock();
+ QXcbEventArray *eventqueue = m_reader->lock();
for (int i = 0; i < eventqueue->size(); ++i) {
xcb_generic_event_t *event = eventqueue->at(i);
- if (checker.check(event)) {
+ if (checker.checkEvent(event)) {
(*eventqueue)[i] = 0;
m_reader->unlock();
return event;
diff --git a/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp b/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
index 719fc85ae2..12b3d67b9f 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -222,7 +222,6 @@ void QXcbConnection::handleGenericEvent(xcb_ge_event_t *event)
for (int i = 0; i < m_xinputData->xiMaxContacts; ++i) {
QWindowSystemInterface::TouchPoint tp;
tp.id = i;
- tp.isPrimary = (i == 0);
tp.state = Qt::TouchPointReleased;
touchPoints << tp;
}
@@ -288,7 +287,7 @@ void QXcbConnection::handleGenericEvent(xcb_ge_event_t *event)
QWindowSystemInterface::registerTouchDevice(dev);
m_xinputData->qtTouchDevice = dev;
}
- QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xideviceevent->time, (QEvent::Type)0 /*None*/, dev, touchPoints);
+ QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xideviceevent->time, dev, touchPoints);
}
if (xideviceevent->evtype == XI_ButtonRelease) {
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index f6856d5694..a00fdd4824 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
index 4bbb9a928b..f766d7c74e 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.h
+++ b/src/plugins/platforms/xcb/qxcbcursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index c15bbeed83..89b1fa7445 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -818,7 +818,7 @@ namespace
public:
ClientMessageScanner(xcb_atom_t a) : atom(a) {}
xcb_atom_t atom;
- bool check(xcb_generic_event_t *event) const {
+ bool checkEvent(xcb_generic_event_t *event) const {
if (!event)
return false;
if ((event->response_type & 0x7f) != XCB_CLIENT_MESSAGE)
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index 8142a77875..0233cc32b2 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbeglsurface.h b/src/plugins/platforms/xcb/qxcbeglsurface.h
index a372cd9830..c4367cf572 100644
--- a/src/plugins/platforms/xcb/qxcbeglsurface.h
+++ b/src/plugins/platforms/xcb/qxcbeglsurface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbimage.cpp b/src/plugins/platforms/xcb/qxcbimage.cpp
index 569e4fc4e4..824805a983 100644
--- a/src/plugins/platforms/xcb/qxcbimage.cpp
+++ b/src/plugins/platforms/xcb/qxcbimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbimage.h b/src/plugins/platforms/xcb/qxcbimage.h
index 1e7f104084..6a06610937 100644
--- a/src/plugins/platforms/xcb/qxcbimage.h
+++ b/src/plugins/platforms/xcb/qxcbimage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 2190722f98..3cf50cbbd9 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 91fcc0b6cb..8a3926dbfb 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 581693ccb7..ef71b78339 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -907,6 +907,7 @@ QString QXcbKeyboard::translateKeySym(xcb_keysym_t keysym, uint xmodifiers,
QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection)
: QXcbObject(connection)
+ , m_autorepeat_code(0)
{
m_key_symbols = xcb_key_symbols_alloc(xcb_connection());
setupModifiers();
@@ -1020,6 +1021,62 @@ void QXcbKeyboard::setMask(uint sym, uint mask)
// #define XCB_KEYBOARD_DEBUG
+class KeyChecker
+{
+public:
+ KeyChecker(xcb_window_t window, xcb_keycode_t code, xcb_timestamp_t time)
+ : m_window(window)
+ , m_code(code)
+ , m_time(time)
+ , m_error(false)
+ , m_release(true)
+ {
+ }
+
+ bool checkEvent(xcb_generic_event_t *ev)
+ {
+ if (m_error || !ev)
+ return false;
+
+ int type = ev->response_type & ~0x80;
+ if (type != XCB_KEY_PRESS && type != XCB_KEY_RELEASE)
+ return false;
+
+ xcb_key_press_event_t *event = (xcb_key_press_event_t *)ev;
+
+ if (event->event != m_window || event->detail != m_code) {
+ m_error = true;
+ return false;
+ }
+
+ if (type == XCB_KEY_PRESS) {
+ m_error = !m_release || event->time - m_time > 10;
+ return !m_error;
+ }
+
+ if (m_release) {
+ m_error = true;
+ return false;
+ }
+
+ m_release = true;
+ m_time = event->time;
+
+ return false;
+ }
+
+ bool release() const { return m_release; }
+ xcb_timestamp_t time() const { return m_time; }
+
+private:
+ xcb_window_t m_window;
+ xcb_keycode_t m_code;
+ xcb_timestamp_t m_time;
+
+ bool m_error;
+ bool m_release;
+};
+
void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycode_t code,
quint16 state, xcb_timestamp_t time)
{
@@ -1062,8 +1119,32 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
return;
}
+ bool isAutoRepeat = false;
+
+ if (type == QEvent::KeyPress) {
+ if (m_autorepeat_code == code) {
+ isAutoRepeat = true;
+ m_autorepeat_code = 0;
+ }
+ } else {
+ // look ahead for auto-repeat
+ KeyChecker checker(((QXcbWindow *)window->handle())->xcb_window(), code, time);
+ xcb_generic_event_t *event = connection()->checkEvent(checker);
+ if (event) {
+ isAutoRepeat = true;
+ free(event);
+ }
+ m_autorepeat_code = isAutoRepeat ? code : 0;
+ }
+
QWindowSystemInterface::handleExtendedKeyEvent(window, time, type, qtcode, modifiers,
- code, 0, state, string.left(count));
+ code, 0, state, string.left(count), isAutoRepeat);
+
+ if (isAutoRepeat && type == QEvent::KeyRelease) {
+ // since we removed it from the event queue using checkEvent we need to send the key press here
+ QWindowSystemInterface::handleExtendedKeyEvent(window, time, QEvent::KeyPress, qtcode, modifiers,
+ code, 0, state, string.left(count), isAutoRepeat);
+ }
}
#ifdef XCB_USE_XLIB
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
index a4b6a28886..4a62dde11a 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -86,6 +86,7 @@ private:
uint m_caps_lock_mask;
xcb_key_symbols_t *m_key_symbols;
+ xcb_keycode_t m_autorepeat_code;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
index 271d41ae75..5d86a118c7 100644
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbmime.h b/src/plugins/platforms/xcb/qxcbmime.h
index ac032db442..02be4c9c5b 100644
--- a/src/plugins/platforms/xcb/qxcbmime.h
+++ b/src/plugins/platforms/xcb/qxcbmime.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 5e0af8d24d..52ff30991e 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index 0902af03eb..517e92bc64 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbobject.h b/src/plugins/platforms/xcb/qxcbobject.h
index a594066545..b164f63f76 100644
--- a/src/plugins/platforms/xcb/qxcbobject.h
+++ b/src/plugins/platforms/xcb/qxcbobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 1336ddb32a..8b01b4389f 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 76cc0fa1b4..1975d56189 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 8e01c8ec40..2cd2a15fb7 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 6ff1627f98..f0b6437699 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbwmsupport.cpp b/src/plugins/platforms/xcb/qxcbwmsupport.cpp
index 15e423e95b..f06c9c503c 100644
--- a/src/plugins/platforms/xcb/qxcbwmsupport.cpp
+++ b/src/plugins/platforms/xcb/qxcbwmsupport.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xcb/qxcbwmsupport.h b/src/plugins/platforms/xcb/qxcbwmsupport.h
index 7b0a21f035..faa0934a3d 100644
--- a/src/plugins/platforms/xcb/qxcbwmsupport.h
+++ b/src/plugins/platforms/xcb/qxcbwmsupport.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/main.cpp b/src/plugins/platforms/xlib/main.cpp
index b4241fa228..41c86a5c18 100644
--- a/src/plugins/platforms/xlib/main.cpp
+++ b/src/plugins/platforms/xlib/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp
index 6733f22093..c995070fe3 100644
--- a/src/plugins/platforms/xlib/qglxintegration.cpp
+++ b/src/plugins/platforms/xlib/qglxintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qglxintegration.h b/src/plugins/platforms/xlib/qglxintegration.h
index e3172b718c..c1ef2c9d36 100644
--- a/src/plugins/platforms/xlib/qglxintegration.h
+++ b/src/plugins/platforms/xlib/qglxintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibbackingstore.cpp b/src/plugins/platforms/xlib/qxlibbackingstore.cpp
index 24a346a29d..954b7c32a5 100644
--- a/src/plugins/platforms/xlib/qxlibbackingstore.cpp
+++ b/src/plugins/platforms/xlib/qxlibbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibbackingstore.h b/src/plugins/platforms/xlib/qxlibbackingstore.h
index 35093f6784..7c0ac4b252 100644
--- a/src/plugins/platforms/xlib/qxlibbackingstore.h
+++ b/src/plugins/platforms/xlib/qxlibbackingstore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibclipboard.cpp b/src/plugins/platforms/xlib/qxlibclipboard.cpp
index 3ee4d4269c..601314ff4f 100644
--- a/src/plugins/platforms/xlib/qxlibclipboard.cpp
+++ b/src/plugins/platforms/xlib/qxlibclipboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibclipboard.h b/src/plugins/platforms/xlib/qxlibclipboard.h
index 8fdc18b7d4..e9faef465b 100644
--- a/src/plugins/platforms/xlib/qxlibclipboard.h
+++ b/src/plugins/platforms/xlib/qxlibclipboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibcursor.cpp b/src/plugins/platforms/xlib/qxlibcursor.cpp
index 7a074bc0e6..44c9ccd489 100644
--- a/src/plugins/platforms/xlib/qxlibcursor.cpp
+++ b/src/plugins/platforms/xlib/qxlibcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibcursor.h b/src/plugins/platforms/xlib/qxlibcursor.h
index fd574778d7..74d520e2d1 100644
--- a/src/plugins/platforms/xlib/qxlibcursor.h
+++ b/src/plugins/platforms/xlib/qxlibcursor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibdisplay.cpp b/src/plugins/platforms/xlib/qxlibdisplay.cpp
index 32cffcf4fe..9e9536c93d 100644
--- a/src/plugins/platforms/xlib/qxlibdisplay.cpp
+++ b/src/plugins/platforms/xlib/qxlibdisplay.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibdisplay.h b/src/plugins/platforms/xlib/qxlibdisplay.h
index 650b72c6dd..02cbd42809 100644
--- a/src/plugins/platforms/xlib/qxlibdisplay.h
+++ b/src/plugins/platforms/xlib/qxlibdisplay.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibintegration.cpp b/src/plugins/platforms/xlib/qxlibintegration.cpp
index c1f0941619..216673cc65 100644
--- a/src/plugins/platforms/xlib/qxlibintegration.cpp
+++ b/src/plugins/platforms/xlib/qxlibintegration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibintegration.h b/src/plugins/platforms/xlib/qxlibintegration.h
index f5150fca6f..3b505df65a 100644
--- a/src/plugins/platforms/xlib/qxlibintegration.h
+++ b/src/plugins/platforms/xlib/qxlibintegration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibkeyboard.cpp b/src/plugins/platforms/xlib/qxlibkeyboard.cpp
index 1d3dc83464..688ff5bf4a 100644
--- a/src/plugins/platforms/xlib/qxlibkeyboard.cpp
+++ b/src/plugins/platforms/xlib/qxlibkeyboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibkeyboard.h b/src/plugins/platforms/xlib/qxlibkeyboard.h
index a33ad61d27..4f781983e6 100644
--- a/src/plugins/platforms/xlib/qxlibkeyboard.h
+++ b/src/plugins/platforms/xlib/qxlibkeyboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibmime.cpp b/src/plugins/platforms/xlib/qxlibmime.cpp
index 4f29a13063..40faa7ed98 100644
--- a/src/plugins/platforms/xlib/qxlibmime.cpp
+++ b/src/plugins/platforms/xlib/qxlibmime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibmime.h b/src/plugins/platforms/xlib/qxlibmime.h
index ddfe908d88..a10b0002f9 100644
--- a/src/plugins/platforms/xlib/qxlibmime.h
+++ b/src/plugins/platforms/xlib/qxlibmime.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibnativeinterface.cpp b/src/plugins/platforms/xlib/qxlibnativeinterface.cpp
index 2c706e64e4..154b31fe3f 100644
--- a/src/plugins/platforms/xlib/qxlibnativeinterface.cpp
+++ b/src/plugins/platforms/xlib/qxlibnativeinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibnativeinterface.h b/src/plugins/platforms/xlib/qxlibnativeinterface.h
index 4c6ce770b0..7bb5b01f61 100644
--- a/src/plugins/platforms/xlib/qxlibnativeinterface.h
+++ b/src/plugins/platforms/xlib/qxlibnativeinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibscreen.cpp b/src/plugins/platforms/xlib/qxlibscreen.cpp
index 314a3e4ecb..c9b8bae49a 100644
--- a/src/plugins/platforms/xlib/qxlibscreen.cpp
+++ b/src/plugins/platforms/xlib/qxlibscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibscreen.h b/src/plugins/platforms/xlib/qxlibscreen.h
index 13fc03ef0f..44d2174f17 100644
--- a/src/plugins/platforms/xlib/qxlibscreen.h
+++ b/src/plugins/platforms/xlib/qxlibscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibstatic.cpp b/src/plugins/platforms/xlib/qxlibstatic.cpp
index c9ed13aeea..147c591b85 100644
--- a/src/plugins/platforms/xlib/qxlibstatic.cpp
+++ b/src/plugins/platforms/xlib/qxlibstatic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibstatic.h b/src/plugins/platforms/xlib/qxlibstatic.h
index a4a2106a77..d203fa3d5d 100644
--- a/src/plugins/platforms/xlib/qxlibstatic.h
+++ b/src/plugins/platforms/xlib/qxlibstatic.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/platforms/xlib/qxlibwindow.cpp b/src/plugins/platforms/xlib/qxlibwindow.cpp
index c14fadaaaa..eeb028d359 100644
--- a/src/plugins/platforms/xlib/qxlibwindow.cpp
+++ b/src/plugins/platforms/xlib/qxlibwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -303,10 +303,11 @@ WId QXlibWindow::winId() const
return x_window;
}
-void QXlibWindow::setParent(const QPlatformWindow *window)
+void QXlibWindow::setParent(const QPlatformWindow *parent)
{
QPoint topLeft = geometry().topLeft();
- XReparentWindow(mScreen->display()->nativeDisplay(),x_window,window->winId(),topLeft.x(),topLeft.y());
+ WId parentWinId = parent ? parent->winId() : mScreen->rootWindow();
+ XReparentWindow(mScreen->display()->nativeDisplay(),x_window,parentWinId,topLeft.x(),topLeft.y());
}
void QXlibWindow::raise()
diff --git a/src/plugins/platforms/xlib/qxlibwindow.h b/src/plugins/platforms/xlib/qxlibwindow.h
index 9b64dc5624..f3e83deed5 100644
--- a/src/plugins/platforms/xlib/qxlibwindow.h
+++ b/src/plugins/platforms/xlib/qxlibwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -112,7 +112,7 @@ public:
void setVisible(bool visible);
WId winId() const;
- void setParent(const QPlatformWindow *window);
+ void setParent(const QPlatformWindow *parent);
void raise();
void lower();
void setWindowTitle(const QString &title);
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 14036e690c..d88db04f28 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,12 +1,12 @@
TEMPLATE = subdirs
-SUBDIRS *= sqldrivers bearer
+SUBDIRS *= sqldrivers bearer
unix {
contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv)|contains(QT_CONFIG,sun-libiconv):SUBDIRS *= codecs
} else {
SUBDIRS *= codecs
}
!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats
-!contains(QT_CONFIG, no-gui):SUBDIRS += accessible
+!isEmpty(QT.widgets.name): SUBDIRS += accessible
SUBDIRS += platforms platforminputcontexts printsupport
diff --git a/src/plugins/printsupport/windows/main.cpp b/src/plugins/printsupport/windows/main.cpp
index 1ed8f6d0ad..415663b260 100644
--- a/src/plugins/printsupport/windows/main.cpp
+++ b/src/plugins/printsupport/windows/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/printsupport/windows/qwindowsprinterinfo.cpp b/src/plugins/printsupport/windows/qwindowsprinterinfo.cpp
index 09ae632587..1420186a36 100644
--- a/src/plugins/printsupport/windows/qwindowsprinterinfo.cpp
+++ b/src/plugins/printsupport/windows/qwindowsprinterinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/printsupport/windows/qwindowsprintersupport.cpp b/src/plugins/printsupport/windows/qwindowsprintersupport.cpp
index f7033733e1..208c26ea0b 100644
--- a/src/plugins/printsupport/windows/qwindowsprintersupport.cpp
+++ b/src/plugins/printsupport/windows/qwindowsprintersupport.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/printsupport/windows/qwindowsprintersupport.h b/src/plugins/printsupport/windows/qwindowsprintersupport.h
index c45e79587a..2774d0693a 100644
--- a/src/plugins/printsupport/windows/qwindowsprintersupport.h
+++ b/src/plugins/printsupport/windows/qwindowsprintersupport.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/db2/main.cpp b/src/plugins/sqldrivers/db2/main.cpp
index b8e9bdd835..1a6ca90776 100644
--- a/src/plugins/sqldrivers/db2/main.cpp
+++ b/src/plugins/sqldrivers/db2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/ibase/main.cpp b/src/plugins/sqldrivers/ibase/main.cpp
index 6b3e088208..059620314e 100644
--- a/src/plugins/sqldrivers/ibase/main.cpp
+++ b/src/plugins/sqldrivers/ibase/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/mysql/main.cpp b/src/plugins/sqldrivers/mysql/main.cpp
index de16ea760e..5243c2cb33 100644
--- a/src/plugins/sqldrivers/mysql/main.cpp
+++ b/src/plugins/sqldrivers/mysql/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/oci/main.cpp b/src/plugins/sqldrivers/oci/main.cpp
index a97126501b..8d95db8867 100644
--- a/src/plugins/sqldrivers/oci/main.cpp
+++ b/src/plugins/sqldrivers/oci/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/odbc/main.cpp b/src/plugins/sqldrivers/odbc/main.cpp
index cd5debfd75..9b8cac6f98 100644
--- a/src/plugins/sqldrivers/odbc/main.cpp
+++ b/src/plugins/sqldrivers/odbc/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/psql/main.cpp b/src/plugins/sqldrivers/psql/main.cpp
index ecaca84670..ce2273da5b 100644
--- a/src/plugins/sqldrivers/psql/main.cpp
+++ b/src/plugins/sqldrivers/psql/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/sqlite/smain.cpp b/src/plugins/sqldrivers/sqlite/smain.cpp
index f61ace9f4b..8027f01bf3 100644
--- a/src/plugins/sqldrivers/sqlite/smain.cpp
+++ b/src/plugins/sqldrivers/sqlite/smain.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/sqlite2/smain.cpp b/src/plugins/sqldrivers/sqlite2/smain.cpp
index de2299cc75..ebdb0b4d54 100644
--- a/src/plugins/sqldrivers/sqlite2/smain.cpp
+++ b/src/plugins/sqldrivers/sqlite2/smain.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/plugins/sqldrivers/tds/main.cpp b/src/plugins/sqldrivers/tds/main.cpp
index bde409ddc6..81e3a21f9b 100644
--- a/src/plugins/sqldrivers/tds/main.cpp
+++ b/src/plugins/sqldrivers/tds/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qabstractpagesetupdialog.cpp b/src/printsupport/dialogs/qabstractpagesetupdialog.cpp
index 8268065bfd..33408b6bd2 100644
--- a/src/printsupport/dialogs/qabstractpagesetupdialog.cpp
+++ b/src/printsupport/dialogs/qabstractpagesetupdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qabstractpagesetupdialog.h b/src/printsupport/dialogs/qabstractpagesetupdialog.h
index 597a7258d9..821d8775da 100644
--- a/src/printsupport/dialogs/qabstractpagesetupdialog.h
+++ b/src/printsupport/dialogs/qabstractpagesetupdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qabstractpagesetupdialog_p.h b/src/printsupport/dialogs/qabstractpagesetupdialog_p.h
index 3a4711dd6b..659114cc8e 100644
--- a/src/printsupport/dialogs/qabstractpagesetupdialog_p.h
+++ b/src/printsupport/dialogs/qabstractpagesetupdialog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp
index 25a287945c..fa91c715c0 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.cpp
+++ b/src/printsupport/dialogs/qabstractprintdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qabstractprintdialog.h b/src/printsupport/dialogs/qabstractprintdialog.h
index 2f8a750827..da6c831347 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.h
+++ b/src/printsupport/dialogs/qabstractprintdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qabstractprintdialog_p.h b/src/printsupport/dialogs/qabstractprintdialog_p.h
index e329cb3169..3ecd749f2d 100644
--- a/src/printsupport/dialogs/qabstractprintdialog_p.h
+++ b/src/printsupport/dialogs/qabstractprintdialog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qpagesetupdialog.cpp b/src/printsupport/dialogs/qpagesetupdialog.cpp
index 9c37572c3d..f63835f5e4 100644
--- a/src/printsupport/dialogs/qpagesetupdialog.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qpagesetupdialog.h b/src/printsupport/dialogs/qpagesetupdialog.h
index 1581ce6c41..1bc94ba9de 100644
--- a/src/printsupport/dialogs/qpagesetupdialog.h
+++ b/src/printsupport/dialogs/qpagesetupdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qpagesetupdialog_mac.mm b/src/printsupport/dialogs/qpagesetupdialog_mac.mm
index 0bbdbcc242..d2bbfaa412 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_mac.mm
+++ b/src/printsupport/dialogs/qpagesetupdialog_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index e5b12f8ba5..6dc182631c 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
index 2303db9fe8..c51b68dcad 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qpagesetupdialog_win.cpp b/src/printsupport/dialogs/qpagesetupdialog_win.cpp
index f177ec4ea5..276cfc1b5b 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_win.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h
index 06ad99d02e..09d5213bad 100644
--- a/src/printsupport/dialogs/qprintdialog.h
+++ b/src/printsupport/dialogs/qprintdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintdialog.qdoc b/src/printsupport/dialogs/qprintdialog.qdoc
index 6418fa2b58..238e22df51 100644
--- a/src/printsupport/dialogs/qprintdialog.qdoc
+++ b/src/printsupport/dialogs/qprintdialog.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintdialog_mac.mm b/src/printsupport/dialogs/qprintdialog_mac.mm
index b1f211ffb3..a4f73ea396 100644
--- a/src/printsupport/dialogs/qprintdialog_mac.mm
+++ b/src/printsupport/dialogs/qprintdialog_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index d503623bae..2e338ad884 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintdialog_win.cpp b/src/printsupport/dialogs/qprintdialog_win.cpp
index d413faeb18..24ba6e6910 100644
--- a/src/printsupport/dialogs/qprintdialog_win.cpp
+++ b/src/printsupport/dialogs/qprintdialog_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintpreviewdialog.cpp b/src/printsupport/dialogs/qprintpreviewdialog.cpp
index 7e5c7dac94..50783969c5 100644
--- a/src/printsupport/dialogs/qprintpreviewdialog.cpp
+++ b/src/printsupport/dialogs/qprintpreviewdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/dialogs/qprintpreviewdialog.h b/src/printsupport/dialogs/qprintpreviewdialog.h
index f2997b09f5..f87cedafa7 100644
--- a/src/printsupport/dialogs/qprintpreviewdialog.h
+++ b/src/printsupport/dialogs/qprintpreviewdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qcups.cpp b/src/printsupport/kernel/qcups.cpp
index 76050d9d71..46a6545952 100644
--- a/src/printsupport/kernel/qcups.cpp
+++ b/src/printsupport/kernel/qcups.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h
index cb7a79e486..3ad6e3e6a3 100644
--- a/src/printsupport/kernel/qcups_p.h
+++ b/src/printsupport/kernel/qcups_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qpaintengine_alpha.cpp b/src/printsupport/kernel/qpaintengine_alpha.cpp
index beda2c7144..6c0d1d8c26 100644
--- a/src/printsupport/kernel/qpaintengine_alpha.cpp
+++ b/src/printsupport/kernel/qpaintengine_alpha.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -223,25 +223,6 @@ void QAlphaPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRe
}
}
-void QAlphaPaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr)
-{
- Q_D(QAlphaPaintEngine);
-
- QRectF tr = d->m_transform.mapRect(r);
- if (d->m_pass == 0) {
- d->m_continueCall = false;
- if (image.hasAlphaChannel() || d->m_alphaOpacity || d->m_complexTransform) {
- d->addAlphaRect(tr);
- }
-
- if (d->m_picengine)
- d->m_picengine->drawImage(r, image, sr);
-
- } else {
- d->m_continueCall = !d->fullyContained(tr);
- }
-}
-
void QAlphaPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
{
Q_D(QAlphaPaintEngine);
diff --git a/src/printsupport/kernel/qpaintengine_alpha_p.h b/src/printsupport/kernel/qpaintengine_alpha_p.h
index b662c166e8..e04d2a61da 100644
--- a/src/printsupport/kernel/qpaintengine_alpha_p.h
+++ b/src/printsupport/kernel/qpaintengine_alpha_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,7 +76,6 @@ public:
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
- virtual void drawImage(const QRectF &r, const QImage &image, const QRectF &sr);
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem);
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
diff --git a/src/printsupport/kernel/qpaintengine_preview.cpp b/src/printsupport/kernel/qpaintengine_preview.cpp
index 3cf06f5770..12de24d59d 100644
--- a/src/printsupport/kernel/qpaintengine_preview.cpp
+++ b/src/printsupport/kernel/qpaintengine_preview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qpaintengine_preview_p.h b/src/printsupport/kernel/qpaintengine_preview_p.h
index c2e11313c2..417870827e 100644
--- a/src/printsupport/kernel/qpaintengine_preview_p.h
+++ b/src/printsupport/kernel/qpaintengine_preview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp
index e97ca3fef4..08a59f5f1b 100644
--- a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp
+++ b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qplatformprintersupport_qpa.h b/src/printsupport/kernel/qplatformprintersupport_qpa.h
index 800713c5bb..690f91bd0b 100644
--- a/src/printsupport/kernel/qplatformprintersupport_qpa.h
+++ b/src/printsupport/kernel/qplatformprintersupport_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qplatformprintplugin.cpp b/src/printsupport/kernel/qplatformprintplugin.cpp
index 8b3c75127e..6b131855e8 100644
--- a/src/printsupport/kernel/qplatformprintplugin.cpp
+++ b/src/printsupport/kernel/qplatformprintplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qplatformprintplugin_qpa.h b/src/printsupport/kernel/qplatformprintplugin_qpa.h
index 831a0546b0..173e7818a2 100644
--- a/src/printsupport/kernel/qplatformprintplugin_qpa.h
+++ b/src/printsupport/kernel/qplatformprintplugin_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprintengine.h b/src/printsupport/kernel/qprintengine.h
index 782b6ef8bd..222f992f62 100644
--- a/src/printsupport/kernel/qprintengine.h
+++ b/src/printsupport/kernel/qprintengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprintengine_pdf.cpp b/src/printsupport/kernel/qprintengine_pdf.cpp
index c8ce2cfa0f..e66dfe5ae9 100644
--- a/src/printsupport/kernel/qprintengine_pdf.cpp
+++ b/src/printsupport/kernel/qprintengine_pdf.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -303,7 +303,7 @@ QVariant QPdfPrintEngine::property(PrintEnginePropertyKey key) const
ret = d->pageOrder;
break;
case PPK_PaperSize:
- ret = d->paperSize;
+ ret = d->printerPaperSize;
break;
case PPK_PaperSource:
ret = d->paperSource;
diff --git a/src/printsupport/kernel/qprintengine_pdf_p.h b/src/printsupport/kernel/qprintengine_pdf_p.h
index 483cde9af9..c97635f941 100644
--- a/src/printsupport/kernel/qprintengine_pdf_p.h
+++ b/src/printsupport/kernel/qprintengine_pdf_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp
index 52fd765051..48256388ea 100644
--- a/src/printsupport/kernel/qprintengine_win.cpp
+++ b/src/printsupport/kernel/qprintengine_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprintengine_win_p.h b/src/printsupport/kernel/qprintengine_win_p.h
index 566e42ea2f..e11b3cb63c 100644
--- a/src/printsupport/kernel/qprintengine_win_p.h
+++ b/src/printsupport/kernel/qprintengine_win_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index 03d58667d4..ae5b2def62 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h
index f09a4cc798..a4964d64bc 100644
--- a/src/printsupport/kernel/qprinter.h
+++ b/src/printsupport/kernel/qprinter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinter_p.h b/src/printsupport/kernel/qprinter_p.h
index 362202fe32..d798207379 100644
--- a/src/printsupport/kernel/qprinter_p.h
+++ b/src/printsupport/kernel/qprinter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp
index baff9e88dc..c49c8ab7cd 100644
--- a/src/printsupport/kernel/qprinterinfo.cpp
+++ b/src/printsupport/kernel/qprinterinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinterinfo.h b/src/printsupport/kernel/qprinterinfo.h
index 59e6f2c138..22372158dc 100644
--- a/src/printsupport/kernel/qprinterinfo.h
+++ b/src/printsupport/kernel/qprinterinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinterinfo_p.h b/src/printsupport/kernel/qprinterinfo_p.h
index 6c94e4e227..6a30eb062e 100644
--- a/src/printsupport/kernel/qprinterinfo_p.h
+++ b/src/printsupport/kernel/qprinterinfo_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinterinfo_unix.cpp b/src/printsupport/kernel/qprinterinfo_unix.cpp
index 63b7a2a7d9..9aeba9a4ce 100644
--- a/src/printsupport/kernel/qprinterinfo_unix.cpp
+++ b/src/printsupport/kernel/qprinterinfo_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/kernel/qprinterinfo_unix_p.h b/src/printsupport/kernel/qprinterinfo_unix_p.h
index c12aa39556..4d69e5ae21 100644
--- a/src/printsupport/kernel/qprinterinfo_unix_p.h
+++ b/src/printsupport/kernel/qprinterinfo_unix_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp
index 6514a1af8b..551f9d2ced 100644
--- a/src/printsupport/widgets/qprintpreviewwidget.cpp
+++ b/src/printsupport/widgets/qprintpreviewwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/printsupport/widgets/qprintpreviewwidget.h b/src/printsupport/widgets/qprintpreviewwidget.h
index 1c12bc0945..d3551b9c08 100644
--- a/src/printsupport/widgets/qprintpreviewwidget.h
+++ b/src/printsupport/widgets/qprintpreviewwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp
index 1cd782dbcb..f8a803568e 100644
--- a/src/sql/drivers/db2/qsql_db2.cpp
+++ b/src/sql/drivers/db2/qsql_db2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/db2/qsql_db2.h b/src/sql/drivers/db2/qsql_db2.h
index 51450c134b..4982aba776 100644
--- a/src/sql/drivers/db2/qsql_db2.h
+++ b/src/sql/drivers/db2/qsql_db2.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp
index f5423d963d..3d08649de9 100644
--- a/src/sql/drivers/ibase/qsql_ibase.cpp
+++ b/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/ibase/qsql_ibase.h b/src/sql/drivers/ibase/qsql_ibase.h
index 878d5f2a2b..cd8d302db5 100644
--- a/src/sql/drivers/ibase/qsql_ibase.h
+++ b/src/sql/drivers/ibase/qsql_ibase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index 96b3b3fff1..b0d8d04d1e 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/mysql/qsql_mysql.h b/src/sql/drivers/mysql/qsql_mysql.h
index b45d7c3bab..632d29305b 100644
--- a/src/sql/drivers/mysql/qsql_mysql.h
+++ b/src/sql/drivers/mysql/qsql_mysql.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 059cce6f5c..9b4f887421 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/oci/qsql_oci.h b/src/sql/drivers/oci/qsql_oci.h
index 1d1bf59962..5b82829221 100644
--- a/src/sql/drivers/oci/qsql_oci.h
+++ b/src/sql/drivers/oci/qsql_oci.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 168ea22e3e..f0d66ea872 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -84,7 +84,7 @@ inline static QString fromSQLTCHAR(const QVarLengthArray<SQLTCHAR>& input, int s
result=QString::fromUcs4((const uint *)input.constData(), realsize);
break;
default:
- qCritical() << "sizeof(SQLTCHAR) is " << sizeof(SQLTCHAR) << "Don't know how to handle this";
+ qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", sizeof(SQLTCHAR));
}
return result;
}
@@ -104,7 +104,7 @@ inline static QVarLengthArray<SQLTCHAR> toSQLTCHAR(const QString &input)
memcpy(result.data(), input.toUcs4().data(), input.size() * 4);
break;
default:
- qCritical() << "sizeof(SQLTCHAR) is " << sizeof(SQLTCHAR) << "Don't know how to handle this";
+ qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", sizeof(SQLTCHAR));
}
result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
return result;
diff --git a/src/sql/drivers/odbc/qsql_odbc.h b/src/sql/drivers/odbc/qsql_odbc.h
index 1ac4549f6f..c28ebce535 100644
--- a/src/sql/drivers/odbc/qsql_odbc.h
+++ b/src/sql/drivers/odbc/qsql_odbc.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index c8578c6de7..55d8cc6146 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/psql/qsql_psql.h b/src/sql/drivers/psql/qsql_psql.h
index 8b23bfbeb4..16a40463fb 100644
--- a/src/sql/drivers/psql/qsql_psql.h
+++ b/src/sql/drivers/psql/qsql_psql.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index 38e4a63d57..d7ec53c451 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -292,7 +292,9 @@ QSQLiteResult::QSQLiteResult(const QSQLiteDriver* db)
QSQLiteResult::~QSQLiteResult()
{
- qobject_cast<const QSQLiteDriver *>(driver())->d->results.removeOne(this);
+ const QSqlDriver *sqlDriver = driver();
+ if (sqlDriver)
+ qobject_cast<const QSQLiteDriver *>(sqlDriver)->d->results.removeOne(this);
d->cleanup();
delete d;
}
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.h b/src/sql/drivers/sqlite/qsql_sqlite.h
index 2ee8e09661..eac90b1e47 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.h
+++ b/src/sql/drivers/sqlite/qsql_sqlite.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp
index 6593a69625..d69acc15a6 100644
--- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.h b/src/sql/drivers/sqlite2/qsql_sqlite2.h
index a34706d8f3..6372495a54 100644
--- a/src/sql/drivers/sqlite2/qsql_sqlite2.h
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/tds/qsql_tds.cpp b/src/sql/drivers/tds/qsql_tds.cpp
index 735e68b603..c97d96beb8 100644
--- a/src/sql/drivers/tds/qsql_tds.cpp
+++ b/src/sql/drivers/tds/qsql_tds.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h
index 7808b5fd14..d14d1b6cf7 100644
--- a/src/sql/drivers/tds/qsql_tds.h
+++ b/src/sql/drivers/tds/qsql_tds.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsql.h b/src/sql/kernel/qsql.h
index f23b518bfb..54c9a684f6 100644
--- a/src/sql/kernel/qsql.h
+++ b/src/sql/kernel/qsql.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsql.qdoc b/src/sql/kernel/qsql.qdoc
index 06ea601229..a935acb661 100644
--- a/src/sql/kernel/qsql.qdoc
+++ b/src/sql/kernel/qsql.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp
index 78a9758c9e..a2ae24a2f4 100644
--- a/src/sql/kernel/qsqlcachedresult.cpp
+++ b/src/sql/kernel/qsqlcachedresult.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlcachedresult_p.h b/src/sql/kernel/qsqlcachedresult_p.h
index dced9e7479..c2e4aeb2be 100644
--- a/src/sql/kernel/qsqlcachedresult_p.h
+++ b/src/sql/kernel/qsqlcachedresult_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 6aa45c46e1..7ba3c24999 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqldatabase.h b/src/sql/kernel/qsqldatabase.h
index 72c5694ceb..9dfbd43ed2 100644
--- a/src/sql/kernel/qsqldatabase.h
+++ b/src/sql/kernel/qsqldatabase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index f5436ff594..3b64bb10cb 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h
index ee1e52538a..446cdf4df6 100644
--- a/src/sql/kernel/qsqldriver.h
+++ b/src/sql/kernel/qsqldriver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqldriverplugin.cpp b/src/sql/kernel/qsqldriverplugin.cpp
index 8b9adb64d0..0f98ce3196 100644
--- a/src/sql/kernel/qsqldriverplugin.cpp
+++ b/src/sql/kernel/qsqldriverplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqldriverplugin.h b/src/sql/kernel/qsqldriverplugin.h
index 2c1def0a54..13ffd1e409 100644
--- a/src/sql/kernel/qsqldriverplugin.h
+++ b/src/sql/kernel/qsqldriverplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp
index fd731e4974..8a8d2c318a 100644
--- a/src/sql/kernel/qsqlerror.cpp
+++ b/src/sql/kernel/qsqlerror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlerror.h b/src/sql/kernel/qsqlerror.h
index c1df370a86..11ebf5a615 100644
--- a/src/sql/kernel/qsqlerror.h
+++ b/src/sql/kernel/qsqlerror.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp
index 95e9a195a6..dca9e169fa 100644
--- a/src/sql/kernel/qsqlfield.cpp
+++ b/src/sql/kernel/qsqlfield.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h
index 93992ea9d4..3188b18a4a 100644
--- a/src/sql/kernel/qsqlfield.h
+++ b/src/sql/kernel/qsqlfield.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlindex.cpp b/src/sql/kernel/qsqlindex.cpp
index 764e93a678..ad66e814ef 100644
--- a/src/sql/kernel/qsqlindex.cpp
+++ b/src/sql/kernel/qsqlindex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlindex.h b/src/sql/kernel/qsqlindex.h
index c88e30603f..328a8716e2 100644
--- a/src/sql/kernel/qsqlindex.h
+++ b/src/sql/kernel/qsqlindex.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlnulldriver_p.h b/src/sql/kernel/qsqlnulldriver_p.h
index 1334e4229b..9de9c5641b 100644
--- a/src/sql/kernel/qsqlnulldriver_p.h
+++ b/src/sql/kernel/qsqlnulldriver_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp
index 74812b5bb7..4b65ef1d8b 100644
--- a/src/sql/kernel/qsqlquery.cpp
+++ b/src/sql/kernel/qsqlquery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlquery.h b/src/sql/kernel/qsqlquery.h
index bd498f344a..2791784374 100644
--- a/src/sql/kernel/qsqlquery.h
+++ b/src/sql/kernel/qsqlquery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp
index 3f14cba245..18dd9fbc80 100644
--- a/src/sql/kernel/qsqlrecord.cpp
+++ b/src/sql/kernel/qsqlrecord.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlrecord.h b/src/sql/kernel/qsqlrecord.h
index 8c7a17ab1d..52168255d2 100644
--- a/src/sql/kernel/qsqlrecord.h
+++ b/src/sql/kernel/qsqlrecord.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 71a81c0a8d..de348c99f5 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,6 +48,7 @@
#include "qsqlresult.h"
#include "qvector.h"
#include "qsqldriver.h"
+#include "qpointer.h"
#include <QDebug>
QT_BEGIN_NAMESPACE
@@ -64,7 +65,7 @@ class QSqlResultPrivate
{
public:
QSqlResultPrivate(QSqlResult* d)
- : q(d), sqldriver(0), idx(QSql::BeforeFirstRow), active(false),
+ : q(d), idx(QSql::BeforeFirstRow), active(false),
isSel(false), forwardOnly(false), precisionPolicy(QSql::LowPrecisionDouble), bindCount(0), binds(QSqlResult::PositionalBinding)
{}
@@ -98,7 +99,7 @@ public:
public:
QSqlResult* q;
- const QSqlDriver* sqldriver;
+ QPointer<QSqlDriver> sqldriver;
int idx;
QString sql;
bool active;
@@ -250,7 +251,7 @@ QString QSqlResultPrivate::namedToPositionalBinding()
QSqlResult::QSqlResult(const QSqlDriver *db)
{
d = new QSqlResultPrivate(this);
- d->sqldriver = db;
+ d->sqldriver = const_cast<QSqlDriver *>(db);
if(db) {
setNumericalPrecisionPolicy(db->numericalPrecisionPolicy());
}
diff --git a/src/sql/kernel/qsqlresult.h b/src/sql/kernel/qsqlresult.h
index 984bd5e03f..07780937a6 100644
--- a/src/sql/kernel/qsqlresult.h
+++ b/src/sql/kernel/qsqlresult.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp
index 5e61922916..a740071d33 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqlquerymodel.h b/src/sql/models/qsqlquerymodel.h
index 5836122ad5..75ae2a5eff 100644
--- a/src/sql/models/qsqlquerymodel.h
+++ b/src/sql/models/qsqlquerymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqlquerymodel_p.h b/src/sql/models/qsqlquerymodel_p.h
index f974882602..c25d3c98a0 100644
--- a/src/sql/models/qsqlquerymodel_p.h
+++ b/src/sql/models/qsqlquerymodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqlrelationaldelegate.cpp b/src/sql/models/qsqlrelationaldelegate.cpp
index c20b5f86da..aaba25d06a 100644
--- a/src/sql/models/qsqlrelationaldelegate.cpp
+++ b/src/sql/models/qsqlrelationaldelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h
index 93f0089c71..60e56ff99d 100644
--- a/src/sql/models/qsqlrelationaldelegate.h
+++ b/src/sql/models/qsqlrelationaldelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp
index ad05e0f39b..6b0ed06ac4 100644
--- a/src/sql/models/qsqlrelationaltablemodel.cpp
+++ b/src/sql/models/qsqlrelationaltablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -715,7 +715,7 @@ void QSqlRelationalTableModel::clear()
\value InnerJoin - Inner join mode, return rows when there is at least one match in both tables.
\value LeftJoin - Left join mode, returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2).
- \see QSqlRelationalTableModel::setJoinMode
+ \sa QSqlRelationalTableModel::setJoinMode
\since 4.8
*/
@@ -724,7 +724,7 @@ void QSqlRelationalTableModel::clear()
In InnerJoin mode (the default) these rows will not be showed: use the
LeftJoin mode if you want to show them.
- \see QSqlRelationalTableModel::JoinMode
+ \sa QSqlRelationalTableModel::JoinMode
\since 4.8
*/
void QSqlRelationalTableModel::setJoinMode( QSqlRelationalTableModel::JoinMode joinMode )
diff --git a/src/sql/models/qsqlrelationaltablemodel.h b/src/sql/models/qsqlrelationaltablemodel.h
index 32d88b3189..decdc08216 100644
--- a/src/sql/models/qsqlrelationaltablemodel.h
+++ b/src/sql/models/qsqlrelationaltablemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index c615a30b48..d2b9427287 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h
index 87ddfc08d6..d40e591238 100644
--- a/src/sql/models/qsqltablemodel.h
+++ b/src/sql/models/qsqltablemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index 1c448f8fe5..9275712cee 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/src.pro b/src/src.pro
index 0f7a380984..80d1c4e3bd 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -10,7 +10,6 @@ nacl: SRC_SUBDIRS -= src_network src_testlib
contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui
-contains(QT_CONFIG, v8): SRC_SUBDIRS += src_v8
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
SRC_SUBDIRS += src_plugins
@@ -19,8 +18,6 @@ src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain
src_winmain.target = sub-winmain
src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib
src_corelib.target = sub-corelib
-src_v8.subdir = $$QT_SOURCE_TREE/src/v8
-src_v8.target = sub-v8
src_xml.subdir = $$QT_SOURCE_TREE/src/xml
src_xml.target = sub-xml
src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus
@@ -65,7 +62,6 @@ src_platformsupport.target = sub-platformsupport
src_declarative.depends += src_opengl
src_webkit.depends += src_opengl
}
- src_v8.depends += src_tools_mkv8snapshot
}
diff --git a/src/testlib/qabstracttestlogger.cpp b/src/testlib/qabstracttestlogger.cpp
index f7d8842c4c..d3a2678ecf 100644
--- a/src/testlib/qabstracttestlogger.cpp
+++ b/src/testlib/qabstracttestlogger.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -80,12 +80,29 @@ QAbstractTestLogger::~QAbstractTestLogger()
stream = 0;
}
+void QAbstractTestLogger::filterUnprintable(char *str) const
+{
+ char *idx = str;
+ while (*idx) {
+ if (((*idx < 0x20 && *idx != '\n' && *idx != '\t') || *idx > 0x7e))
+ *idx = '?';
+ ++idx;
+ }
+}
+
void QAbstractTestLogger::outputString(const char *msg)
{
QTEST_ASSERT(stream);
+ QTEST_ASSERT(msg);
- ::fputs(msg, stream);
+ char *filtered = new char[strlen(msg) + 1];
+ strcpy(filtered, msg);
+ filterUnprintable(filtered);
+
+ ::fputs(filtered, stream);
::fflush(stream);
+
+ delete [] filtered;
}
void QAbstractTestLogger::startLogging()
@@ -135,8 +152,6 @@ int qt_asprintf(QTestCharBuffer *str, const char *format, ...)
break; // out of memory - take what we have
}
- filter_unprintable(str->data());
-
return res;
}
diff --git a/src/testlib/qabstracttestlogger_p.h b/src/testlib/qabstracttestlogger_p.h
index 3e11863012..009fbddf23 100644
--- a/src/testlib/qabstracttestlogger_p.h
+++ b/src/testlib/qabstracttestlogger_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -99,6 +99,7 @@ public:
void outputString(const char *msg);
protected:
+ void filterUnprintable(char *str) const;
FILE *stream;
};
diff --git a/src/testlib/qasciikey.cpp b/src/testlib/qasciikey.cpp
index bcbbddff63..ee18ec87f6 100644
--- a/src/testlib/qasciikey.cpp
+++ b/src/testlib/qasciikey.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index ae15ef259e..b637a6e337 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -285,11 +285,11 @@ void QTest::setBenchmarkResult(qreal result, QTest::QBenchmarkMetric metric)
}
template <typename T>
-Q_TYPENAME T::value_type qAverage(const T &container)
+typename T::value_type qAverage(const T &container)
{
- Q_TYPENAME T::const_iterator it = container.constBegin();
- Q_TYPENAME T::const_iterator end = container.constEnd();
- Q_TYPENAME T::value_type acc = Q_TYPENAME T::value_type();
+ typename T::const_iterator it = container.constBegin();
+ typename T::const_iterator end = container.constEnd();
+ typename T::value_type acc = typename T::value_type();
int count = 0;
while (it != end) {
acc += *it;
diff --git a/src/testlib/qbenchmark.h b/src/testlib/qbenchmark.h
index 586d01be58..d43f1a6297 100644
--- a/src/testlib/qbenchmark.h
+++ b/src/testlib/qbenchmark.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmark_p.h b/src/testlib/qbenchmark_p.h
index 38f34c416b..402eccfa14 100644
--- a/src/testlib/qbenchmark_p.h
+++ b/src/testlib/qbenchmark_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkevent.cpp b/src/testlib/qbenchmarkevent.cpp
index 05d00156c8..a531d44748 100644
--- a/src/testlib/qbenchmarkevent.cpp
+++ b/src/testlib/qbenchmarkevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkevent_p.h b/src/testlib/qbenchmarkevent_p.h
index 3773aea7e7..3f94af2c67 100644
--- a/src/testlib/qbenchmarkevent_p.h
+++ b/src/testlib/qbenchmarkevent_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkmeasurement.cpp b/src/testlib/qbenchmarkmeasurement.cpp
index be52b4f211..db0f7c0958 100644
--- a/src/testlib/qbenchmarkmeasurement.cpp
+++ b/src/testlib/qbenchmarkmeasurement.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h
index 53e44fd531..82721e8c87 100644
--- a/src/testlib/qbenchmarkmeasurement_p.h
+++ b/src/testlib/qbenchmarkmeasurement_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,9 +54,7 @@
//
#include <QtCore/qelapsedtimer.h>
-#ifdef HAVE_TICK_COUNTER
#include <QtTest/private/cycle_p.h>
-#endif
#include <QtTest/qbenchmark.h>
QT_BEGIN_NAMESPACE
diff --git a/src/testlib/qbenchmarkmetric.cpp b/src/testlib/qbenchmarkmetric.cpp
index fb7f8f857a..6cd9aa468f 100644
--- a/src/testlib/qbenchmarkmetric.cpp
+++ b/src/testlib/qbenchmarkmetric.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkmetric.h b/src/testlib/qbenchmarkmetric.h
index 133a114cd6..35b441a84e 100644
--- a/src/testlib/qbenchmarkmetric.h
+++ b/src/testlib/qbenchmarkmetric.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkmetric_p.h b/src/testlib/qbenchmarkmetric_p.h
index a3e885b56a..247a2ca795 100644
--- a/src/testlib/qbenchmarkmetric_p.h
+++ b/src/testlib/qbenchmarkmetric_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp
index c511796884..f62cd299bc 100644
--- a/src/testlib/qbenchmarkvalgrind.cpp
+++ b/src/testlib/qbenchmarkvalgrind.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qbenchmarkvalgrind_p.h b/src/testlib/qbenchmarkvalgrind_p.h
index e6a0720a37..f242d85531 100644
--- a/src/testlib/qbenchmarkvalgrind_p.h
+++ b/src/testlib/qbenchmarkvalgrind_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index 45fc882492..f0e83183ec 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -257,7 +257,7 @@ void QPlainTestLogger::printBenchmarkResult(const QBenchmarkResult &result)
const char *bmtag = QTest::benchmarkResult2String();
char buf1[1024];
- QTest::qt_snprintf(
+ qsnprintf(
buf1, sizeof(buf1), "%s: %s::%s",
bmtag,
QTestResult::currentTestObjectName(),
@@ -267,16 +267,15 @@ void QPlainTestLogger::printBenchmarkResult(const QBenchmarkResult &result)
bufTag[0] = 0;
QByteArray tag = result.context.tag.toAscii();
if (tag.isEmpty() == false) {
- QTest::qt_snprintf(bufTag, sizeof(bufTag), ":\"%s\"", tag.data());
+ qsnprintf(bufTag, sizeof(bufTag), ":\"%s\"", tag.data());
}
char fillFormat[8];
int fillLength = 5;
- QTest::qt_snprintf(
- fillFormat, sizeof(fillFormat), ":\n%%%ds", fillLength);
+ qsnprintf(fillFormat, sizeof(fillFormat), ":\n%%%ds", fillLength);
char fill[1024];
- QTest::qt_snprintf(fill, sizeof(fill), fillFormat, "");
+ qsnprintf(fill, sizeof(fill), fillFormat, "");
const char * unitText = QTest::benchmarkMetricUnit(result.metric);
@@ -285,34 +284,24 @@ void QPlainTestLogger::printBenchmarkResult(const QBenchmarkResult &result)
QTest::formatResult(resultBuffer, 100, valuePerIteration, QTest::countSignificantDigits(result.value));
char buf2[1024];
- QTest::qt_snprintf(
- buf2, sizeof(buf2), "%s %s",
- resultBuffer,
- unitText);
+ qsnprintf(buf2, sizeof(buf2), "%s %s", resultBuffer, unitText);
char buf2_[1024];
QByteArray iterationText = " per iteration";
Q_ASSERT(result.iterations > 0);
- QTest::qt_snprintf(
- buf2_,
- sizeof(buf2_), "%s",
- iterationText.data());
+ qsnprintf(buf2_, sizeof(buf2_), "%s", iterationText.data());
char buf3[1024];
Q_ASSERT(result.iterations > 0);
QTest::formatResult(resultBuffer, 100, result.value, QTest::countSignificantDigits(result.value));
- QTest::qt_snprintf(
- buf3, sizeof(buf3), " (total: %s, iterations: %d)",
- resultBuffer,
- result.iterations);
+ qsnprintf(buf3, sizeof(buf3), " (total: %s, iterations: %d)", resultBuffer, result.iterations);
char buf[1024];
if (result.setByMacro) {
- QTest::qt_snprintf(
- buf, sizeof(buf), "%s%s%s%s%s%s\n", buf1, bufTag, fill, buf2, buf2_, buf3);
+ qsnprintf(buf, sizeof(buf), "%s%s%s%s%s%s\n", buf1, bufTag, fill, buf2, buf2_, buf3);
} else {
- QTest::qt_snprintf(buf, sizeof(buf), "%s%s%s%s\n", buf1, bufTag, fill, buf2);
+ qsnprintf(buf, sizeof(buf), "%s%s%s%s\n", buf1, bufTag, fill, buf2);
}
memcpy(buf, bmtag, strlen(bmtag));
@@ -340,13 +329,12 @@ void QPlainTestLogger::startLogging()
char buf[1024];
if (QTestLog::verboseLevel() < 0) {
- QTest::qt_snprintf(buf, sizeof(buf), "Testing %s\n",
- QTestResult::currentTestObjectName());
+ qsnprintf(buf, sizeof(buf), "Testing %s\n", QTestResult::currentTestObjectName());
} else {
- QTest::qt_snprintf(buf, sizeof(buf),
- "********* Start testing of %s *********\n"
- "Config: Using QTest library " QTEST_VERSION_STR
- ", Qt %s\n", QTestResult::currentTestObjectName(), qVersion());
+ qsnprintf(buf, sizeof(buf),
+ "********* Start testing of %s *********\n"
+ "Config: Using QTest library " QTEST_VERSION_STR
+ ", Qt %s\n", QTestResult::currentTestObjectName(), qVersion());
}
outputMessage(buf);
}
@@ -355,15 +343,15 @@ void QPlainTestLogger::stopLogging()
{
char buf[1024];
if (QTestLog::verboseLevel() < 0) {
- QTest::qt_snprintf(buf, sizeof(buf), "Totals: %d passed, %d failed, %d skipped\n",
- QTestResult::passCount(), QTestResult::failCount(),
- QTestResult::skipCount());
+ qsnprintf(buf, sizeof(buf), "Totals: %d passed, %d failed, %d skipped\n",
+ QTestResult::passCount(), QTestResult::failCount(),
+ QTestResult::skipCount());
} else {
- QTest::qt_snprintf(buf, sizeof(buf),
- "Totals: %d passed, %d failed, %d skipped\n"
- "********* Finished testing of %s *********\n",
- QTestResult::passCount(), QTestResult::failCount(),
- QTestResult::skipCount(), QTestResult::currentTestObjectName());
+ qsnprintf(buf, sizeof(buf),
+ "Totals: %d passed, %d failed, %d skipped\n"
+ "********* Finished testing of %s *********\n",
+ QTestResult::passCount(), QTestResult::failCount(),
+ QTestResult::skipCount(), QTestResult::currentTestObjectName());
}
outputMessage(buf);
diff --git a/src/testlib/qplaintestlogger_p.h b/src/testlib/qplaintestlogger_p.h
index 432e900320..dc0cec6dc4 100644
--- a/src/testlib/qplaintestlogger_p.h
+++ b/src/testlib/qplaintestlogger_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qsignaldumper.cpp b/src/testlib/qsignaldumper.cpp
index 18a505066f..ae8c353e6e 100644
--- a/src/testlib/qsignaldumper.cpp
+++ b/src/testlib/qsignaldumper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qsignaldumper_p.h b/src/testlib/qsignaldumper_p.h
index ddc42291f4..acf259733d 100644
--- a/src/testlib/qsignaldumper_p.h
+++ b/src/testlib/qsignaldumper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qsignalspy.h b/src/testlib/qsignalspy.h
index 61ce12a3a4..61d65131f1 100644
--- a/src/testlib/qsignalspy.h
+++ b/src/testlib/qsignalspy.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,8 +56,6 @@ QT_MODULE(Test)
class QVariant;
-/* ### Qt5: change the class to use regular BC mechanisms, such that we can
- * implement things like suggested in task 160192. */
class QSignalSpy: public QObject, public QList<QList<QVariant> >
{
public:
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index fa7c48bc70..c63f315619 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 950b5d537b..da3a836636 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -194,19 +194,20 @@ inline bool qCompare(QStringList const &t1, QStringList const &t2,
char msg[1024];
msg[0] = '\0';
bool isOk = true;
- if (t1.count() != t2.count()) {
- qt_snprintf(msg, 1024, "Compared QStringLists have different sizes.\n"
- " Actual (%s) size : '%d'\n"
- " Expected (%s) size: '%d'", actual, t1.count(), expected, t2.count());
+ const int actualSize = t1.count();
+ const int expectedSize = t2.count();
+ if (actualSize != expectedSize) {
+ qsnprintf(msg, sizeof(msg), "Compared QStringLists have different sizes.\n"
+ " Actual (%s) size : '%d'\n"
+ " Expected (%s) size: '%d'", actual, actualSize, expected, expectedSize);
isOk = false;
}
- const int min = qMin(t1.count(), t2.count());
- for (int i = 0; isOk && i < min; ++i) {
+ for (int i = 0; isOk && i < actualSize; ++i) {
if (t1.at(i) != t2.at(i)) {
- qt_snprintf(msg, 1024, "Compared QStringLists differ at index %d.\n"
- " Actual (%s) : '%s'\n"
- " Expected (%s) : '%s'", i, actual, t1.at(i).toLatin1().constData(),
- expected, t2.at(i).toLatin1().constData());
+ qsnprintf(msg, sizeof(msg), "Compared QStringLists differ at index %d.\n"
+ " Actual (%s) : '%s'\n"
+ " Expected (%s) : '%s'", i, actual, t1.at(i).toLatin1().constData(),
+ expected, t2.at(i).toLatin1().constData());
isOk = false;
}
}
@@ -253,6 +254,7 @@ int main(int argc, char *argv[]) \
int main(int argc, char *argv[]) \
{ \
QApplication app(argc, argv); \
+ app.setAttribute(Qt::AA_Use96Dpi, true); \
QTEST_DISABLE_KEYPAD_NAVIGATION \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
@@ -266,6 +268,7 @@ int main(int argc, char *argv[]) \
int main(int argc, char *argv[]) \
{ \
QGuiApplication app(argc, argv); \
+ app.setAttribute(Qt::AA_Use96Dpi, true); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
@@ -276,6 +279,7 @@ int main(int argc, char *argv[]) \
int main(int argc, char *argv[]) \
{ \
QCoreApplication app(argc, argv); \
+ app.setAttribute(Qt::AA_Use96Dpi, true); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
@@ -286,6 +290,7 @@ int main(int argc, char *argv[]) \
int main(int argc, char *argv[]) \
{ \
QCoreApplication app(argc, argv); \
+ app.setAttribute(Qt::AA_Use96Dpi, true); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h
index 730329a19c..ddd749e29d 100644
--- a/src/testlib/qtest_global.h
+++ b/src/testlib/qtest_global.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,7 @@ QT_MODULE(Test)
# endif
#endif
-#if defined (Q_CC_SUN) || defined (Q_CC_XLC) || (defined (Q_CC_GNU) && (__GNUC__ - 0 < 3))
+#if defined (Q_CC_SUN) || defined (Q_CC_XLC)
# define QTEST_NO_SPECIALIZATIONS
#endif
@@ -78,8 +78,6 @@ QT_MODULE(Test)
namespace QTest
{
enum TestFailMode { Abort = 1, Continue = 2 };
-
- int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format, ...);
}
QT_END_NAMESPACE
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h
index 89f63e25c6..a5877f9d23 100644
--- a/src/testlib/qtest_gui.h
+++ b/src/testlib/qtest_gui.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,8 +57,12 @@
#include <QtTest/qtesttouch.h>
#include <QtTest/qtestkeyboard.h>
-#include <QtWidgets/qicon.h>
#include <QtGui/qpixmap.h>
+#include <QtGui/qimage.h>
+
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/qicon.h>
+#endif
#if 0
// inform syncqt
@@ -85,30 +89,76 @@ inline bool qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const
}
#endif
+#ifndef QTEST_NO_SPECIALIZATIONS
template<>
+#endif
+inline bool qCompare(QImage const &t1, QImage const &t2,
+ const char *actual, const char *expected, const char *file, int line)
+{
+ char msg[1024];
+ msg[0] = '\0';
+ const bool t1Null = t1.isNull();
+ const bool t2Null = t2.isNull();
+ if (t1Null != t2Null) {
+ qsnprintf(msg, 1024, "Compared QImages differ.\n"
+ " Actual (%s).isNull() : %d\n"
+ " Expected (%s).isNull(): %d", actual, t1Null, expected, t2Null);
+ return compare_helper(false, msg, file, line);
+ }
+ if (t1Null && t2Null)
+ return compare_helper(true, "COMPARE()", file, line);
+ if (t1.width() != t2.width() || t2.height() != t2.height()) {
+ qsnprintf(msg, 1024, "Compared QImages differ in size.\n"
+ " Actual (%s) : %dx%d\n"
+ " Expected (%s): %dx%d",
+ actual, t1.width(), t1.height(),
+ expected, t2.width(), t2.height());
+ return compare_helper(false, msg, file, line);
+ }
+ if (t1.format() != t2.format()) {
+ qsnprintf(msg, 1024, "Compared QImages differ in format.\n"
+ " Actual (%s) : %d\n"
+ " Expected (%s): %d",
+ actual, t1.format(), expected, t2.format());
+ return compare_helper(false, msg, file, line);
+ }
+ return (t1 == t2)
+ ? compare_helper(true, "COMPARE()", file, line)
+ : compare_helper(false, "Compared values are not the same",
+ toString(t1), toString(t2), actual, expected, file, line);
+}
+
+#ifndef QTEST_NO_SPECIALIZATIONS
+template<>
+#endif
inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, const char *expected,
const char *file, int line)
{
+ char msg[1024];
+ msg[0] = '\0';
+ const bool t1Null = t1.isNull();
+ const bool t2Null = t2.isNull();
+ if (t1Null != t2Null) {
+ qsnprintf(msg, 1024, "Compared QPixmaps differ.\n"
+ " Actual (%s).isNull() : %d\n"
+ " Expected (%s).isNull(): %d", actual, t1Null, expected, t2Null);
+ return compare_helper(false, msg, file, line);
+ }
+ if (t1Null && t2Null)
+ return compare_helper(true, "COMPARE()", file, line);
+ if (t1.width() != t2.width() || t2.height() != t2.height()) {
+ qsnprintf(msg, 1024, "Compared QPixmaps differ in size.\n"
+ " Actual (%s) : %dx%d\n"
+ " Expected (%s): %dx%d",
+ actual, t1.width(), t1.height(),
+ expected, t2.width(), t2.height());
+ return compare_helper(false, msg, file, line);
+ }
return qCompare(t1.toImage(), t2.toImage(), actual, expected, file, line);
}
}
-/* compatibility */
-
-inline static bool pixmapsAreEqual(const QPixmap *actual, const QPixmap *expected)
-{
- if (!actual && !expected)
- return true;
- if (!actual || !expected)
- return false;
- if (actual->isNull() && expected->isNull())
- return true;
- if (actual->isNull() || expected->isNull() || actual->size() != expected->size())
- return false;
- return actual->toImage() == expected->toImage();
-}
-
#ifdef Q_WS_X11
extern void qt_x11_wait_for_window_manager(QWidget *w);
#endif
diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h
index 90ed8838b3..6bd3339a0f 100644
--- a/src/testlib/qtestaccessible.h
+++ b/src/testlib/qtestaccessible.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h
index 24edab278d..0dc24762ab 100644
--- a/src/testlib/qtestassert.h
+++ b/src/testlib/qtestassert.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index b37dbc0203..8bd836d7f9 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -148,9 +148,6 @@ QT_BEGIN_NAMESPACE
unspecified behavior from being introduced; that is behavior that usually
occurs when the compiler implicitly casts the argument.
- If you use QCOMPARE() to compare two QStringList objects, it will start
- comparing the objects from the end of the lists.
-
For your own classes, you can use \l QTest::toString() to format values for
outputting into the test log.
@@ -163,40 +160,61 @@ QT_BEGIN_NAMESPACE
\sa QVERIFY(), QTRY_COMPARE(), QTest::toString()
*/
-/*! \macro QTRY_VERIFY(condition)
+/*! \macro QTRY_VERIFY_WITH_TIMEOUT(condition, timeout)
\relates QTest
- The QTRY_VERIFY() macro is similar to QVERIFY(), but checks the \a condition
- repeatedly, until either the condition becomes true or a maximum timeout is
+ The QTRY_VERIFY_WITH_TIMEOUT() macro is similar to QVERIFY(), but checks the \a condition
+ repeatedly, until either the condition becomes true or the \a timeout is
reached. Between each evaluation, events will be processed. If the timeout
is reached, a failure is recorded in the test log and the test won't be
executed further.
- The timeout is fixed at five seconds.
+ \note This macro can only be used in a test function that is invoked
+ by the test framework.
+
+ \sa QTRY_VERIFY(), QVERIFY(), QCOMPARE(), QTRY_COMPARE()
+*/
+
+
+/*! \macro QTRY_VERIFY(condition)
+
+ \relates QTest
+
+ Invokes QTRY_VERIFY_WITH_TIMEOUT() with a timeout of five seconds.
\note This macro can only be used in a test function that is invoked
by the test framework.
- \sa QVERIFY(), QCOMPARE(), QTRY_COMPARE()
+ \sa QTRY_VERIFY_WITH_TIMEOUT(), QVERIFY(), QCOMPARE(), QTRY_COMPARE()
*/
-/*! \macro QTRY_COMPARE(actual, expected)
+/*! \macro QTRY_COMPARE_WITH_TIMEOUT(actual, expected, timeout)
\relates QTest
- The QTRY_COMPARE() macro is similar to QCOMPARE(), but performs the comparison
+ The QTRY_COMPARE_WITH_TIMEOUT() macro is similar to QCOMPARE(), but performs the comparison
of the \a actual and \a expected values repeatedly, until either the two values
- are equal or a maximum timeout is reached. Between each comparison, events
+ are equal or the \a timeout is reached. Between each comparison, events
will be processed. If the timeout is reached, a failure is recorded in the
test log and the test won't be executed further.
- The timeout is fixed at five seconds.
+ \note This macro can only be used in a test function that is invoked
+ by the test framework.
+
+ \sa QTRY_COMPARE(), QCOMPARE(), QVERIFY(), QTRY_VERIFY()
+*/
+
+/*! \macro QTRY_COMPARE(actual, expected)
+
+ \relates QTest
+
+ Invokes QTRY_COMPARE_WITH_TIMEOUT() with a timeout of five seconds.
\note This macro can only be used in a test function that is invoked
by the test framework.
- \sa QCOMPARE(), QVERIFY(), QTRY_VERIFY()
+ \sa QTRY_COMPARE_WITH_TIMEOUT(), QCOMPARE(), QVERIFY(), QTRY_VERIFY()
*/
/*! \macro QFETCH(type, name)
@@ -392,14 +410,19 @@ QT_BEGIN_NAMESPACE
the \a TestClass, and executes all tests in the order they were defined.
Use this macro to build stand-alone executables.
- If \c QT_GUI_LIB is defined, the application object will be a QApplication,
+ If \c QT_WIDGETS_LIB is defined, the application object will be a QApplication,
+ if \c QT_GUI_LIB is defined, the application object will be a QGuiApplication,
otherwise it will be a QCoreApplication. If qmake is used and the configuration
- includes \c{QT += gui}, then \c QT_GUI_LIB will be defined automatically.
+ includes \c{QT += widgets}, then \c QT_WIDGETS_LIB will be defined automatically.
+ Similarly, if qmake is used and the configuration includes \c{QT += gui}, then
+ \c QT_GUI_LIB will be defined automatically.
- \bold {Note:} On platforms that have keypad navigation enabled by default (eg: Symbian),
- this macro will forcfully disable it to simplify the usage of key events when writing
- autotests. If you wish to write a test case that uses keypad navigation, you should
- enable it either in the \c {initTestCase()} or \c {init()} functions of your test case.
+ \bold {Note:} On platforms that have keypad navigation enabled by default,
+ this macro will forcefully disable it if \c QT_WIDGETS_LIB is defined. This is done
+ to simplify the usage of key events when writing autotests. If you wish to write a
+ test case that uses keypad navigation, you should enable it either in the
+ \c {initTestCase()} or \c {init()} functions of your test case by calling
+ \l {QApplication::setNavigationMode()}.
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 11
@@ -512,7 +535,8 @@ QT_BEGIN_NAMESPACE
\overload
Simulates clicking of \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before clicking the key.
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 13
@@ -526,7 +550,8 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
Simulates clicking of \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before clicking the key.
Examples:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 14
@@ -534,7 +559,7 @@ QT_BEGIN_NAMESPACE
The first example above simulates clicking the \c escape key on \c
myWidget without any keyboard modifiers and without delay. The
second example simulates clicking \c shift-escape on \c myWidget
- with a following 200 ms delay of the test.
+ following a 200 ms delay of the test.
\sa QTest::keyClicks()
*/
@@ -559,7 +584,7 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay
- is larger than 0, the test will wait for \a delay milliseconds.
+ is larger than 0, the test will wait for \a delay milliseconds before pressing the key.
\bold {Note:} At some point you should release the key using \l keyRelease().
@@ -571,7 +596,8 @@ QT_BEGIN_NAMESPACE
\overload
Simulates pressing a \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before pressing the key.
\bold {Note:} At some point you should release the key using \l keyRelease().
@@ -581,7 +607,8 @@ QT_BEGIN_NAMESPACE
/*! \fn void QTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
Simulates releasing a \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before releasing the key.
\sa QTest::keyPress(), QTest::keyClick()
*/
@@ -591,7 +618,8 @@ QT_BEGIN_NAMESPACE
\overload
Simulates releasing a \a key with an optional \a modifier on a \a widget.
- If \a delay is larger than 0, the test will wait for \a delay milliseconds.
+ If \a delay is larger than 0, the test will wait for \a delay milliseconds
+ before releasing the key.
\sa QTest::keyClick()
*/
@@ -975,38 +1003,10 @@ namespace QTest
static int keyDelay = -1;
static int mouseDelay = -1;
static int eventDelay = -1;
- static int keyVerbose = -1;
#if defined(Q_OS_UNIX)
static bool noCrashHandler = false;
#endif
-void filter_unprintable(char *str)
-{
- char *idx = str;
- while (*idx) {
- if (((*idx < 0x20 && *idx != '\n' && *idx != '\t') || *idx > 0x7e))
- *idx = '?';
- ++idx;
- }
-}
-
-/*! \internal
- */
-int qt_snprintf(char *str, int size, const char *format, ...)
-{
- va_list ap;
- int res = 0;
-
- va_start(ap, format);
- qvsnprintf(str, size, format, ap);
- va_end(ap);
- str[size - 1] = '\0';
-
- filter_unprintable(str);
-
- return res;
-}
-
/*! \internal
Invoke a method of the object without generating warning if the method does not exist
*/
@@ -1020,14 +1020,6 @@ static void invokeMethod(QObject *obj, const char *methodName)
}
}
-bool Q_TESTLIB_EXPORT defaultKeyVerbose()
-{
- if (keyVerbose == -1) {
- keyVerbose = qgetenv("QTEST_KEYEVENT_VERBOSE").isEmpty() ? 0 : 1;
- }
- return keyVerbose == 1;
-}
-
int defaultEventDelay()
{
if (eventDelay == -1) {
@@ -1118,7 +1110,7 @@ static void qPrintDataTags(FILE *stream)
slot[strlen(slot) - 2] = '\0';
QByteArray member;
member.resize(qstrlen(slot) + qstrlen("_data()") + 1);
- QTest::qt_snprintf(member.data(), member.size(), "%s_data()", slot);
+ qsnprintf(member.data(), member.size(), "%s_data()", slot);
invokeMethod(QTest::currentTestObject, member.constData());
for (int j = 0; j < table.dataCount(); ++j)
localTags << QLatin1String(table.testData(j)->dataTag());
@@ -1209,7 +1201,6 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
" -eventdelay ms : Set default delay for mouse and keyboard simulation to ms milliseconds\n"
" -keydelay ms : Set default delay for keyboard simulation to ms milliseconds\n"
" -mousedelay ms : Set default delay for mouse simulation to ms milliseconds\n"
- " -keyevent-verbose : Turn on verbose messages for keyboard simulation\n"
" -maxwarnings n : Sets the maximum amount of messages to output.\n"
" 0 means unlimited, default: 2000\n"
#if defined(Q_OS_UNIX)
@@ -1343,8 +1334,6 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
} else if (strcmp(argv[i], "-nocrashhandler") == 0) {
QTest::noCrashHandler = true;
#endif
- } else if (strcmp(argv[i], "-keyevent-verbose") == 0) {
- QTest::keyVerbose = 1;
#ifdef QTESTLIB_USE_VALGRIND
} else if (strcmp(argv[i], "-callgrind") == 0) {
if (QBenchmarkValgrindUtils::haveValgrind())
@@ -1448,8 +1437,8 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
if (colon != -1) {
data = qstrdup(argv[i]+colon+1);
}
- QTest::qt_snprintf(buf, qMin(512, off + 1), "%s", argv[i]); // copy text before the ':' into buf
- QTest::qt_snprintf(buf + off, qMin(512 - off, 3), "()"); // append "()"
+ qsnprintf(buf, qMin(512, off + 1), "%s", argv[i]); // copy text before the ':' into buf
+ qsnprintf(buf + off, qMin(512 - off, 3), "()"); // append "()"
int idx = QTest::currentTestObject->metaObject()->indexOfMethod(buf);
if (idx < 0 || !isValidSlot(QTest::currentTestObject->metaObject()->method(idx))) {
fprintf(stderr, "Unknown testfunction: '%s'\n", buf);
@@ -1552,9 +1541,13 @@ static void qInvokeTestMethodDataEntry(char *slot)
if (QBenchmarkTestMethodData::current->isBenchmark() &&
QBenchmarkGlobalData::current->verboseOutput) {
if (i == -1) {
- qDebug() << "warmup stage result :" << QBenchmarkTestMethodData::current->result.value;
+ QTestLog::info(qPrintable(
+ QString::fromLatin1("warmup stage result : %1")
+ .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0);
} else {
- qDebug() << "accumulation stage result:" << QBenchmarkTestMethodData::current->result.value;
+ QTestLog::info(qPrintable(
+ QString::fromLatin1("accumulation stage result: %1")
+ .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0);
}
}
} while (QBenchmarkTestMethodData::current->isBenchmark()
@@ -1601,7 +1594,7 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0)
if (curGlobalDataIndex == 0) {
QTestResult::setCurrentTestLocation(QTestResult::DataFunc);
- QTest::qt_snprintf(member, 512, "%s_data()", slot);
+ qsnprintf(member, 512, "%s_data()", slot);
invokeMethod(QTest::currentTestObject, member);
}
@@ -1927,6 +1920,10 @@ FatalSignalHandler::~FatalSignalHandler()
test that was executed with qExec() can't run another test via qExec() and
threads are not allowed to call qExec() simultaneously.
+ If you have programatically created the arguments, as opposed to getting them
+ from the arguments in \c main(), it is likely of interest to use
+ QTest::qExec(QObject *, const QStringList &) since it is Unicode safe.
+
\sa QTEST_MAIN()
*/
@@ -2019,6 +2016,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
#endif
currentTestObject = 0;
+
+ QSignalDumper::endDump();
+
#ifdef Q_WS_MAC
if (macNeedsActivate) {
IOPMAssertionRelease(powerID);
@@ -2036,6 +2036,30 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
return qMin(QTestResult::failCount(), 127);
}
+/*!
+ \overload
+ \since 4.4
+
+ Behaves identically to qExec(QObject *, int, char**) but takes a
+ QStringList of \a arguments instead of a \c char** list.
+ */
+int QTest::qExec(QObject *testObject, const QStringList &arguments)
+{
+ const int argc = arguments.count();
+ QVarLengthArray<char *> argv(argc);
+
+ QVector<QByteArray> args;
+ args.reserve(argc);
+
+ for (int i = 0; i < argc; ++i)
+ {
+ args.append(arguments.at(i).toLocal8Bit().constData());
+ argv[i] = args.last().data();
+ }
+
+ return qExec(testObject, argc, argv.data());
+}
+
/*! \internal
*/
void QTest::qFail(const char *statementStr, const char *file, int line)
@@ -2099,6 +2123,15 @@ void QTest::ignoreMessage(QtMsgType type, const char *message)
/*! \internal
*/
+
+#ifdef Q_OS_WIN
+static inline bool isWindowsBuildDirectory(const QString &dirName)
+{
+ return dirName.compare(QStringLiteral("Debug"), Qt::CaseInsensitive) == 0
+ || dirName.compare(QStringLiteral("Release"), Qt::CaseInsensitive) == 0;
+}
+#endif
+
QString QTest::qFindTestData(const QString& base, const char *file, int line, const char *builddir)
{
QString found;
@@ -2107,16 +2140,23 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co
// 1. relative to test binary.
if (qApp) {
- QString binpath = QCoreApplication::applicationDirPath();
- QString candidate = QString::fromLatin1("%1/%2").arg(binpath).arg(base);
- if (QFileInfo(candidate).exists()) {
- found = candidate;
+ QDir binDirectory(QCoreApplication::applicationDirPath());
+ if (binDirectory.exists(base)) {
+ found = binDirectory.absoluteFilePath(base);
}
+#ifdef Q_OS_WIN
+ // Windows: The executable is typically located in one of the
+ // 'Release' or 'Debug' directories.
+ else if (isWindowsBuildDirectory(binDirectory.dirName())
+ && binDirectory.cdUp() && binDirectory.exists(base)) {
+ found = binDirectory.absoluteFilePath(base);
+ }
+#endif // Q_OS_WIN
else if (QTestLog::verboseLevel() >= 2) {
+ const QString candidate = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + QLatin1Char('/') + base);
QTestLog::info(qPrintable(
QString::fromLatin1("testdata %1 not found relative to test binary [%2]; "
- "checking next location")
- .arg(base).arg(candidate)),
+ "checking next location").arg(base, candidate)),
file, line);
}
}
@@ -2127,9 +2167,7 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co
if (testObjectName) {
QString testsPath = QLibraryInfo::location(QLibraryInfo::TestsPath);
QString candidate = QString::fromLatin1("%1/%2/%3")
- .arg(testsPath)
- .arg(QFile::decodeName(testObjectName).toLower())
- .arg(base);
+ .arg(testsPath, QFile::decodeName(testObjectName).toLower(), base);
if (QFileInfo(candidate).exists()) {
found = candidate;
}
@@ -2137,7 +2175,7 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co
QTestLog::info(qPrintable(
QString::fromLatin1("testdata %1 not found in tests install path [%2]; "
"checking next location")
- .arg(base).arg(candidate)),
+ .arg(base, QDir::toNativeSeparators(candidate))),
file, line);
}
}
@@ -2154,14 +2192,14 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co
srcdir.setFile(QFile::decodeName(builddir) + QLatin1String("/") + srcdir.filePath());
}
- QString candidate = QString::fromLatin1("%1/%2").arg(srcdir.canonicalFilePath()).arg(base);
+ QString candidate = QString::fromLatin1("%1/%2").arg(srcdir.canonicalFilePath(), base);
if (QFileInfo(candidate).exists()) {
found = candidate;
}
else if (QTestLog::verboseLevel() >= 2) {
QTestLog::info(qPrintable(
QString::fromLatin1("testdata %1 not found relative to source path [%2]")
- .arg(base).arg(candidate)),
+ .arg(base, QDir::toNativeSeparators(candidate))),
file, line);
}
}
@@ -2173,7 +2211,7 @@ QString QTest::qFindTestData(const QString& base, const char *file, int line, co
}
else if (QTestLog::verboseLevel() >= 1) {
QTestLog::info(qPrintable(
- QString::fromLatin1("testdata %1 was located at %2").arg(base).arg(found)),
+ QString::fromLatin1("testdata %1 was located at %2").arg(base, QDir::toNativeSeparators(found))),
file, line);
}
@@ -2247,7 +2285,7 @@ QTestData &QTest::newRow(const char *dataTag)
{
QTEST_ASSERT_X(dataTag, "QTest::newRow()", "Data tag can not be null");
QTestTable *tbl = QTestTable::currentTestTable();
- QTEST_ASSERT_X(tbl, "QTest::addColumn()", "Cannot add testdata outside of a _data slot.");
+ QTEST_ASSERT_X(tbl, "QTest::newRow()", "Cannot add testdata outside of a _data slot.");
return *tbl->newData(dataTag);
}
@@ -2386,7 +2424,7 @@ Q_TESTLIB_EXPORT bool QTest::qCompare<double>(double const &t1, double const &t2
template <> Q_TESTLIB_EXPORT char *QTest::toString<TYPE >(const TYPE &t) \
{ \
char *msg = new char[128]; \
- qt_snprintf(msg, 128, #FORMAT, t); \
+ qsnprintf(msg, 128, #FORMAT, t); \
return msg; \
}
@@ -2423,7 +2461,7 @@ char *QTest::toString(const char *str)
char *QTest::toString(const void *p)
{
char *msg = new char[128];
- qt_snprintf(msg, 128, "%p", p);
+ qsnprintf(msg, 128, "%p", p);
return msg;
}
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h
index 091e9a8d96..4537e76920 100644
--- a/src/testlib/qtestcase.h
+++ b/src/testlib/qtestcase.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -86,33 +86,37 @@ do {\
} while (0)
// Will try to wait for the expression to become true while allowing event processing
-#define QTRY_VERIFY(__expr) \
+#define QTRY_VERIFY_WITH_TIMEOUT(__expr, __timeout) \
do { \
const int __step = 50; \
- const int __timeout = 5000; \
+ const int __timeoutValue = __timeout; \
if (!(__expr)) { \
QTest::qWait(0); \
} \
- for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
+ for (int __i = 0; __i < __timeoutValue && !(__expr); __i+=__step) { \
QTest::qWait(__step); \
} \
QVERIFY(__expr); \
} while (0)
+#define QTRY_VERIFY(__expr) QTRY_VERIFY_WITH_TIMEOUT(__expr, 5000)
+
// Will try to wait for the comparison to become successful while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
+
+#define QTRY_COMPARE_WITH_TIMEOUT(__expr, __expected, __timeout) \
do { \
const int __step = 50; \
- const int __timeout = 5000; \
+ const int __timeoutValue = __timeout; \
if ((__expr) != (__expected)) { \
QTest::qWait(0); \
} \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
+ for (int __i = 0; __i < __timeoutValue && ((__expr) != (__expected)); __i+=__step) { \
QTest::qWait(__step); \
} \
QCOMPARE(__expr, __expected); \
} while (0)
+#define QTRY_COMPARE(__expr, __expected) QTRY_COMPARE_WITH_TIMEOUT(__expr, __expected, 5000)
#ifdef Q_CC_MSVC
#define QSKIP(statement) \
@@ -180,6 +184,7 @@ namespace QTest
Q_TESTLIB_EXPORT char *toString(const void *);
Q_TESTLIB_EXPORT int qExec(QObject *testObject, int argc = 0, char **argv = 0);
+ Q_TESTLIB_EXPORT int qExec(QObject *testObject, const QStringList &arguments);
Q_TESTLIB_EXPORT bool qVerify(bool statement, const char *statementStr, const char *description,
const char *file, int line);
@@ -208,7 +213,7 @@ namespace QTest
Q_TESTLIB_EXPORT bool compare_helper(bool success, const char *msg, const char *file,
int line);
Q_TESTLIB_EXPORT bool compare_helper(bool success, const char *msg, char *val1, char *val2,
- const char *expected, const char *actual,
+ const char *actual, const char *expected,
const char *file, int line);
Q_TESTLIB_EXPORT void qSleep(int ms);
Q_TESTLIB_EXPORT void addColumnInternal(int id, const char *name);
diff --git a/src/testlib/qtestcoreelement_p.h b/src/testlib/qtestcoreelement_p.h
index 17e6ede4b6..3eb50f20d4 100644
--- a/src/testlib/qtestcoreelement_p.h
+++ b/src/testlib/qtestcoreelement_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestcorelist_p.h b/src/testlib/qtestcorelist_p.h
index 263df17172..2571f75af4 100644
--- a/src/testlib/qtestcorelist_p.h
+++ b/src/testlib/qtestcorelist_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestdata.cpp b/src/testlib/qtestdata.cpp
index 6ee0063738..1a246591c7 100644
--- a/src/testlib/qtestdata.cpp
+++ b/src/testlib/qtestdata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestdata.h b/src/testlib/qtestdata.h
index 02ee03ff7d..90b1395bf5 100644
--- a/src/testlib/qtestdata.h
+++ b/src/testlib/qtestdata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestelement.cpp b/src/testlib/qtestelement.cpp
index d0af966e8c..cad7b28da6 100644
--- a/src/testlib/qtestelement.cpp
+++ b/src/testlib/qtestelement.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestelement_p.h b/src/testlib/qtestelement_p.h
index 583ef1cfea..22bcddaf87 100644
--- a/src/testlib/qtestelement_p.h
+++ b/src/testlib/qtestelement_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestelementattribute.cpp b/src/testlib/qtestelementattribute.cpp
index 1ab25af25b..c3e62cc654 100644
--- a/src/testlib/qtestelementattribute.cpp
+++ b/src/testlib/qtestelementattribute.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestelementattribute_p.h b/src/testlib/qtestelementattribute_p.h
index 9993321e81..04f06f20e3 100644
--- a/src/testlib/qtestelementattribute_p.h
+++ b/src/testlib/qtestelementattribute_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestevent.h b/src/testlib/qtestevent.h
index c7af5b28d7..ac23bb69cd 100644
--- a/src/testlib/qtestevent.h
+++ b/src/testlib/qtestevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestevent.qdoc b/src/testlib/qtestevent.qdoc
index 356f10367d..405f64abcc 100644
--- a/src/testlib/qtestevent.qdoc
+++ b/src/testlib/qtestevent.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h
index cb7c078136..205aba9fc7 100644
--- a/src/testlib/qtesteventloop.h
+++ b/src/testlib/qtesteventloop.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h
index deb572b8fd..71defcfbdc 100644
--- a/src/testlib/qtestkeyboard.h
+++ b/src/testlib/qtestkeyboard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,11 +53,16 @@
#include <QtTest/qtestspontaneevent.h>
#include <QtCore/qpointer.h>
-#include <QtWidgets/qapplication.h>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qwindow.h>
#include <QtGui/qevent.h>
-#include <QtWidgets/qwidget.h>
#include <QtGui/qwindowsysteminterface_qpa.h>
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/qwidget.h>
+#include <QtWidgets/qapplication.h>
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 0951b9b309..695c001e0f 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -291,7 +291,7 @@ void QTestLog::printUnhandledIgnoreMessages()
char msg[1024];
QTest::IgnoreResultList *list = QTest::ignoreResultList;
while (list) {
- QTest::qt_snprintf(msg, 1024, "Did not receive message: \"%s\"", list->msg);
+ qsnprintf(msg, 1024, "Did not receive message: \"%s\"", list->msg);
QTest::TestLoggers::addMessage(QAbstractTestLogger::Info, msg);
list = list->next;
@@ -419,7 +419,7 @@ int QTestLog::verboseLevel()
return QTest::verbosity;
}
-void QTestLog::addIgnoreMessage(QtMsgType type, const char *msg)
+void QTestLog::ignoreMessage(QtMsgType type, const char *msg)
{
QTEST_ASSERT(msg);
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index b2aa8c1890..02bb54815c 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,7 +73,8 @@ public:
static void addXPass(const char *msg, const char *file, int line);
static void addSkip(const char *msg, const char *file, int line);
static void addBenchmarkResult(const QBenchmarkResult &result);
- static void addIgnoreMessage(QtMsgType type, const char *msg);
+
+ static void ignoreMessage(QtMsgType type, const char *msg);
static int unhandledIgnoreMessages();
static void printUnhandledIgnoreMessages();
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h
index cc6b3de9a9..6c68b057c1 100644
--- a/src/testlib/qtestmouse.h
+++ b/src/testlib/qtestmouse.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,11 +53,14 @@
#include <QtTest/qtestspontaneevent.h>
#include <QtCore/qpoint.h>
#include <QtCore/qstring.h>
-#include <QtWidgets/qapplication.h>
#include <QtGui/qevent.h>
-#include <QtWidgets/qwidget.h>
#include <QtGui/qwindowsysteminterface_qpa.h>
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/qapplication.h>
+#include <QtWidgets/qwidget.h>
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp
index 35a3f042ad..9fc3c67ca5 100644
--- a/src/testlib/qtestresult.cpp
+++ b/src/testlib/qtestresult.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -88,11 +88,6 @@ void QTestResult::reset()
QTest::expectFailMode = 0;
}
-bool QTestResult::allDataPassed()
-{
- return !QTest::failed;
-}
-
bool QTestResult::currentTestFailed()
{
return QTest::dataFailed;
@@ -239,11 +234,11 @@ bool QTestResult::verify(bool statement, const char *statementStr,
char msg[1024];
if (QTestLog::verboseLevel() >= 2) {
- QTest::qt_snprintf(msg, 1024, "QVERIFY(%s)", statementStr);
+ qsnprintf(msg, 1024, "QVERIFY(%s)", statementStr);
QTestLog::info(msg, file, line);
}
- QTest::qt_snprintf(msg, 1024, "'%s' returned FALSE. (%s)", statementStr, description);
+ qsnprintf(msg, 1024, "'%s' returned FALSE. (%s)", statementStr, description);
return checkStatement(statement, msg, file, line);
}
@@ -267,9 +262,9 @@ bool QTestResult::compare(bool success, const char *msg, char *val1, char *val2,
return compare(success, msg, file, line);
char buf[1024];
- QTest::qt_snprintf(buf, 1024, "%s\n Actual (%s): %s\n Expected (%s): %s", msg,
- actual, val1 ? val1 : "<null>",
- expected, val2 ? val2 : "<null>");
+ qsnprintf(buf, 1024, "%s\n Actual (%s): %s\n Expected (%s): %s", msg,
+ actual, val1 ? val1 : "<null>",
+ expected, val2 ? val2 : "<null>");
delete [] val1;
delete [] val2;
return compare(success, buf, file, line);
@@ -330,7 +325,7 @@ int QTestResult::skipCount()
void QTestResult::ignoreMessage(QtMsgType type, const char *msg)
{
- QTestLog::addIgnoreMessage(type, msg);
+ QTestLog::ignoreMessage(type, msg);
}
bool QTestResult::testFailed()
diff --git a/src/testlib/qtestresult_p.h b/src/testlib/qtestresult_p.h
index 1ce81854b5..134d0637b6 100644
--- a/src/testlib/qtestresult_p.h
+++ b/src/testlib/qtestresult_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,7 +67,6 @@ public:
static const char *currentTestObjectName();
static bool currentTestFailed();
- static bool allDataPassed();
static QTestData *currentTestData();
static QTestData *currentGlobalTestData();
static const char *currentTestFunction();
diff --git a/src/testlib/qtestspontaneevent.h b/src/testlib/qtestspontaneevent.h
index bf5a74ca4b..20e396bda6 100644
--- a/src/testlib/qtestspontaneevent.h
+++ b/src/testlib/qtestspontaneevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h
index 6a87fe3460..ff621cdb6f 100644
--- a/src/testlib/qtestsystem.h
+++ b/src/testlib/qtestsystem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtesttable.cpp b/src/testlib/qtesttable.cpp
index 0c76076b88..203a74618d 100644
--- a/src/testlib/qtesttable.cpp
+++ b/src/testlib/qtesttable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,8 +73,8 @@ public:
ElementList *list;
DataList *dataList;
- void append(int elemType, const char *elemName);
- void append(QTestData *data);
+ void addColumn(int elemType, const char *elemName);
+ void addRow(QTestData *data);
ElementList *elementAt(int index);
QTestData *dataAt(int index);
@@ -124,7 +124,7 @@ QTestTablePrivate::~QTestTablePrivate()
}
}
-void QTestTablePrivate::append(int elemType, const char *elemName)
+void QTestTablePrivate::addColumn(int elemType, const char *elemName)
{
ElementList *item = new ElementList;
item->elementName = elemName;
@@ -139,7 +139,7 @@ void QTestTablePrivate::append(int elemType, const char *elemName)
last->next = item;
}
-void QTestTablePrivate::append(QTestData *data)
+void QTestTablePrivate::addRow(QTestData *data)
{
DataList *item = new DataList;
item->data = data;
@@ -158,7 +158,7 @@ void QTestTable::addColumn(int type, const char *name)
QTEST_ASSERT(type);
QTEST_ASSERT(name);
- d->append(type, name);
+ d->addColumn(type, name);
}
int QTestTable::elementCount() const
@@ -192,7 +192,7 @@ bool QTestTable::isEmpty() const
QTestData *QTestTable::newData(const char *tag)
{
QTestData *dt = new QTestData(tag, this);
- d->append(dt);
+ d->addRow(dt);
return dt;
}
diff --git a/src/testlib/qtesttable_p.h b/src/testlib/qtesttable_p.h
index ed435865a9..46ee4a99d9 100644
--- a/src/testlib/qtesttable_p.h
+++ b/src/testlib/qtesttable_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h
index 6a9909b617..499db58b4d 100644
--- a/src/testlib/qtesttouch.h
+++ b/src/testlib/qtesttouch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,7 +54,9 @@
#include <QtGui/QWindowSystemInterface>
#include <QtCore/qmap.h>
#include <QtGui/qevent.h>
+#ifdef QT_WIDGETS_LIB
#include <QtWidgets/qwidget.h>
+#endif
QT_BEGIN_HEADER
@@ -62,13 +64,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Test)
-#ifdef QT_WIDGETS_LIB
-extern Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
- QTouchDevice *device,
- const QList<QTouchEvent::TouchPoint> &touchPoints,
- ulong timestamp);
-#endif
-
namespace QTest
{
@@ -136,20 +131,44 @@ namespace QTest
if (!points.isEmpty()) {
if (targetWindow)
{
- QWindowSystemInterface::handleTouchEvent(targetWindow,QEvent::None, device, touchPointList(points.values()));
- QTest::qWait(10);
+ QWindowSystemInterface::handleTouchEvent(targetWindow, device, touchPointList(points.values()));
}
#ifdef QT_WIDGETS_LIB
else if (targetWidget)
{
- qt_translateRawTouchEvent(targetWidget, device, points.values(), 0);
+ QWindowSystemInterface::handleTouchEvent(targetWidget->windowHandle(), device, touchPointList(points.values()));
}
#endif
}
+ QCoreApplication::processEvents();
previousPoints = points;
points.clear();
}
+ static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt)
+ {
+ QWindowSystemInterface::TouchPoint p;
+ p.id = pt.id();
+ p.flags = pt.flags();
+ p.normalPosition = pt.normalizedPos();
+ p.area = pt.screenRect();
+ p.pressure = pt.pressure();
+ p.state = pt.state();
+ p.velocity = pt.velocity();
+ p.rawPositions = pt.rawScreenPositions();
+ return p;
+ }
+ static QList<struct QWindowSystemInterface::TouchPoint> touchPointList(const QList<QTouchEvent::TouchPoint>& pointList)
+ {
+ QList<struct QWindowSystemInterface::TouchPoint> newList;
+
+ Q_FOREACH (QTouchEvent::TouchPoint p, pointList)
+ {
+ newList.append(touchPoint(p));
+ }
+ return newList;
+ }
+
private:
#ifdef QT_WIDGETS_LIB
QTouchEventSequence(QWidget *widget, QTouchDevice *aDevice)
@@ -198,27 +217,6 @@ namespace QTest
return window->mapToGlobal(pt);
return targetWindow ? targetWindow->mapToGlobal(pt) : pt;
}
- QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt)
- {
- QWindowSystemInterface::TouchPoint p;
- p.id = pt.id();
- p.isPrimary = pt.isPrimary();
- p.normalPosition = pt.screenRect().topLeft();
- p.area = pt.screenRect();
- p.pressure = pt.pressure();
- p.state = pt.state();
- return p;
- }
- QList<struct QWindowSystemInterface::TouchPoint> touchPointList(const QList<QTouchEvent::TouchPoint>& pointList)
- {
- QList<struct QWindowSystemInterface::TouchPoint> newList;
-
- Q_FOREACH (QTouchEvent::TouchPoint p, pointList)
- {
- newList.append(touchPoint(p));
- }
- return newList;
- }
QMap<int, QTouchEvent::TouchPoint> previousPoints;
QMap<int, QTouchEvent::TouchPoint> points;
diff --git a/src/testlib/qtestxunitstreamer.cpp b/src/testlib/qtestxunitstreamer.cpp
index 2c0b074cd8..607167ccce 100644
--- a/src/testlib/qtestxunitstreamer.cpp
+++ b/src/testlib/qtestxunitstreamer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qtestxunitstreamer_p.h b/src/testlib/qtestxunitstreamer_p.h
index 825890258a..c43d399acc 100644
--- a/src/testlib/qtestxunitstreamer_p.h
+++ b/src/testlib/qtestxunitstreamer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp
index fd18d1de30..b06f4736e7 100644
--- a/src/testlib/qxmltestlogger.cpp
+++ b/src/testlib/qxmltestlogger.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -251,7 +251,7 @@ void QXmlTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
QTest::benchmarkResultFormatString(),
quotedMetric.constData(),
quotedTag.constData(),
- QByteArray::number(result.value).constData(), //no 64-bit qt_snprintf support
+ QByteArray::number(result.value).constData(), //no 64-bit qsnprintf support
result.iterations);
outputString(buf.constData());
}
diff --git a/src/testlib/qxmltestlogger_p.h b/src/testlib/qxmltestlogger_p.h
index c273493c48..0adb857633 100644
--- a/src/testlib/qxmltestlogger_p.h
+++ b/src/testlib/qxmltestlogger_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/testlib/qxunittestlogger.cpp b/src/testlib/qxunittestlogger.cpp
index 97a02eaff2..892cce855e 100644
--- a/src/testlib/qxunittestlogger.cpp
+++ b/src/testlib/qxunittestlogger.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -86,13 +86,13 @@ void QXunitTestLogger::stopLogging()
currentLogElement = new QTestElement(QTest::LET_TestSuite);
currentLogElement->addAttribute(QTest::AI_Name, QTestResult::currentTestObjectName());
- QTest::qt_snprintf(buf, sizeof(buf), "%i", testCounter);
+ qsnprintf(buf, sizeof(buf), "%i", testCounter);
currentLogElement->addAttribute(QTest::AI_Tests, buf);
- QTest::qt_snprintf(buf, sizeof(buf), "%i", failureCounter);
+ qsnprintf(buf, sizeof(buf), "%i", failureCounter);
currentLogElement->addAttribute(QTest::AI_Failures, buf);
- QTest::qt_snprintf(buf, sizeof(buf), "%i", errorCounter);
+ qsnprintf(buf, sizeof(buf), "%i", errorCounter);
currentLogElement->addAttribute(QTest::AI_Errors, buf);
QTestElement *property;
@@ -173,7 +173,7 @@ void QXunitTestLogger::addIncident(IncidentTypes type, const char *description,
failureElement->addAttribute(QTest::AI_File, file);
else
failureElement->addAttribute(QTest::AI_File, "");
- QTest::qt_snprintf(buf, sizeof(buf), "%i", line);
+ qsnprintf(buf, sizeof(buf), "%i", line);
failureElement->addAttribute(QTest::AI_Line, buf);
failureElement->addAttribute(QTest::AI_Description, description);
addTag(failureElement);
@@ -212,7 +212,7 @@ void QXunitTestLogger::addIncident(IncidentTypes type, const char *description,
else
currentLogElement->addAttribute(QTest::AI_File, "");
- QTest::qt_snprintf(buf, sizeof(buf), "%i", line);
+ qsnprintf(buf, sizeof(buf), "%i", line);
currentLogElement->addAttribute(QTest::AI_Line, buf);
/*
@@ -235,7 +235,7 @@ void QXunitTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
benchmarkElement->addAttribute(QTest::AI_Value, QByteArray::number(result.value).constData());
char buf[100];
- QTest::qt_snprintf(buf, sizeof(buf), "%i", result.iterations);
+ qsnprintf(buf, sizeof(buf), "%i", result.iterations);
benchmarkElement->addAttribute(QTest::AI_Iterations, buf);
currentLogElement->addLogElement(benchmarkElement);
}
@@ -303,7 +303,7 @@ void QXunitTestLogger::addMessage(MessageTypes type, const char *message, const
errorElement->addAttribute(QTest::AI_File, "");
char buf[100];
- QTest::qt_snprintf(buf, sizeof(buf), "%i", line);
+ qsnprintf(buf, sizeof(buf), "%i", line);
errorElement->addAttribute(QTest::AI_Line, buf);
currentLogElement->addLogElement(errorElement);
diff --git a/src/testlib/qxunittestlogger_p.h b/src/testlib/qxunittestlogger_p.h
index ea3aaf4d92..0778fa4843 100644
--- a/src/testlib/qxunittestlogger_p.h
+++ b/src/testlib/qxunittestlogger_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index 50c1af1775..83fcee18d6 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -19,7 +19,6 @@ DEFINES += \
QT_NO_QOBJECT \
QT_NO_STL \
QT_NO_SYSTEMLOCALE \
- QT_NO_TEXTSTREAM \
QT_NO_THREAD \
QT_NO_UNICODETABLES \
QT_NO_USING_NAMESPACE \
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index fdebd9be24..b5869d826c 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -22,7 +22,6 @@ DEFINES += \
QT_NO_QOBJECT \
QT_NO_STL \
QT_NO_SYSTEMLOCALE \
- QT_NO_TEXTSTREAM \
QT_NO_THREAD \
QT_NO_UNICODETABLES \
QT_NO_USING_NAMESPACE \
diff --git a/src/tools/mkv8snapshot/mkv8snapshot.pro b/src/tools/mkv8snapshot/mkv8snapshot.pro
deleted file mode 100644
index cd2b20456a..0000000000
--- a/src/tools/mkv8snapshot/mkv8snapshot.pro
+++ /dev/null
@@ -1,38 +0,0 @@
-TEMPLATE = app
-TARGET = mkv8snapshot
-QT =
-CONFIG -= app_bundle
-CONFIG -= qt
-CONFIG += console
-
-DESTDIR = ../../../bin
-INCLUDEPATH += .
-DEPENDPATH += .
-LIBS =
-OBJECTS_DIR = .
-
-contains(QT_CONFIG, build_all): CONFIG += build_all
-win32|mac:!macx-xcode: CONFIG += debug_and_release
-
-TARGET = $$TARGET$$qtPlatformTargetSuffix()
-
-cross_compile {
- equals(QT_ARCH, arm): V8_TARGET_ARCH = arm
-}
-
-include(../../v8/v8.pri)
-
-cross_compile {
- equals(V8_TARGET_ARCH, arm): SOURCES += $$V8SRC/arm/simulator-arm.cc
-}
-
-SOURCES += \
- $$V8SRC/snapshot-empty.cc \
- $$V8SRC/mksnapshot.cc
-
-unix:LIBS += -lpthread
-
-# We don't need to install this tool, it's only used for building v8.
-# However we do have to make sure that 'make install' builds it.
-dummytarget.CONFIG = dummy_install
-INSTALLS += dummytarget
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 7a9684fd02..8793496b37 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -329,17 +329,10 @@ void Generator::generateCode()
}
if (!extraList.isEmpty()) {
- fprintf(out, "#ifdef Q_NO_DATA_RELOCATION\n");
- fprintf(out, "static const QMetaObjectAccessor qt_meta_extradata_%s[] = {\n ", qualifiedClassNameIdentifier.constData());
- for (int i = 0; i < extraList.count(); ++i) {
- fprintf(out, " %s::getStaticMetaObject,\n", extraList.at(i).constData());
- }
- fprintf(out, "#else\n");
fprintf(out, "static const QMetaObject *qt_meta_extradata_%s[] = {\n ", qualifiedClassNameIdentifier.constData());
for (int i = 0; i < extraList.count(); ++i) {
fprintf(out, " &%s::staticMetaObject,\n", extraList.at(i).constData());
}
- fprintf(out, "#endif //Q_NO_DATA_RELOCATION\n");
fprintf(out, " 0\n};\n\n");
}
@@ -384,12 +377,6 @@ void Generator::generateCode()
if(isQt)
return;
-//
-// Generate static meta object accessor (needed for symbian, because DLLs do not support data imports.
-//
- fprintf(out, "\n#ifdef Q_NO_DATA_RELOCATION\n");
- fprintf(out, "const QMetaObject &%s::getStaticMetaObject() { return staticMetaObject; }\n", cdef->qualified.constData());
- fprintf(out, "#endif //Q_NO_DATA_RELOCATION\n");
if (!cdef->hasQObject)
return;
diff --git a/src/tools/moc/generator.h b/src/tools/moc/generator.h
index 90e586b6a0..3be216ae76 100644
--- a/src/tools/moc/generator.h
+++ b/src/tools/moc/generator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/keywords.cpp b/src/tools/moc/keywords.cpp
index 1440b5ca7b..fd59c1279f 100644
--- a/src/tools/moc/keywords.cpp
+++ b/src/tools/moc/keywords.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,12 +43,12 @@
// DO NOT EDIT.
static const short keyword_trans[][128] = {
- {0,0,0,0,0,0,0,0,0,541,538,0,0,0,0,0,
+ {0,0,0,0,0,0,0,0,0,532,529,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 541,252,539,542,0,38,239,540,25,26,236,234,30,235,27,237,
+ 532,252,530,533,0,38,239,531,25,26,236,234,30,235,27,237,
22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43,
0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,21,8,8,8,8,8,8,8,8,8,31,543,32,238,8,
+ 8,21,8,8,8,8,8,8,8,8,8,31,534,32,238,8,
0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13,
14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -190,7 +190,7 @@ static const short keyword_trans[][128] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0,
- 546,546,546,546,546,546,546,546,546,546,0,0,0,0,0,0,
+ 537,537,537,537,537,537,537,537,537,537,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -349,7 +349,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,545,0,0,0,0,544,
+ 0,0,0,0,0,0,0,0,0,0,536,0,0,0,0,535,
0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -392,7 +392,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,439,388,378,383,364,0,448,0,0,0,0,0,358,
- 370,0,530,436,0,0,0,0,0,0,0,0,0,0,0,0,
+ 370,0,521,436,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -415,7 +415,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,513,0,437,0,0,0,465,0,0,471,0,0,0,
+ 0,0,0,504,0,437,0,0,0,465,0,0,471,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -424,7 +424,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,450,0,506,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,450,0,497,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -432,15 +432,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 522,0,0,481,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,497,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,486,
+ 513,0,0,481,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
@@ -938,7 +930,7 @@ static const struct
{CHARACTER, 0, 79, 483, CHARACTER},
{CHARACTER, 0, 84, 484, CHARACTER},
{Q_PRIVATE_SLOT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 49, 0, 0, CHARACTER},
+ {CHARACTER, 0, 95, 486, CHARACTER},
{CHARACTER, 0, 77, 487, CHARACTER},
{CHARACTER, 0, 79, 488, CHARACTER},
{CHARACTER, 0, 67, 489, CHARACTER},
@@ -950,46 +942,37 @@ static const struct
{CHARACTER, 0, 65, 495, CHARACTER},
{CHARACTER, 0, 84, 496, CHARACTER},
{Q_MOC_COMPAT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 95, 498, CHARACTER},
- {CHARACTER, 0, 83, 499, CHARACTER},
- {CHARACTER, 0, 85, 500, CHARACTER},
- {CHARACTER, 0, 80, 501, CHARACTER},
- {CHARACTER, 0, 80, 502, CHARACTER},
- {CHARACTER, 0, 79, 503, CHARACTER},
- {CHARACTER, 0, 82, 504, CHARACTER},
- {CHARACTER, 0, 84, 505, CHARACTER},
- {Q_QT3_SUPPORT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 79, 507, CHARACTER},
- {CHARACTER, 0, 75, 508, CHARACTER},
+ {CHARACTER, 0, 79, 498, CHARACTER},
+ {CHARACTER, 0, 75, 499, CHARACTER},
+ {CHARACTER, 0, 65, 500, CHARACTER},
+ {CHARACTER, 0, 66, 501, CHARACTER},
+ {CHARACTER, 0, 76, 502, CHARACTER},
+ {CHARACTER, 0, 69, 503, CHARACTER},
+ {Q_INVOKABLE_TOKEN, 0, 0, 0, CHARACTER},
+ {CHARACTER, 0, 82, 505, CHARACTER},
+ {CHARACTER, 0, 73, 506, CHARACTER},
+ {CHARACTER, 0, 80, 507, CHARACTER},
+ {CHARACTER, 0, 84, 508, CHARACTER},
{CHARACTER, 0, 65, 509, CHARACTER},
{CHARACTER, 0, 66, 510, CHARACTER},
{CHARACTER, 0, 76, 511, CHARACTER},
{CHARACTER, 0, 69, 512, CHARACTER},
- {Q_INVOKABLE_TOKEN, 0, 0, 0, CHARACTER},
+ {Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER},
{CHARACTER, 0, 82, 514, CHARACTER},
- {CHARACTER, 0, 73, 515, CHARACTER},
+ {CHARACTER, 0, 79, 515, CHARACTER},
{CHARACTER, 0, 80, 516, CHARACTER},
- {CHARACTER, 0, 84, 517, CHARACTER},
- {CHARACTER, 0, 65, 518, CHARACTER},
- {CHARACTER, 0, 66, 519, CHARACTER},
- {CHARACTER, 0, 76, 520, CHARACTER},
- {CHARACTER, 0, 69, 521, CHARACTER},
- {Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 82, 523, CHARACTER},
- {CHARACTER, 0, 79, 524, CHARACTER},
- {CHARACTER, 0, 80, 525, CHARACTER},
- {CHARACTER, 0, 69, 526, CHARACTER},
- {CHARACTER, 0, 82, 527, CHARACTER},
- {CHARACTER, 0, 84, 528, CHARACTER},
- {CHARACTER, 0, 89, 529, CHARACTER},
+ {CHARACTER, 0, 69, 517, CHARACTER},
+ {CHARACTER, 0, 82, 518, CHARACTER},
+ {CHARACTER, 0, 84, 519, CHARACTER},
+ {CHARACTER, 0, 89, 520, CHARACTER},
{Q_PRIVATE_PROPERTY_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 69, 531, CHARACTER},
- {CHARACTER, 0, 86, 532, CHARACTER},
- {CHARACTER, 0, 73, 533, CHARACTER},
- {CHARACTER, 0, 83, 534, CHARACTER},
- {CHARACTER, 0, 73, 535, CHARACTER},
- {CHARACTER, 0, 79, 536, CHARACTER},
- {CHARACTER, 0, 78, 537, CHARACTER},
+ {CHARACTER, 0, 69, 522, CHARACTER},
+ {CHARACTER, 0, 86, 523, CHARACTER},
+ {CHARACTER, 0, 73, 524, CHARACTER},
+ {CHARACTER, 0, 83, 525, CHARACTER},
+ {CHARACTER, 0, 73, 526, CHARACTER},
+ {CHARACTER, 0, 79, 527, CHARACTER},
+ {CHARACTER, 0, 78, 528, CHARACTER},
{Q_REVISION_TOKEN, 0, 0, 0, CHARACTER},
{NEWLINE, 0, 0, 0, NOTOKEN},
{QUOTE, 0, 0, 0, NOTOKEN},
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
index bf7e22c0b9..82bd288f0f 100644
--- a/src/tools/moc/main.cpp
+++ b/src/tools/moc/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index d725919cac..6d8e6f899a 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -165,7 +165,6 @@ Type Moc::parseType()
type.isVolatile = true;
continue;
case Q_MOC_COMPAT_TOKEN:
- case Q_QT3_SUPPORT_TOKEN:
case Q_INVOKABLE_TOKEN:
case Q_SCRIPTABLE_TOKEN:
case Q_SIGNALS_TOKEN:
@@ -323,7 +322,6 @@ bool Moc::testFunctionAttribute(Token tok, FunctionDef *def)
{
switch (tok) {
case Q_MOC_COMPAT_TOKEN:
- case Q_QT3_SUPPORT_TOKEN:
def->isCompat = true;
return true;
case Q_INVOKABLE_TOKEN:
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index c2577a2f4c..a80cf304d7 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/mwerks_mac.cpp b/src/tools/moc/mwerks_mac.cpp
index 9286d29349..752fc0d683 100644
--- a/src/tools/moc/mwerks_mac.cpp
+++ b/src/tools/moc/mwerks_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/mwerks_mac.h b/src/tools/moc/mwerks_mac.h
index ab1723c2af..526dc66d81 100644
--- a/src/tools/moc/mwerks_mac.h
+++ b/src/tools/moc/mwerks_mac.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/outputrevision.h b/src/tools/moc/outputrevision.h
index a2a0cda162..4955cca169 100644
--- a/src/tools/moc/outputrevision.h
+++ b/src/tools/moc/outputrevision.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/parser.cpp b/src/tools/moc/parser.cpp
index e960975ecf..39de3abbaf 100644
--- a/src/tools/moc/parser.cpp
+++ b/src/tools/moc/parser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/parser.h b/src/tools/moc/parser.h
index 651234dd78..7aeac80c38 100644
--- a/src/tools/moc/parser.h
+++ b/src/tools/moc/parser.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/ppkeywords.cpp b/src/tools/moc/ppkeywords.cpp
index f76d59da07..a4f139098e 100644
--- a/src/tools/moc/ppkeywords.cpp
+++ b/src/tools/moc/ppkeywords.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index ecf6d7d4de..376935cd60 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/preprocessor.h b/src/tools/moc/preprocessor.h
index 11b6476380..bf1e6d49b3 100644
--- a/src/tools/moc/preprocessor.h
+++ b/src/tools/moc/preprocessor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/symbols.h b/src/tools/moc/symbols.h
index 9c6de87365..6e773bcab1 100644
--- a/src/tools/moc/symbols.h
+++ b/src/tools/moc/symbols.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/token.cpp b/src/tools/moc/token.cpp
index 25b5b62d0f..d7ae9437e4 100644
--- a/src/tools/moc/token.cpp
+++ b/src/tools/moc/token.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -213,7 +213,6 @@ const char *tokenTypeName(Token t)
case PP_MOC_FALSE: return "PP_MOC_FALSE";
case Q_DECLARE_METATYPE_TOKEN: return "Q_DECLARE_METATYPE_TOKEN";
case Q_MOC_COMPAT_TOKEN: return "Q_MOC_COMPAT_TOKEN";
- case Q_QT3_SUPPORT_TOKEN: return "Q_QT3_SUPPORT_TOKEN";
case Q_INVOKABLE_TOKEN: return "Q_INVOKABLE_TOKEN";
case Q_SCRIPTABLE_TOKEN: return "Q_SCRIPTABLE_TOKEN";
}
diff --git a/src/tools/moc/token.h b/src/tools/moc/token.h
index 04e69141b6..359a46f2e8 100644
--- a/src/tools/moc/token.h
+++ b/src/tools/moc/token.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -182,7 +182,6 @@ enum Token {
Q_SLOT_TOKEN,
Q_PRIVATE_SLOT_TOKEN,
Q_MOC_COMPAT_TOKEN,
- Q_QT3_SUPPORT_TOKEN,
Q_INVOKABLE_TOKEN,
Q_SCRIPTABLE_TOKEN,
Q_PRIVATE_PROPERTY_TOKEN,
diff --git a/src/tools/moc/util/generate.sh b/src/tools/moc/util/generate.sh
index 6340e9e98f..1cb6c5f7ec 100755
--- a/src/tools/moc/util/generate.sh
+++ b/src/tools/moc/util/generate.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/src/tools/moc/util/generate_keywords.cpp b/src/tools/moc/util/generate_keywords.cpp
index c40eb18c1e..751019797b 100644
--- a/src/tools/moc/util/generate_keywords.cpp
+++ b/src/tools/moc/util/generate_keywords.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -243,7 +243,6 @@ static const Keyword keywords[] = {
{ "Q_SLOTS", "Q_SLOTS_TOKEN" },
{ "Q_PRIVATE_SLOT", "Q_PRIVATE_SLOT_TOKEN" },
{ "QT_MOC_COMPAT", "Q_MOC_COMPAT_TOKEN" },
- { "QT3_SUPPORT", "Q_QT3_SUPPORT_TOKEN" },
{ "Q_INVOKABLE", "Q_INVOKABLE_TOKEN" },
{ "Q_SIGNAL", "Q_SIGNAL_TOKEN" },
{ "Q_SLOT", "Q_SLOT_TOKEN" },
diff --git a/src/tools/moc/util/licenseheader.txt b/src/tools/moc/util/licenseheader.txt
index 6f593a762b..a6f7b3e29a 100644
--- a/src/tools/moc/util/licenseheader.txt
+++ b/src/tools/moc/util/licenseheader.txt
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/moc/utils.h b/src/tools/moc/utils.h
index 31358db682..e5aad4df9c 100644
--- a/src/tools/moc/utils.h
+++ b/src/tools/moc/utils.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp
index 46ff59e154..6d90f02491 100644
--- a/src/tools/rcc/main.cpp
+++ b/src/tools/rcc/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 01cc0299f5..6748841615 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/rcc/rcc.h b/src/tools/rcc/rcc.h
index 0a51c3cba5..0510df0bf3 100644
--- a/src/tools/rcc/rcc.h
+++ b/src/tools/rcc/rcc.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index 89ce0be055..5cbe92309e 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -2,7 +2,6 @@ TEMPLATE = subdirs
TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc
!contains(QT_CONFIG, no-gui): TOOLS_SUBDIRS += src_tools_uic
-contains(QT_CONFIG, v8):contains(QT_CONFIG, v8snapshot): TOOLS_SUBDIRS += src_tools_mkv8snapshot
# Set subdir and respective target name
src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap
src_tools_bootstrap.target = sub-tools-bootstrap
@@ -12,8 +11,6 @@ src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc
src_tools_rcc.target = sub-rcc
src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic
src_tools_uic.target = sub-uic
-src_tools_mkv8snapshot.subdir = $$QT_SOURCE_TREE/src/tools/mkv8snapshot
-src_tools_mkv8snapshot.target = sub-mkv8snapshot
!wince*:!ordered {
# Set dependencies for each subdir
diff --git a/src/tools/uic/cpp/cppextractimages.cpp b/src/tools/uic/cpp/cppextractimages.cpp
index 45447d8660..8d9060db44 100644
--- a/src/tools/uic/cpp/cppextractimages.cpp
+++ b/src/tools/uic/cpp/cppextractimages.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppextractimages.h b/src/tools/uic/cpp/cppextractimages.h
index ad0183e335..9641e02060 100644
--- a/src/tools/uic/cpp/cppextractimages.h
+++ b/src/tools/uic/cpp/cppextractimages.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwritedeclaration.cpp b/src/tools/uic/cpp/cppwritedeclaration.cpp
index d8adc4b7db..afa26b27e4 100644
--- a/src/tools/uic/cpp/cppwritedeclaration.cpp
+++ b/src/tools/uic/cpp/cppwritedeclaration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwritedeclaration.h b/src/tools/uic/cpp/cppwritedeclaration.h
index 9a7d6edeb2..7d3653362f 100644
--- a/src/tools/uic/cpp/cppwritedeclaration.h
+++ b/src/tools/uic/cpp/cppwritedeclaration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteicondata.cpp b/src/tools/uic/cpp/cppwriteicondata.cpp
index ab362ab0a7..c0f9cc4149 100644
--- a/src/tools/uic/cpp/cppwriteicondata.cpp
+++ b/src/tools/uic/cpp/cppwriteicondata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteicondata.h b/src/tools/uic/cpp/cppwriteicondata.h
index 2ea0a5baa6..7c43ba842a 100644
--- a/src/tools/uic/cpp/cppwriteicondata.h
+++ b/src/tools/uic/cpp/cppwriteicondata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteicondeclaration.cpp b/src/tools/uic/cpp/cppwriteicondeclaration.cpp
index 46788819e7..8ba9790f2c 100644
--- a/src/tools/uic/cpp/cppwriteicondeclaration.cpp
+++ b/src/tools/uic/cpp/cppwriteicondeclaration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteicondeclaration.h b/src/tools/uic/cpp/cppwriteicondeclaration.h
index 63369997b6..911aab473c 100644
--- a/src/tools/uic/cpp/cppwriteicondeclaration.h
+++ b/src/tools/uic/cpp/cppwriteicondeclaration.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteiconinitialization.cpp b/src/tools/uic/cpp/cppwriteiconinitialization.cpp
index f2a35a0b7d..1045bafe0a 100644
--- a/src/tools/uic/cpp/cppwriteiconinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteiconinitialization.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteiconinitialization.h b/src/tools/uic/cpp/cppwriteiconinitialization.h
index dcbb0ef8df..2b4495785a 100644
--- a/src/tools/uic/cpp/cppwriteiconinitialization.h
+++ b/src/tools/uic/cpp/cppwriteiconinitialization.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index c4613e20ae..de0deb3852 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteincludes.h b/src/tools/uic/cpp/cppwriteincludes.h
index e8215364b9..bce8ece0ec 100644
--- a/src/tools/uic/cpp/cppwriteincludes.h
+++ b/src/tools/uic/cpp/cppwriteincludes.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index a887719d4f..dfb4a3299e 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h
index a33a1b9883..721eb0f79e 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.h
+++ b/src/tools/uic/cpp/cppwriteinitialization.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/customwidgetsinfo.cpp b/src/tools/uic/customwidgetsinfo.cpp
index f4a9381f73..d63054313c 100644
--- a/src/tools/uic/customwidgetsinfo.cpp
+++ b/src/tools/uic/customwidgetsinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/customwidgetsinfo.h b/src/tools/uic/customwidgetsinfo.h
index f04dd53853..ed96a33c58 100644
--- a/src/tools/uic/customwidgetsinfo.h
+++ b/src/tools/uic/customwidgetsinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/databaseinfo.cpp b/src/tools/uic/databaseinfo.cpp
index cbd26033fb..53a6bf3111 100644
--- a/src/tools/uic/databaseinfo.cpp
+++ b/src/tools/uic/databaseinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/databaseinfo.h b/src/tools/uic/databaseinfo.h
index 87d4ceb1e3..7df32fb6e0 100644
--- a/src/tools/uic/databaseinfo.h
+++ b/src/tools/uic/databaseinfo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/driver.cpp b/src/tools/uic/driver.cpp
index 0dd528c4cb..38217c603e 100644
--- a/src/tools/uic/driver.cpp
+++ b/src/tools/uic/driver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/driver.h b/src/tools/uic/driver.h
index 22575c9127..66bfde6d53 100644
--- a/src/tools/uic/driver.h
+++ b/src/tools/uic/driver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/globaldefs.h b/src/tools/uic/globaldefs.h
index a30c35a91c..45e0142821 100644
--- a/src/tools/uic/globaldefs.h
+++ b/src/tools/uic/globaldefs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp
index 1f6e27b2a4..ec63c70dc1 100644
--- a/src/tools/uic/main.cpp
+++ b/src/tools/uic/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/option.h b/src/tools/uic/option.h
index 42b449530b..2eed07f0dc 100644
--- a/src/tools/uic/option.h
+++ b/src/tools/uic/option.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h
index 5ad6a4a12c..1afef3d3ac 100644
--- a/src/tools/uic/qclass_lib_map.h
+++ b/src/tools/uic/qclass_lib_map.h
@@ -397,11 +397,8 @@ QT_CLASS_LIB(QXmlStreamStringRef, QtXml, qxmlstream.h)
QT_CLASS_LIB(QXmlStreamWriter, QtXml, qxmlstream.h)
QT_CLASS_LIB(QNetworkCacheMetaData, QtNetwork, qabstractnetworkcache.h)
QT_CLASS_LIB(QAbstractNetworkCache, QtNetwork, qabstractnetworkcache.h)
-QT_CLASS_LIB(QFtp, QtNetwork, qftp.h)
-QT_CLASS_LIB(QHttpHeader, QtNetwork, qhttp.h)
-QT_CLASS_LIB(QHttpResponseHeader, QtNetwork, qhttp.h)
-QT_CLASS_LIB(QHttpRequestHeader, QtNetwork, qhttp.h)
-QT_CLASS_LIB(QHttp, QtNetwork, qhttp.h)
+QT_CLASS_LIB(QHttpHeader, QtNetwork, qhttpheader_p.h)
+QT_CLASS_LIB(QHttpResponseHeader, QtNetwork, qhttpheader_p.h)
QT_CLASS_LIB(QNetworkAccessManager, QtNetwork, qnetworkaccessmanager.h)
QT_CLASS_LIB(QNetworkCookie, QtNetwork, qnetworkcookie.h)
QT_CLASS_LIB(QNetworkCookieJar, QtNetwork, qnetworkcookiejar.h)
@@ -601,7 +598,6 @@ QT_CLASS_LIB(QTDSDriver, QtSql, qsql_tds.h)
QT_CLASS_LIB(QAccessible, QtWidgets, qaccessible.h)
QT_CLASS_LIB(QAccessibleInterface, QtWidgets, qaccessible.h)
QT_CLASS_LIB(QAccessibleInterfaceEx, QtWidgets, qaccessible.h)
-QT_CLASS_LIB(QAccessibleEvent, QtWidgets, qaccessible.h)
QT_CLASS_LIB(QAccessible2Interface, QtWidgets, qaccessible2.h)
QT_CLASS_LIB(QAccessibleTextInterface, QtWidgets, qaccessible2.h)
QT_CLASS_LIB(QAccessibleEditableTextInterface, QtWidgets, qaccessible2.h)
@@ -1160,189 +1156,3 @@ QT_CLASS_LIB(QGraphicsSvgItem, QtSvg, qgraphicssvgitem.h)
QT_CLASS_LIB(QSvgGenerator, QtSvg, qsvggenerator.h)
QT_CLASS_LIB(QSvgRenderer, QtSvg, qsvgrenderer.h)
QT_CLASS_LIB(QSvgWidget, QtSvg, qsvgwidget.h)
-QT_CLASS_LIB(Q3CanvasItemList, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasItem, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3Canvas, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasView, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasPixmap, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasPixmapArray, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasSprite, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasPolygonalItem, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasRectangle, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasPolygon, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasSpline, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasLine, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasEllipse, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3CanvasText, Qt3Support, q3canvas.h)
-QT_CLASS_LIB(Q3FileIconProvider, Qt3Support, q3filedialog.h)
-QT_CLASS_LIB(Q3FilePreview, Qt3Support, q3filedialog.h)
-QT_CLASS_LIB(Q3FileDialog, Qt3Support, q3filedialog.h)
-QT_CLASS_LIB(Q3ProgressDialog, Qt3Support, q3progressdialog.h)
-QT_CLASS_LIB(Q3TabDialog, Qt3Support, q3tabdialog.h)
-QT_CLASS_LIB(Q3Wizard, Qt3Support, q3wizard.h)
-QT_CLASS_LIB(Q3IconDragItem, Qt3Support, q3iconview.h)
-QT_CLASS_LIB(Q3IconDrag, Qt3Support, q3iconview.h)
-QT_CLASS_LIB(Q3IconViewItem, Qt3Support, q3iconview.h)
-QT_CLASS_LIB(Q3IconView, Qt3Support, q3iconview.h)
-QT_CLASS_LIB(Q3ListBox, Qt3Support, q3listbox.h)
-QT_CLASS_LIB(Q3ListBoxItem, Qt3Support, q3listbox.h)
-QT_CLASS_LIB(Q3ListBoxText, Qt3Support, q3listbox.h)
-QT_CLASS_LIB(Q3ListBoxPixmap, Qt3Support, q3listbox.h)
-QT_CLASS_LIB(Q3ListViewItem, Qt3Support, q3listview.h)
-QT_CLASS_LIB(Q3ListView, Qt3Support, q3listview.h)
-QT_CLASS_LIB(Q3CheckListItem, Qt3Support, q3listview.h)
-QT_CLASS_LIB(Q3ListViewItemIterator, Qt3Support, q3listview.h)
-QT_CLASS_LIB(Q3TableSelection, Qt3Support, q3table.h)
-QT_CLASS_LIB(Q3TableItem, Qt3Support, q3table.h)
-QT_CLASS_LIB(Q3ComboTableItem, Qt3Support, q3table.h)
-QT_CLASS_LIB(Q3CheckTableItem, Qt3Support, q3table.h)
-QT_CLASS_LIB(Q3Table, Qt3Support, q3table.h)
-QT_CLASS_LIB(Q3Dns, Qt3Support, q3dns.h)
-QT_CLASS_LIB(Q3DnsSocket, Qt3Support, q3dns.h)
-QT_CLASS_LIB(Q3Ftp, Qt3Support, q3ftp.h)
-QT_CLASS_LIB(Q3HttpHeader, Qt3Support, q3http.h)
-QT_CLASS_LIB(Q3HttpResponseHeader, Qt3Support, q3http.h)
-QT_CLASS_LIB(Q3HttpRequestHeader, Qt3Support, q3http.h)
-QT_CLASS_LIB(Q3Http, Qt3Support, q3http.h)
-QT_CLASS_LIB(Q3LocalFs, Qt3Support, q3localfs.h)
-QT_CLASS_LIB(Q3NetworkProtocolFactoryBase, Qt3Support, q3networkprotocol.h)
-QT_CLASS_LIB(Q3NetworkProtocolFactory, Qt3Support, q3networkprotocol.h)
-QT_CLASS_LIB(Q3NetworkProtocolDict, Qt3Support, q3networkprotocol.h)
-QT_CLASS_LIB(Q3NetworkProtocol, Qt3Support, q3networkprotocol.h)
-QT_CLASS_LIB(Q3NetworkOperation, Qt3Support, q3networkprotocol.h)
-QT_CLASS_LIB(Q3ServerSocket, Qt3Support, q3serversocket.h)
-QT_CLASS_LIB(Q3Socket, Qt3Support, q3socket.h)
-QT_CLASS_LIB(Q3SocketDevice, Qt3Support, q3socketdevice.h)
-QT_CLASS_LIB(Q3Url, Qt3Support, q3url.h)
-QT_CLASS_LIB(Q3UrlOperator, Qt3Support, q3urloperator.h)
-QT_CLASS_LIB(Q3Accel, Qt3Support, q3accel.h)
-QT_CLASS_LIB(Q3BoxLayout, Qt3Support, q3boxlayout.h)
-QT_CLASS_LIB(Q3HBoxLayout, Qt3Support, q3boxlayout.h)
-QT_CLASS_LIB(Q3VBoxLayout, Qt3Support, q3boxlayout.h)
-QT_CLASS_LIB(Q3DragObject, Qt3Support, q3dragobject.h)
-QT_CLASS_LIB(Q3StoredDrag, Qt3Support, q3dragobject.h)
-QT_CLASS_LIB(Q3TextDrag, Qt3Support, q3dragobject.h)
-QT_CLASS_LIB(Q3ImageDrag, Qt3Support, q3dragobject.h)
-QT_CLASS_LIB(Q3UriDrag, Qt3Support, q3dragobject.h)
-QT_CLASS_LIB(Q3ColorDrag, Qt3Support, q3dragobject.h)
-QT_CLASS_LIB(Q3DropSite, Qt3Support, q3dropsite.h)
-QT_CLASS_LIB(Q3GridLayout, Qt3Support, q3gridlayout.h)
-QT_CLASS_LIB(Q3MimeSourceFactory, Qt3Support, q3mimefactory.h)
-QT_CLASS_LIB(Q3PolygonScanner, Qt3Support, q3polygonscanner.h)
-QT_CLASS_LIB(Q3Process, Qt3Support, q3process.h)
-QT_CLASS_LIB(Q3PaintDeviceMetrics, Qt3Support, q3paintdevicemetrics.h)
-QT_CLASS_LIB(Q3Painter, Qt3Support, q3painter.h)
-QT_CLASS_LIB(Q3Picture, Qt3Support, q3picture.h)
-QT_CLASS_LIB(Q3PointArray, Qt3Support, q3pointarray.h)
-QT_CLASS_LIB(Q3DataBrowser, Qt3Support, q3databrowser.h)
-QT_CLASS_LIB(Q3DataTable, Qt3Support, q3datatable.h)
-QT_CLASS_LIB(Q3DataView, Qt3Support, q3dataview.h)
-QT_CLASS_LIB(Q3EditorFactory, Qt3Support, q3editorfactory.h)
-QT_CLASS_LIB(Q3SqlCursor, Qt3Support, q3sqlcursor.h)
-QT_CLASS_LIB(Q3SqlEditorFactory, Qt3Support, q3sqleditorfactory.h)
-QT_CLASS_LIB(Q3SqlFieldInfo, Qt3Support, q3sqlfieldinfo.h)
-QT_CLASS_LIB(Q3SqlForm, Qt3Support, q3sqlform.h)
-QT_CLASS_LIB(Q3SqlPropertyMap, Qt3Support, q3sqlpropertymap.h)
-QT_CLASS_LIB(Q3SqlFieldInfoList, Qt3Support, q3sqlrecordinfo.h)
-QT_CLASS_LIB(Q3SqlRecordInfo, Qt3Support, q3sqlrecordinfo.h)
-QT_CLASS_LIB(Q3SqlSelectCursor, Qt3Support, q3sqlselectcursor.h)
-QT_CLASS_LIB(Q3MultiLineEdit, Qt3Support, q3multilineedit.h)
-QT_CLASS_LIB(Q3SimpleRichText, Qt3Support, q3simplerichtext.h)
-QT_CLASS_LIB(Q3StyleSheetItem, Qt3Support, q3stylesheet.h)
-QT_CLASS_LIB(Q3StyleSheet, Qt3Support, q3stylesheet.h)
-QT_CLASS_LIB(Q3SyntaxHighlighter, Qt3Support, q3syntaxhighlighter.h)
-QT_CLASS_LIB(Q3TextBrowser, Qt3Support, q3textbrowser.h)
-QT_CLASS_LIB(Q3TextEditOptimPrivate, Qt3Support, q3textedit.h)
-QT_CLASS_LIB(Q3TextEdit, Qt3Support, q3textedit.h)
-QT_CLASS_LIB(Q3TextStream, Qt3Support, q3textstream.h)
-QT_CLASS_LIB(Q3TSFUNC, Qt3Support, q3textstream.h)
-QT_CLASS_LIB(Q3TextView, Qt3Support, q3textview.h)
-QT_CLASS_LIB(Q3AsciiCache, Qt3Support, q3asciicache.h)
-QT_CLASS_LIB(Q3AsciiCacheIterator, Qt3Support, q3asciicache.h)
-QT_CLASS_LIB(Q3AsciiDict, Qt3Support, q3asciidict.h)
-QT_CLASS_LIB(Q3AsciiDictIterator, Qt3Support, q3asciidict.h)
-QT_CLASS_LIB(Q3Cache, Qt3Support, q3cache.h)
-QT_CLASS_LIB(Q3CacheIterator, Qt3Support, q3cache.h)
-QT_CLASS_LIB(Q3CleanupHandler, Qt3Support, q3cleanuphandler.h)
-QT_CLASS_LIB(Q3SingleCleanupHandler, Qt3Support, q3cleanuphandler.h)
-QT_CLASS_LIB(Q3CString, Qt3Support, q3cstring.h)
-QT_CLASS_LIB(Q3DeepCopy, Qt3Support, q3deepcopy.h)
-QT_CLASS_LIB(Q3Dict, Qt3Support, q3dict.h)
-QT_CLASS_LIB(Q3DictIterator, Qt3Support, q3dict.h)
-QT_CLASS_LIB(Q3GArray, Qt3Support, q3garray.h)
-QT_CLASS_LIB(Q3GCache, Qt3Support, q3gcache.h)
-QT_CLASS_LIB(Q3GCacheIterator, Qt3Support, q3gcache.h)
-QT_CLASS_LIB(Q3BaseBucket, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3StringBucket, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3AsciiBucket, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3IntBucket, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3PtrBucket, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3GDict, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3GDictIterator, Qt3Support, q3gdict.h)
-QT_CLASS_LIB(Q3LNode, Qt3Support, q3glist.h)
-QT_CLASS_LIB(Q3GList, Qt3Support, q3glist.h)
-QT_CLASS_LIB(Q3GListIterator, Qt3Support, q3glist.h)
-QT_CLASS_LIB(Q3GListStdIterator, Qt3Support, q3glist.h)
-QT_CLASS_LIB(Q3GVector, Qt3Support, q3gvector.h)
-QT_CLASS_LIB(Q3IntCache, Qt3Support, q3intcache.h)
-QT_CLASS_LIB(Q3IntCacheIterator, Qt3Support, q3intcache.h)
-QT_CLASS_LIB(Q3IntDict, Qt3Support, q3intdict.h)
-QT_CLASS_LIB(Q3IntDictIterator, Qt3Support, q3intdict.h)
-QT_CLASS_LIB(Q3MemArray, Qt3Support, q3memarray.h)
-QT_CLASS_LIB(Q3ObjectDictionary, Qt3Support, q3objectdict.h)
-QT_CLASS_LIB(Q3PtrCollection, Qt3Support, q3ptrcollection.h)
-QT_CLASS_LIB(Q3PtrDict, Qt3Support, q3ptrdict.h)
-QT_CLASS_LIB(Q3PtrDictIterator, Qt3Support, q3ptrdict.h)
-QT_CLASS_LIB(Q3PtrListStdIterator, Qt3Support, q3ptrlist.h)
-QT_CLASS_LIB(Q3PtrList, Qt3Support, q3ptrlist.h)
-QT_CLASS_LIB(Q3PtrListIterator, Qt3Support, q3ptrlist.h)
-QT_CLASS_LIB(Q3PtrQueue, Qt3Support, q3ptrqueue.h)
-QT_CLASS_LIB(Q3PtrStack, Qt3Support, q3ptrstack.h)
-QT_CLASS_LIB(Q3PtrVector, Qt3Support, q3ptrvector.h)
-QT_CLASS_LIB(Q3Semaphore, Qt3Support, q3semaphore.h)
-QT_CLASS_LIB(Q3Shared, Qt3Support, q3shared.h)
-QT_CLASS_LIB(Q3Signal, Qt3Support, q3signal.h)
-QT_CLASS_LIB(Q3SortedList, Qt3Support, q3sortedlist.h)
-QT_CLASS_LIB(Q3StrListIterator, Qt3Support, q3strlist.h)
-QT_CLASS_LIB(Q3StrListIterator, Qt3Support, q3strlist.h)
-QT_CLASS_LIB(Q3StrList, Qt3Support, q3strlist.h)
-QT_CLASS_LIB(Q3StrIList, Qt3Support, q3strlist.h)
-QT_CLASS_LIB(Q3StrVec, Qt3Support, q3strvec.h)
-QT_CLASS_LIB(Q3StrIVec, Qt3Support, q3strvec.h)
-QT_CLASS_LIB(Q3ValueListIterator, Qt3Support, q3valuelist.h)
-QT_CLASS_LIB(Q3ValueListConstIterator, Qt3Support, q3valuelist.h)
-QT_CLASS_LIB(Q3ValueList, Qt3Support, q3valuelist.h)
-QT_CLASS_LIB(Q3ValueStack, Qt3Support, q3valuestack.h)
-QT_CLASS_LIB(Q3ValueVector, Qt3Support, q3valuevector.h)
-QT_CLASS_LIB(Q3Action, Qt3Support, q3action.h)
-QT_CLASS_LIB(Q3ActionGroup, Qt3Support, q3action.h)
-QT_CLASS_LIB(Q3Button, Qt3Support, q3button.h)
-QT_CLASS_LIB(Q3ButtonGroup, Qt3Support, q3buttongroup.h)
-QT_CLASS_LIB(Q3VButtonGroup, Qt3Support, q3buttongroup.h)
-QT_CLASS_LIB(Q3HButtonGroup, Qt3Support, q3buttongroup.h)
-QT_CLASS_LIB(Q3ComboBox, Qt3Support, q3combobox.h)
-QT_CLASS_LIB(Q3DateTimeEditBase, Qt3Support, q3datetimeedit.h)
-QT_CLASS_LIB(Q3DateEdit, Qt3Support, q3datetimeedit.h)
-QT_CLASS_LIB(Q3TimeEdit, Qt3Support, q3datetimeedit.h)
-QT_CLASS_LIB(Q3DateTimeEdit, Qt3Support, q3datetimeedit.h)
-QT_CLASS_LIB(Q3DockAreaLayout, Qt3Support, q3dockarea.h)
-QT_CLASS_LIB(Q3DockArea, Qt3Support, q3dockarea.h)
-QT_CLASS_LIB(Q3DockWindow, Qt3Support, q3dockwindow.h)
-QT_CLASS_LIB(Q3Frame, Qt3Support, q3frame.h)
-QT_CLASS_LIB(Q3Grid, Qt3Support, q3grid.h)
-QT_CLASS_LIB(Q3GridView, Qt3Support, q3gridview.h)
-QT_CLASS_LIB(Q3GroupBox, Qt3Support, q3groupbox.h)
-QT_CLASS_LIB(Q3HBox, Qt3Support, q3hbox.h)
-QT_CLASS_LIB(Q3Header, Qt3Support, q3header.h)
-QT_CLASS_LIB(Q3HGroupBox, Qt3Support, q3hgroupbox.h)
-QT_CLASS_LIB(Q3MainWindow, Qt3Support, q3mainwindow.h)
-QT_CLASS_LIB(Q3PopupMenu, Qt3Support, q3popupmenu.h)
-QT_CLASS_LIB(Q3ProgressBar, Qt3Support, q3progressbar.h)
-QT_CLASS_LIB(Q3RangeControl, Qt3Support, q3rangecontrol.h)
-QT_CLASS_LIB(Q3SpinWidget, Qt3Support, q3rangecontrol.h)
-QT_CLASS_LIB(Q3ScrollView, Qt3Support, q3scrollview.h)
-QT_CLASS_LIB(Q3ToolBar, Qt3Support, q3toolbar.h)
-QT_CLASS_LIB(Q3VBox, Qt3Support, q3vbox.h)
-QT_CLASS_LIB(Q3VGroupBox, Qt3Support, q3vgroupbox.h)
-QT_CLASS_LIB(Q3WhatsThis, Qt3Support, q3whatsthis.h)
-QT_CLASS_LIB(Q3WidgetStack, Qt3Support, q3widgetstack.h)
diff --git a/src/tools/uic/treewalker.cpp b/src/tools/uic/treewalker.cpp
index 9974e61aab..cc1dca3820 100644
--- a/src/tools/uic/treewalker.cpp
+++ b/src/tools/uic/treewalker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/treewalker.h b/src/tools/uic/treewalker.h
index 8cd718509b..f57b6009c2 100644
--- a/src/tools/uic/treewalker.h
+++ b/src/tools/uic/treewalker.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp
index 5374fe9202..0c8adcd07a 100644
--- a/src/tools/uic/ui4.cpp
+++ b/src/tools/uic/ui4.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/ui4.h b/src/tools/uic/ui4.h
index 6a56c9eadc..ce8e9c1473 100644
--- a/src/tools/uic/ui4.h
+++ b/src/tools/uic/ui4.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp
index 347efb1042..8f425c8212 100644
--- a/src/tools/uic/uic.cpp
+++ b/src/tools/uic/uic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/uic.h b/src/tools/uic/uic.h
index a6437161ee..9f77e54749 100644
--- a/src/tools/uic/uic.h
+++ b/src/tools/uic/uic.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/utils.h b/src/tools/uic/utils.h
index edc1e2a5e2..9455598868 100644
--- a/src/tools/uic/utils.h
+++ b/src/tools/uic/utils.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/validator.cpp b/src/tools/uic/validator.cpp
index 1d8157444c..687b19599d 100644
--- a/src/tools/uic/validator.cpp
+++ b/src/tools/uic/validator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/tools/uic/validator.h b/src/tools/uic/validator.h
index 53085b06d8..1cc313472e 100644
--- a/src/tools/uic/validator.h
+++ b/src/tools/uic/validator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch b/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch
deleted file mode 100644
index cb9f4a255c..0000000000
--- a/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch
+++ /dev/null
@@ -1,336 +0,0 @@
-From 0a86a97f554c4aaa727da1c4481ca6368c68bf85 Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Tue, 4 Oct 2011 15:04:21 +1000
-Subject: [PATCH 01/12] Add hashing and comparison methods to v8::String
-
-This allows us to more rapidly search for a v8::String inside a hash
-of QStrings.
----
- include/v8.h | 45 +++++++++++++++++++++++++++++
- src/api.cc | 51 +++++++++++++++++++++++++++++++++
- src/heap-inl.h | 2 +
- src/heap.cc | 3 ++
- src/objects-inl.h | 1 +
- src/objects.cc | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
- src/objects.h | 10 ++++++-
- 7 files changed, 192 insertions(+), 2 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index 73b7fbe..86ea70f 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -1021,6 +1021,49 @@ class String : public Primitive {
- V8EXPORT int Utf8Length() const;
-
- /**
-+ * Returns the hash of this string.
-+ */
-+ V8EXPORT uint32_t Hash() const;
-+
-+ struct CompleteHashData {
-+ CompleteHashData() : length(0), hash(0), symbol_id(0) {}
-+ int length;
-+ uint32_t hash;
-+ uint32_t symbol_id;
-+ };
-+
-+ /**
-+ * Returns the "complete" hash of the string. This is
-+ * all the information about the string needed to implement
-+ * a very efficient hash keyed on the string.
-+ *
-+ * The members of CompleteHashData are:
-+ * length: The length of the string. Equivalent to Length()
-+ * hash: The hash of the string. Equivalent to Hash()
-+ * symbol_id: If the string is a sequential symbol, the symbol
-+ * id, otherwise 0. If the symbol ids of two strings are
-+ * the same (and non-zero) the two strings are identical.
-+ * If the symbol ids are different the strings may still be
-+ * identical, but an Equals() check must be performed.
-+ */
-+ V8EXPORT CompleteHashData CompleteHash() const;
-+
-+ /**
-+ * Compute a hash value for the passed UTF16 string
-+ * data.
-+ */
-+ V8EXPORT static uint32_t ComputeHash(uint16_t *string, int length);
-+ V8EXPORT static uint32_t ComputeHash(char *string, int length);
-+
-+ /**
-+ * Returns true if this string is equal to the external
-+ * string data provided.
-+ */
-+ V8EXPORT bool Equals(uint16_t *string, int length);
-+ V8EXPORT bool Equals(char *string, int length);
-+ inline bool Equals(Handle<Value> that) const { return v8::Value::Equals(that); }
-+
-+ /**
- * Write the contents of the string to an external buffer.
- * If no arguments are given, expects the buffer to be large
- * enough to hold the entire string and NULL terminator. Copies
-@@ -1051,6 +1094,8 @@ class String : public Primitive {
- NO_NULL_TERMINATION = 2
- };
-
-+ V8EXPORT uint16_t GetCharacter(int index);
-+
- // 16-bit character codes.
- V8EXPORT int Write(uint16_t* buffer,
- int start = 0,
-diff --git a/src/api.cc b/src/api.cc
-index ac4f07f..996812e 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -3633,6 +3633,57 @@ int String::Utf8Length() const {
- }
-
-
-+uint32_t String::Hash() const {
-+ i::Handle<i::String> str = Utils::OpenHandle(this);
-+ if (IsDeadCheck(str->GetIsolate(), "v8::String::Hash()")) return 0;
-+ return str->Hash();
-+}
-+
-+
-+String::CompleteHashData String::CompleteHash() const {
-+ i::Handle<i::String> str = Utils::OpenHandle(this);
-+ if (IsDeadCheck(str->GetIsolate(), "v8::String::CompleteHash()")) return CompleteHashData();
-+ CompleteHashData result;
-+ result.length = str->length();
-+ result.hash = str->Hash();
-+ if (str->IsSeqString())
-+ result.symbol_id = i::SeqString::cast(*str)->symbol_id();
-+ return result;
-+}
-+
-+
-+uint32_t String::ComputeHash(uint16_t *string, int length) {
-+ return i::HashSequentialString<i::uc16>(string, length) >> i::String::kHashShift;
-+}
-+
-+
-+uint32_t String::ComputeHash(char *string, int length) {
-+ return i::HashSequentialString<char>(string, length) >> i::String::kHashShift;
-+}
-+
-+
-+uint16_t String::GetCharacter(int index)
-+{
-+ i::Handle<i::String> str = Utils::OpenHandle(this);
-+ return str->Get(index);
-+}
-+
-+
-+bool String::Equals(uint16_t *string, int length) {
-+ i::Handle<i::String> str = Utils::OpenHandle(this);
-+ if (IsDeadCheck(str->GetIsolate(), "v8::String::Equals()")) return 0;
-+ return str->SlowEqualsExternal(string, length);
-+}
-+
-+
-+bool String::Equals(char *string, int length)
-+{
-+ i::Handle<i::String> str = Utils::OpenHandle(this);
-+ if (IsDeadCheck(str->GetIsolate(), "v8::String::Equals()")) return 0;
-+ return str->SlowEqualsExternal(string, length);
-+}
-+
-+
- int String::WriteUtf8(char* buffer,
- int capacity,
- int* nchars_ref,
-diff --git a/src/heap-inl.h b/src/heap-inl.h
-index aaf2927..4c55d63 100644
---- a/src/heap-inl.h
-+++ b/src/heap-inl.h
-@@ -105,6 +105,7 @@ MaybeObject* Heap::AllocateAsciiSymbol(Vector<const char> str,
- String* answer = String::cast(result);
- answer->set_length(str.length());
- answer->set_hash_field(hash_field);
-+ SeqString::cast(answer)->set_symbol_id(0);
-
- ASSERT_EQ(size, answer->Size());
-
-@@ -138,6 +139,7 @@ MaybeObject* Heap::AllocateTwoByteSymbol(Vector<const uc16> str,
- String* answer = String::cast(result);
- answer->set_length(str.length());
- answer->set_hash_field(hash_field);
-+ SeqString::cast(answer)->set_symbol_id(0);
-
- ASSERT_EQ(size, answer->Size());
-
-diff --git a/src/heap.cc b/src/heap.cc
-index bbb9d3e..d287ead 100644
---- a/src/heap.cc
-+++ b/src/heap.cc
-@@ -4009,6 +4009,7 @@ MaybeObject* Heap::AllocateInternalSymbol(unibrow::CharacterStream* buffer,
- String* answer = String::cast(result);
- answer->set_length(chars);
- answer->set_hash_field(hash_field);
-+ SeqString::cast(answer)->set_symbol_id(0);
-
- ASSERT_EQ(size, answer->Size());
-
-@@ -4051,6 +4052,7 @@ MaybeObject* Heap::AllocateRawAsciiString(int length, PretenureFlag pretenure) {
- HeapObject::cast(result)->set_map(ascii_string_map());
- String::cast(result)->set_length(length);
- String::cast(result)->set_hash_field(String::kEmptyHashField);
-+ SeqString::cast(result)->set_symbol_id(0);
- ASSERT_EQ(size, HeapObject::cast(result)->Size());
- return result;
- }
-@@ -4086,6 +4088,7 @@ MaybeObject* Heap::AllocateRawTwoByteString(int length,
- HeapObject::cast(result)->set_map(string_map());
- String::cast(result)->set_length(length);
- String::cast(result)->set_hash_field(String::kEmptyHashField);
-+ SeqString::cast(result)->set_symbol_id(0);
- ASSERT_EQ(size, HeapObject::cast(result)->Size());
- return result;
- }
-diff --git a/src/objects-inl.h b/src/objects-inl.h
-index dc3aa46..34cae9f 100644
---- a/src/objects-inl.h
-+++ b/src/objects-inl.h
-@@ -2082,6 +2082,7 @@ SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
- SMI_ACCESSORS(FreeSpace, size, kSizeOffset)
-
- SMI_ACCESSORS(String, length, kLengthOffset)
-+SMI_ACCESSORS(SeqString, symbol_id, kSymbolIdOffset)
-
-
- uint32_t String::hash_field() {
-diff --git a/src/objects.cc b/src/objects.cc
-index 9a87ac5..2946d02 100644
---- a/src/objects.cc
-+++ b/src/objects.cc
-@@ -6716,6 +6716,71 @@ static inline bool CompareStringContentsPartial(Isolate* isolate,
- }
-
-
-+bool String::SlowEqualsExternal(uc16 *string, int length) {
-+ int len = this->length();
-+ if (len != length) return false;
-+ if (len == 0) return true;
-+
-+ // We know the strings are both non-empty. Compare the first chars
-+ // before we try to flatten the strings.
-+ if (this->Get(0) != string[0]) return false;
-+
-+ String* lhs = this->TryFlattenGetString();
-+
-+ if (lhs->IsFlat()) {
-+ String::FlatContent lhs_content = lhs->GetFlatContent();
-+ if (lhs->IsAsciiRepresentation()) {
-+ Vector<const char> vec1 = lhs_content.ToAsciiVector();
-+ VectorIterator<char> buf1(vec1);
-+ VectorIterator<uc16> ib(string, length);
-+ return CompareStringContents(&buf1, &ib);
-+ } else {
-+ Vector<const uc16> vec1 = lhs_content.ToUC16Vector();
-+ Vector<const uc16> vec2(string, length);
-+ return CompareRawStringContents(vec1, vec2);
-+ }
-+ } else {
-+ Isolate* isolate = GetIsolate();
-+ isolate->objects_string_compare_buffer_a()->Reset(0, lhs);
-+ VectorIterator<uc16> ib(string, length);
-+ return CompareStringContents(isolate->objects_string_compare_buffer_a(), &ib);
-+ }
-+}
-+
-+
-+bool String::SlowEqualsExternal(char *string, int length)
-+{
-+ int len = this->length();
-+ if (len != length) return false;
-+ if (len == 0) return true;
-+
-+ // We know the strings are both non-empty. Compare the first chars
-+ // before we try to flatten the strings.
-+ if (this->Get(0) != string[0]) return false;
-+
-+ String* lhs = this->TryFlattenGetString();
-+
-+ if (StringShape(lhs).IsSequentialAscii()) {
-+ const char* str1 = SeqAsciiString::cast(lhs)->GetChars();
-+ return CompareRawStringContents(Vector<const char>(str1, len),
-+ Vector<const char>(string, len));
-+ }
-+
-+ if (lhs->IsFlat()) {
-+ String::FlatContent lhs_content = lhs->GetFlatContent();
-+ Vector<const uc16> vec1 = lhs_content.ToUC16Vector();
-+ VectorIterator<const uc16> buf1(vec1);
-+ VectorIterator<char> buf2(string, length);
-+ return CompareStringContents(&buf1, &buf2);
-+ } else {
-+ Isolate* isolate = GetIsolate();
-+ isolate->objects_string_compare_buffer_a()->Reset(0, lhs);
-+ VectorIterator<char> ib(string, length);
-+ return CompareStringContents(isolate->objects_string_compare_buffer_a(), &ib);
-+ }
-+}
-+
-+
- bool String::SlowEquals(String* other) {
- // Fast check: negative check with lengths.
- int len = length();
-@@ -10716,9 +10781,24 @@ class AsciiSymbolKey : public SequentialSymbolKey<char> {
-
- MaybeObject* AsObject() {
- if (hash_field_ == 0) Hash();
-- return HEAP->AllocateAsciiSymbol(string_, hash_field_);
-+ MaybeObject *result = HEAP->AllocateAsciiSymbol(string_, hash_field_);
-+ if (!result->IsFailure() && result->ToObjectUnchecked()->IsSeqString()) {
-+ while (true) {
-+ Atomic32 my_symbol_id = next_symbol_id;
-+ if (my_symbol_id > Smi::kMaxValue)
-+ break;
-+ if (my_symbol_id == NoBarrier_CompareAndSwap(&next_symbol_id, my_symbol_id, my_symbol_id + 1)) {
-+ SeqString::cast(result->ToObjectUnchecked())->set_symbol_id(my_symbol_id);
-+ break;
-+ }
-+ }
-+ }
-+ return result;
- }
-+
-+ static Atomic32 next_symbol_id;
- };
-+Atomic32 AsciiSymbolKey::next_symbol_id = 1;
-
-
- class SubStringAsciiSymbolKey : public HashTableKey {
-diff --git a/src/objects.h b/src/objects.h
-index f7d21802..d96e5f9 100644
---- a/src/objects.h
-+++ b/src/objects.h
-@@ -6201,6 +6201,9 @@ class String: public HeapObject {
- bool IsAsciiEqualTo(Vector<const char> str);
- bool IsTwoByteEqualTo(Vector<const uc16> str);
-
-+ bool SlowEqualsExternal(uc16 *string, int length);
-+ bool SlowEqualsExternal(char *string, int length);
-+
- // Return a UTF8 representation of the string. The string is null
- // terminated but may optionally contain nulls. Length is returned
- // in length_output if length_output is not a null pointer The string
-@@ -6457,8 +6460,13 @@ class SeqString: public String {
- // Casting.
- static inline SeqString* cast(Object* obj);
-
-+ // Get and set the symbol id of the string
-+ inline int symbol_id();
-+ inline void set_symbol_id(int value);
-+
- // Layout description.
-- static const int kHeaderSize = String::kSize;
-+ static const int kSymbolIdOffset = String::kSize;
-+ static const int kHeaderSize = kSymbolIdOffset + kPointerSize;
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString);
---
-1.7.7.3
-
diff --git a/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch b/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch
deleted file mode 100644
index 35db5c2ca5..0000000000
--- a/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch
+++ /dev/null
@@ -1,361 +0,0 @@
-From 20eca1d4ce4c56b599a052d496f4660f9ca9c978 Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Thu, 27 Oct 2011 11:31:56 +0100
-Subject: [PATCH 02/12] Add a "fallback" mode for named property interceptors
-
-By default interceptors are called before the normal property
-resolution on objects. When an interceptor is installed as a
-"fallback" interceptor, it is only called if the object doesn't
-already have the property.
-
-In the case of a global object having an fallback interceptor,
-the interceptor is not invoked at all for var or function
-declarations.
----
- include/v8.h | 7 +++++++
- src/api.cc | 29 +++++++++++++++++++++++++++++
- src/factory.cc | 3 +++
- src/handles.cc | 6 ++++--
- src/handles.h | 3 ++-
- src/objects-inl.h | 15 +++++++++++++++
- src/objects.cc | 24 +++++++++++++++++-------
- src/objects.h | 16 ++++++++++++----
- src/runtime.cc | 11 ++++++-----
- 9 files changed, 95 insertions(+), 19 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index 86ea70f..d2e6c32 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -2305,6 +2305,7 @@ class V8EXPORT FunctionTemplate : public Template {
- NamedPropertyQuery query,
- NamedPropertyDeleter remover,
- NamedPropertyEnumerator enumerator,
-+ bool is_fallback,
- Handle<Value> data);
- void SetIndexedInstancePropertyHandler(IndexedPropertyGetter getter,
- IndexedPropertySetter setter,
-@@ -2388,6 +2389,12 @@ class V8EXPORT ObjectTemplate : public Template {
- NamedPropertyDeleter deleter = 0,
- NamedPropertyEnumerator enumerator = 0,
- Handle<Value> data = Handle<Value>());
-+ void SetFallbackPropertyHandler(NamedPropertyGetter getter,
-+ NamedPropertySetter setter = 0,
-+ NamedPropertyQuery query = 0,
-+ NamedPropertyDeleter deleter = 0,
-+ NamedPropertyEnumerator enumerator = 0,
-+ Handle<Value> data = Handle<Value>());
-
- /**
- * Sets an indexed property handler on the object template.
-diff --git a/src/api.cc b/src/api.cc
-index 996812e..e0f3b5a 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -1123,6 +1123,7 @@ void FunctionTemplate::SetNamedInstancePropertyHandler(
- NamedPropertyQuery query,
- NamedPropertyDeleter remover,
- NamedPropertyEnumerator enumerator,
-+ bool is_fallback,
- Handle<Value> data) {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- if (IsDeadCheck(isolate,
-@@ -1141,6 +1142,7 @@ void FunctionTemplate::SetNamedInstancePropertyHandler(
- if (query != 0) SET_FIELD_WRAPPED(obj, set_query, query);
- if (remover != 0) SET_FIELD_WRAPPED(obj, set_deleter, remover);
- if (enumerator != 0) SET_FIELD_WRAPPED(obj, set_enumerator, enumerator);
-+ obj->set_is_fallback(i::Smi::FromInt(is_fallback));
-
- if (data.IsEmpty()) data = v8::Undefined();
- obj->set_data(*Utils::OpenHandle(*data));
-@@ -1285,6 +1287,33 @@ void ObjectTemplate::SetNamedPropertyHandler(NamedPropertyGetter getter,
- query,
- remover,
- enumerator,
-+ false,
-+ data);
-+}
-+
-+
-+void ObjectTemplate::SetFallbackPropertyHandler(NamedPropertyGetter getter,
-+ NamedPropertySetter setter,
-+ NamedPropertyQuery query,
-+ NamedPropertyDeleter remover,
-+ NamedPropertyEnumerator enumerator,
-+ Handle<Value> data) {
-+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
-+ if (IsDeadCheck(isolate, "v8::ObjectTemplate::SetNamedPropertyHandler()")) {
-+ return;
-+ }
-+ ENTER_V8(isolate);
-+ i::HandleScope scope(isolate);
-+ EnsureConstructor(this);
-+ i::FunctionTemplateInfo* constructor =
-+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
-+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
-+ Utils::ToLocal(cons)->SetNamedInstancePropertyHandler(getter,
-+ setter,
-+ query,
-+ remover,
-+ enumerator,
-+ true,
- data);
- }
-
-diff --git a/src/factory.cc b/src/factory.cc
-index 15f640e..1b95ed1 100644
---- a/src/factory.cc
-+++ b/src/factory.cc
-@@ -1213,6 +1213,9 @@ Handle<JSFunction> Factory::CreateApiFunction(
- // Set interceptor information in the map.
- if (!obj->named_property_handler()->IsUndefined()) {
- map->set_has_named_interceptor();
-+ InterceptorInfo *nph = InterceptorInfo::cast(obj->named_property_handler());
-+ bool is_fallback = nph->is_fallback()->IsUndefined()?false:nph->is_fallback()->value();
-+ map->set_named_interceptor_is_fallback(is_fallback);
- }
- if (!obj->indexed_property_handler()->IsUndefined()) {
- map->set_has_indexed_interceptor();
-diff --git a/src/handles.cc b/src/handles.cc
-index 62851f3..790d224 100644
---- a/src/handles.cc
-+++ b/src/handles.cc
-@@ -269,9 +269,11 @@ Handle<Object> SetProperty(Handle<JSReceiver> object,
- Handle<String> key,
- Handle<Object> value,
- PropertyAttributes attributes,
-- StrictModeFlag strict_mode) {
-+ StrictModeFlag strict_mode,
-+ bool skip_fallback_interceptor) {
- CALL_HEAP_FUNCTION(object->GetIsolate(),
-- object->SetProperty(*key, *value, attributes, strict_mode),
-+ object->SetProperty(*key, *value, attributes, strict_mode,
-+ skip_fallback_interceptor),
- Object);
- }
-
-diff --git a/src/handles.h b/src/handles.h
-index 06e47fc..c359cb3 100644
---- a/src/handles.h
-+++ b/src/handles.h
-@@ -190,7 +190,8 @@ Handle<Object> SetProperty(Handle<JSReceiver> object,
- Handle<String> key,
- Handle<Object> value,
- PropertyAttributes attributes,
-- StrictModeFlag strict_mode);
-+ StrictModeFlag strict_mode,
-+ bool skip_fallback_interceptor = false);
-
- Handle<Object> SetProperty(Handle<Object> object,
- Handle<Object> key,
-diff --git a/src/objects-inl.h b/src/objects-inl.h
-index 34cae9f..1cfea84 100644
---- a/src/objects-inl.h
-+++ b/src/objects-inl.h
-@@ -2754,6 +2754,20 @@ void Map::set_is_shared(bool value) {
- bool Map::is_shared() {
- return ((1 << kIsShared) & bit_field3()) != 0;
- }
-+
-+void Map::set_named_interceptor_is_fallback(bool value)
-+{
-+ if (value) {
-+ set_bit_field3(bit_field3() | (1 << kNamedInterceptorIsFallback));
-+ } else {
-+ set_bit_field3(bit_field3() & ~(1 << kNamedInterceptorIsFallback));
-+ }
-+}
-+
-+bool Map::named_interceptor_is_fallback()
-+{
-+ return ((1 << kNamedInterceptorIsFallback) & bit_field3()) != 0;
-+}
-
-
- JSFunction* Map::unchecked_constructor() {
-@@ -3255,6 +3269,7 @@ ACCESSORS(InterceptorInfo, query, Object, kQueryOffset)
- ACCESSORS(InterceptorInfo, deleter, Object, kDeleterOffset)
- ACCESSORS(InterceptorInfo, enumerator, Object, kEnumeratorOffset)
- ACCESSORS(InterceptorInfo, data, Object, kDataOffset)
-+ACCESSORS(InterceptorInfo, is_fallback, Smi, kFallbackOffset)
-
- ACCESSORS(CallHandlerInfo, callback, Object, kCallbackOffset)
- ACCESSORS(CallHandlerInfo, data, Object, kDataOffset)
-diff --git a/src/objects.cc b/src/objects.cc
-index 2946d02..f5b6bee 100644
---- a/src/objects.cc
-+++ b/src/objects.cc
-@@ -1980,9 +1980,10 @@ MaybeObject* JSObject::SetPropertyWithInterceptor(
- MaybeObject* JSReceiver::SetProperty(String* name,
- Object* value,
- PropertyAttributes attributes,
-- StrictModeFlag strict_mode) {
-+ StrictModeFlag strict_mode,
-+ bool skip_fallback_interceptor) {
- LookupResult result(GetIsolate());
-- LocalLookup(name, &result);
-+ LocalLookup(name, &result, skip_fallback_interceptor);
- return SetProperty(&result, name, value, attributes, strict_mode);
- }
-
-@@ -4213,7 +4214,8 @@ AccessorDescriptor* Map::FindAccessor(String* name) {
- }
-
-
--void JSReceiver::LocalLookup(String* name, LookupResult* result) {
-+void JSReceiver::LocalLookup(String* name, LookupResult* result,
-+ bool skip_fallback_interceptor) {
- ASSERT(name->IsString());
-
- Heap* heap = GetHeap();
-@@ -4245,23 +4247,31 @@ void JSReceiver::LocalLookup(String* name, LookupResult* result) {
- }
-
- // Check for lookup interceptor except when bootstrapping.
-- if (js_object->HasNamedInterceptor() &&
-- !heap->isolate()->bootstrapper()->IsActive()) {
-+ bool wouldIntercept = js_object->HasNamedInterceptor() &&
-+ !heap->isolate()->bootstrapper()->IsActive();
-+ if (wouldIntercept && !map()->named_interceptor_is_fallback()) {
- result->InterceptorResult(js_object);
- return;
- }
-
- js_object->LocalLookupRealNamedProperty(name, result);
-+
-+ if (wouldIntercept && !skip_fallback_interceptor && !result->IsProperty() &&
-+ map()->named_interceptor_is_fallback()) {
-+ result->InterceptorResult(js_object);
-+ return;
-+ }
- }
-
-
--void JSReceiver::Lookup(String* name, LookupResult* result) {
-+void JSReceiver::Lookup(String* name, LookupResult* result,
-+ bool skip_fallback_interceptor) {
- // Ecma-262 3rd 8.6.2.4
- Heap* heap = GetHeap();
- for (Object* current = this;
- current != heap->null_value();
- current = JSObject::cast(current)->GetPrototype()) {
-- JSReceiver::cast(current)->LocalLookup(name, result);
-+ JSReceiver::cast(current)->LocalLookup(name, result, skip_fallback_interceptor);
- if (result->IsProperty()) return;
- }
- result->NotFound();
-diff --git a/src/objects.h b/src/objects.h
-index d96e5f9..ed40061 100644
---- a/src/objects.h
-+++ b/src/objects.h
-@@ -1362,7 +1362,8 @@ class JSReceiver: public HeapObject {
- MUST_USE_RESULT MaybeObject* SetProperty(String* key,
- Object* value,
- PropertyAttributes attributes,
-- StrictModeFlag strict_mode);
-+ StrictModeFlag strict_mode,
-+ bool skip_fallback_interceptor = false);
- MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result,
- String* key,
- Object* value,
-@@ -1414,8 +1415,8 @@ class JSReceiver: public HeapObject {
-
- // Lookup a property. If found, the result is valid and has
- // detailed information.
-- void LocalLookup(String* name, LookupResult* result);
-- void Lookup(String* name, LookupResult* result);
-+ void LocalLookup(String* name, LookupResult* result, bool skip_fallback_interceptor = false);
-+ void Lookup(String* name, LookupResult* result, bool skip_fallback_interceptor = false);
-
- protected:
- Smi* GenerateIdentityHash();
-@@ -4242,6 +4243,10 @@ class Map: public HeapObject {
- inline void set_is_access_check_needed(bool access_check_needed);
- inline bool is_access_check_needed();
-
-+ // Whether the named interceptor is a fallback interceptor or not
-+ inline void set_named_interceptor_is_fallback(bool value);
-+ inline bool named_interceptor_is_fallback();
-+
- // [prototype]: implicit prototype object.
- DECL_ACCESSORS(prototype, Object)
-
-@@ -4506,6 +4511,7 @@ class Map: public HeapObject {
-
- // Bit positions for bit field 3
- static const int kIsShared = 0;
-+ static const int kNamedInterceptorIsFallback = 1;
-
- // Layout of the default cache. It holds alternating name and code objects.
- static const int kCodeCacheEntrySize = 2;
-@@ -7390,6 +7396,7 @@ class InterceptorInfo: public Struct {
- DECL_ACCESSORS(deleter, Object)
- DECL_ACCESSORS(enumerator, Object)
- DECL_ACCESSORS(data, Object)
-+ DECL_ACCESSORS(is_fallback, Smi)
-
- static inline InterceptorInfo* cast(Object* obj);
-
-@@ -7409,7 +7416,8 @@ class InterceptorInfo: public Struct {
- static const int kDeleterOffset = kQueryOffset + kPointerSize;
- static const int kEnumeratorOffset = kDeleterOffset + kPointerSize;
- static const int kDataOffset = kEnumeratorOffset + kPointerSize;
-- static const int kSize = kDataOffset + kPointerSize;
-+ static const int kFallbackOffset = kDataOffset + kPointerSize;
-+ static const int kSize = kFallbackOffset + kPointerSize;
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo);
-diff --git a/src/runtime.cc b/src/runtime.cc
-index 9c23c2c..0e256c1 100644
---- a/src/runtime.cc
-+++ b/src/runtime.cc
-@@ -1330,7 +1330,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
- // Lookup the property in the global object, and don't set the
- // value of the variable if the property is already there.
- LookupResult lookup(isolate);
-- global->Lookup(*name, &lookup);
-+ global->Lookup(*name, &lookup, true);
- if (lookup.IsProperty()) {
- // We found an existing property. Unless it was an interceptor
- // that claims the property is absent, skip this declaration.
-@@ -1357,7 +1357,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
- }
-
- LookupResult lookup(isolate);
-- global->LocalLookup(*name, &lookup);
-+ global->LocalLookup(*name, &lookup, true);
-
- // Compute the property attributes. According to ECMA-262, section
- // 13, page 71, the property must be read-only and
-@@ -1398,7 +1398,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
- name,
- value,
- static_cast<PropertyAttributes>(attr),
-- strict_mode));
-+ strict_mode,
-+ true));
- }
- }
-
-@@ -1534,7 +1535,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) {
- while (object->IsJSObject() &&
- JSObject::cast(object)->map()->is_hidden_prototype()) {
- JSObject* raw_holder = JSObject::cast(object);
-- raw_holder->LocalLookup(*name, &lookup);
-+ raw_holder->LocalLookup(*name, &lookup, true);
- if (lookup.IsProperty() && lookup.type() == INTERCEPTOR) {
- HandleScope handle_scope(isolate);
- Handle<JSObject> holder(raw_holder);
-@@ -1557,7 +1558,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) {
- // Reload global in case the loop above performed a GC.
- global = isolate->context()->global();
- if (assign) {
-- return global->SetProperty(*name, args[2], attributes, strict_mode);
-+ return global->SetProperty(*name, args[2], attributes, strict_mode, true);
- }
- return isolate->heap()->undefined_value();
- }
---
-1.7.7.3
-
diff --git a/src/v8/0003-Generalize-external-object-resources.patch b/src/v8/0003-Generalize-external-object-resources.patch
deleted file mode 100644
index ba384a62ee..0000000000
--- a/src/v8/0003-Generalize-external-object-resources.patch
+++ /dev/null
@@ -1,595 +0,0 @@
-From 74974cee335e6c22ea99fd9a4bbb9c7fa7323d80 Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Tue, 4 Oct 2011 16:06:09 +1000
-Subject: [PATCH 03/12] Generalize external object resources
-
-V8 was already able to manage and finalize an external string
-resource. This change generalizes that mechanism to handle a
-single generic external resource - a v8::Object::ExternalResource
-derived instance - on normal JSObject's.
-
-This is useful for mapping C++ objects to JS objects where the
-C++ object's memory is effectively owned by the JS Object, and
-thus needs to destroyed when the JS Object is garbage collected.
-The V8 mailing list suggests using a weak persistent handle for
-this purpose, but that seems to incur a fairly massive performance
-penalty for short lived objects as weak persistent handle callbacks
-are not called until the object has been promoted into the old
-object space.
----
- include/v8.h | 25 ++++++++++++++++++++
- src/api.cc | 56 +++++++++++++++++++++++++++++++++++++++++++++
- src/factory.cc | 11 +++++++++
- src/heap-inl.h | 63 +++++++++++++++++++++++++++++++++++---------------
- src/heap.cc | 29 +++++++++++++++++------
- src/heap.h | 16 ++++++++-----
- src/mark-compact.cc | 13 +++++-----
- src/objects-inl.h | 35 +++++++++++++++++++++++++++-
- src/objects.h | 19 ++++++++++++---
- 9 files changed, 223 insertions(+), 44 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index d2e6c32..3ef4dd6 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -1597,6 +1597,25 @@ class Object : public Value {
- /** Sets a native pointer in an internal field. */
- V8EXPORT void SetPointerInInternalField(int index, void* value);
-
-+ class V8EXPORT ExternalResource { // NOLINT
-+ public:
-+ ExternalResource() {}
-+ virtual ~ExternalResource() {}
-+
-+ protected:
-+ virtual void Dispose() { delete this; }
-+
-+ private:
-+ // Disallow copying and assigning.
-+ ExternalResource(const ExternalResource&);
-+ void operator=(const ExternalResource&);
-+
-+ friend class v8::internal::Heap;
-+ };
-+
-+ V8EXPORT void SetExternalResource(ExternalResource *);
-+ V8EXPORT ExternalResource *GetExternalResource();
-+
- // Testers for local properties.
- V8EXPORT bool HasOwnProperty(Handle<String> key);
- V8EXPORT bool HasRealNamedProperty(Handle<String> key);
-@@ -2466,6 +2485,12 @@ class V8EXPORT ObjectTemplate : public Template {
- */
- void SetInternalFieldCount(int value);
-
-+ /**
-+ * Sets whether the object can store an "external resource" object.
-+ */
-+ bool HasExternalResource();
-+ void SetHasExternalResource(bool value);
-+
- private:
- ObjectTemplate();
- static Local<ObjectTemplate> New(Handle<FunctionTemplate> constructor);
-diff --git a/src/api.cc b/src/api.cc
-index e0f3b5a..7d54252 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -1436,6 +1436,34 @@ void ObjectTemplate::SetInternalFieldCount(int value) {
- }
-
-
-+bool ObjectTemplate::HasExternalResource()
-+{
-+ if (IsDeadCheck(Utils::OpenHandle(this)->GetIsolate(),
-+ "v8::ObjectTemplate::HasExternalResource()")) {
-+ return 0;
-+ }
-+ return !Utils::OpenHandle(this)->has_external_resource()->IsUndefined();
-+}
-+
-+
-+void ObjectTemplate::SetHasExternalResource(bool value)
-+{
-+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
-+ if (IsDeadCheck(isolate, "v8::ObjectTemplate::SetHasExternalResource()")) {
-+ return;
-+ }
-+ ENTER_V8(isolate);
-+ if (value) {
-+ EnsureConstructor(this);
-+ }
-+ if (value) {
-+ Utils::OpenHandle(this)->set_has_external_resource(i::Smi::FromInt(1));
-+ } else {
-+ Utils::OpenHandle(this)->set_has_external_resource(Utils::OpenHandle(this)->GetHeap()->undefined_value());
-+ }
-+}
-+
-+
- // --- S c r i p t D a t a ---
-
-
-@@ -4029,6 +4057,34 @@ void v8::Object::SetPointerInInternalField(int index, void* value) {
- }
-
-
-+void v8::Object::SetExternalResource(v8::Object::ExternalResource *resource) {
-+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
-+ ENTER_V8(isolate);
-+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
-+ if (CanBeEncodedAsSmi(resource)) {
-+ obj->SetExternalResourceObject(EncodeAsSmi(resource));
-+ } else {
-+ obj->SetExternalResourceObject(*isolate->factory()->NewForeign(static_cast<i::Address>((void *)resource)));
-+ }
-+ if (!obj->IsSymbol()) {
-+ isolate->heap()->external_string_table()->AddObject(*obj);
-+ }
-+}
-+
-+
-+v8::Object::ExternalResource *v8::Object::GetExternalResource() {
-+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
-+ i::Object* value = obj->GetExternalResourceObject();
-+ if (value->IsSmi()) {
-+ return reinterpret_cast<v8::Object::ExternalResource*>(i::Internals::GetExternalPointerFromSmi(value));
-+ } else if (value->IsForeign()) {
-+ return reinterpret_cast<v8::Object::ExternalResource*>(i::Foreign::cast(value)->address());
-+ } else {
-+ return NULL;
-+ }
-+}
-+
-+
- // --- E n v i r o n m e n t ---
-
-
-diff --git a/src/factory.cc b/src/factory.cc
-index 1b95ed1..8c96944 100644
---- a/src/factory.cc
-+++ b/src/factory.cc
-@@ -1152,15 +1152,21 @@ Handle<JSFunction> Factory::CreateApiFunction(
- Handle<Code> construct_stub = isolate()->builtins()->JSConstructStubApi();
-
- int internal_field_count = 0;
-+ bool has_external_resource = false;
-+
- if (!obj->instance_template()->IsUndefined()) {
- Handle<ObjectTemplateInfo> instance_template =
- Handle<ObjectTemplateInfo>(
- ObjectTemplateInfo::cast(obj->instance_template()));
- internal_field_count =
- Smi::cast(instance_template->internal_field_count())->value();
-+ has_external_resource =
-+ !instance_template->has_external_resource()->IsUndefined();
- }
-
- int instance_size = kPointerSize * internal_field_count;
-+ if (has_external_resource) instance_size += kPointerSize;
-+
- InstanceType type = INVALID_TYPE;
- switch (instance_type) {
- case JavaScriptObject:
-@@ -1195,6 +1201,11 @@ Handle<JSFunction> Factory::CreateApiFunction(
-
- Handle<Map> map = Handle<Map>(result->initial_map());
-
-+ // Mark as having external data object if needed
-+ if (has_external_resource) {
-+ map->set_has_external_resource(true);
-+ }
-+
- // Mark as undetectable if needed.
- if (obj->undetectable()) {
- map->set_is_undetectable();
-diff --git a/src/heap-inl.h b/src/heap-inl.h
-index 4c55d63..bca57cb 100644
---- a/src/heap-inl.h
-+++ b/src/heap-inl.h
-@@ -222,21 +222,36 @@ MaybeObject* Heap::NumberFromUint32(uint32_t value) {
- }
-
-
--void Heap::FinalizeExternalString(String* string) {
-- ASSERT(string->IsExternalString());
-- v8::String::ExternalStringResourceBase** resource_addr =
-- reinterpret_cast<v8::String::ExternalStringResourceBase**>(
-- reinterpret_cast<byte*>(string) +
-- ExternalString::kResourceOffset -
-- kHeapObjectTag);
--
-- // Dispose of the C++ object if it has not already been disposed.
-- if (*resource_addr != NULL) {
-- (*resource_addr)->Dispose();
-+void Heap::FinalizeExternalString(HeapObject* string) {
-+ ASSERT(string->IsExternalString() || string->map()->has_external_resource());
-+
-+ if (string->IsExternalString()) {
-+ v8::String::ExternalStringResourceBase** resource_addr =
-+ reinterpret_cast<v8::String::ExternalStringResourceBase**>(
-+ reinterpret_cast<byte*>(string) +
-+ ExternalString::kResourceOffset -
-+ kHeapObjectTag);
-+
-+ // Dispose of the C++ object if it has not already been disposed.
-+ if (*resource_addr != NULL) {
-+ (*resource_addr)->Dispose();
-+ }
-+
-+ // Clear the resource pointer in the string.
-+ *resource_addr = NULL;
-+ } else {
-+ JSObject *object = JSObject::cast(string);
-+ Object *value = object->GetExternalResourceObject();
-+ v8::Object::ExternalResource *resource = 0;
-+ if (value->IsSmi()) {
-+ resource = reinterpret_cast<v8::Object::ExternalResource*>(Internals::GetExternalPointerFromSmi(value));
-+ } else if (value->IsForeign()) {
-+ resource = reinterpret_cast<v8::Object::ExternalResource*>(Foreign::cast(value)->address());
-+ }
-+ if (resource) {
-+ resource->Dispose();
-+ }
- }
--
-- // Clear the resource pointer in the string.
-- *resource_addr = NULL;
- }
-
-
-@@ -555,6 +570,16 @@ void ExternalStringTable::AddString(String* string) {
- }
-
-
-+void ExternalStringTable::AddObject(HeapObject* object) {
-+ ASSERT(object->map()->has_external_resource());
-+ if (heap_->InNewSpace(object)) {
-+ new_space_strings_.Add(object);
-+ } else {
-+ old_space_strings_.Add(object);
-+ }
-+}
-+
-+
- void ExternalStringTable::Iterate(ObjectVisitor* v) {
- if (!new_space_strings_.is_empty()) {
- Object** start = &new_space_strings_[0];
-@@ -583,14 +608,14 @@ void ExternalStringTable::Verify() {
- }
-
-
--void ExternalStringTable::AddOldString(String* string) {
-- ASSERT(string->IsExternalString());
-- ASSERT(!heap_->InNewSpace(string));
-- old_space_strings_.Add(string);
-+void ExternalStringTable::AddOldObject(HeapObject* object) {
-+ ASSERT(object->IsExternalString() || object->map()->has_external_resource());
-+ ASSERT(!heap_->InNewSpace(object));
-+ old_space_strings_.Add(object);
- }
-
-
--void ExternalStringTable::ShrinkNewStrings(int position) {
-+void ExternalStringTable::ShrinkNewObjects(int position) {
- new_space_strings_.Rewind(position);
- if (FLAG_verify_heap) {
- Verify();
-diff --git a/src/heap.cc b/src/heap.cc
-index d287ead..53a0f27 100644
---- a/src/heap.cc
-+++ b/src/heap.cc
-@@ -1099,18 +1099,18 @@ void Heap::Scavenge() {
- }
-
-
--String* Heap::UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap,
-- Object** p) {
-+HeapObject* Heap::UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap,
-+ Object** p) {
- MapWord first_word = HeapObject::cast(*p)->map_word();
-
- if (!first_word.IsForwardingAddress()) {
- // Unreachable external string can be finalized.
-- heap->FinalizeExternalString(String::cast(*p));
-+ heap->FinalizeExternalString(HeapObject::cast(*p));
- return NULL;
- }
-
- // String is still reachable.
-- return String::cast(first_word.ToForwardingAddress());
-+ return HeapObject::cast(first_word.ToForwardingAddress());
- }
-
-
-@@ -1128,11 +1128,11 @@ void Heap::UpdateNewSpaceReferencesInExternalStringTable(
-
- for (Object** p = start; p < end; ++p) {
- ASSERT(InFromSpace(*p));
-- String* target = updater_func(this, p);
-+ HeapObject* target = updater_func(this, p);
-
- if (target == NULL) continue;
-
-- ASSERT(target->IsExternalString());
-+ ASSERT(target->IsExternalString() || target->map()->has_external_resource());
-
- if (InNewSpace(target)) {
- // String is still in new space. Update the table entry.
-@@ -1140,12 +1140,12 @@ void Heap::UpdateNewSpaceReferencesInExternalStringTable(
- ++last;
- } else {
- // String got promoted. Move it to the old string list.
-- external_string_table_.AddOldString(target);
-+ external_string_table_.AddOldObject(target);
- }
- }
-
- ASSERT(last <= end);
-- external_string_table_.ShrinkNewStrings(static_cast<int>(last - start));
-+ external_string_table_.ShrinkNewObjects(static_cast<int>(last - start));
- }
-
-
-@@ -6367,6 +6367,19 @@ void ExternalStringTable::CleanUp() {
-
-
- void ExternalStringTable::TearDown() {
-+ for (int i = 0; i < new_space_strings_.length(); ++i) {
-+ if (new_space_strings_[i] == heap_->raw_unchecked_null_value()) continue;
-+ HeapObject *object = HeapObject::cast(new_space_strings_[i]);
-+ if (!object->IsExternalString())
-+ heap_->FinalizeExternalString(object);
-+ }
-+ for (int i = 0; i < old_space_strings_.length(); ++i) {
-+ if (old_space_strings_[i] == heap_->raw_unchecked_null_value()) continue;
-+ HeapObject *object = HeapObject::cast(old_space_strings_[i]);
-+ if (!object->IsExternalString())
-+ heap_->FinalizeExternalString(object);
-+ }
-+
- new_space_strings_.Free();
- old_space_strings_.Free();
- }
-diff --git a/src/heap.h b/src/heap.h
-index 7c0b0ea..5e90964 100644
---- a/src/heap.h
-+++ b/src/heap.h
-@@ -245,8 +245,8 @@ class Isolate;
- class WeakObjectRetainer;
-
-
--typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
-- Object** pointer);
-+typedef HeapObject* (*ExternalStringTableUpdaterCallback)(Heap* heap,
-+ Object** pointer);
-
- class StoreBufferRebuilder {
- public:
-@@ -331,10 +331,14 @@ typedef void (*ScavengingCallback)(Map* map,
- // External strings table is a place where all external strings are
- // registered. We need to keep track of such strings to properly
- // finalize them.
-+// The ExternalStringTable can contain both strings and objects with
-+// external resources. It was not renamed to make the patch simpler.
- class ExternalStringTable {
- public:
- // Registers an external string.
- inline void AddString(String* string);
-+ // Registers an external object.
-+ inline void AddObject(HeapObject* string);
-
- inline void Iterate(ObjectVisitor* v);
-
-@@ -352,10 +356,10 @@ class ExternalStringTable {
-
- inline void Verify();
-
-- inline void AddOldString(String* string);
-+ inline void AddOldObject(HeapObject* string);
-
- // Notifies the table that only a prefix of the new list is valid.
-- inline void ShrinkNewStrings(int position);
-+ inline void ShrinkNewObjects(int position);
-
- // To speed up scavenge collections new space string are kept
- // separate from old space strings.
-@@ -851,7 +855,7 @@ class Heap {
-
- // Finalizes an external string by deleting the associated external
- // data and clearing the resource pointer.
-- inline void FinalizeExternalString(String* string);
-+ inline void FinalizeExternalString(HeapObject* string);
-
- // Allocates an uninitialized object. The memory is non-executable if the
- // hardware and OS allow.
-@@ -1656,7 +1660,7 @@ class Heap {
- // Performs a minor collection in new generation.
- void Scavenge();
-
-- static String* UpdateNewSpaceReferenceInExternalStringTableEntry(
-+ static HeapObject* UpdateNewSpaceReferenceInExternalStringTableEntry(
- Heap* heap,
- Object** pointer);
-
-diff --git a/src/mark-compact.cc b/src/mark-compact.cc
-index b41b033..bf0aab8 100644
---- a/src/mark-compact.cc
-+++ b/src/mark-compact.cc
-@@ -1513,8 +1513,9 @@ class SymbolTableCleaner : public ObjectVisitor {
-
- // Since no objects have yet been moved we can safely access the map of
- // the object.
-- if (o->IsExternalString()) {
-- heap_->FinalizeExternalString(String::cast(*p));
-+ if (o->IsExternalString() ||
-+ (o->IsHeapObject() && HeapObject::cast(o)->map()->has_external_resource())) {
-+ heap_->FinalizeExternalString(HeapObject::cast(*p));
- }
- // Set the entry to null_value (as deleted).
- *p = heap_->null_value();
-@@ -2487,15 +2488,15 @@ static void UpdatePointer(HeapObject** p, HeapObject* object) {
- }
-
-
--static String* UpdateReferenceInExternalStringTableEntry(Heap* heap,
-- Object** p) {
-+static HeapObject* UpdateReferenceInExternalStringTableEntry(Heap* heap,
-+ Object** p) {
- MapWord map_word = HeapObject::cast(*p)->map_word();
-
- if (map_word.IsForwardingAddress()) {
-- return String::cast(map_word.ToForwardingAddress());
-+ return HeapObject::cast(map_word.ToForwardingAddress());
- }
-
-- return String::cast(*p);
-+ return HeapObject::cast(*p);
- }
-
-
-diff --git a/src/objects-inl.h b/src/objects-inl.h
-index 1cfea84..6a80c9c 100644
---- a/src/objects-inl.h
-+++ b/src/objects-inl.h
-@@ -1343,7 +1343,7 @@ int JSObject::GetInternalFieldCount() {
- // Make sure to adjust for the number of in-object properties. These
- // properties do contribute to the size, but are not internal fields.
- return ((Size() - GetHeaderSize()) >> kPointerSizeLog2) -
-- map()->inobject_properties();
-+ map()->inobject_properties() - (map()->has_external_resource()?1:0);
- }
-
-
-@@ -1373,6 +1373,23 @@ void JSObject::SetInternalField(int index, Object* value) {
- }
-
-
-+void JSObject::SetExternalResourceObject(Object *value) {
-+ ASSERT(map()->has_external_resource());
-+ int offset = GetHeaderSize() + kPointerSize * GetInternalFieldCount();
-+ WRITE_FIELD(this, offset, value);
-+ WRITE_BARRIER(GetHeap(), this, offset, value);
-+}
-+
-+
-+Object *JSObject::GetExternalResourceObject() {
-+ if (map()->has_external_resource()) {
-+ return READ_FIELD(this, GetHeaderSize() + kPointerSize * GetInternalFieldCount());
-+ } else {
-+ return GetHeap()->undefined_value();
-+ }
-+}
-+
-+
- // Access fast-case object properties at index. The use of these routines
- // is needed to correctly distinguish between properties stored in-object and
- // properties stored in the properties array.
-@@ -2755,6 +2772,20 @@ bool Map::is_shared() {
- return ((1 << kIsShared) & bit_field3()) != 0;
- }
-
-+void Map::set_has_external_resource(bool value) {
-+ if (value) {
-+ set_bit_field(bit_field() | (1 << kHasExternalResource));
-+ } else {
-+ set_bit_field(bit_field() & ~(1 << kHasExternalResource));
-+ }
-+}
-+
-+bool Map::has_external_resource()
-+{
-+ return ((1 << kHasExternalResource) & bit_field()) != 0;
-+}
-+
-+
- void Map::set_named_interceptor_is_fallback(bool value)
- {
- if (value) {
-@@ -3301,6 +3332,8 @@ ACCESSORS(FunctionTemplateInfo, flag, Smi, kFlagOffset)
- ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset)
- ACCESSORS(ObjectTemplateInfo, internal_field_count, Object,
- kInternalFieldCountOffset)
-+ACCESSORS(ObjectTemplateInfo, has_external_resource, Object,
-+ kHasExternalResourceOffset)
-
- ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset)
- ACCESSORS(SignatureInfo, args, Object, kArgsOffset)
-diff --git a/src/objects.h b/src/objects.h
-index ed40061..c38d461 100644
---- a/src/objects.h
-+++ b/src/objects.h
-@@ -1760,6 +1760,9 @@ class JSObject: public JSReceiver {
- inline Object* GetInternalField(int index);
- inline void SetInternalField(int index, Object* value);
-
-+ inline void SetExternalResourceObject(Object *);
-+ inline Object *GetExternalResourceObject();
-+
- // The following lookup functions skip interceptors.
- void LocalLookupRealNamedProperty(String* name, LookupResult* result);
- void LookupRealNamedProperty(String* name, LookupResult* result);
-@@ -4171,11 +4174,11 @@ class Map: public HeapObject {
-
- // Tells whether the instance has a call-as-function handler.
- inline void set_has_instance_call_handler() {
-- set_bit_field(bit_field() | (1 << kHasInstanceCallHandler));
-+ set_bit_field3(bit_field3() | (1 << kHasInstanceCallHandler));
- }
-
- inline bool has_instance_call_handler() {
-- return ((1 << kHasInstanceCallHandler) & bit_field()) != 0;
-+ return ((1 << kHasInstanceCallHandler) & bit_field3()) != 0;
- }
-
- inline void set_is_extensible(bool value);
-@@ -4247,6 +4250,11 @@ class Map: public HeapObject {
- inline void set_named_interceptor_is_fallback(bool value);
- inline bool named_interceptor_is_fallback();
-
-+ // Tells whether the instance has the space for an external resource
-+ // object
-+ inline void set_has_external_resource(bool value);
-+ inline bool has_external_resource();
-+
- // [prototype]: implicit prototype object.
- DECL_ACCESSORS(prototype, Object)
-
-@@ -4487,7 +4495,7 @@ class Map: public HeapObject {
- static const int kHasNamedInterceptor = 3;
- static const int kHasIndexedInterceptor = 4;
- static const int kIsUndetectable = 5;
-- static const int kHasInstanceCallHandler = 6;
-+ static const int kHasExternalResource = 6;
- static const int kIsAccessCheckNeeded = 7;
-
- // Bit positions for bit field 2
-@@ -4512,6 +4520,7 @@ class Map: public HeapObject {
- // Bit positions for bit field 3
- static const int kIsShared = 0;
- static const int kNamedInterceptorIsFallback = 1;
-+ static const int kHasInstanceCallHandler = 2;
-
- // Layout of the default cache. It holds alternating name and code objects.
- static const int kCodeCacheEntrySize = 2;
-@@ -7539,6 +7548,7 @@ class ObjectTemplateInfo: public TemplateInfo {
- public:
- DECL_ACCESSORS(constructor, Object)
- DECL_ACCESSORS(internal_field_count, Object)
-+ DECL_ACCESSORS(has_external_resource, Object)
-
- static inline ObjectTemplateInfo* cast(Object* obj);
-
-@@ -7555,7 +7565,8 @@ class ObjectTemplateInfo: public TemplateInfo {
- static const int kConstructorOffset = TemplateInfo::kHeaderSize;
- static const int kInternalFieldCountOffset =
- kConstructorOffset + kPointerSize;
-- static const int kSize = kInternalFieldCountOffset + kPointerSize;
-+ static const int kHasExternalResourceOffset = kInternalFieldCountOffset + kPointerSize;
-+ static const int kSize = kHasExternalResourceOffset + kPointerSize;
- };
-
-
---
-1.7.7.3
-
diff --git a/src/v8/0004-Introduce-a-QML-compilation-mode.patch b/src/v8/0004-Introduce-a-QML-compilation-mode.patch
deleted file mode 100644
index 712c710df2..0000000000
--- a/src/v8/0004-Introduce-a-QML-compilation-mode.patch
+++ /dev/null
@@ -1,2355 +0,0 @@
-From ae1c497cf2235df9d73d3c5d3c2b40bcde7e534f Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Thu, 27 Oct 2011 13:34:16 +0100
-Subject: [PATCH 04/12] Introduce a QML compilation mode
-
-In QML mode, there is a second global object - known as the QML
-global object. During property resolution, if a property is not
-present on the JS global object, it is resolved on the QML global
-object.
-
-This global object behavior is only enabled if a script is being
-compiled in QML mode. The object to use as the QML global object
-is passed as a parameter to the Script::Run() method. Any function
-closures etc. created during the run will retain a reference to this
-object, so different objects can be passed in different script
-runs.
----
- include/v8.h | 19 +++++++--
- src/api.cc | 52 +++++++++++++++++++----
- src/arm/code-stubs-arm.cc | 4 ++
- src/arm/full-codegen-arm.cc | 28 +++++++-----
- src/arm/lithium-arm.cc | 4 +-
- src/arm/lithium-arm.h | 12 +++++-
- src/arm/lithium-codegen-arm.cc | 9 ++--
- src/arm/macro-assembler-arm.h | 5 ++
- src/ast-inl.h | 5 ++
- src/ast.cc | 5 ++
- src/ast.h | 1 +
- src/code-stubs.h | 2 +-
- src/compiler.cc | 15 ++++++-
- src/compiler.h | 16 ++++++-
- src/contexts.cc | 35 ++++++++++++++++
- src/contexts.h | 4 ++
- src/execution.cc | 31 ++++++++++++--
- src/execution.h | 8 ++++
- src/full-codegen.cc | 3 +-
- src/full-codegen.h | 1 +
- src/heap.cc | 4 ++
- src/hydrogen-instructions.cc | 5 ++
- src/hydrogen-instructions.h | 21 ++++++++-
- src/hydrogen.cc | 4 ++
- src/ia32/code-stubs-ia32.cc | 5 ++
- src/ia32/full-codegen-ia32.cc | 28 +++++++-----
- src/ia32/lithium-codegen-ia32.cc | 9 ++--
- src/ia32/lithium-ia32.cc | 4 +-
- src/ia32/lithium-ia32.h | 12 +++++-
- src/ia32/macro-assembler-ia32.h | 3 +
- src/mips/code-stubs-mips.cc | 5 ++
- src/mips/full-codegen-mips.cc | 30 ++++++++-----
- src/mips/macro-assembler-mips.h | 5 ++
- src/objects-inl.h | 2 +
- src/objects.h | 7 +++
- src/parser.cc | 28 +++++++++++--
- src/parser.h | 4 +-
- src/prettyprinter.cc | 3 +
- src/runtime.cc | 84 +++++++++++++++++++++++++-------------
- src/runtime.h | 8 ++--
- src/scopeinfo.cc | 28 ++++++++++---
- src/scopeinfo.h | 1 +
- src/scopes.cc | 63 ++++++++++++++++++++++++++++
- src/scopes.h | 8 ++++
- src/variables.cc | 3 +-
- src/variables.h | 5 ++
- src/x64/code-stubs-x64.cc | 4 ++
- src/x64/full-codegen-x64.cc | 28 +++++++-----
- src/x64/lithium-codegen-x64.cc | 9 ++--
- src/x64/lithium-x64.cc | 4 +-
- src/x64/lithium-x64.h | 12 +++++
- src/x64/macro-assembler-x64.h | 5 ++
- 52 files changed, 559 insertions(+), 141 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index 3ef4dd6..193e2fe 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -587,6 +587,11 @@ class ScriptOrigin {
- */
- class V8EXPORT Script {
- public:
-+ enum CompileFlags {
-+ Default = 0x00,
-+ QmlMode = 0x01
-+ };
-+
- /**
- * Compiles the specified script (context-independent).
- *
-@@ -605,7 +610,8 @@ class V8EXPORT Script {
- static Local<Script> New(Handle<String> source,
- ScriptOrigin* origin = NULL,
- ScriptData* pre_data = NULL,
-- Handle<String> script_data = Handle<String>());
-+ Handle<String> script_data = Handle<String>(),
-+ CompileFlags = Default);
-
- /**
- * Compiles the specified script using the specified file name
-@@ -618,7 +624,8 @@ class V8EXPORT Script {
- * will use the currently entered context).
- */
- static Local<Script> New(Handle<String> source,
-- Handle<Value> file_name);
-+ Handle<Value> file_name,
-+ CompileFlags = Default);
-
- /**
- * Compiles the specified script (bound to current context).
-@@ -639,7 +646,8 @@ class V8EXPORT Script {
- static Local<Script> Compile(Handle<String> source,
- ScriptOrigin* origin = NULL,
- ScriptData* pre_data = NULL,
-- Handle<String> script_data = Handle<String>());
-+ Handle<String> script_data = Handle<String>(),
-+ CompileFlags = Default);
-
- /**
- * Compiles the specified script using the specified file name
-@@ -656,7 +664,8 @@ class V8EXPORT Script {
- */
- static Local<Script> Compile(Handle<String> source,
- Handle<Value> file_name,
-- Handle<String> script_data = Handle<String>());
-+ Handle<String> script_data = Handle<String>(),
-+ CompileFlags = Default);
-
- /**
- * Runs the script returning the resulting value. If the script is
-@@ -666,6 +675,7 @@ class V8EXPORT Script {
- * compiled.
- */
- Local<Value> Run();
-+ Local<Value> Run(Handle<Object> qml);
-
- /**
- * Returns the script id value.
-@@ -3506,6 +3516,7 @@ class V8EXPORT Context {
- * JavaScript frames an empty handle is returned.
- */
- static Local<Context> GetCalling();
-+ static Local<Object> GetCallingQmlGlobal();
-
- /**
- * Sets the security token for the context. To access an object in
-diff --git a/src/api.cc b/src/api.cc
-index 7d54252..2d3d97a 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -1514,7 +1514,8 @@ ScriptData* ScriptData::New(const char* data, int length) {
- Local<Script> Script::New(v8::Handle<String> source,
- v8::ScriptOrigin* origin,
- v8::ScriptData* pre_data,
-- v8::Handle<String> script_data) {
-+ v8::Handle<String> script_data,
-+ v8::Script::CompileFlags compile_flags) {
- i::Isolate* isolate = i::Isolate::Current();
- ON_BAILOUT(isolate, "v8::Script::New()", return Local<Script>());
- LOG_API(isolate, "Script::New");
-@@ -1551,7 +1552,8 @@ Local<Script> Script::New(v8::Handle<String> source,
- NULL,
- pre_data_impl,
- Utils::OpenHandle(*script_data),
-- i::NOT_NATIVES_CODE);
-+ i::NOT_NATIVES_CODE,
-+ compile_flags);
- has_pending_exception = result.is_null();
- EXCEPTION_BAILOUT_CHECK(isolate, Local<Script>());
- return Local<Script>(ToApi<Script>(result));
-@@ -1559,21 +1561,23 @@ Local<Script> Script::New(v8::Handle<String> source,
-
-
- Local<Script> Script::New(v8::Handle<String> source,
-- v8::Handle<Value> file_name) {
-+ v8::Handle<Value> file_name,
-+ v8::Script::CompileFlags compile_flags) {
- ScriptOrigin origin(file_name);
-- return New(source, &origin);
-+ return New(source, &origin, 0, Handle<String>(), compile_flags);
- }
-
-
- Local<Script> Script::Compile(v8::Handle<String> source,
- v8::ScriptOrigin* origin,
- v8::ScriptData* pre_data,
-- v8::Handle<String> script_data) {
-+ v8::Handle<String> script_data,
-+ v8::Script::CompileFlags compile_flags) {
- i::Isolate* isolate = i::Isolate::Current();
- ON_BAILOUT(isolate, "v8::Script::Compile()", return Local<Script>());
- LOG_API(isolate, "Script::Compile");
- ENTER_V8(isolate);
-- Local<Script> generic = New(source, origin, pre_data, script_data);
-+ Local<Script> generic = New(source, origin, pre_data, script_data, compile_flags);
- if (generic.IsEmpty())
- return generic;
- i::Handle<i::Object> obj = Utils::OpenHandle(*generic);
-@@ -1589,13 +1593,18 @@ Local<Script> Script::Compile(v8::Handle<String> source,
-
- Local<Script> Script::Compile(v8::Handle<String> source,
- v8::Handle<Value> file_name,
-- v8::Handle<String> script_data) {
-+ v8::Handle<String> script_data,
-+ v8::Script::CompileFlags compile_flags) {
- ScriptOrigin origin(file_name);
-- return Compile(source, &origin, 0, script_data);
-+ return Compile(source, &origin, 0, script_data, compile_flags);
- }
-
-
- Local<Value> Script::Run() {
-+ return Run(Handle<Object>());
-+}
-+
-+Local<Value> Script::Run(Handle<Object> qml) {
- i::Isolate* isolate = i::Isolate::Current();
- ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>());
- LOG_API(isolate, "Script::Run");
-@@ -1614,10 +1623,11 @@ Local<Value> Script::Run() {
- fun = i::Handle<i::JSFunction>(i::JSFunction::cast(*obj), isolate);
- }
- EXCEPTION_PREAMBLE(isolate);
-+ i::Handle<i::Object> qmlglobal = Utils::OpenHandle(*qml);
- i::Handle<i::Object> receiver(
- isolate->context()->global_proxy(), isolate);
- i::Handle<i::Object> result =
-- i::Execution::Call(fun, receiver, 0, NULL, &has_pending_exception);
-+ i::Execution::Call(fun, receiver, 0, NULL, &has_pending_exception, false, qmlglobal);
- EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>());
- raw_result = *result;
- }
-@@ -4337,6 +4347,30 @@ v8::Local<v8::Context> Context::GetCalling() {
- }
-
-
-+v8::Local<v8::Object> Context::GetCallingQmlGlobal() {
-+ i::Isolate* isolate = i::Isolate::Current();
-+ if (IsDeadCheck(isolate, "v8::Context::GetCallingQmlGlobal()")) {
-+ return Local<Object>();
-+ }
-+
-+ i::Context *context = isolate->context();
-+ if (!context->qml_global()->IsUndefined()) {
-+ i::Handle<i::Object> qmlglobal(context->qml_global());
-+ return Utils::ToLocal(i::Handle<i::JSObject>::cast(qmlglobal));
-+ }
-+
-+ i::JavaScriptFrameIterator it;
-+ if (it.done()) return Local<Object>();
-+ context = i::Context::cast(it.frame()->context());
-+ if (!context->qml_global()->IsUndefined()) {
-+ i::Handle<i::Object> qmlglobal(context->qml_global());
-+ return Utils::ToLocal(i::Handle<i::JSObject>::cast(qmlglobal));
-+ } else {
-+ return Local<Object>();
-+ }
-+}
-+
-+
- v8::Local<v8::Object> Context::Global() {
- if (IsDeadCheck(i::Isolate::Current(), "v8::Context::Global()")) {
- return Local<v8::Object>();
-diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
-index cb3bc88..f5be938 100644
---- a/src/arm/code-stubs-arm.cc
-+++ b/src/arm/code-stubs-arm.cc
-@@ -172,6 +172,10 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
- __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
- __ str(r1, MemOperand(r0, Context::SlotOffset(Context::GLOBAL_INDEX)));
-
-+ // Copy the qml global object from the surrounding context.
-+ __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::QML_GLOBAL_INDEX)));
-+ __ str(r1, MemOperand(r0, Context::SlotOffset(Context::QML_GLOBAL_INDEX)));
-+
- // Initialize the rest of the slots to undefined.
- __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
- for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
-diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
-index 497a295..b8e3f30 100644
---- a/src/arm/full-codegen-arm.cc
-+++ b/src/arm/full-codegen-arm.cc
-@@ -182,12 +182,13 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
-
- // Possibly allocate a local context.
- int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment cmnt(masm_, "[ Allocate local context");
- // Argument to NewContext is the function, which is in r1.
- __ push(r1);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -1193,9 +1194,9 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
- __ bind(&fast);
- }
-
-- __ ldr(r0, GlobalObjectOperand());
-+ __ ldr(r0, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ mov(r2, Operand(var->name()));
-- RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
-+ RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF || var->is_qml_global())
- ? RelocInfo::CODE_TARGET
- : RelocInfo::CODE_TARGET_CONTEXT;
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-@@ -1280,10 +1281,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
- Comment cmnt(masm_, "Global variable");
- // Use inline caching. Variable name is passed in r2 and the global
- // object (receiver) in r0.
-- __ ldr(r0, GlobalObjectOperand());
-+ __ ldr(r0, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ mov(r2, Operand(var->name()));
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-- __ Call(ic, RelocInfo::CODE_TARGET_CONTEXT);
-+ __ Call(ic, var->is_qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT);
- context()->Plug(r0);
- break;
- }
-@@ -1920,7 +1921,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
- if (var->IsUnallocated()) {
- // Global var, const, or let.
- __ mov(r2, Operand(var->name()));
-- __ ldr(r1, GlobalObjectOperand());
-+ __ ldr(r1, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- Handle<Code> ic = is_strict_mode()
- ? isolate()->builtins()->StoreIC_Initialize_Strict()
- : isolate()->builtins()->StoreIC_Initialize();
-@@ -2220,10 +2221,13 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(ResolveEvalFlag flag,
- FLAG_harmony_scoping ? kStrictMode : strict_mode_flag();
- __ mov(r1, Operand(Smi::FromInt(strict_mode)));
- __ push(r1);
-+ // Push the qml mode flag.
-+ __ mov(r1, Operand(Smi::FromInt(is_qml_mode())));
-+ __ push(r1);
-
- __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP
- ? Runtime::kResolvePossiblyDirectEvalNoLookup
-- : Runtime::kResolvePossiblyDirectEval, 4);
-+ : Runtime::kResolvePossiblyDirectEval, 5);
- }
-
-
-@@ -2296,9 +2300,9 @@ void FullCodeGenerator::VisitCall(Call* expr) {
- context()->DropAndPlug(1, r0);
- } else if (proxy != NULL && proxy->var()->IsUnallocated()) {
- // Push global object as receiver for the call IC.
-- __ ldr(r0, GlobalObjectOperand());
-+ __ ldr(r0, proxy->var()->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ push(r0);
-- EmitCallWithIC(expr, proxy->name(), RelocInfo::CODE_TARGET_CONTEXT);
-+ EmitCallWithIC(expr, proxy->name(), proxy->var()->is_qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT);
- } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
- // Call to a lookup slot (dynamically introduced variable).
- Label slow, done;
-@@ -3711,7 +3715,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
- // but "delete this" is allowed.
- ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this());
- if (var->IsUnallocated()) {
-- __ ldr(r2, GlobalObjectOperand());
-+ __ ldr(r2, var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ mov(r1, Operand(var->name()));
- __ mov(r0, Operand(Smi::FromInt(kNonStrictMode)));
- __ Push(r2, r1, r0);
-@@ -3997,7 +4001,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
- VariableProxy* proxy = expr->AsVariableProxy();
- if (proxy != NULL && proxy->var()->IsUnallocated()) {
- Comment cmnt(masm_, "Global variable");
-- __ ldr(r0, GlobalObjectOperand());
-+ __ ldr(r0, proxy->var()->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ mov(r2, Operand(proxy->name()));
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
- // Use a regular load, not a contextual load, to avoid a reference
-diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
-index 5197842..943bc82 100644
---- a/src/arm/lithium-arm.cc
-+++ b/src/arm/lithium-arm.cc
-@@ -1128,7 +1128,7 @@ LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
-
- LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
- LOperand* context = UseRegisterAtStart(instr->value());
-- return DefineAsRegister(new LGlobalObject(context));
-+ return DefineAsRegister(new LGlobalObject(context, instr->qml_global()));
- }
-
-
-@@ -1198,7 +1198,7 @@ LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
-
- LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
- argument_count_ -= instr->argument_count();
-- return MarkAsCall(DefineFixed(new LCallGlobal, r0), instr);
-+ return MarkAsCall(DefineFixed(new LCallGlobal(instr->qml_global()), r0), instr);
- }
-
-
-diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h
-index 5733bd0..a7e1704 100644
---- a/src/arm/lithium-arm.h
-+++ b/src/arm/lithium-arm.h
-@@ -1303,13 +1303,17 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> {
-
- class LGlobalObject: public LTemplateInstruction<1, 1, 0> {
- public:
-- explicit LGlobalObject(LOperand* context) {
-+ explicit LGlobalObject(LOperand* context, bool qml_global) {
- inputs_[0] = context;
-+ qml_global_ = qml_global;
- }
-
- DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
-
- LOperand* context() { return InputAt(0); }
-+ bool qml_global() { return qml_global_; }
-+ private:
-+ bool qml_global_;
- };
-
-
-@@ -1396,10 +1400,16 @@ class LCallGlobal: public LTemplateInstruction<1, 0, 0> {
- DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
- DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
-
-+ explicit LCallGlobal(bool qml_global) : qml_global_(qml_global) {}
-+
- virtual void PrintDataTo(StringStream* stream);
-
- Handle<String> name() const {return hydrogen()->name(); }
- int arity() const { return hydrogen()->argument_count() - 1; }
-+
-+ bool qml_global() { return qml_global_; }
-+ private:
-+ bool qml_global_;
- };
-
-
-diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
-index 4cf7df4..2e1e6fa 100644
---- a/src/arm/lithium-codegen-arm.cc
-+++ b/src/arm/lithium-codegen-arm.cc
-@@ -190,12 +190,13 @@ bool LCodeGen::GeneratePrologue() {
-
- // Possibly allocate a local context.
- int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment(";;; Allocate local context");
- // Argument to NewContext is the function, which is in r1.
- __ push(r1);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -2826,7 +2827,7 @@ void LCodeGen::DoOuterContext(LOuterContext* instr) {
-
- void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
- Register result = ToRegister(instr->result());
-- __ ldr(result, ContextOperand(cp, Context::GLOBAL_INDEX));
-+ __ ldr(result, ContextOperand(cp, instr->qml_global()?Context::QML_GLOBAL_INDEX:Context::GLOBAL_INDEX));
- }
-
-
-@@ -3280,7 +3281,7 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
- ASSERT(ToRegister(instr->result()).is(r0));
-
- int arity = instr->arity();
-- RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT;
-+ RelocInfo::Mode mode = instr->qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT;
- Handle<Code> ic =
- isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
- __ mov(r2, Operand(instr->name()));
-diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h
-index 90c4b37..5947e6a 100644
---- a/src/arm/macro-assembler-arm.h
-+++ b/src/arm/macro-assembler-arm.h
-@@ -1326,6 +1326,11 @@ static inline MemOperand GlobalObjectOperand() {
- }
-
-
-+static inline MemOperand QmlGlobalObjectOperand() {
-+ return ContextOperand(cp, Context::QML_GLOBAL_INDEX);
-+}
-+
-+
- #ifdef GENERATED_CODE_COVERAGE
- #define CODE_COVERAGE_STRINGIFY(x) #x
- #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
-diff --git a/src/ast-inl.h b/src/ast-inl.h
-index f8b460d..217c71f 100644
---- a/src/ast-inl.h
-+++ b/src/ast-inl.h
-@@ -126,6 +126,11 @@ StrictModeFlag FunctionLiteral::strict_mode_flag() const {
- }
-
-
-+bool FunctionLiteral::qml_mode() const {
-+ return scope()->is_qml_mode();
-+}
-+
-+
- } } // namespace v8::internal
-
- #endif // V8_AST_INL_H_
-diff --git a/src/ast.cc b/src/ast.cc
-index 9e34bc0..0dc3c1c 100644
---- a/src/ast.cc
-+++ b/src/ast.cc
-@@ -764,6 +764,11 @@ void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle,
- is_monomorphic_ = oracle->CallIsMonomorphic(this);
- Property* property = expression()->AsProperty();
- if (property == NULL) {
-+ if (VariableProxy *proxy = expression()->AsVariableProxy()) {
-+ if (proxy->var()->is_qml_global())
-+ return;
-+ }
-+
- // Function call. Specialize for monomorphic calls.
- if (is_monomorphic_) target_ = oracle->GetCallTarget(this);
- } else {
-diff --git a/src/ast.h b/src/ast.h
-index 3de00ef..8920b50 100644
---- a/src/ast.h
-+++ b/src/ast.h
-@@ -1653,6 +1653,7 @@ class FunctionLiteral: public Expression {
- bool is_anonymous() const { return is_anonymous_; }
- bool strict_mode() const { return strict_mode_flag() == kStrictMode; }
- StrictModeFlag strict_mode_flag() const;
-+ bool qml_mode() const;
-
- int materialized_literal_count() { return materialized_literal_count_; }
- int expected_property_count() { return expected_property_count_; }
-diff --git a/src/code-stubs.h b/src/code-stubs.h
-index fc7000b..4380764 100644
---- a/src/code-stubs.h
-+++ b/src/code-stubs.h
-@@ -326,7 +326,7 @@ class FastNewContextStub : public CodeStub {
- static const int kMaximumSlots = 64;
-
- explicit FastNewContextStub(int slots) : slots_(slots) {
-- ASSERT(slots_ > 0 && slots_ <= kMaximumSlots);
-+ ASSERT(slots_ >= 0 && slots <= kMaximumSlots);
- }
-
- void Generate(MacroAssembler* masm);
-diff --git a/src/compiler.cc b/src/compiler.cc
-index 88db467..4902e72 100644
---- a/src/compiler.cc
-+++ b/src/compiler.cc
-@@ -447,7 +447,8 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
- v8::Extension* extension,
- ScriptDataImpl* input_pre_data,
- Handle<Object> script_data,
-- NativesFlag natives) {
-+ NativesFlag natives,
-+ v8::Script::CompileFlags compile_flags) {
- Isolate* isolate = source->GetIsolate();
- int source_length = source->length();
- isolate->counters()->total_load_size()->Increment(source_length);
-@@ -515,6 +516,7 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
- info.MarkAsGlobal();
- info.SetExtension(extension);
- info.SetPreParseData(pre_data);
-+ if (compile_flags & v8::Script::QmlMode) info.MarkAsQmlMode();
- result = MakeFunctionInfo(&info);
- if (extension == NULL && !result.is_null()) {
- compilation_cache->PutScript(source, result);
-@@ -534,7 +536,8 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
- Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
- Handle<Context> context,
- bool is_global,
-- StrictModeFlag strict_mode) {
-+ StrictModeFlag strict_mode,
-+ bool qml_mode) {
- Isolate* isolate = source->GetIsolate();
- int source_length = source->length();
- isolate->counters()->total_eval_size()->Increment(source_length);
-@@ -559,6 +562,7 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
- info.MarkAsEval();
- if (is_global) info.MarkAsGlobal();
- info.SetStrictModeFlag(strict_mode);
-+ if (qml_mode) info.MarkAsQmlMode();
- info.SetCallingContext(context);
- result = MakeFunctionInfo(&info);
- if (!result.is_null()) {
-@@ -606,6 +610,12 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
- info->SetStrictModeFlag(strict_mode);
- shared->set_strict_mode_flag(strict_mode);
-
-+ // After parsing we know function's qml mode. Remember it.
-+ if (info->function()->qml_mode()) {
-+ shared->set_qml_mode(true);
-+ info->MarkAsQmlMode();
-+ }
-+
- // Compile the code.
- if (!MakeCode(info)) {
- if (!isolate->has_pending_exception()) {
-@@ -751,6 +761,7 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
- *lit->this_property_assignments());
- function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
- function_info->set_strict_mode_flag(lit->strict_mode_flag());
-+ function_info->set_qml_mode(lit->qml_mode());
- function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
- function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
- }
-diff --git a/src/compiler.h b/src/compiler.h
-index bedf5ee..054e3b9 100644
---- a/src/compiler.h
-+++ b/src/compiler.h
-@@ -57,6 +57,7 @@ class CompilationInfo BASE_EMBEDDED {
- return StrictModeFlagField::decode(flags_);
- }
- bool is_in_loop() const { return IsInLoop::decode(flags_); }
-+ bool is_qml_mode() const { return IsQmlMode::decode(flags_); }
- FunctionLiteral* function() const { return function_; }
- Scope* scope() const { return scope_; }
- Handle<Code> code() const { return code_; }
-@@ -85,6 +86,9 @@ class CompilationInfo BASE_EMBEDDED {
- ASSERT(is_lazy());
- flags_ |= IsInLoop::encode(true);
- }
-+ void MarkAsQmlMode() {
-+ flags_ |= IsQmlMode::encode(true);
-+ }
- void MarkAsNative() {
- flags_ |= IsNative::encode(true);
- }
-@@ -192,6 +196,9 @@ class CompilationInfo BASE_EMBEDDED {
- ASSERT(strict_mode_flag() == kNonStrictMode);
- SetStrictModeFlag(shared_info_->strict_mode_flag());
- }
-+ if (!shared_info_.is_null() && shared_info_->qml_mode()) {
-+ MarkAsQmlMode();
-+ }
- }
-
- void SetMode(Mode mode) {
-@@ -218,7 +225,8 @@ class CompilationInfo BASE_EMBEDDED {
- // If compiling for debugging produce just full code matching the
- // initial mode setting.
- class IsCompilingForDebugging: public BitField<bool, 8, 1> {};
--
-+ // Qml mode
-+ class IsQmlMode: public BitField<bool, 9, 1> {};
-
- unsigned flags_;
-
-@@ -283,13 +291,15 @@ class Compiler : public AllStatic {
- v8::Extension* extension,
- ScriptDataImpl* pre_data,
- Handle<Object> script_data,
-- NativesFlag is_natives_code);
-+ NativesFlag is_natives_code,
-+ v8::Script::CompileFlags = v8::Script::Default);
-
- // Compile a String source within a context for Eval.
- static Handle<SharedFunctionInfo> CompileEval(Handle<String> source,
- Handle<Context> context,
- bool is_global,
-- StrictModeFlag strict_mode);
-+ StrictModeFlag strict_mode,
-+ bool qml_mode);
-
- // Compile from function info (used for lazy compilation). Returns true on
- // success and false if the compilation resulted in a stack overflow.
-diff --git a/src/contexts.cc b/src/contexts.cc
-index b25ffac..3129af0 100644
---- a/src/contexts.cc
-+++ b/src/contexts.cc
-@@ -103,6 +103,9 @@ Handle<Object> Context::Lookup(Handle<String> name,
- PrintF(")\n");
- }
-
-+ Handle<JSObject> qml_global;
-+ Handle<JSObject> qml_global_global;
-+
- do {
- if (FLAG_trace_contexts) {
- PrintF(" - looking in context %p", reinterpret_cast<void*>(*context));
-@@ -110,6 +113,11 @@ Handle<Object> Context::Lookup(Handle<String> name,
- PrintF("\n");
- }
-
-+ if (qml_global.is_null() && !context->qml_global()->IsUndefined()) {
-+ qml_global = Handle<JSObject>(context->qml_global(), isolate);
-+ qml_global_global = Handle<JSObject>(context->global(), isolate);
-+ }
-+
- // 1. Check global objects, subjects of with, and extension objects.
- if (context->IsGlobalContext() ||
- context->IsWithContext() ||
-@@ -228,6 +236,33 @@ Handle<Object> Context::Lookup(Handle<String> name,
- }
- } while (follow_context_chain);
-
-+ if (!qml_global.is_null()) {
-+ if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0) {
-+ *attributes = qml_global_global->GetLocalPropertyAttribute(*name);
-+ } else {
-+ *attributes = qml_global_global->GetPropertyAttribute(*name);
-+ }
-+
-+ if (*attributes != ABSENT) {
-+ *attributes = ABSENT;
-+ } else {
-+ if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0) {
-+ *attributes = qml_global->GetLocalPropertyAttribute(*name);
-+ } else {
-+ *attributes = qml_global->GetPropertyAttribute(*name);
-+ }
-+
-+ if (*attributes != ABSENT) {
-+ // property found
-+ if (FLAG_trace_contexts) {
-+ PrintF("=> found property in qml global object %p\n",
-+ reinterpret_cast<void*>(*qml_global));
-+ }
-+ return qml_global;
-+ }
-+ }
-+ }
-+
- if (FLAG_trace_contexts) {
- PrintF("=> no property/slot found\n");
- }
-diff --git a/src/contexts.h b/src/contexts.h
-index 7021ff8..c3cfeee 100644
---- a/src/contexts.h
-+++ b/src/contexts.h
-@@ -218,6 +218,7 @@ class Context: public FixedArray {
- // (with contexts), or the variable name (catch contexts), the serialized
- // scope info (block contexts).
- EXTENSION_INDEX,
-+ QML_GLOBAL_INDEX,
- GLOBAL_INDEX,
- MIN_CONTEXT_SLOTS,
-
-@@ -321,6 +322,9 @@ class Context: public FixedArray {
- }
- void set_global(GlobalObject* global) { set(GLOBAL_INDEX, global); }
-
-+ JSObject *qml_global() { return reinterpret_cast<JSObject *>(get(QML_GLOBAL_INDEX)); }
-+ void set_qml_global(JSObject *qml_global) { set(QML_GLOBAL_INDEX, qml_global); }
-+
- // Returns a JSGlobalProxy object or null.
- JSObject* global_proxy();
- void set_global_proxy(JSObject* global);
-diff --git a/src/execution.cc b/src/execution.cc
-index 29955fa..4261ac2 100644
---- a/src/execution.cc
-+++ b/src/execution.cc
-@@ -71,7 +71,8 @@ static Handle<Object> Invoke(bool is_construct,
- Handle<Object> receiver,
- int argc,
- Handle<Object> args[],
-- bool* has_pending_exception) {
-+ bool* has_pending_exception,
-+ Handle<Object> qml) {
- Isolate* isolate = function->GetIsolate();
-
- // Entering JavaScript.
-@@ -102,6 +103,12 @@ static Handle<Object> Invoke(bool is_construct,
- // make the current one is indeed a global object.
- ASSERT(function->context()->global()->IsGlobalObject());
-
-+ Handle<JSObject> oldqml;
-+ if (!qml.is_null()) {
-+ oldqml = Handle<JSObject>(function->context()->qml_global());
-+ function->context()->set_qml_global(JSObject::cast(*qml));
-+ }
-+
- {
- // Save and restore context around invocation and block the
- // allocation of handles without explicit handle scopes.
-@@ -118,6 +125,9 @@ static Handle<Object> Invoke(bool is_construct,
- CALL_GENERATED_CODE(stub_entry, function_entry, func, recv, argc, argv);
- }
-
-+ if (!qml.is_null())
-+ function->context()->set_qml_global(*oldqml);
-+
- #ifdef DEBUG
- value->Verify();
- #endif
-@@ -146,7 +156,18 @@ Handle<Object> Execution::Call(Handle<Object> callable,
- int argc,
- Handle<Object> argv[],
- bool* pending_exception,
-- bool convert_receiver) {
-+ bool convert_receiver)
-+{
-+ return Call(callable, receiver, argc, argv, pending_exception, convert_receiver, Handle<Object>());
-+}
-+
-+Handle<Object> Execution::Call(Handle<Object> callable,
-+ Handle<Object> receiver,
-+ int argc,
-+ Handle<Object> argv[],
-+ bool* pending_exception,
-+ bool convert_receiver,
-+ Handle<Object> qml) {
- *pending_exception = false;
-
- if (!callable->IsJSFunction()) {
-@@ -170,7 +191,7 @@ Handle<Object> Execution::Call(Handle<Object> callable,
- if (*pending_exception) return callable;
- }
-
-- return Invoke(false, func, receiver, argc, argv, pending_exception);
-+ return Invoke(false, func, receiver, argc, argv, pending_exception, qml);
- }
-
-
-@@ -179,7 +200,7 @@ Handle<Object> Execution::New(Handle<JSFunction> func,
- Handle<Object> argv[],
- bool* pending_exception) {
- return Invoke(true, func, Isolate::Current()->global(), argc, argv,
-- pending_exception);
-+ pending_exception, Handle<Object>());
- }
-
-
-@@ -198,7 +219,7 @@ Handle<Object> Execution::TryCall(Handle<JSFunction> func,
- *caught_exception = false;
-
- Handle<Object> result = Invoke(false, func, receiver, argc, args,
-- caught_exception);
-+ caught_exception, Handle<Object>());
-
- if (*caught_exception) {
- ASSERT(catcher.HasCaught());
-diff --git a/src/execution.h b/src/execution.h
-index f2d17d0..532e5d8 100644
---- a/src/execution.h
-+++ b/src/execution.h
-@@ -65,6 +65,14 @@ class Execution : public AllStatic {
- bool* pending_exception,
- bool convert_receiver = false);
-
-+ static Handle<Object> Call(Handle<Object> callable,
-+ Handle<Object> receiver,
-+ int argc,
-+ Handle<Object> argv[],
-+ bool* pending_exception,
-+ bool convert_receiver,
-+ Handle<Object> qml);
-+
- // Construct object from function, the caller supplies an array of
- // arguments. Arguments are Object* type. After function returns,
- // pointers in 'args' might be invalid.
-diff --git a/src/full-codegen.cc b/src/full-codegen.cc
-index 27c509f..f099d25 100644
---- a/src/full-codegen.cc
-+++ b/src/full-codegen.cc
-@@ -513,7 +513,7 @@ void FullCodeGenerator::VisitDeclarations(
- // Batch declare global functions and variables.
- if (global_count > 0) {
- Handle<FixedArray> array =
-- isolate()->factory()->NewFixedArray(2 * global_count, TENURED);
-+ isolate()->factory()->NewFixedArray(3 * global_count, TENURED);
- for (int j = 0, i = 0; i < length; i++) {
- Declaration* decl = declarations->at(i);
- Variable* var = decl->proxy()->var();
-@@ -537,6 +537,7 @@ void FullCodeGenerator::VisitDeclarations(
- }
- array->set(j++, *function);
- }
-+ array->set(j++, Smi::FromInt(var->is_qml_global()));
- }
- }
- // Invoke the platform-dependent code generator to do the actual
-diff --git a/src/full-codegen.h b/src/full-codegen.h
-index 9132502..78e6089 100644
---- a/src/full-codegen.h
-+++ b/src/full-codegen.h
-@@ -583,6 +583,7 @@ class FullCodeGenerator: public AstVisitor {
- StrictModeFlag strict_mode_flag() {
- return function()->strict_mode_flag();
- }
-+ bool is_qml_mode() { return function()->qml_mode(); }
- FunctionLiteral* function() { return info_->function(); }
- Scope* scope() { return scope_; }
-
-diff --git a/src/heap.cc b/src/heap.cc
-index 53a0f27..881a876 100644
---- a/src/heap.cc
-+++ b/src/heap.cc
-@@ -4355,6 +4355,7 @@ MaybeObject* Heap::AllocateFunctionContext(int length, JSFunction* function) {
- context->set_previous(function->context());
- context->set_extension(NULL);
- context->set_global(function->context()->global());
-+ context->set_qml_global(function->context()->qml_global());
- return context;
- }
-
-@@ -4375,6 +4376,7 @@ MaybeObject* Heap::AllocateCatchContext(JSFunction* function,
- context->set_previous(previous);
- context->set_extension(name);
- context->set_global(previous->global());
-+ context->set_qml_global(previous->qml_global());
- context->set(Context::THROWN_OBJECT_INDEX, thrown_object);
- return context;
- }
-@@ -4393,6 +4395,7 @@ MaybeObject* Heap::AllocateWithContext(JSFunction* function,
- context->set_previous(previous);
- context->set_extension(extension);
- context->set_global(previous->global());
-+ context->set_qml_global(previous->qml_global());
- return context;
- }
-
-@@ -4411,6 +4414,7 @@ MaybeObject* Heap::AllocateBlockContext(JSFunction* function,
- context->set_previous(previous);
- context->set_extension(scope_info);
- context->set_global(previous->global());
-+ context->set_qml_global(previous->qml_global());
- return context;
- }
-
-diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
-index 6f46509..ac9728c 100644
---- a/src/hydrogen-instructions.cc
-+++ b/src/hydrogen-instructions.cc
-@@ -655,6 +655,11 @@ void HCallNamed::PrintDataTo(StringStream* stream) {
- }
-
-
-+void HGlobalObject::PrintDataTo(StringStream* stream) {
-+ stream->Add("qml_global: %s ", qml_global()?"true":"false");
-+ HUnaryOperation::PrintDataTo(stream);
-+}
-+
- void HCallGlobal::PrintDataTo(StringStream* stream) {
- stream->Add("%o ", *name());
- HUnaryCall::PrintDataTo(stream);
-diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
-index 65fc4df..ebf0030 100644
---- a/src/hydrogen-instructions.h
-+++ b/src/hydrogen-instructions.h
-@@ -1410,19 +1410,30 @@ class HOuterContext: public HUnaryOperation {
-
- class HGlobalObject: public HUnaryOperation {
- public:
-- explicit HGlobalObject(HValue* context) : HUnaryOperation(context) {
-+ explicit HGlobalObject(HValue* context) : HUnaryOperation(context), qml_global_(false) {
- set_representation(Representation::Tagged());
- SetFlag(kUseGVN);
- }
-
-+ virtual void PrintDataTo(StringStream* stream);
-+
- DECLARE_CONCRETE_INSTRUCTION(GlobalObject)
-
- virtual Representation RequiredInputRepresentation(int index) {
- return Representation::Tagged();
- }
-
-+ bool qml_global() { return qml_global_; }
-+ void set_qml_global(bool v) { qml_global_ = v; }
-+
- protected:
-- virtual bool DataEquals(HValue* other) { return true; }
-+ virtual bool DataEquals(HValue* other) {
-+ HGlobalObject* o = HGlobalObject::cast(other);
-+ return o->qml_global_ == qml_global_;
-+ }
-+
-+ private:
-+ bool qml_global_;
- };
-
-
-@@ -1601,7 +1612,7 @@ class HCallFunction: public HUnaryCall {
- class HCallGlobal: public HUnaryCall {
- public:
- HCallGlobal(HValue* context, Handle<String> name, int argument_count)
-- : HUnaryCall(context, argument_count), name_(name) {
-+ : HUnaryCall(context, argument_count), name_(name), qml_global_(false) {
- }
-
- virtual void PrintDataTo(StringStream* stream);
-@@ -1613,10 +1624,14 @@ class HCallGlobal: public HUnaryCall {
- return Representation::Tagged();
- }
-
-+ bool qml_global() { return qml_global_; }
-+ void set_qml_global(bool v) { qml_global_ = v; }
-+
- DECLARE_CONCRETE_INSTRUCTION(CallGlobal)
-
- private:
- Handle<String> name_;
-+ bool qml_global_;
- };
-
-
-diff --git a/src/hydrogen.cc b/src/hydrogen.cc
-index 3a4d172..0a7fad1 100644
---- a/src/hydrogen.cc
-+++ b/src/hydrogen.cc
-@@ -3185,6 +3185,7 @@ void HGraphBuilder::VisitVariableProxy(VariableProxy* expr) {
- } else {
- HValue* context = environment()->LookupContext();
- HGlobalObject* global_object = new(zone()) HGlobalObject(context);
-+ if (variable->is_qml_global()) global_object->set_qml_global(true);
- AddInstruction(global_object);
- HLoadGlobalGeneric* instr =
- new(zone()) HLoadGlobalGeneric(context,
-@@ -3644,6 +3645,7 @@ void HGraphBuilder::HandleGlobalVariableAssignment(Variable* var,
- } else {
- HValue* context = environment()->LookupContext();
- HGlobalObject* global_object = new(zone()) HGlobalObject(context);
-+ if (var->is_qml_global()) global_object->set_qml_global(true);
- AddInstruction(global_object);
- HStoreGlobalGeneric* instr =
- new(zone()) HStoreGlobalGeneric(context,
-@@ -5106,11 +5108,13 @@ void HGraphBuilder::VisitCall(Call* expr) {
- } else {
- HValue* context = environment()->LookupContext();
- HGlobalObject* receiver = new(zone()) HGlobalObject(context);
-+ if (var->is_qml_global()) receiver->set_qml_global(true);
- AddInstruction(receiver);
- PushAndAdd(new(zone()) HPushArgument(receiver));
- CHECK_ALIVE(VisitArgumentList(expr->arguments()));
-
- call = new(zone()) HCallGlobal(context, var->name(), argument_count);
-+ if (var->is_qml_global()) static_cast<HCallGlobal*>(call)->set_qml_global(true);
- Drop(argument_count);
- }
-
-diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
-index 37b519a..8a94a06 100644
---- a/src/ia32/code-stubs-ia32.cc
-+++ b/src/ia32/code-stubs-ia32.cc
-@@ -144,6 +144,11 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
- __ mov(ebx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
- __ mov(Operand(eax, Context::SlotOffset(Context::GLOBAL_INDEX)), ebx);
-
-+ // Copy the qml global object from the previous context.
-+ __ mov(ebx, Operand(esi, Context::SlotOffset(Context::QML_GLOBAL_INDEX)));
-+ __ mov(Operand(eax, Context::SlotOffset(Context::QML_GLOBAL_INDEX)), ebx);
-+
-+
- // Initialize the rest of the slots to undefined.
- __ mov(ebx, factory->undefined_value());
- for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
-diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
-index 25588c8..9cee4a3 100644
---- a/src/ia32/full-codegen-ia32.cc
-+++ b/src/ia32/full-codegen-ia32.cc
-@@ -178,12 +178,13 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
-
- // Possibly allocate a local context.
- int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment cmnt(masm_, "[ Allocate local context");
- // Argument to NewContext is the function, which is still in edi.
- __ push(edi);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -1179,10 +1180,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
-
- // All extension objects were empty and it is safe to use a global
- // load IC call.
-- __ mov(eax, GlobalObjectOperand());
-+ __ mov(eax, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ mov(ecx, var->name());
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-- RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
-+ RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF || var->is_qml_global())
- ? RelocInfo::CODE_TARGET
- : RelocInfo::CODE_TARGET_CONTEXT;
- __ call(ic, mode);
-@@ -1263,10 +1264,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
- Comment cmnt(masm_, "Global variable");
- // Use inline caching. Variable name is passed in ecx and the global
- // object in eax.
-- __ mov(eax, GlobalObjectOperand());
-+ __ mov(eax, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ mov(ecx, var->name());
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-- __ call(ic, RelocInfo::CODE_TARGET_CONTEXT);
-+ __ call(ic, var->is_qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT);
- context()->Plug(eax);
- break;
- }
-@@ -1920,7 +1921,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
- if (var->IsUnallocated()) {
- // Global var, const, or let.
- __ mov(ecx, var->name());
-- __ mov(edx, GlobalObjectOperand());
-+ __ mov(edx, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- Handle<Code> ic = is_strict_mode()
- ? isolate()->builtins()->StoreIC_Initialize_Strict()
- : isolate()->builtins()->StoreIC_Initialize();
-@@ -2235,9 +2236,12 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(ResolveEvalFlag flag,
- FLAG_harmony_scoping ? kStrictMode : strict_mode_flag();
- __ push(Immediate(Smi::FromInt(strict_mode)));
-
-+ // Push the qml mode flag
-+ __ push(Immediate(Smi::FromInt(is_qml_mode())));
-+
- __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP
- ? Runtime::kResolvePossiblyDirectEvalNoLookup
-- : Runtime::kResolvePossiblyDirectEval, 4);
-+ : Runtime::kResolvePossiblyDirectEval, 5);
- }
-
-
-@@ -2308,9 +2312,9 @@ void FullCodeGenerator::VisitCall(Call* expr) {
-
- } else if (proxy != NULL && proxy->var()->IsUnallocated()) {
- // Push global object as receiver for the call IC.
-- __ push(GlobalObjectOperand());
-+ __ push(proxy->var()->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- increment_stack_height();
-- EmitCallWithIC(expr, proxy->name(), RelocInfo::CODE_TARGET_CONTEXT);
-+ EmitCallWithIC(expr, proxy->name(), proxy->var()->is_qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT);
-
- } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
- // Call to a lookup slot (dynamically introduced variable).
-@@ -3777,7 +3781,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
- // but "delete this" is allowed.
- ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this());
- if (var->IsUnallocated()) {
-- __ push(GlobalObjectOperand());
-+ __ push(var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ push(Immediate(var->name()));
- __ push(Immediate(Smi::FromInt(kNonStrictMode)));
- __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
-@@ -4085,7 +4089,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
-
- if (proxy != NULL && proxy->var()->IsUnallocated()) {
- Comment cmnt(masm_, "Global variable");
-- __ mov(eax, GlobalObjectOperand());
-+ __ mov(eax, proxy->var()->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ mov(ecx, Immediate(proxy->name()));
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
- // Use a regular load, not a contextual load, to avoid a reference
-diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
-index d4cbbce..b381227 100644
---- a/src/ia32/lithium-codegen-ia32.cc
-+++ b/src/ia32/lithium-codegen-ia32.cc
-@@ -211,12 +211,13 @@ bool LCodeGen::GeneratePrologue() {
-
- // Possibly allocate a local context.
- int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment(";;; Allocate local context");
- // Argument to NewContext is the function, which is still in edi.
- __ push(edi);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -2661,7 +2662,7 @@ void LCodeGen::DoOuterContext(LOuterContext* instr) {
- void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
- Register context = ToRegister(instr->context());
- Register result = ToRegister(instr->result());
-- __ mov(result, Operand(context, Context::SlotOffset(Context::GLOBAL_INDEX)));
-+ __ mov(result, Operand(context, Context::SlotOffset(instr->qml_global()?Context::QML_GLOBAL_INDEX:Context::GLOBAL_INDEX)));
- }
-
-
-@@ -3131,7 +3132,7 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
- ASSERT(ToRegister(instr->result()).is(eax));
-
- int arity = instr->arity();
-- RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT;
-+ RelocInfo::Mode mode = instr->qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT;
- Handle<Code> ic =
- isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
- __ mov(ecx, instr->name());
-diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
-index 626f899..d09d55f 100644
---- a/src/ia32/lithium-ia32.cc
-+++ b/src/ia32/lithium-ia32.cc
-@@ -1144,7 +1144,7 @@ LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
-
- LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
- LOperand* context = UseRegisterAtStart(instr->value());
-- return DefineAsRegister(new LGlobalObject(context));
-+ return DefineAsRegister(new LGlobalObject(context, instr->qml_global()));
- }
-
-
-@@ -1228,7 +1228,7 @@ LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
- LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
- LOperand* context = UseFixed(instr->context(), esi);
- argument_count_ -= instr->argument_count();
-- LCallGlobal* result = new LCallGlobal(context);
-+ LCallGlobal* result = new LCallGlobal(context, instr->qml_global());
- return MarkAsCall(DefineFixed(result, eax), instr);
- }
-
-diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h
-index 5f23afa..22541c8 100644
---- a/src/ia32/lithium-ia32.h
-+++ b/src/ia32/lithium-ia32.h
-@@ -1338,13 +1338,17 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> {
-
- class LGlobalObject: public LTemplateInstruction<1, 1, 0> {
- public:
-- explicit LGlobalObject(LOperand* context) {
-+ explicit LGlobalObject(LOperand* context, bool qml_global) {
- inputs_[0] = context;
-+ qml_global_ = qml_global;
- }
-
- DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
-
- LOperand* context() { return InputAt(0); }
-+ bool qml_global() { return qml_global_; }
-+ private:
-+ bool qml_global_;
- };
-
-
-@@ -1443,7 +1447,7 @@ class LCallFunction: public LTemplateInstruction<1, 1, 0> {
-
- class LCallGlobal: public LTemplateInstruction<1, 1, 0> {
- public:
-- explicit LCallGlobal(LOperand* context) {
-+ explicit LCallGlobal(LOperand* context, bool qml_global) : qml_global_(qml_global) {
- inputs_[0] = context;
- }
-
-@@ -1455,6 +1459,10 @@ class LCallGlobal: public LTemplateInstruction<1, 1, 0> {
- LOperand* context() { return inputs_[0]; }
- Handle<String> name() const {return hydrogen()->name(); }
- int arity() const { return hydrogen()->argument_count() - 1; }
-+
-+ bool qml_global() { return qml_global_; }
-+ private:
-+ bool qml_global_;
- };
-
-
-diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h
-index 8528c55..de3c3a0 100644
---- a/src/ia32/macro-assembler-ia32.h
-+++ b/src/ia32/macro-assembler-ia32.h
-@@ -935,6 +935,9 @@ static inline Operand GlobalObjectOperand() {
- return ContextOperand(esi, Context::GLOBAL_INDEX);
- }
-
-+static inline Operand QmlGlobalObjectOperand() {
-+ return ContextOperand(esi, Context::QML_GLOBAL_INDEX);
-+}
-
- // Generates an Operand for saving parameters after PrepareCallApiFunction.
- Operand ApiParameterOperand(int index);
-diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
-index 85e929d..a534b78 100644
---- a/src/mips/code-stubs-mips.cc
-+++ b/src/mips/code-stubs-mips.cc
-@@ -173,6 +173,11 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
- __ lw(a1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
- __ sw(a1, MemOperand(v0, Context::SlotOffset(Context::GLOBAL_INDEX)));
-
-+ // Copy the qml global object from the surrounding context.
-+ __ lw(a1, MemOperand(cp, Context::SlotOffset(Context::QML_GLOBAL_INDEX)));
-+ __ sw(a1, MemOperand(v0, Context::SlotOffset(Context::QML_GLOBAL_INDEX)));
-+
-+
- // Initialize the rest of the slots to undefined.
- __ LoadRoot(a1, Heap::kUndefinedValueRootIndex);
- for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
-diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
-index 2f989bc..b6bd407 100644
---- a/src/mips/full-codegen-mips.cc
-+++ b/src/mips/full-codegen-mips.cc
-@@ -191,12 +191,13 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
-
- // Possibly allocate a local context.
- int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment cmnt(masm_, "[ Allocate local context");
- // Argument to NewContext is the function, which is in a1.
- __ push(a1);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -1199,9 +1200,9 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
- __ bind(&fast);
- }
-
-- __ lw(a0, GlobalObjectOperand());
-+ __ lw(a0, var->is_qml_global() ? QmlGlobalObjectOperand():GlobalObjectOperand());
- __ li(a2, Operand(var->name()));
-- RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
-+ RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF || var->is_qml_global())
- ? RelocInfo::CODE_TARGET
- : RelocInfo::CODE_TARGET_CONTEXT;
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-@@ -1286,10 +1287,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
- Comment cmnt(masm_, "Global variable");
- // Use inline caching. Variable name is passed in a2 and the global
- // object (receiver) in a0.
-- __ lw(a0, GlobalObjectOperand());
-+ __ lw(a0, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ li(a2, Operand(var->name()));
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-- __ Call(ic, RelocInfo::CODE_TARGET_CONTEXT);
-+ __ Call(ic, var->is_qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT);
- context()->Plug(v0);
- break;
- }
-@@ -1937,7 +1938,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
- // Global var, const, or let.
- __ mov(a0, result_register());
- __ li(a2, Operand(var->name()));
-- __ lw(a1, GlobalObjectOperand());
-+ __ lw(a1, var->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- Handle<Code> ic = is_strict_mode()
- ? isolate()->builtins()->StoreIC_Initialize_Strict()
- : isolate()->builtins()->StoreIC_Initialize();
-@@ -2246,9 +2247,14 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(ResolveEvalFlag flag,
- __ li(a1, Operand(Smi::FromInt(strict_mode)));
- __ push(a1);
-
-+
-+ // Push the qml mode flag.
-+ __ li(a1, Operand(Smi::FromInt(is_qml_mode())));
-+ __ push(a1);
-+
- __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP
- ? Runtime::kResolvePossiblyDirectEvalNoLookup
-- : Runtime::kResolvePossiblyDirectEval, 4);
-+ : Runtime::kResolvePossiblyDirectEval, 5);
- }
-
-
-@@ -2320,9 +2326,9 @@ void FullCodeGenerator::VisitCall(Call* expr) {
- context()->DropAndPlug(1, v0);
- } else if (proxy != NULL && proxy->var()->IsUnallocated()) {
- // Push global object as receiver for the call IC.
-- __ lw(a0, GlobalObjectOperand());
-+ __ lw(a0, proxy->var()->is_qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- __ push(a0);
-- EmitCallWithIC(expr, proxy->name(), RelocInfo::CODE_TARGET_CONTEXT);
-+ EmitCallWithIC(expr, proxy->name(), proxy->var()->is_qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT);
- } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
- // Call to a lookup slot (dynamically introduced variable).
- Label slow, done;
-@@ -3743,7 +3749,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
- // but "delete this" is allowed.
- ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this());
- if (var->IsUnallocated()) {
-- __ lw(a2, GlobalObjectOperand());
-+ __ lw(a2, var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ li(a1, Operand(var->name()));
- __ li(a0, Operand(Smi::FromInt(kNonStrictMode)));
- __ Push(a2, a1, a0);
-@@ -4032,7 +4038,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
- VariableProxy* proxy = expr->AsVariableProxy();
- if (proxy != NULL && proxy->var()->IsUnallocated()) {
- Comment cmnt(masm_, "Global variable");
-- __ lw(a0, GlobalObjectOperand());
-+ __ lw(a0, proxy->var()->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ li(a2, Operand(proxy->name()));
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
- // Use a regular load, not a contextual load, to avoid a reference
-diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h
-index 84c55f7..5224db9 100644
---- a/src/mips/macro-assembler-mips.h
-+++ b/src/mips/macro-assembler-mips.h
-@@ -112,6 +112,11 @@ static inline MemOperand GlobalObjectOperand() {
- }
-
-
-+static inline MemOperand QmlGlobalObjectOperand() {
-+ return ContextOperand(cp, Context::QML_GLOBAL_INDEX);
-+}
-+
-+
- // Generate a MemOperand for loading a field from an object.
- static inline MemOperand FieldMemOperand(Register object, int offset) {
- return MemOperand(object, offset - kHeapObjectTag);
-diff --git a/src/objects-inl.h b/src/objects-inl.h
-index 6a80c9c..2e83fb7 100644
---- a/src/objects-inl.h
-+++ b/src/objects-inl.h
-@@ -3535,6 +3535,8 @@ void SharedFunctionInfo::set_strict_mode_flag(StrictModeFlag strict_mode_flag) {
-
- BOOL_GETTER(SharedFunctionInfo, compiler_hints, strict_mode,
- kStrictModeFunction)
-+BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, qml_mode,
-+ kQmlModeFunction)
- BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative)
- BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
- name_should_print_as_anonymous,
-diff --git a/src/objects.h b/src/objects.h
-index c38d461..b71eaac 100644
---- a/src/objects.h
-+++ b/src/objects.h
-@@ -3120,6 +3120,9 @@ class SerializedScopeInfo : public FixedArray {
- // Is this scope a strict mode scope?
- bool IsStrictMode();
-
-+ // Is this scope a qml mode scope?
-+ bool IsQmlMode();
-+
- // Return the number of stack slots for code.
- int NumberOfStackSlots();
-
-@@ -4929,6 +4932,9 @@ class SharedFunctionInfo: public HeapObject {
- inline StrictModeFlag strict_mode_flag();
- inline void set_strict_mode_flag(StrictModeFlag strict_mode_flag);
-
-+ // Indicates whether the function is a qml mode function.
-+ DECL_BOOLEAN_ACCESSORS(qml_mode)
-+
- // False if the function definitely does not allocate an arguments object.
- DECL_BOOLEAN_ACCESSORS(uses_arguments)
-
-@@ -5150,6 +5156,7 @@ class SharedFunctionInfo: public HeapObject {
- kCodeAgeShift,
- kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize,
- kStrictModeFunction,
-+ kQmlModeFunction,
- kUsesArguments,
- kHasDuplicateParameters,
- kNative,
-diff --git a/src/parser.cc b/src/parser.cc
-index 37204c9..357d340 100644
---- a/src/parser.cc
-+++ b/src/parser.cc
-@@ -607,7 +607,8 @@ Parser::Parser(Handle<Script> script,
-
- FunctionLiteral* Parser::ParseProgram(Handle<String> source,
- bool in_global_context,
-- StrictModeFlag strict_mode) {
-+ StrictModeFlag strict_mode,
-+ bool qml_mode) {
- ZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);
-
- HistogramTimerScope timer(isolate()->counters()->parse());
-@@ -623,11 +624,11 @@ FunctionLiteral* Parser::ParseProgram(Handle<String> source,
- ExternalTwoByteStringUC16CharacterStream stream(
- Handle<ExternalTwoByteString>::cast(source), 0, source->length());
- scanner_.Initialize(&stream);
-- return DoParseProgram(source, in_global_context, strict_mode, &zone_scope);
-+ return DoParseProgram(source, in_global_context, strict_mode, qml_mode, &zone_scope);
- } else {
- GenericStringUC16CharacterStream stream(source, 0, source->length());
- scanner_.Initialize(&stream);
-- return DoParseProgram(source, in_global_context, strict_mode, &zone_scope);
-+ return DoParseProgram(source, in_global_context, strict_mode, qml_mode, &zone_scope);
- }
- }
-
-@@ -635,6 +636,7 @@ FunctionLiteral* Parser::ParseProgram(Handle<String> source,
- FunctionLiteral* Parser::DoParseProgram(Handle<String> source,
- bool in_global_context,
- StrictModeFlag strict_mode,
-+ bool qml_mode,
- ZoneScope* zone_scope) {
- ASSERT(top_scope_ == NULL);
- ASSERT(target_stack_ == NULL);
-@@ -654,6 +656,9 @@ FunctionLiteral* Parser::DoParseProgram(Handle<String> source,
- LexicalScope lexical_scope(this, scope, isolate());
- ASSERT(top_scope_->strict_mode_flag() == kNonStrictMode);
- top_scope_->SetStrictModeFlag(strict_mode);
-+ if (qml_mode) {
-+ scope->EnableQmlMode();
-+ }
- ZoneList<Statement*>* body = new(zone()) ZoneList<Statement*>(16);
- bool ok = true;
- int beg_loc = scanner().location().beg_pos;
-@@ -747,6 +752,10 @@ FunctionLiteral* Parser::ParseLazy(CompilationInfo* info,
- scope->strict_mode_flag() == info->strict_mode_flag());
- ASSERT(info->strict_mode_flag() == shared_info->strict_mode_flag());
- scope->SetStrictModeFlag(shared_info->strict_mode_flag());
-+ if (shared_info->qml_mode()) {
-+ top_scope_->EnableQmlMode();
-+ }
-+
- FunctionLiteral::Type type = shared_info->is_expression()
- ? (shared_info->is_anonymous()
- ? FunctionLiteral::ANONYMOUS_EXPRESSION
-@@ -1856,6 +1865,11 @@ Block* Parser::ParseVariableDeclarations(
- arguments->Add(value);
- value = NULL; // zap the value to avoid the unnecessary assignment
-
-+ int qml_mode = 0;
-+ if (top_scope_->is_qml_mode() && !Isolate::Current()->global()->HasProperty(*name))
-+ qml_mode = 1;
-+ arguments->Add(NewNumberLiteral(qml_mode));
-+
- // Construct the call to Runtime_InitializeConstGlobal
- // and add it to the initialization statement block.
- // Note that the function does different things depending on
-@@ -1872,6 +1886,11 @@ Block* Parser::ParseVariableDeclarations(
- StrictModeFlag flag = initialization_scope->strict_mode_flag();
- arguments->Add(NewNumberLiteral(flag));
-
-+ int qml_mode = 0;
-+ if (top_scope_->is_qml_mode() && !Isolate::Current()->global()->HasProperty(*name))
-+ qml_mode = 1;
-+ arguments->Add(NewNumberLiteral(qml_mode));
-+
- // Be careful not to assign a value to the global variable if
- // we're in a with. The initialization value should not
- // necessarily be stored in the global object in that case,
-@@ -5418,7 +5437,8 @@ bool ParserApi::Parse(CompilationInfo* info) {
- Handle<String> source = Handle<String>(String::cast(script->source()));
- result = parser.ParseProgram(source,
- info->is_global(),
-- info->strict_mode_flag());
-+ info->strict_mode_flag(),
-+ info->is_qml_mode());
- }
- }
- info->SetFunction(result);
-diff --git a/src/parser.h b/src/parser.h
-index eaae6f7..a60951d 100644
---- a/src/parser.h
-+++ b/src/parser.h
-@@ -430,7 +430,8 @@ class Parser {
- // Returns NULL if parsing failed.
- FunctionLiteral* ParseProgram(Handle<String> source,
- bool in_global_context,
-- StrictModeFlag strict_mode);
-+ StrictModeFlag strict_mode,
-+ bool qml_mode = false);
-
- FunctionLiteral* ParseLazy(CompilationInfo* info);
-
-@@ -476,6 +477,7 @@ class Parser {
- FunctionLiteral* DoParseProgram(Handle<String> source,
- bool in_global_context,
- StrictModeFlag strict_mode,
-+ bool qml_mode,
- ZoneScope* zone_scope);
-
- // Report syntax error
-diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
-index 37c76ce..73812fd 100644
---- a/src/prettyprinter.cc
-+++ b/src/prettyprinter.cc
-@@ -618,6 +618,9 @@ void AstPrinter::PrintLiteralWithModeIndented(const char* info,
- EmbeddedVector<char, 256> buf;
- int pos = OS::SNPrintF(buf, "%s (mode = %s", info,
- Variable::Mode2String(var->mode()));
-+ if (var->is_qml_global()) {
-+ pos += OS::SNPrintF(buf + pos, ":QML");
-+ }
- OS::SNPrintF(buf + pos, ")");
- PrintLiteralIndented(buf.start(), value, true);
- }
-diff --git a/src/runtime.cc b/src/runtime.cc
-index 0e256c1..b64e66b 100644
---- a/src/runtime.cc
-+++ b/src/runtime.cc
-@@ -1307,19 +1307,23 @@ static Failure* ThrowRedeclarationError(Isolate* isolate,
- RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
- ASSERT(args.length() == 3);
- HandleScope scope(isolate);
-- Handle<GlobalObject> global = Handle<GlobalObject>(
-- isolate->context()->global());
-
- Handle<Context> context = args.at<Context>(0);
- CONVERT_ARG_CHECKED(FixedArray, pairs, 1);
- CONVERT_SMI_ARG_CHECKED(flags, 2);
-
-+ Handle<JSObject> js_global = Handle<JSObject>(isolate->context()->global());
-+ Handle<JSObject> qml_global = Handle<JSObject>(isolate->context()->qml_global());
-+
- // Traverse the name/value pairs and set the properties.
- int length = pairs->length();
-- for (int i = 0; i < length; i += 2) {
-+ for (int i = 0; i < length; i += 3) {
- HandleScope scope(isolate);
- Handle<String> name(String::cast(pairs->get(i)));
- Handle<Object> value(pairs->get(i + 1), isolate);
-+ Handle<Smi> is_qml_global(Smi::cast(pairs->get(i + 2)));
-+
-+ Handle<JSObject> global = is_qml_global->value()?qml_global:js_global;
-
- // We have to declare a global const property. To capture we only
- // assign to it when evaluating the assignment for "const x =
-@@ -1506,19 +1510,24 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) {
- NoHandleAllocation nha;
- // args[0] == name
- // args[1] == strict_mode
-- // args[2] == value (optional)
-+ // args[2] == qml_mode
-+ // args[3] == value (optional)
-
- // Determine if we need to assign to the variable if it already
- // exists (based on the number of arguments).
-- RUNTIME_ASSERT(args.length() == 2 || args.length() == 3);
-- bool assign = args.length() == 3;
-+ RUNTIME_ASSERT(args.length() == 3 || args.length() == 4);
-+ bool assign = args.length() == 4;
-
- CONVERT_ARG_CHECKED(String, name, 0);
-- GlobalObject* global = isolate->context()->global();
- RUNTIME_ASSERT(args[1]->IsSmi());
- StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(1));
- ASSERT(strict_mode == kStrictMode || strict_mode == kNonStrictMode);
-
-+ RUNTIME_ASSERT(args[2]->IsSmi());
-+ int qml_mode = Smi::cast(args[2])->value();
-+
-+ JSObject* global = qml_mode?isolate->context()->qml_global():isolate->context()->global();
-+
- // According to ECMA-262, section 12.2, page 62, the property must
- // not be deletable.
- PropertyAttributes attributes = DONT_DELETE;
-@@ -1546,7 +1555,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) {
- // Found an interceptor that's not read only.
- if (assign) {
- return raw_holder->SetProperty(
-- &lookup, *name, args[2], attributes, strict_mode);
-+ &lookup, *name, args[3], attributes, strict_mode);
- } else {
- return isolate->heap()->undefined_value();
- }
-@@ -1556,9 +1565,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) {
- }
-
- // Reload global in case the loop above performed a GC.
-- global = isolate->context()->global();
-+ global = qml_mode?isolate->context()->qml_global():isolate->context()->global();
- if (assign) {
-- return global->SetProperty(*name, args[2], attributes, strict_mode, true);
-+ return global->SetProperty(*name, args[3], attributes, strict_mode, true);
- }
- return isolate->heap()->undefined_value();
- }
-@@ -1568,12 +1577,15 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeConstGlobal) {
- // All constants are declared with an initial value. The name
- // of the constant is the first argument and the initial value
- // is the second.
-- RUNTIME_ASSERT(args.length() == 2);
-+ RUNTIME_ASSERT(args.length() == 3);
- CONVERT_ARG_CHECKED(String, name, 0);
- Handle<Object> value = args.at<Object>(1);
-
-+ RUNTIME_ASSERT(args[2]->IsSmi());
-+ int qml_mode = Smi::cast(args[2])->value();
-+
- // Get the current global object from top.
-- GlobalObject* global = isolate->context()->global();
-+ JSObject* global = qml_mode?isolate->context()->qml_global():isolate->context()->global();
-
- // According to ECMA-262, section 12.2, page 62, the property must
- // not be deletable. Since it's a const, it must be READ_ONLY too.
-@@ -1597,7 +1609,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeConstGlobal) {
- // Restore global object from context (in case of GC) and continue
- // with setting the value.
- HandleScope handle_scope(isolate);
-- Handle<GlobalObject> global(isolate->context()->global());
-+ Handle<JSObject> global(qml_mode?isolate->context()->qml_global():isolate->context()->global());
-
- // BUG 1213575: Handle the case where we have to set a read-only
- // property through an interceptor and only do it if it's
-@@ -9386,7 +9398,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileString) {
- Handle<SharedFunctionInfo> shared = Compiler::CompileEval(source,
- context,
- true,
-- kNonStrictMode);
-+ kNonStrictMode,
-+ false);
- if (shared.is_null()) return Failure::Exception();
- Handle<JSFunction> fun =
- isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
-@@ -9399,7 +9412,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileString) {
- static ObjectPair CompileGlobalEval(Isolate* isolate,
- Handle<String> source,
- Handle<Object> receiver,
-- StrictModeFlag strict_mode) {
-+ StrictModeFlag strict_mode,
-+ bool qml_mode) {
- Handle<Context> context = Handle<Context>(isolate->context());
- Handle<Context> global_context = Handle<Context>(context->global_context());
-
-@@ -9417,7 +9431,8 @@ static ObjectPair CompileGlobalEval(Isolate* isolate,
- source,
- Handle<Context>(isolate->context()),
- context->IsGlobalContext(),
-- strict_mode);
-+ strict_mode,
-+ qml_mode);
- if (shared.is_null()) return MakePair(Failure::Exception(), NULL);
- Handle<JSFunction> compiled =
- isolate->factory()->NewFunctionFromSharedFunctionInfo(
-@@ -9427,7 +9442,7 @@ static ObjectPair CompileGlobalEval(Isolate* isolate,
-
-
- RUNTIME_FUNCTION(ObjectPair, Runtime_ResolvePossiblyDirectEval) {
-- ASSERT(args.length() == 4);
-+ ASSERT(args.length() == 5);
-
- HandleScope scope(isolate);
- Handle<Object> callee = args.at<Object>(0);
-@@ -9490,15 +9505,17 @@ RUNTIME_FUNCTION(ObjectPair, Runtime_ResolvePossiblyDirectEval) {
- }
-
- ASSERT(args[3]->IsSmi());
-+ ASSERT(args[4]->IsSmi());
- return CompileGlobalEval(isolate,
- args.at<String>(1),
- args.at<Object>(2),
-- static_cast<StrictModeFlag>(args.smi_at(3)));
-+ static_cast<StrictModeFlag>(args.smi_at(3)),
-+ Smi::cast(args[4])->value());
- }
-
-
- RUNTIME_FUNCTION(ObjectPair, Runtime_ResolvePossiblyDirectEvalNoLookup) {
-- ASSERT(args.length() == 4);
-+ ASSERT(args.length() == 5);
-
- HandleScope scope(isolate);
- Handle<Object> callee = args.at<Object>(0);
-@@ -9511,10 +9528,12 @@ RUNTIME_FUNCTION(ObjectPair, Runtime_ResolvePossiblyDirectEvalNoLookup) {
- }
-
- ASSERT(args[3]->IsSmi());
-+ ASSERT(args[4]->IsSmi());
- return CompileGlobalEval(isolate,
- args.at<String>(1),
- args.at<Object>(2),
-- static_cast<StrictModeFlag>(args.smi_at(3)));
-+ static_cast<StrictModeFlag>(args.smi_at(3)),
-+ Smi::cast(args[4])->value());
- }
-
-
-@@ -11220,10 +11239,12 @@ class ScopeIterator {
- ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
- Handle<Script> script(Script::cast(shared_info->script()));
- Scope* scope;
-- if (index >= 0) {
-+ if (index >= 0 || shared_info->qml_mode()) {
- // Global code
- CompilationInfo info(script);
- info.MarkAsGlobal();
-+ if (shared_info->qml_mode())
-+ info.MarkAsQmlMode();
- bool result = ParserApi::Parse(&info);
- ASSERT(result);
- result = Scope::Analyze(&info);
-@@ -11253,7 +11274,6 @@ class ScopeIterator {
- ScopeType scope_type = Type();
- if (scope_type == ScopeTypeGlobal) {
- // The global scope is always the last in the chain.
-- ASSERT(context_->IsGlobalContext());
- context_ = Handle<Context>();
- return;
- }
-@@ -11277,7 +11297,7 @@ class ScopeIterator {
- !scope_info->HasContext());
- return ScopeTypeLocal;
- case GLOBAL_SCOPE:
-- ASSERT(context_->IsGlobalContext());
-+ ASSERT(context_->IsGlobalContext() || scope_info->IsQmlMode());
- return ScopeTypeGlobal;
- case WITH_SCOPE:
- ASSERT(context_->IsWithContext());
-@@ -11315,10 +11335,15 @@ class ScopeIterator {
- switch (Type()) {
- case ScopeIterator::ScopeTypeGlobal:
- return Handle<JSObject>(CurrentContext()->global());
-- case ScopeIterator::ScopeTypeLocal:
-+ case ScopeIterator::ScopeTypeLocal: {
-+ Handle<SerializedScopeInfo> scope_info = nested_scope_chain_.last();
-+ if (scope_info->IsQmlMode())
-+ ASSERT(nested_scope_chain_.length() == 2);
-+ else
-+ ASSERT(nested_scope_chain_.length() == 1);
- // Materialize the content of the local scope into a JSObject.
-- ASSERT(nested_scope_chain_.length() == 1);
- return MaterializeLocalScope(isolate_, frame_, inlined_frame_index_);
-+ }
- case ScopeIterator::ScopeTypeWith:
- // Return the with object.
- return Handle<JSObject>(JSObject::cast(CurrentContext()->extension()));
-@@ -12034,6 +12059,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) {
- Handle<JSFunction> function(JSFunction::cast(frame->function()));
- Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info());
- ScopeInfo<> sinfo(*scope_info);
-+ bool qml_mode = function->shared()->qml_mode();
-
- // Traverse the saved contexts chain to find the active context for the
- // selected frame.
-@@ -12107,7 +12133,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) {
- Compiler::CompileEval(function_source,
- context,
- context->IsGlobalContext(),
-- kNonStrictMode);
-+ kNonStrictMode,
-+ qml_mode);
- if (shared.is_null()) return Failure::Exception();
- Handle<JSFunction> compiled_function =
- isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context);
-@@ -12117,7 +12144,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) {
- Handle<Object> receiver(frame->receiver(), isolate);
- Handle<Object> evaluation_function =
- Execution::Call(compiled_function, receiver, 0, NULL,
-- &has_pending_exception);
-+ &has_pending_exception, false,
-+ Handle<Object>(function->context()->qml_global()));
- if (has_pending_exception) return Failure::Exception();
-
- Handle<Object> arguments = GetArgumentsObject(isolate,
-@@ -12198,7 +12226,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluateGlobal) {
- // Currently, the eval code will be executed in non-strict mode,
- // even in the strict code context.
- Handle<SharedFunctionInfo> shared =
-- Compiler::CompileEval(source, context, is_global, kNonStrictMode);
-+ Compiler::CompileEval(source, context, is_global, kNonStrictMode, false);
- if (shared.is_null()) return Failure::Exception();
- Handle<JSFunction> compiled_function =
- Handle<JSFunction>(
-diff --git a/src/runtime.h b/src/runtime.h
-index 67fc628..aada06d 100644
---- a/src/runtime.h
-+++ b/src/runtime.h
-@@ -257,8 +257,8 @@ namespace internal {
- \
- /* Eval */ \
- F(GlobalReceiver, 1, 1) \
-- F(ResolvePossiblyDirectEval, 4, 2) \
-- F(ResolvePossiblyDirectEvalNoLookup, 4, 2) \
-+ F(ResolvePossiblyDirectEval, 5, 2) \
-+ F(ResolvePossiblyDirectEvalNoLookup, 5, 2) \
- \
- F(SetProperty, -1 /* 4 or 5 */, 1) \
- F(DefineOrRedefineDataProperty, 4, 1) \
-@@ -336,8 +336,8 @@ namespace internal {
- /* Declarations and initialization */ \
- F(DeclareGlobals, 3, 1) \
- F(DeclareContextSlot, 4, 1) \
-- F(InitializeVarGlobal, -1 /* 2 or 3 */, 1) \
-- F(InitializeConstGlobal, 2, 1) \
-+ F(InitializeVarGlobal, -1 /* 3 or 4 */, 1) \
-+ F(InitializeConstGlobal, 3, 1) \
- F(InitializeConstContextSlot, 3, 1) \
- F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
- \
-diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
-index 8ea5f1e..a61b787 100644
---- a/src/scopeinfo.cc
-+++ b/src/scopeinfo.cc
-@@ -51,6 +51,7 @@ ScopeInfo<Allocator>::ScopeInfo(Scope* scope)
- : function_name_(FACTORY->empty_symbol()),
- calls_eval_(scope->calls_eval()),
- is_strict_mode_(scope->is_strict_mode()),
-+ is_qml_mode_(scope->is_qml_mode()),
- type_(scope->type()),
- parameters_(scope->num_parameters()),
- stack_slots_(scope->num_stack_slots()),
-@@ -153,6 +154,8 @@ ScopeInfo<Allocator>::ScopeInfo(Scope* scope)
- //
- // - is strict mode scope
- //
-+// - is qml mode scope
-+//
- // - scope type
- //
- // - number of variables in the context object (smi) (= function context
-@@ -252,6 +255,7 @@ ScopeInfo<Allocator>::ScopeInfo(SerializedScopeInfo* data)
- p = ReadObject(p, &function_name_);
- p = ReadBool(p, &calls_eval_);
- p = ReadBool(p, &is_strict_mode_);
-+ p = ReadBool(p, &is_qml_mode_);
- p = ReadInt(p, &type_);
- p = ReadList<Allocator>(p, &context_slots_, &context_modes_);
- p = ReadList<Allocator>(p, &parameters_);
-@@ -307,9 +311,9 @@ static Object** WriteList(Object** p,
-
- template<class Allocator>
- Handle<SerializedScopeInfo> ScopeInfo<Allocator>::Serialize() {
-- // function name, calls eval, is_strict_mode, scope type,
-+ // function name, calls eval, is_strict_mode, is_qml_mode, scope type,
- // length for 3 tables:
-- const int extra_slots = 1 + 1 + 1 + 1 + 3;
-+ const int extra_slots = 1 + 1 + 1 + 1 + 1 + 3;
- int length = extra_slots +
- context_slots_.length() * 2 +
- parameters_.length() +
-@@ -324,6 +328,7 @@ Handle<SerializedScopeInfo> ScopeInfo<Allocator>::Serialize() {
- p = WriteObject(p, function_name_);
- p = WriteBool(p, calls_eval_);
- p = WriteBool(p, is_strict_mode_);
-+ p = WriteBool(p, is_qml_mode_);
- p = WriteInt(p, type_);
- p = WriteList(p, &context_slots_, &context_modes_);
- p = WriteList(p, &parameters_);
-@@ -372,8 +377,8 @@ SerializedScopeInfo* SerializedScopeInfo::Empty() {
-
- Object** SerializedScopeInfo::ContextEntriesAddr() {
- ASSERT(length() > 0);
-- // +4 for function name, calls eval, strict mode, scope type.
-- return data_start() + 4;
-+ // +5 for function name, calls eval, strict mode, qml mode, scope type.
-+ return data_start() + 5;
- }
-
-
-@@ -417,10 +422,21 @@ bool SerializedScopeInfo::IsStrictMode() {
- }
-
-
-+bool SerializedScopeInfo::IsQmlMode() {
-+ if (length() > 0) {
-+ Object** p = data_start() + 3; // +3 for function name, calls eval, strict mode.
-+ bool qml_mode;
-+ p = ReadBool(p, &qml_mode);
-+ return qml_mode;
-+ }
-+ return false;
-+}
-+
-+
- ScopeType SerializedScopeInfo::Type() {
- ASSERT(length() > 0);
-- // +3 for function name, calls eval, strict mode.
-- Object** p = data_start() + 3;
-+ // +4 for function name, calls eval, strict mode, qml mode.
-+ Object** p = data_start() + 4;
- ScopeType type;
- p = ReadInt(p, &type);
- return type;
-diff --git a/src/scopeinfo.h b/src/scopeinfo.h
-index eeb3047..2ca4503 100644
---- a/src/scopeinfo.h
-+++ b/src/scopeinfo.h
-@@ -88,6 +88,7 @@ class ScopeInfo BASE_EMBEDDED {
- Handle<String> function_name_;
- bool calls_eval_;
- bool is_strict_mode_;
-+ bool is_qml_mode_;
- ScopeType type_;
- List<Handle<String>, Allocator > parameters_;
- List<Handle<String>, Allocator > stack_slots_;
-diff --git a/src/scopes.cc b/src/scopes.cc
-index 3167c4d..6503d07 100644
---- a/src/scopes.cc
-+++ b/src/scopes.cc
-@@ -35,6 +35,8 @@
-
- #include "allocation-inl.h"
-
-+#include "debug.h"
-+
- namespace v8 {
- namespace internal {
-
-@@ -202,6 +204,7 @@ void Scope::SetDefaults(ScopeType type,
- // Inherit the strict mode from the parent scope.
- strict_mode_flag_ = (outer_scope != NULL)
- ? outer_scope->strict_mode_flag_ : kNonStrictMode;
-+ qml_mode_ = (outer_scope != NULL) && outer_scope->qml_mode_;
- outer_scope_calls_non_strict_eval_ = false;
- inner_scope_calls_eval_ = false;
- force_eager_compilation_ = false;
-@@ -907,6 +910,26 @@ void Scope::ResolveVariable(Scope* global_scope,
- // by 'eval' introduced variable bindings.
- if (var->is_global()) {
- var = NonLocal(proxy->name(), DYNAMIC_GLOBAL);
-+
-+ if (qml_mode_) {
-+ Handle<GlobalObject> global = isolate_->global();
-+
-+#ifdef ENABLE_DEBUGGER_SUPPORT
-+ if (isolate_->debug()->IsLoaded() && isolate_->debug()->InDebugger()) {
-+ //Get the context before the debugger was entered.
-+ SaveContext *save = isolate_->save_context();
-+ while (save != NULL && *save->context() == *isolate_->debug()->debug_context())
-+ save = save->prev();
-+
-+ global = Handle<GlobalObject>(save->context()->global());
-+ }
-+#endif
-+
-+ if (qml_mode_ && !global->HasProperty(*(proxy->name()))) {
-+ var->set_is_qml_global(true);
-+ }
-+ }
-+
- } else {
- Variable* invalidated = var;
- var = NonLocal(proxy->name(), DYNAMIC_LOCAL);
-@@ -918,12 +941,52 @@ void Scope::ResolveVariable(Scope* global_scope,
- // No binding has been found. Declare a variable in global scope.
- ASSERT(global_scope != NULL);
- var = global_scope->DeclareGlobal(proxy->name());
-+
-+ if (qml_mode_) {
-+ Handle<GlobalObject> global = isolate_->global();
-+
-+#ifdef ENABLE_DEBUGGER_SUPPORT
-+ if (isolate_->debug()->IsLoaded() && isolate_->debug()->InDebugger()) {
-+ //Get the context before the debugger was entered.
-+ SaveContext *save = isolate_->save_context();
-+ while (save != NULL && *save->context() == *isolate_->debug()->debug_context())
-+ save = save->prev();
-+
-+ global = Handle<GlobalObject>(save->context()->global());
-+ }
-+#endif
-+
-+ if (!global->HasProperty(*(proxy->name()))) {
-+ var->set_is_qml_global(true);
-+ }
-+ }
-+
- break;
-
- case UNBOUND_EVAL_SHADOWED:
- // No binding has been found. But some scope makes a
- // non-strict 'eval' call.
- var = NonLocal(proxy->name(), DYNAMIC_GLOBAL);
-+
-+ if (qml_mode_) {
-+ Handle<GlobalObject> global = isolate_->global();
-+
-+#ifdef ENABLE_DEBUGGER_SUPPORT
-+ if (isolate_->debug()->IsLoaded() && isolate_->debug()->InDebugger()) {
-+ //Get the context before the debugger was entered.
-+ SaveContext *save = isolate_->save_context();
-+ while (save != NULL && *save->context() == *isolate_->debug()->debug_context())
-+ save = save->prev();
-+
-+ global = Handle<GlobalObject>(save->context()->global());
-+ }
-+#endif
-+
-+ if (qml_mode_ && !global->HasProperty(*(proxy->name()))) {
-+ var->set_is_qml_global(true);
-+ }
-+ }
-+
- break;
-
- case DYNAMIC_LOOKUP:
-diff --git a/src/scopes.h b/src/scopes.h
-index a1418874..41e5f5c 100644
---- a/src/scopes.h
-+++ b/src/scopes.h
-@@ -228,6 +228,11 @@ class Scope: public ZoneObject {
- end_position_ = statement_pos;
- }
-
-+ // Enable qml mode for this scope
-+ void EnableQmlMode() {
-+ qml_mode_ = true;
-+ }
-+
- // ---------------------------------------------------------------------------
- // Predicates.
-
-@@ -242,6 +247,7 @@ class Scope: public ZoneObject {
- return is_eval_scope() || is_function_scope() || is_global_scope();
- }
- bool is_strict_mode() const { return strict_mode_flag() == kStrictMode; }
-+ bool is_qml_mode() const { return qml_mode_; }
- bool is_strict_mode_eval_scope() const {
- return is_eval_scope() && is_strict_mode();
- }
-@@ -427,6 +433,8 @@ class Scope: public ZoneObject {
- // Source positions.
- int start_position_;
- int end_position_;
-+ // This scope is a qml mode scope.
-+ bool qml_mode_;
-
- // Computed via PropagateScopeInfo.
- bool outer_scope_calls_non_strict_eval_;
-diff --git a/src/variables.cc b/src/variables.cc
-index d85e1b2..1887935 100644
---- a/src/variables.cc
-+++ b/src/variables.cc
-@@ -68,7 +68,8 @@ Variable::Variable(Scope* scope,
- local_if_not_shadowed_(NULL),
- is_valid_LHS_(is_valid_LHS),
- is_accessed_from_inner_scope_(false),
-- is_used_(false) {
-+ is_used_(false),
-+ is_qml_global_(false) {
- // names must be canonicalized for fast equality checks
- ASSERT(name->IsSymbol());
- }
-diff --git a/src/variables.h b/src/variables.h
-index 8b2d869..33561b0 100644
---- a/src/variables.h
-+++ b/src/variables.h
-@@ -155,6 +155,8 @@ class Variable: public ZoneObject {
- index_ = index;
- }
-
-+ bool is_qml_global() const { return is_qml_global_; }
-+ void set_is_qml_global(bool is_qml_global) { is_qml_global_ = is_qml_global; }
- private:
- Scope* scope_;
- Handle<String> name_;
-@@ -175,6 +177,9 @@ class Variable: public ZoneObject {
- // Usage info.
- bool is_accessed_from_inner_scope_; // set by variable resolver
- bool is_used_;
-+
-+ // QML info
-+ bool is_qml_global_;
- };
-
-
-diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
-index f62c517..f30221f 100644
---- a/src/x64/code-stubs-x64.cc
-+++ b/src/x64/code-stubs-x64.cc
-@@ -139,6 +139,10 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
- __ movq(rbx, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)));
- __ movq(Operand(rax, Context::SlotOffset(Context::GLOBAL_INDEX)), rbx);
-
-+ // Copy the qmlglobal object from the previous context.
-+ __ movq(rbx, Operand(rsi, Context::SlotOffset(Context::QML_GLOBAL_INDEX)));
-+ __ movq(Operand(rax, Context::SlotOffset(Context::QML_GLOBAL_INDEX)), rbx);
-+
- // Initialize the rest of the slots to undefined.
- __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
- for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
-diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
-index bf640db..b1e5d35 100644
---- a/src/x64/full-codegen-x64.cc
-+++ b/src/x64/full-codegen-x64.cc
-@@ -173,12 +173,13 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
-
- // Possibly allocate a local context.
- int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment cmnt(masm_, "[ Allocate local context");
- // Argument to NewContext is the function, which is still in rdi.
- __ push(rdi);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -1155,10 +1156,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
-
- // All extension objects were empty and it is safe to use a global
- // load IC call.
-- __ movq(rax, GlobalObjectOperand());
-+ __ movq(rax, var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ Move(rcx, var->name());
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-- RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
-+ RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF || var->is_qml_global())
- ? RelocInfo::CODE_TARGET
- : RelocInfo::CODE_TARGET_CONTEXT;
- __ call(ic, mode);
-@@ -1240,9 +1241,9 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
- // Use inline caching. Variable name is passed in rcx and the global
- // object on the stack.
- __ Move(rcx, var->name());
-- __ movq(rax, GlobalObjectOperand());
-+ __ movq(rax, var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
-- __ call(ic, RelocInfo::CODE_TARGET_CONTEXT);
-+ __ call(ic, var->is_qml_global() ? RelocInfo::CODE_TARGET : RelocInfo::CODE_TARGET_CONTEXT);
- context()->Plug(rax);
- break;
- }
-@@ -1834,7 +1835,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
- if (var->IsUnallocated()) {
- // Global var, const, or let.
- __ Move(rcx, var->name());
-- __ movq(rdx, GlobalObjectOperand());
-+ __ movq(rdx, var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- Handle<Code> ic = is_strict_mode()
- ? isolate()->builtins()->StoreIC_Initialize_Strict()
- : isolate()->builtins()->StoreIC_Initialize();
-@@ -2117,9 +2118,12 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(ResolveEvalFlag flag,
- FLAG_harmony_scoping ? kStrictMode : strict_mode_flag();
- __ Push(Smi::FromInt(strict_mode));
-
-+ // Push the qml mode flag
-+ __ Push(Smi::FromInt(is_qml_mode()));
-+
- __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP
- ? Runtime::kResolvePossiblyDirectEvalNoLookup
-- : Runtime::kResolvePossiblyDirectEval, 4);
-+ : Runtime::kResolvePossiblyDirectEval, 5);
- }
-
-
-@@ -2188,8 +2192,8 @@ void FullCodeGenerator::VisitCall(Call* expr) {
- } else if (proxy != NULL && proxy->var()->IsUnallocated()) {
- // Call to a global variable. Push global object as receiver for the
- // call IC lookup.
-- __ push(GlobalObjectOperand());
-- EmitCallWithIC(expr, proxy->name(), RelocInfo::CODE_TARGET_CONTEXT);
-+ __ push(proxy->var()->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
-+ EmitCallWithIC(expr, proxy->name(), proxy->var()->is_qml_global() ? RelocInfo::CODE_TARGET : RelocInfo::CODE_TARGET_CONTEXT);
- } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
- // Call to a lookup slot (dynamically introduced variable).
- Label slow, done;
-@@ -3638,7 +3642,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
- // but "delete this" is allowed.
- ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this());
- if (var->IsUnallocated()) {
-- __ push(GlobalObjectOperand());
-+ __ push(var->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- __ Push(var->name());
- __ Push(Smi::FromInt(kNonStrictMode));
- __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
-@@ -3936,7 +3940,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
- if (proxy != NULL && proxy->var()->IsUnallocated()) {
- Comment cmnt(masm_, "Global variable");
- __ Move(rcx, proxy->name());
-- __ movq(rax, GlobalObjectOperand());
-+ __ movq(rax, proxy->var()->is_qml_global() ? QmlGlobalObjectOperand() : GlobalObjectOperand());
- Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
- // Use a regular load, not a contextual load, to avoid a reference
- // error.
-diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
-index 38a8c18..2a95fee 100644
---- a/src/x64/lithium-codegen-x64.cc
-+++ b/src/x64/lithium-codegen-x64.cc
-@@ -196,12 +196,13 @@ bool LCodeGen::GeneratePrologue() {
-
- // Possibly allocate a local context.
- int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
-- if (heap_slots > 0) {
-+ if (heap_slots > 0 ||
-+ (scope()->is_qml_mode() && scope()->is_global_scope())) {
- Comment(";;; Allocate local context");
- // Argument to NewContext is the function, which is still in rdi.
- __ push(rdi);
- if (heap_slots <= FastNewContextStub::kMaximumSlots) {
-- FastNewContextStub stub(heap_slots);
-+ FastNewContextStub stub((heap_slots < 0)?0:heap_slots);
- __ CallStub(&stub);
- } else {
- __ CallRuntime(Runtime::kNewFunctionContext, 1);
-@@ -2610,7 +2611,7 @@ void LCodeGen::DoOuterContext(LOuterContext* instr) {
-
- void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
- Register result = ToRegister(instr->result());
-- __ movq(result, GlobalObjectOperand());
-+ __ movq(result, instr->qml_global()?QmlGlobalObjectOperand():GlobalObjectOperand());
- }
-
-
-@@ -3049,7 +3050,7 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
- void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
- ASSERT(ToRegister(instr->result()).is(rax));
- int arity = instr->arity();
-- RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT;
-+ RelocInfo::Mode mode = instr->qml_global()?RelocInfo::CODE_TARGET:RelocInfo::CODE_TARGET_CONTEXT;
- Handle<Code> ic =
- isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
- __ Move(rcx, instr->name());
-diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
-index 0af2ce4..9e2731f 100644
---- a/src/x64/lithium-x64.cc
-+++ b/src/x64/lithium-x64.cc
-@@ -1123,7 +1123,7 @@ LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
-
-
- LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
-- return DefineAsRegister(new LGlobalObject);
-+ return DefineAsRegister(new LGlobalObject(instr->qml_global()));
- }
-
-
-@@ -1193,7 +1193,7 @@ LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
-
- LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
- argument_count_ -= instr->argument_count();
-- return MarkAsCall(DefineFixed(new LCallGlobal, rax), instr);
-+ return MarkAsCall(DefineFixed(new LCallGlobal(instr->qml_global()), rax), instr);
- }
-
-
-diff --git a/src/x64/lithium-x64.h b/src/x64/lithium-x64.h
-index 20a6937..8f1a3d8 100644
---- a/src/x64/lithium-x64.h
-+++ b/src/x64/lithium-x64.h
-@@ -1303,7 +1303,13 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> {
-
- class LGlobalObject: public LTemplateInstruction<1, 0, 0> {
- public:
-+ explicit LGlobalObject(bool qml_global) : qml_global_(qml_global) {}
-+
- DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
-+
-+ bool qml_global() { return qml_global_; }
-+ private:
-+ bool qml_global_;
- };
-
-
-@@ -1393,10 +1399,16 @@ class LCallGlobal: public LTemplateInstruction<1, 0, 0> {
- DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
- DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
-
-+ explicit LCallGlobal(bool qml_global) : qml_global_(qml_global) {}
-+
- virtual void PrintDataTo(StringStream* stream);
-
- Handle<String> name() const {return hydrogen()->name(); }
- int arity() const { return hydrogen()->argument_count() - 1; }
-+
-+ bool qml_global() { return qml_global_; }
-+ private:
-+ bool qml_global_;
- };
-
-
-diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h
-index f5f81b1..5caa6cf 100644
---- a/src/x64/macro-assembler-x64.h
-+++ b/src/x64/macro-assembler-x64.h
-@@ -1418,6 +1418,11 @@ static inline Operand GlobalObjectOperand() {
- }
-
-
-+static inline Operand QmlGlobalObjectOperand() {
-+ return ContextOperand(rsi, Context::QML_GLOBAL_INDEX);
-+}
-+
-+
- // Provides access to exit frame stack space (not GCed).
- static inline Operand StackSpaceOperand(int index) {
- #ifdef _WIN64
---
-1.7.7.3
-
diff --git a/src/v8/0005-Allow-access-to-the-calling-script-data.patch b/src/v8/0005-Allow-access-to-the-calling-script-data.patch
deleted file mode 100644
index 3c41a036ee..0000000000
--- a/src/v8/0005-Allow-access-to-the-calling-script-data.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From d01b0fc24542eb6128bcbd3a8a02da9659b8433e Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Fri, 14 Oct 2011 17:03:06 +1000
-Subject: [PATCH 05/12] Allow access to the calling script data
-
----
- include/v8.h | 1 +
- src/api.cc | 12 ++++++++++++
- 2 files changed, 13 insertions(+), 0 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index 193e2fe..c094d08 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -3517,6 +3517,7 @@ class V8EXPORT Context {
- */
- static Local<Context> GetCalling();
- static Local<Object> GetCallingQmlGlobal();
-+ static Local<Value> GetCallingScriptData();
-
- /**
- * Sets the security token for the context. To access an object in
-diff --git a/src/api.cc b/src/api.cc
-index 2d3d97a..54df40d 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -4370,6 +4370,18 @@ v8::Local<v8::Object> Context::GetCallingQmlGlobal() {
- }
- }
-
-+v8::Local<v8::Value> Context::GetCallingScriptData()
-+{
-+ i::Isolate* isolate = i::Isolate::Current();
-+ if (IsDeadCheck(isolate, "v8::Context::GetCallingScriptData()")) {
-+ return Local<Object>();
-+ }
-+
-+ i::JavaScriptFrameIterator it;
-+ if (it.done()) return Local<Object>();
-+ i::Handle<i::Script> script(i::Script::cast(i::JSFunction::cast(it.frame()->function())->shared()->script()));
-+ return Utils::ToLocal(i::Handle<i::Object>(script->data()));
-+}
-
- v8::Local<v8::Object> Context::Global() {
- if (IsDeadCheck(i::Isolate::Current(), "v8::Context::Global()")) {
---
-1.7.7.3
-
diff --git a/src/v8/0006-Add-custom-object-compare-callback.patch b/src/v8/0006-Add-custom-object-compare-callback.patch
deleted file mode 100644
index 51c933580f..0000000000
--- a/src/v8/0006-Add-custom-object-compare-callback.patch
+++ /dev/null
@@ -1,548 +0,0 @@
-From 59b3da4073971aa725eea8f303f37948dc3bb376 Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Thu, 27 Oct 2011 13:40:00 +0100
-Subject: [PATCH 06/12] Add custom object compare callback
-
-A global custom object comparison callback can be set with:
- V8::SetUserObjectComparisonCallbackFunction()
-When two JSObjects are compared (== or !=), if either one has
-the MarkAsUseUserObjectComparison() bit set, the custom comparison
-callback is invoked to do the actual comparison.
-
-This is useful when you have "value" objects that you want to
-compare as equal, even though they are actually different JS object
-instances.
----
- include/v8.h | 13 +++++++++++++
- src/api.cc | 22 ++++++++++++++++++++++
- src/arm/code-stubs-arm.cc | 43 +++++++++++++++++++++++++++++++++++++++++--
- src/factory.cc | 8 ++++++++
- src/ia32/code-stubs-ia32.cc | 39 +++++++++++++++++++++++++++++++++++++++
- src/isolate.cc | 7 +++++++
- src/isolate.h | 8 ++++++++
- src/objects-inl.h | 21 ++++++++++++++++++---
- src/objects.cc | 8 ++++----
- src/objects.h | 12 ++++++++++--
- src/runtime.cc | 23 +++++++++++++++++++++++
- src/runtime.h | 1 +
- src/x64/code-stubs-x64.cc | 37 +++++++++++++++++++++++++++++++++++++
- 13 files changed, 231 insertions(+), 11 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index c094d08..6baf2b2 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -2501,6 +2501,12 @@ class V8EXPORT ObjectTemplate : public Template {
- bool HasExternalResource();
- void SetHasExternalResource(bool value);
-
-+ /**
-+ * Mark object instances of the template as using the user object
-+ * comparison callback.
-+ */
-+ void MarkAsUseUserObjectComparison();
-+
- private:
- ObjectTemplate();
- static Local<ObjectTemplate> New(Handle<FunctionTemplate> constructor);
-@@ -2720,6 +2726,10 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
- AccessType type,
- Local<Value> data);
-
-+// --- User Object Comparisoa nCallback ---
-+typedef bool (*UserObjectComparisonCallback)(Local<Object> lhs,
-+ Local<Object> rhs);
-+
- // --- AllowCodeGenerationFromStrings callbacks ---
-
- /**
-@@ -3046,6 +3056,9 @@ class V8EXPORT V8 {
- /** Callback function for reporting failed access checks.*/
- static void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback);
-
-+ /** Callback for user object comparisons */
-+ static void SetUserObjectComparisonCallbackFunction(UserObjectComparisonCallback);
-+
- /**
- * Enables the host application to receive a notification before a
- * garbage collection. Allocations are not allowed in the
-diff --git a/src/api.cc b/src/api.cc
-index 54df40d..974d702 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -1464,6 +1464,17 @@ void ObjectTemplate::SetHasExternalResource(bool value)
- }
-
-
-+void ObjectTemplate::MarkAsUseUserObjectComparison()
-+{
-+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
-+ if (IsDeadCheck(isolate, "v8::ObjectTemplate::MarkAsUseUserObjectComparison()")) {
-+ return;
-+ }
-+ ENTER_V8(isolate);
-+ EnsureConstructor(this);
-+ Utils::OpenHandle(this)->set_use_user_object_comparison(i::Smi::FromInt(1));
-+}
-+
- // --- S c r i p t D a t a ---
-
-
-@@ -5113,6 +5124,17 @@ void V8::SetFailedAccessCheckCallbackFunction(
- isolate->SetFailedAccessCheckCallback(callback);
- }
-
-+
-+void V8::SetUserObjectComparisonCallbackFunction(
-+ UserObjectComparisonCallback callback) {
-+ i::Isolate* isolate = i::Isolate::Current();
-+ if (IsDeadCheck(isolate, "v8::V8::SetUserObjectComparisonCallbackFunction()")) {
-+ return;
-+ }
-+ isolate->SetUserObjectComparisonCallback(callback);
-+}
-+
-+
- void V8::AddObjectGroup(Persistent<Value>* objects,
- size_t length,
- RetainedObjectInfo* info) {
-diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
-index f5be938..1e1aebd 100644
---- a/src/arm/code-stubs-arm.cc
-+++ b/src/arm/code-stubs-arm.cc
-@@ -1569,6 +1569,37 @@ void CompareStub::Generate(MacroAssembler* masm) {
- // NOTICE! This code is only reached after a smi-fast-case check, so
- // it is certain that at least one operand isn't a smi.
-
-+ {
-+ Label not_user_equal, user_equal;
-+ __ and_(r2, r1, Operand(r0));
-+ __ tst(r2, Operand(kSmiTagMask));
-+ __ b(eq, &not_user_equal);
-+
-+ __ CompareObjectType(r0, r2, r4, JS_OBJECT_TYPE);
-+ __ b(ne, &not_user_equal);
-+
-+ __ CompareObjectType(r1, r3, r4, JS_OBJECT_TYPE);
-+ __ b(ne, &not_user_equal);
-+
-+ __ ldrb(r2, FieldMemOperand(r2, Map::kBitField2Offset));
-+ __ and_(r2, r2, Operand(1 << Map::kUseUserObjectComparison));
-+ __ cmp(r2, Operand(1 << Map::kUseUserObjectComparison));
-+ __ b(eq, &user_equal);
-+
-+ __ ldrb(r3, FieldMemOperand(r3, Map::kBitField2Offset));
-+ __ and_(r3, r3, Operand(1 << Map::kUseUserObjectComparison));
-+ __ cmp(r3, Operand(1 << Map::kUseUserObjectComparison));
-+ __ b(ne, &not_user_equal);
-+
-+ __ bind(&user_equal);
-+
-+ __ Push(r0, r1);
-+ __ TailCallRuntime(Runtime::kUserObjectEquals, 2, 1);
-+
-+ __ bind(&not_user_equal);
-+ }
-+
-+
- // Handle the case where the objects are identical. Either returns the answer
- // or goes to slow. Only falls through if the objects were not identical.
- EmitIdenticalObjectComparison(masm, &slow, cc_, never_nan_nan_);
-@@ -6615,10 +6646,18 @@ void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
- __ and_(r2, r1, Operand(r0));
- __ JumpIfSmi(r2, &miss);
-
-- __ CompareObjectType(r0, r2, r2, JS_OBJECT_TYPE);
-+ __ CompareObjectType(r0, r2, r3, JS_OBJECT_TYPE);
- __ b(ne, &miss);
-- __ CompareObjectType(r1, r2, r2, JS_OBJECT_TYPE);
-+ __ ldrb(r2, FieldMemOperand(r2, Map::kBitField2Offset));
-+ __ and_(r2, r2, Operand(1 << Map::kUseUserObjectComparison));
-+ __ cmp(r2, Operand(1 << Map::kUseUserObjectComparison));
-+ __ b(eq, &miss);
-+ __ CompareObjectType(r1, r2, r3, JS_OBJECT_TYPE);
- __ b(ne, &miss);
-+ __ ldrb(r2, FieldMemOperand(r2, Map::kBitField2Offset));
-+ __ and_(r2, r2, Operand(1 << Map::kUseUserObjectComparison));
-+ __ cmp(r2, Operand(1 << Map::kUseUserObjectComparison));
-+ __ b(eq, &miss);
-
- ASSERT(GetCondition() == eq);
- __ sub(r0, r0, Operand(r1));
-diff --git a/src/factory.cc b/src/factory.cc
-index 8c96944..76ca69d 100644
---- a/src/factory.cc
-+++ b/src/factory.cc
-@@ -1153,6 +1153,7 @@ Handle<JSFunction> Factory::CreateApiFunction(
-
- int internal_field_count = 0;
- bool has_external_resource = false;
-+ bool use_user_object_comparison = false;
-
- if (!obj->instance_template()->IsUndefined()) {
- Handle<ObjectTemplateInfo> instance_template =
-@@ -1162,6 +1163,8 @@ Handle<JSFunction> Factory::CreateApiFunction(
- Smi::cast(instance_template->internal_field_count())->value();
- has_external_resource =
- !instance_template->has_external_resource()->IsUndefined();
-+ use_user_object_comparison =
-+ !instance_template->use_user_object_comparison()->IsUndefined();
- }
-
- int instance_size = kPointerSize * internal_field_count;
-@@ -1206,6 +1209,11 @@ Handle<JSFunction> Factory::CreateApiFunction(
- map->set_has_external_resource(true);
- }
-
-+ // Mark as using user object comparison if needed
-+ if (use_user_object_comparison) {
-+ map->set_use_user_object_comparison(true);
-+ }
-+
- // Mark as undetectable if needed.
- if (obj->undetectable()) {
- map->set_is_undetectable();
-diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
-index 8a94a06..e73753e 100644
---- a/src/ia32/code-stubs-ia32.cc
-+++ b/src/ia32/code-stubs-ia32.cc
-@@ -4020,6 +4020,39 @@ void CompareStub::Generate(MacroAssembler* masm) {
- // NOTICE! This code is only reached after a smi-fast-case check, so
- // it is certain that at least one operand isn't a smi.
-
-+ {
-+ Label not_user_equal, user_equal;
-+ __ test(eax, Immediate(kSmiTagMask));
-+ __ j(zero, &not_user_equal);
-+ __ test(edx, Immediate(kSmiTagMask));
-+ __ j(zero, &not_user_equal);
-+
-+ __ CmpObjectType(eax, JS_OBJECT_TYPE, ebx);
-+ __ j(not_equal, &not_user_equal);
-+
-+ __ CmpObjectType(edx, JS_OBJECT_TYPE, ecx);
-+ __ j(not_equal, &not_user_equal);
-+
-+ __ test_b(FieldOperand(ebx, Map::kBitField2Offset),
-+ 1 << Map::kUseUserObjectComparison);
-+ __ j(not_zero, &user_equal);
-+ __ test_b(FieldOperand(ecx, Map::kBitField2Offset),
-+ 1 << Map::kUseUserObjectComparison);
-+ __ j(not_zero, &user_equal);
-+
-+ __ jmp(&not_user_equal);
-+
-+ __ bind(&user_equal);
-+
-+ __ pop(ebx); // Return address.
-+ __ push(eax);
-+ __ push(edx);
-+ __ push(ebx);
-+ __ TailCallRuntime(Runtime::kUserObjectEquals, 2, 1);
-+
-+ __ bind(&not_user_equal);
-+ }
-+
- // Identical objects can be compared fast, but there are some tricky cases
- // for NaN and undefined.
- {
-@@ -6497,8 +6530,14 @@ void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
-
- __ CmpObjectType(eax, JS_OBJECT_TYPE, ecx);
- __ j(not_equal, &miss, Label::kNear);
-+ __ test_b(FieldOperand(ecx, Map::kBitField2Offset),
-+ 1 << Map::kUseUserObjectComparison);
-+ __ j(not_zero, &miss, Label::kNear);
- __ CmpObjectType(edx, JS_OBJECT_TYPE, ecx);
- __ j(not_equal, &miss, Label::kNear);
-+ __ test_b(FieldOperand(ecx, Map::kBitField2Offset),
-+ 1 << Map::kUseUserObjectComparison);
-+ __ j(not_zero, &miss, Label::kNear);
-
- ASSERT(GetCondition() == equal);
- __ sub(eax, edx);
-diff --git a/src/isolate.cc b/src/isolate.cc
-index a073af9..36c1dfd 100644
---- a/src/isolate.cc
-+++ b/src/isolate.cc
-@@ -96,6 +96,7 @@ void ThreadLocalTop::InitializeInternal() {
- thread_id_ = ThreadId::Invalid();
- external_caught_exception_ = false;
- failed_access_check_callback_ = NULL;
-+ user_object_comparison_callback_ = NULL;
- save_context_ = NULL;
- catcher_ = NULL;
- top_lookup_result_ = NULL;
-@@ -729,6 +730,12 @@ void Isolate::SetFailedAccessCheckCallback(
- thread_local_top()->failed_access_check_callback_ = callback;
- }
-
-+
-+void Isolate::SetUserObjectComparisonCallback(
-+ v8::UserObjectComparisonCallback callback) {
-+ thread_local_top()->user_object_comparison_callback_ = callback;
-+}
-+
-
- void Isolate::ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type) {
- if (!thread_local_top()->failed_access_check_callback_) return;
-diff --git a/src/isolate.h b/src/isolate.h
-index 5453bf2..9919e83 100644
---- a/src/isolate.h
-+++ b/src/isolate.h
-@@ -258,6 +258,9 @@ class ThreadLocalTop BASE_EMBEDDED {
- // Head of the list of live LookupResults.
- LookupResult* top_lookup_result_;
-
-+ // Call back function for user object comparisons
-+ v8::UserObjectComparisonCallback user_object_comparison_callback_;
-+
- // Whether out of memory exceptions should be ignored.
- bool ignore_out_of_memory_;
-
-@@ -703,6 +706,11 @@ class Isolate {
- void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback);
- void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type);
-
-+ void SetUserObjectComparisonCallback(v8::UserObjectComparisonCallback callback);
-+ inline v8::UserObjectComparisonCallback UserObjectComparisonCallback() {
-+ return thread_local_top()->user_object_comparison_callback_;
-+ }
-+
- // Exception throwing support. The caller should use the result
- // of Throw() as its return value.
- Failure* Throw(Object* exception, MessageLocation* location = NULL);
-diff --git a/src/objects-inl.h b/src/objects-inl.h
-index 2e83fb7..13d7591 100644
---- a/src/objects-inl.h
-+++ b/src/objects-inl.h
-@@ -2749,14 +2749,14 @@ bool Map::is_extensible() {
-
- void Map::set_attached_to_shared_function_info(bool value) {
- if (value) {
-- set_bit_field2(bit_field2() | (1 << kAttachedToSharedFunctionInfo));
-+ set_bit_field3(bit_field3() | (1 << kAttachedToSharedFunctionInfo));
- } else {
-- set_bit_field2(bit_field2() & ~(1 << kAttachedToSharedFunctionInfo));
-+ set_bit_field3(bit_field3() & ~(1 << kAttachedToSharedFunctionInfo));
- }
- }
-
- bool Map::attached_to_shared_function_info() {
-- return ((1 << kAttachedToSharedFunctionInfo) & bit_field2()) != 0;
-+ return ((1 << kAttachedToSharedFunctionInfo) & bit_field3()) != 0;
- }
-
-
-@@ -2786,6 +2786,19 @@ bool Map::has_external_resource()
- }
-
-
-+void Map::set_use_user_object_comparison(bool value) {
-+ if (value) {
-+ set_bit_field2(bit_field2() | (1 << kUseUserObjectComparison));
-+ } else {
-+ set_bit_field2(bit_field2() & ~(1 << kUseUserObjectComparison));
-+ }
-+}
-+
-+bool Map::use_user_object_comparison() {
-+ return ((1 << kUseUserObjectComparison) & bit_field2()) != 0;
-+}
-+
-+
- void Map::set_named_interceptor_is_fallback(bool value)
- {
- if (value) {
-@@ -3334,6 +3347,8 @@ ACCESSORS(ObjectTemplateInfo, internal_field_count, Object,
- kInternalFieldCountOffset)
- ACCESSORS(ObjectTemplateInfo, has_external_resource, Object,
- kHasExternalResourceOffset)
-+ACCESSORS(ObjectTemplateInfo, use_user_object_comparison, Object,
-+ kUseUserObjectComparisonOffset)
-
- ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset)
- ACCESSORS(SignatureInfo, args, Object, kArgsOffset)
-diff --git a/src/objects.cc b/src/objects.cc
-index f5b6bee..6a4eff9 100644
---- a/src/objects.cc
-+++ b/src/objects.cc
-@@ -7686,8 +7686,8 @@ void SharedFunctionInfo::DetachInitialMap() {
- Map* map = reinterpret_cast<Map*>(initial_map());
-
- // Make the map remember to restore the link if it survives the GC.
-- map->set_bit_field2(
-- map->bit_field2() | (1 << Map::kAttachedToSharedFunctionInfo));
-+ map->set_bit_field3(
-+ map->bit_field3() | (1 << Map::kAttachedToSharedFunctionInfo));
-
- // Undo state changes made by StartInobjectTracking (except the
- // construction_count). This way if the initial map does not survive the GC
-@@ -7707,8 +7707,8 @@ void SharedFunctionInfo::DetachInitialMap() {
-
- // Called from GC, hence reinterpret_cast and unchecked accessors.
- void SharedFunctionInfo::AttachInitialMap(Map* map) {
-- map->set_bit_field2(
-- map->bit_field2() & ~(1 << Map::kAttachedToSharedFunctionInfo));
-+ map->set_bit_field3(
-+ map->bit_field3() & ~(1 << Map::kAttachedToSharedFunctionInfo));
-
- // Resume inobject slack tracking.
- set_initial_map(map);
-diff --git a/src/objects.h b/src/objects.h
-index b71eaac..3137437 100644
---- a/src/objects.h
-+++ b/src/objects.h
-@@ -4258,6 +4258,11 @@ class Map: public HeapObject {
- inline void set_has_external_resource(bool value);
- inline bool has_external_resource();
-
-+ // Tells whether the user object comparison callback should be used for
-+ // comparisons involving this object
-+ inline void set_use_user_object_comparison(bool value);
-+ inline bool use_user_object_comparison();
-+
- // [prototype]: implicit prototype object.
- DECL_ACCESSORS(prototype, Object)
-
-@@ -4505,7 +4510,7 @@ class Map: public HeapObject {
- static const int kIsExtensible = 0;
- static const int kFunctionWithPrototype = 1;
- static const int kStringWrapperSafeForDefaultValueOf = 2;
-- static const int kAttachedToSharedFunctionInfo = 3;
-+ static const int kUseUserObjectComparison = 3;
- // No bits can be used after kElementsKindFirstBit, they are all reserved for
- // storing ElementKind.
- static const int kElementsKindShift = 4;
-@@ -4524,6 +4529,7 @@ class Map: public HeapObject {
- static const int kIsShared = 0;
- static const int kNamedInterceptorIsFallback = 1;
- static const int kHasInstanceCallHandler = 2;
-+ static const int kAttachedToSharedFunctionInfo = 3;
-
- // Layout of the default cache. It holds alternating name and code objects.
- static const int kCodeCacheEntrySize = 2;
-@@ -7556,6 +7562,7 @@ class ObjectTemplateInfo: public TemplateInfo {
- DECL_ACCESSORS(constructor, Object)
- DECL_ACCESSORS(internal_field_count, Object)
- DECL_ACCESSORS(has_external_resource, Object)
-+ DECL_ACCESSORS(use_user_object_comparison, Object)
-
- static inline ObjectTemplateInfo* cast(Object* obj);
-
-@@ -7573,7 +7580,8 @@ class ObjectTemplateInfo: public TemplateInfo {
- static const int kInternalFieldCountOffset =
- kConstructorOffset + kPointerSize;
- static const int kHasExternalResourceOffset = kInternalFieldCountOffset + kPointerSize;
-- static const int kSize = kHasExternalResourceOffset + kPointerSize;
-+ static const int kUseUserObjectComparisonOffset = kHasExternalResourceOffset + kPointerSize;
-+ static const int kSize = kUseUserObjectComparisonOffset + kPointerSize;
- };
-
-
-diff --git a/src/runtime.cc b/src/runtime.cc
-index b64e66b..8010169 100644
---- a/src/runtime.cc
-+++ b/src/runtime.cc
-@@ -7095,6 +7095,29 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringEquals) {
- }
-
-
-+RUNTIME_FUNCTION(MaybeObject*, Runtime_UserObjectEquals) {
-+ NoHandleAllocation ha;
-+ ASSERT(args.length() == 2);
-+
-+ CONVERT_CHECKED(JSObject, lhs, args[1]);
-+ CONVERT_CHECKED(JSObject, rhs, args[0]);
-+
-+ bool result;
-+
-+ v8::UserObjectComparisonCallback callback = isolate->UserObjectComparisonCallback();
-+ if (callback) {
-+ HandleScope scope(isolate);
-+ Handle<JSObject> lhs_handle(lhs);
-+ Handle<JSObject> rhs_handle(rhs);
-+ result = callback(v8::Utils::ToLocal(lhs_handle), v8::Utils::ToLocal(rhs_handle));
-+ } else {
-+ result = (lhs == rhs);
-+ }
-+
-+ return Smi::FromInt(result?0:1);
-+}
-+
-+
- RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberCompare) {
- NoHandleAllocation ha;
- ASSERT(args.length() == 3);
-diff --git a/src/runtime.h b/src/runtime.h
-index aada06d..cd36da9 100644
---- a/src/runtime.h
-+++ b/src/runtime.h
-@@ -157,6 +157,7 @@ namespace internal {
- /* Comparisons */ \
- F(NumberEquals, 2, 1) \
- F(StringEquals, 2, 1) \
-+ F(UserObjectEquals, 2, 1) \
- \
- F(NumberCompare, 3, 1) \
- F(SmiLexicographicCompare, 2, 1) \
-diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
-index f30221f..ff8337f 100644
---- a/src/x64/code-stubs-x64.cc
-+++ b/src/x64/code-stubs-x64.cc
-@@ -3088,6 +3088,37 @@ void CompareStub::Generate(MacroAssembler* masm) {
- // NOTICE! This code is only reached after a smi-fast-case check, so
- // it is certain that at least one operand isn't a smi.
-
-+ {
-+ Label not_user_equal, user_equal;
-+ __ JumpIfSmi(rax, &not_user_equal);
-+ __ JumpIfSmi(rdx, &not_user_equal);
-+
-+ __ CmpObjectType(rax, JS_OBJECT_TYPE, rbx);
-+ __ j(not_equal, &not_user_equal);
-+
-+ __ CmpObjectType(rdx, JS_OBJECT_TYPE, rcx);
-+ __ j(not_equal, &not_user_equal);
-+
-+ __ testb(FieldOperand(rbx, Map::kBitField2Offset),
-+ Immediate(1 << Map::kUseUserObjectComparison));
-+ __ j(not_zero, &user_equal);
-+ __ testb(FieldOperand(rcx, Map::kBitField2Offset),
-+ Immediate(1 << Map::kUseUserObjectComparison));
-+ __ j(not_zero, &user_equal);
-+
-+ __ jmp(&not_user_equal);
-+
-+ __ bind(&user_equal);
-+
-+ __ pop(rbx); // Return address.
-+ __ push(rax);
-+ __ push(rdx);
-+ __ push(rbx);
-+ __ TailCallRuntime(Runtime::kUserObjectEquals, 2, 1);
-+
-+ __ bind(&not_user_equal);
-+ }
-+
- // Two identical objects are equal unless they are both NaN or undefined.
- {
- Label not_identical;
-@@ -5421,8 +5452,14 @@ void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
-
- __ CmpObjectType(rax, JS_OBJECT_TYPE, rcx);
- __ j(not_equal, &miss, Label::kNear);
-+ __ testb(FieldOperand(rcx, Map::kBitField2Offset),
-+ Immediate(1 << Map::kUseUserObjectComparison));
-+ __ j(not_zero, &miss, Label::kNear);
- __ CmpObjectType(rdx, JS_OBJECT_TYPE, rcx);
- __ j(not_equal, &miss, Label::kNear);
-+ __ testb(FieldOperand(rcx, Map::kBitField2Offset),
-+ Immediate(1 << Map::kUseUserObjectComparison));
-+ __ j(not_zero, &miss, Label::kNear);
-
- ASSERT(GetCondition() == equal);
- __ subq(rax, rdx);
---
-1.7.7.3
-
diff --git a/src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch b/src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch
deleted file mode 100644
index b6380b1b8e..0000000000
--- a/src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 519fec2ddc92193760dc2a6599f91ff4eb11563c Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Fri, 9 Sep 2011 14:16:12 +1000
-Subject: [PATCH 07/12] Allow a script to be flagged as "native"
-
-Native scripts do not appear in backtraces, or in the source and
-line number when exceptions are thrown from within them. This is
-useful to be able to write code in JavaScript instead of C++ and
-still have it appear sensibly to the user.
----
- include/v8.h | 5 +++--
- src/compiler.cc | 2 +-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index 6baf2b2..229ddbd 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -588,8 +588,9 @@ class ScriptOrigin {
- class V8EXPORT Script {
- public:
- enum CompileFlags {
-- Default = 0x00,
-- QmlMode = 0x01
-+ Default = 0x00,
-+ QmlMode = 0x01,
-+ NativeMode = 0x02
- };
-
- /**
-diff --git a/src/compiler.cc b/src/compiler.cc
-index 4902e72..cabca74 100644
---- a/src/compiler.cc
-+++ b/src/compiler.cc
-@@ -499,7 +499,7 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
-
- // Create a script object describing the script to be compiled.
- Handle<Script> script = FACTORY->NewScript(source);
-- if (natives == NATIVES_CODE) {
-+ if (natives == NATIVES_CODE || compile_flags & v8::Script::NativeMode) {
- script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
- }
- if (!script_name.is_null()) {
---
-1.7.7.3
-
diff --git a/src/v8/0008-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch b/src/v8/0008-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch
deleted file mode 100644
index 5e36024232..0000000000
--- a/src/v8/0008-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From de3e14564f163d808a3d10397a3018e6aaeb727b Mon Sep 17 00:00:00 2001
-From: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
-Date: Tue, 7 Dec 2010 11:56:42 +0100
-Subject: [PATCH 08/12] QtScript/V8: Add new v8 api to check if a value is an
- error.
-
-New function v8::Value::IsError was created.
-
-This API is experimental and added only for the purposes of our
-research.
----
- include/v8.h | 5 +++++
- src/api.cc | 6 ++++++
- src/heap.h | 1 +
- 3 files changed, 12 insertions(+), 0 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index 229ddbd..d995e54 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -967,6 +967,11 @@ class Value : public Data {
- */
- V8EXPORT bool IsRegExp() const;
-
-+ /**
-+ * Returns true if this value is an Error.
-+ */
-+ V8EXPORT bool IsError() const;
-+
- V8EXPORT Local<Boolean> ToBoolean() const;
- V8EXPORT Local<Number> ToNumber() const;
- V8EXPORT Local<String> ToString() const;
-diff --git a/src/api.cc b/src/api.cc
-index 974d702..a16ef65 100644
---- a/src/api.cc
-+++ b/src/api.cc
-@@ -2316,6 +2316,12 @@ bool Value::IsRegExp() const {
- return obj->IsJSRegExp();
- }
-
-+bool Value::IsError() const {
-+ if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsError()")) return false;
-+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
-+ return obj->HasSpecificClassOf(HEAP->Error_symbol());
-+}
-+
-
- Local<String> Value::ToString() const {
- i::Handle<i::Object> obj = Utils::OpenHandle(this);
-diff --git a/src/heap.h b/src/heap.h
-index 5e90964..6166cde 100644
---- a/src/heap.h
-+++ b/src/heap.h
-@@ -190,6 +190,7 @@ inline Heap* _inline_get_heap_();
- V(string_symbol, "string") \
- V(String_symbol, "String") \
- V(Date_symbol, "Date") \
-+ V(Error_symbol, "Error") \
- V(this_symbol, "this") \
- V(to_string_symbol, "toString") \
- V(char_at_symbol, "CharAt") \
---
-1.7.7.3
-
diff --git a/src/v8/0009-Fix-deprecated-Python-code.patch b/src/v8/0009-Fix-deprecated-Python-code.patch
deleted file mode 100644
index c0ca24a9ff..0000000000
--- a/src/v8/0009-Fix-deprecated-Python-code.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 7084bd94a99db246baa4f1d050a6f23cfd6adc14 Mon Sep 17 00:00:00 2001
-From: Kent Hansen <kent.hansen@nokia.com>
-Date: Fri, 2 Sep 2011 12:03:09 +0200
-Subject: [PATCH 09/12] Fix deprecated Python code
-
-Needed to make the scripts run on Python 3, which is the
-default python interpreter on some newer distros.
-
-Patch from http://code.google.com/p/v8/issues/detail?id=1391
----
- tools/js2c.py | 4 ++--
- tools/jsmin.py | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tools/js2c.py b/tools/js2c.py
-index a2ea8ea..fe6a72e 100644
---- a/tools/js2c.py
-+++ b/tools/js2c.py
-@@ -194,14 +194,14 @@ def ReadMacros(lines):
- macro_match = MACRO_PATTERN.match(line)
- if macro_match:
- name = macro_match.group(1)
-- args = map(string.strip, macro_match.group(2).split(','))
-+ args = args = [match.strip() for match in macro_match.group(2).split(',')]
- body = macro_match.group(3).strip()
- macros.append((re.compile("\\b%s\\(" % name), TextMacro(args, body)))
- else:
- python_match = PYTHON_MACRO_PATTERN.match(line)
- if python_match:
- name = python_match.group(1)
-- args = map(string.strip, python_match.group(2).split(','))
-+ args = [match.strip() for match in python_match.group(2).split(',')]
- body = python_match.group(3).strip()
- fun = eval("lambda " + ",".join(args) + ': ' + body)
- macros.append((re.compile("\\b%s\\(" % name), PythonMacro(args, fun)))
-diff --git a/tools/jsmin.py b/tools/jsmin.py
-index 646bf14..395441b 100644
---- a/tools/jsmin.py
-+++ b/tools/jsmin.py
-@@ -154,7 +154,7 @@ class JavaScriptMinifier(object):
- return var_name
- while True:
- identifier_first_char = self.identifier_counter % 52
-- identifier_second_char = self.identifier_counter / 52
-+ identifier_second_char = self.identifier_counter // 52
- new_identifier = self.CharFromNumber(identifier_first_char)
- if identifier_second_char != 0:
- new_identifier = (
---
-1.7.7.3
-
diff --git a/src/v8/0010-Remove-execute-flag-from-v8-debug.h.patch b/src/v8/0010-Remove-execute-flag-from-v8-debug.h.patch
deleted file mode 100644
index 243692e9ee..0000000000
--- a/src/v8/0010-Remove-execute-flag-from-v8-debug.h.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-From 04779c9a6f99fc097af68cf75a27b1d6a76c3e9d Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Thu, 25 Aug 2011 11:09:58 +1000
-Subject: [PATCH 10/12] Remove execute flag from v8-debug.h
-
----
- 0 files changed, 0 insertions(+), 0 deletions(-)
- mode change 100755 => 100644 include/v8-debug.h
-
-diff --git a/include/v8-debug.h b/include/v8-debug.h
-old mode 100755
-new mode 100644
---
-1.7.7.3
-
diff --git a/src/v8/0011-Fix-warnings.patch b/src/v8/0011-Fix-warnings.patch
deleted file mode 100644
index 39b5438e23..0000000000
--- a/src/v8/0011-Fix-warnings.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From eb7bb4628dc4480210818e371934a76ae1f7fb91 Mon Sep 17 00:00:00 2001
-From: Aaron Kennedy <aaron.kennedy@nokia.com>
-Date: Fri, 27 May 2011 13:04:15 +1000
-Subject: [PATCH 11/12] Fix warnings
-
----
- include/v8.h | 16 ++++++++--------
- 1 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/include/v8.h b/include/v8.h
-index d995e54..a7b5c8a 100644
---- a/include/v8.h
-+++ b/include/v8.h
-@@ -2579,7 +2579,7 @@ class V8EXPORT Extension { // NOLINT
- int source_length = -1);
- virtual ~Extension() { }
- virtual v8::Handle<v8::FunctionTemplate>
-- GetNativeFunction(v8::Handle<v8::String> name) {
-+ GetNativeFunction(v8::Handle<v8::String>) {
- return v8::Handle<v8::FunctionTemplate>();
- }
-
-@@ -3946,13 +3946,13 @@ class Internals {
- return *reinterpret_cast<T*>(addr);
- }
-
-- static inline bool CanCastToHeapObject(void* o) { return false; }
-- static inline bool CanCastToHeapObject(Context* o) { return true; }
-- static inline bool CanCastToHeapObject(String* o) { return true; }
-- static inline bool CanCastToHeapObject(Object* o) { return true; }
-- static inline bool CanCastToHeapObject(Message* o) { return true; }
-- static inline bool CanCastToHeapObject(StackTrace* o) { return true; }
-- static inline bool CanCastToHeapObject(StackFrame* o) { return true; }
-+ static inline bool CanCastToHeapObject(void*) { return false; }
-+ static inline bool CanCastToHeapObject(Context*) { return true; }
-+ static inline bool CanCastToHeapObject(String*) { return true; }
-+ static inline bool CanCastToHeapObject(Object*) { return true; }
-+ static inline bool CanCastToHeapObject(Message*) { return true; }
-+ static inline bool CanCastToHeapObject(StackTrace*) { return true; }
-+ static inline bool CanCastToHeapObject(StackFrame*) { return true; }
- };
-
- } // namespace internal
---
-1.7.7.3
-
diff --git a/src/v8/0012-Add-flag-to-avoid-breakpoint-relocation.patch b/src/v8/0012-Add-flag-to-avoid-breakpoint-relocation.patch
deleted file mode 100644
index 922b011776..0000000000
--- a/src/v8/0012-Add-flag-to-avoid-breakpoint-relocation.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From d28b6a024826aaa48a8b3e69c096d01c91aff2c9 Mon Sep 17 00:00:00 2001
-From: Kai Koehne <kai.koehne@nokia.com>
-Date: Thu, 10 Nov 2011 16:00:37 +0100
-Subject: [PATCH 12/12] Add flag to avoid breakpoint relocation
-
-Add a flag that prevents v8 from relocating breakpoints across
-line boundaries.
----
- src/debug.cc | 29 +++++++++++++++++++---
- src/flag-definitions.h | 1 +
- test/cctest/test-debug.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 85 insertions(+), 4 deletions(-)
-
-diff --git a/src/debug.cc b/src/debug.cc
-index dc9f297..d32574b 100644
---- a/src/debug.cc
-+++ b/src/debug.cc
-@@ -1131,6 +1131,17 @@ Handle<DebugInfo> Debug::GetDebugInfo(Handle<SharedFunctionInfo> shared) {
- return Handle<DebugInfo>(DebugInfo::cast(shared->debug_info()));
- }
-
-+static bool ContainsLineBreak(String *string, int from, int to)
-+{
-+ ASSERT(from >= 0);
-+ ASSERT(from <= to);
-+ const int end = (string->length() < to) ? string->length() : to;
-+ for (int pos = from; pos < end; ++pos) {
-+ if (string->Get(pos) == '\n')
-+ return true;
-+ }
-+ return false;
-+}
-
- void Debug::SetBreakPoint(Handle<SharedFunctionInfo> shared,
- Handle<Object> break_point_object,
-@@ -1151,12 +1162,22 @@ void Debug::SetBreakPoint(Handle<SharedFunctionInfo> shared,
- // Find the break point and change it.
- BreakLocationIterator it(debug_info, SOURCE_BREAK_LOCATIONS);
- it.FindBreakLocationFromPosition(*source_position);
-- it.SetBreakPoint(break_point_object);
-
-- *source_position = it.position();
-+ bool acceptBreak = true;
-+ if (!FLAG_breakpoint_relocation) {
-+ if (String *sourceStr = String::cast(shared->GetSourceCode())) {
-+ acceptBreak = !ContainsLineBreak(sourceStr, *source_position, it.position());
-+ }
-+ }
-+
-+ if (acceptBreak) {
-+ it.SetBreakPoint(break_point_object);
-
-- // At least one active break point now.
-- ASSERT(debug_info->GetBreakPointCount() > 0);
-+ *source_position = it.position();
-+
-+ // At least one active break point now.
-+ ASSERT(debug_info->GetBreakPointCount() > 0);
-+ }
- }
-
-
-diff --git a/src/flag-definitions.h b/src/flag-definitions.h
-index ee6ef01..fe64a96 100644
---- a/src/flag-definitions.h
-+++ b/src/flag-definitions.h
-@@ -233,6 +233,7 @@ DEFINE_bool(trace_debug_json, false, "trace debugging JSON request/response")
- DEFINE_bool(debugger_auto_break, true,
- "automatically set the debug break flag when debugger commands are "
- "in the queue")
-+DEFINE_bool(breakpoint_relocation, true, "relocate breakpoints to the next executable line")
- DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature")
-
- // execution.cc
-diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
-index cf723ba..7e51c34 100644
---- a/test/cctest/test-debug.cc
-+++ b/test/cctest/test-debug.cc
-@@ -2305,6 +2305,65 @@ TEST(ScriptBreakPointTopLevelCrash) {
- CheckDebuggerUnloaded();
- }
-
-+// Test that breakpoint_relocation flag is honored
-+TEST(ScriptBreakPointNoRelocation) {
-+ i::FLAG_breakpoint_relocation = false;
-+
-+ v8::HandleScope scope;
-+ DebugLocalContext env;
-+ env.ExposeDebug();
-+
-+ // Create a function for checking the function when hitting a break point.
-+ frame_function_name = CompileFunction(&env,
-+ frame_function_name_source,
-+ "frame_function_name");
-+
-+ v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount,
-+ v8::Undefined());
-+
-+ v8::Local<v8::String> script1 = v8::String::New(
-+ "a = 0 // line 0\n"
-+ " // line 1\n"
-+ " // line 2\n"
-+ " // line 3\n"
-+ "function f() { // line 4\n"
-+ " return 0; // line 5\n"
-+ "} // line 6");
-+
-+ // Set the script break point on the empty line
-+ SetScriptBreakPointByNameFromJS("test.html", 2, -1);
-+
-+ // Compile the script and call the function.
-+ v8::ScriptOrigin origin(v8::String::New("test.html"), v8::Integer::New(0));
-+ v8::Script::Compile(script1, &origin)->Run();
-+ v8::Local<v8::Function> f
-+ = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f")));
-+ f->Call(env->Global(), 0, NULL);
-+
-+ // Check that a break point was not hit
-+ CHECK_EQ(0, break_point_hit_count);
-+
-+ v8::Local<v8::String> script2 = v8::String::New(
-+ "a = 0 // line 0\n"
-+ "function g() { // line 1\n"
-+ " return 0; // line 2\n"
-+ "} // line 3\n"
-+ "function f() { // line 4\n"
-+ " return 0; // line 5\n"
-+ "} // line 6");
-+
-+ // Compile the script and call the new function
-+ v8::Script::Compile(script2, &origin)->Run();
-+ v8::Local<v8::Function> g
-+ = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("g")));
-+ g->Call(env->Global(), 0, NULL);
-+
-+ // Check that a break point was not hit
-+ CHECK_EQ(1, break_point_hit_count);
-+
-+ v8::Debug::SetDebugEventListener(NULL);
-+ CheckDebuggerUnloaded();
-+}
-
- // Test that it is possible to remove the last break point for a function
- // inside the break handling of that break point.
---
-1.7.7.3
-
diff --git a/src/v8/README b/src/v8/README
deleted file mode 100644
index 850f70326e..0000000000
--- a/src/v8/README
+++ /dev/null
@@ -1 +0,0 @@
-These patches apply cleanly against v8 at e123c9dfe54146f8bfca38841255f63a95a00a19
diff --git a/src/v8/v8.pri b/src/v8/v8.pri
deleted file mode 100644
index 11b74c8151..0000000000
--- a/src/v8/v8.pri
+++ /dev/null
@@ -1,304 +0,0 @@
-isEmpty(QT_ARCH) {
- # We're most likely being parsed in a fromfile() call, in which case the
- # QMake environment isn't complete. Load qt_config in an attempt to set
- # the variables we need (QT_ARCH and CONFIG, in particular).
- load(qt_config)
-}
-
-isEmpty(V8_TARGET_ARCH) {
- # Detect target
- equals(QT_ARCH, x86_64)|contains(CONFIG, x86_64):V8_TARGET_ARCH = x64
- else:equals(QT_ARCH, "i386"): V8_TARGET_ARCH = ia32
- else:equals(QT_ARCH, "mips"): V8_TARGET_ARCH = mips
- else:equals(QT_ARCH, "arm"): V8_TARGET_ARCH = arm
- else:equals(QMAKE_HOST.arch, armv7l): V8_TARGET_ARCH = arm
- else:equals(QMAKE_HOST.arch, armv5tel): V8_TARGET_ARCH = arm
- else:equals(QMAKE_HOST.arch, x86_64): V8_TARGET_ARCH = x64
- else:equals(QMAKE_HOST.arch, x86): V8_TARGET_ARCH = ia32
- else:equals(QMAKE_HOST.arch, i386): V8_TARGET_ARCH = ia32
- else:equals(QMAKE_HOST.arch, i686): V8_TARGET_ARCH = ia32
- else:error("Couldn't detect supported v8 architecture ($$QMAKE_HOST.arch/$$QT_ARCH). Currently supported architectures are: x64, x86 and arm")
-}
-
-include($$PWD/v8base.pri)
-
-# In debug-and-release builds, generated sources must not go to the same
-# directory, or they could clobber each other in highly parallelized builds
-CONFIG(debug, debug|release):V8_GENERATED_SOURCES_DIR = generated-debug
-else: V8_GENERATED_SOURCES_DIR = generated-release
-
-# this maybe removed in future
-DEFINES += ENABLE_DEBUGGER_SUPPORT
-
-# this is needed by crankshaft ( http://code.google.com/p/v8/issues/detail?id=1271 )
-DEFINES += ENABLE_VMSTATE_TRACKING ENABLE_LOGGING_AND_PROFILING
-
-CONFIG(debug, debug|release) {
- DEFINES += DEBUG V8_ENABLE_CHECKS OBJECT_PRINT ENABLE_DISASSEMBLER
-} else {
- DEFINES += NDEBUG
-}
-
-V8SRC = $$V8DIR/src
-
-INCLUDEPATH += \
- $$V8SRC
-
-SOURCES += \
- $$V8SRC/accessors.cc \
- $$V8SRC/allocation.cc \
- $$V8SRC/api.cc \
- $$V8SRC/assembler.cc \
- $$V8SRC/ast.cc \
- $$V8SRC/atomicops_internals_x86_gcc.cc \
- $$V8SRC/bignum.cc \
- $$V8SRC/bignum-dtoa.cc \
- $$V8SRC/bootstrapper.cc \
- $$V8SRC/builtins.cc \
- $$V8SRC/cached-powers.cc \
- $$V8SRC/checks.cc \
- $$V8SRC/circular-queue.cc \
- $$V8SRC/code-stubs.cc \
- $$V8SRC/codegen.cc \
- $$V8SRC/compilation-cache.cc \
- $$V8SRC/compiler.cc \
- $$V8SRC/contexts.cc \
- $$V8SRC/conversions.cc \
- $$V8SRC/counters.cc \
- $$V8SRC/cpu-profiler.cc \
- $$V8SRC/data-flow.cc \
- $$V8SRC/dateparser.cc \
- $$V8SRC/debug-agent.cc \
- $$V8SRC/debug.cc \
- $$V8SRC/deoptimizer.cc \
- $$V8SRC/disassembler.cc \
- $$V8SRC/diy-fp.cc \
- $$V8SRC/dtoa.cc \
- $$V8SRC/elements.cc \
- $$V8SRC/execution.cc \
- $$V8SRC/factory.cc \
- $$V8SRC/flags.cc \
- $$V8SRC/frames.cc \
- $$V8SRC/full-codegen.cc \
- $$V8SRC/func-name-inferrer.cc \
- $$V8SRC/gdb-jit.cc \
- $$V8SRC/global-handles.cc \
- $$V8SRC/fast-dtoa.cc \
- $$V8SRC/fixed-dtoa.cc \
- $$V8SRC/handles.cc \
- $$V8SRC/hashmap.cc \
- $$V8SRC/heap-profiler.cc \
- $$V8SRC/heap.cc \
- $$V8SRC/hydrogen.cc \
- $$V8SRC/hydrogen-instructions.cc \
- $$V8SRC/ic.cc \
- $$V8SRC/incremental-marking.cc \
- $$V8SRC/inspector.cc \
- $$V8SRC/interpreter-irregexp.cc \
- $$V8SRC/isolate.cc \
- $$V8SRC/jsregexp.cc \
- $$V8SRC/lithium-allocator.cc \
- $$V8SRC/lithium.cc \
- $$V8SRC/liveedit.cc \
- $$V8SRC/liveobjectlist.cc \
- $$V8SRC/log-utils.cc \
- $$V8SRC/log.cc \
- $$V8SRC/mark-compact.cc \
- $$V8SRC/messages.cc \
- $$V8SRC/objects.cc \
- $$V8SRC/objects-printer.cc \
- $$V8SRC/objects-visiting.cc \
- $$V8SRC/parser.cc \
- $$V8SRC/preparser.cc \
- $$V8SRC/preparse-data.cc \
- $$V8SRC/profile-generator.cc \
- $$V8SRC/property.cc \
- $$V8SRC/regexp-macro-assembler-irregexp.cc \
- $$V8SRC/regexp-macro-assembler.cc \
- $$V8SRC/regexp-stack.cc \
- $$V8SRC/rewriter.cc \
- $$V8SRC/runtime.cc \
- $$V8SRC/runtime-profiler.cc \
- $$V8SRC/safepoint-table.cc \
- $$V8SRC/scanner.cc \
- $$V8SRC/scanner-character-streams.cc \
- $$V8SRC/scopeinfo.cc \
- $$V8SRC/scopes.cc \
- $$V8SRC/serialize.cc \
- $$V8SRC/snapshot-common.cc \
- $$V8SRC/spaces.cc \
- $$V8SRC/string-search.cc \
- $$V8SRC/string-stream.cc \
- $$V8SRC/strtod.cc \
- $$V8SRC/stub-cache.cc \
- $$V8SRC/token.cc \
- $$V8SRC/type-info.cc \
- $$V8SRC/unicode.cc \
- $$V8SRC/utils.cc \
- $$V8SRC/v8-counters.cc \
- $$V8SRC/v8.cc \
- $$V8SRC/v8conversions.cc \
- $$V8SRC/v8threads.cc \
- $$V8SRC/v8utils.cc \
- $$V8SRC/variables.cc \
- $$V8SRC/version.cc \
- $$V8SRC/store-buffer.cc \
- $$V8SRC/zone.cc \
- $$V8SRC/extensions/gc-extension.cc \
- $$V8SRC/extensions/externalize-string-extension.cc
-
-equals(V8_TARGET_ARCH, arm) {
-DEFINES += V8_TARGET_ARCH_ARM
-DEFINES += USE_EABI_HARDFLOAT=1 CAN_USE_VFP_INSTRUCTIONS
-SOURCES += \
- $$V8SRC/arm/builtins-arm.cc \
- $$V8SRC/arm/code-stubs-arm.cc \
- $$V8SRC/arm/codegen-arm.cc \
- $$V8SRC/arm/constants-arm.cc \
- $$V8SRC/arm/cpu-arm.cc \
- $$V8SRC/arm/debug-arm.cc \
- $$V8SRC/arm/deoptimizer-arm.cc \
- $$V8SRC/arm/disasm-arm.cc \
- $$V8SRC/arm/frames-arm.cc \
- $$V8SRC/arm/full-codegen-arm.cc \
- $$V8SRC/arm/ic-arm.cc \
- $$V8SRC/arm/lithium-arm.cc \
- $$V8SRC/arm/lithium-codegen-arm.cc \
- $$V8SRC/arm/lithium-gap-resolver-arm.cc \
- $$V8SRC/arm/macro-assembler-arm.cc \
- $$V8SRC/arm/regexp-macro-assembler-arm.cc \
- $$V8SRC/arm/stub-cache-arm.cc \
- $$V8SRC/arm/assembler-arm.cc
-} else:equals(V8_TARGET_ARCH, ia32) {
-DEFINES += V8_TARGET_ARCH_IA32
-SOURCES += \
- $$V8SRC/ia32/assembler-ia32.cc \
- $$V8SRC/ia32/builtins-ia32.cc \
- $$V8SRC/ia32/code-stubs-ia32.cc \
- $$V8SRC/ia32/codegen-ia32.cc \
- $$V8SRC/ia32/cpu-ia32.cc \
- $$V8SRC/ia32/debug-ia32.cc \
- $$V8SRC/ia32/deoptimizer-ia32.cc \
- $$V8SRC/ia32/disasm-ia32.cc \
- $$V8SRC/ia32/frames-ia32.cc \
- $$V8SRC/ia32/full-codegen-ia32.cc \
- $$V8SRC/ia32/ic-ia32.cc \
- $$V8SRC/ia32/lithium-codegen-ia32.cc \
- $$V8SRC/ia32/lithium-gap-resolver-ia32.cc \
- $$V8SRC/ia32/lithium-ia32.cc \
- $$V8SRC/ia32/macro-assembler-ia32.cc \
- $$V8SRC/ia32/regexp-macro-assembler-ia32.cc \
- $$V8SRC/ia32/stub-cache-ia32.cc
-} else:equals(V8_TARGET_ARCH, x64) {
-# FIXME What about 32-bit Macs?
-DEFINES += V8_TARGET_ARCH_X64
-SOURCES += \
- $$V8SRC/x64/assembler-x64.cc \
- $$V8SRC/x64/builtins-x64.cc \
- $$V8SRC/x64/code-stubs-x64.cc \
- $$V8SRC/x64/codegen-x64.cc \
- $$V8SRC/x64/cpu-x64.cc \
- $$V8SRC/x64/debug-x64.cc \
- $$V8SRC/x64/deoptimizer-x64.cc \
- $$V8SRC/x64/disasm-x64.cc \
- $$V8SRC/x64/frames-x64.cc \
- $$V8SRC/x64/full-codegen-x64.cc \
- $$V8SRC/x64/ic-x64.cc \
- $$V8SRC/x64/lithium-codegen-x64.cc \
- $$V8SRC/x64/lithium-gap-resolver-x64.cc \
- $$V8SRC/x64/lithium-x64.cc \
- $$V8SRC/x64/macro-assembler-x64.cc \
- $$V8SRC/x64/regexp-macro-assembler-x64.cc \
- $$V8SRC/x64/stub-cache-x64.cc
-} else:equals(V8_TARGET_ARCH, mips) {
-DEFINES += V8_TARGET_MIPS
-SOURCES += \
- $$V8SRC/mips/assembler-mips.cc \
- $$V8SRC/mips/builtins-mips.cc \
- $$V8SRC/mips/codegen-mips.cc \
- $$V8SRC/mips/code-stubs-mips.cc \
- $$V8SRC/mips/constants-mips.cc \
- $$V8SRC/mips/cpu-mips.cc \
- $$V8SRC/mips/debug-mips.cc \
- $$V8SRC/mips/deoptimizer-mips.cc \
- $$V8SRC/mips/disasm-mips.cc \
- $$V8SRC/mips/frames-mips.cc \
- $$V8SRC/mips/full-codegen-mips.cc \
- $$V8SRC/mips/ic-mips.cc \
- $$V8SRC/mips/macro-assembler-mips.cc \
- $$V8SRC/mips/regexp-macro-assembler-mips.cc \
- $$V8SRC/mips/simulator-mips.cc \
- $$V8SRC/mips/stub-cache-mips.cc
-}
-
-unix:!symbian:!macx {
-SOURCES += \
- $$V8SRC/platform-linux.cc \
- $$V8SRC/platform-posix.cc
-}
-
-#os:macos
-macx {
-SOURCES += \
- $$V8SRC/platform-macos.cc \
- $$V8SRC/platform-posix.cc
-}
-
-win32 {
-SOURCES += \
- $$V8SRC/platform-win32.cc \
- $$V8SRC/win32-math.cc
-LIBS += -lWs2_32 -lWinmm
-win32-msvc*: QMAKE_CXXFLAGS += -wd4100 -wd 4291 -wd4351 -wd4355 -wd4800
-win32-msvc*:arch_i386: DEFINES += _USE_32BIT_TIME_T
-}
-
-#mode:debug
-CONFIG(debug) {
- SOURCES += \
- $$V8SRC/objects-debug.cc \
- $$V8SRC/prettyprinter.cc \
- $$V8SRC/regexp-macro-assembler-tracer.cc
-}
-
-V8_LIBRARY_FILES = \
- $$V8SRC/runtime.js \
- $$V8SRC/v8natives.js \
- $$V8SRC/array.js \
- $$V8SRC/string.js \
- $$V8SRC/uri.js \
- $$V8SRC/math.js \
- $$V8SRC/messages.js \
- $$V8SRC/apinatives.js \
- $$V8SRC/date.js \
- $$V8SRC/regexp.js \
- $$V8SRC/json.js \
- $$V8SRC/liveedit-debugger.js \
- $$V8SRC/mirror-debugger.js \
- $$V8SRC/debug-debugger.js
-
-V8_EXPERIMENTAL_LIBRARY_FILES = \
- $$V8SRC/proxy.js \
-
-v8_js2c.commands = python $$V8DIR/tools/js2c.py $$V8_GENERATED_SOURCES_DIR/libraries.cpp CORE off
-v8_js2c.commands += $$V8SRC/macros.py ${QMAKE_FILE_IN}
-v8_js2c.output = $$V8_GENERATED_SOURCES_DIR/libraries.cpp
-v8_js2c.input = V8_LIBRARY_FILES
-v8_js2c.variable_out = SOURCES
-v8_js2c.dependency_type = TYPE_C
-v8_js2c.depends = $$V8DIR/tools/js2c.py $$V8SRC/macros.py
-v8_js2c.CONFIG += combine
-v8_js2c.name = generating[v8] ${QMAKE_FILE_IN}
-silent:v8_js2c.commands = @echo generating[v8] ${QMAKE_FILE_IN} && $$v8_js2c.commands
-
-v8_js2c_experimental.commands = python $$V8DIR/tools/js2c.py $$V8_GENERATED_SOURCES_DIR/experimental-libraries.cpp EXPERIMENTAL off
-v8_js2c_experimental.commands += $$V8SRC/macros.py ${QMAKE_FILE_IN}
-v8_js2c_experimental.output = $$V8_GENERATED_SOURCES_DIR/experimental-libraries.cpp
-v8_js2c_experimental.input = V8_EXPERIMENTAL_LIBRARY_FILES
-v8_js2c_experimental.variable_out = SOURCES
-v8_js2c_experimental.dependency_type = TYPE_C
-v8_js2c_experimental.depends = $$V8DIR/tools/js2c.py $$V8SRC/macros.py
-v8_js2c_experimental.CONFIG += combine
-v8_js2c_experimental.name = generating[v8] ${QMAKE_FILE_IN}
-
-QMAKE_EXTRA_COMPILERS += v8_js2c v8_js2c_experimental
diff --git a/src/v8/v8.pro b/src/v8/v8.pro
deleted file mode 100644
index 6f8ed703aa..0000000000
--- a/src/v8/v8.pro
+++ /dev/null
@@ -1,41 +0,0 @@
-load(qt_module)
-
-TARGET = QtV8
-QPRO_PWD = $$PWD
-QT =
-
-CONFIG += module
-MODULE_PRI = ../modules/qt_v8.pri
-
-win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
-
-load(qt_module_config)
-CONFIG += warn_off
-
-# Remove includepaths that were added by qt_module_config.
-# These cause compilation of V8 to fail because they appear before
-# 3rdparty/v8/src; 3rdparty/v8/src/v8.h will then be "shadowed" by
-# the public v8.h API header (they are not the same!).
-INCLUDEPATH -= $$MODULE_PRIVATE_INCLUDES
-INCLUDEPATH -= $$MODULE_PRIVATE_INCLUDES/$$TARGET
-INCLUDEPATH -= $$MODULE_INCLUDES $$MODULE_INCLUDES/..
-
-HEADERS += $$QT_SOURCE_TREE/src/v8/qtv8version.h
-
-!contains(QT_CONFIG, static): DEFINES += V8_SHARED BUILDING_V8_SHARED
-
-include(v8.pri)
-
-contains(QT_CONFIG, v8snapshot) {
- mkv8snapshot.commands = ../../bin/mkv8snapshot$$qtPlatformTargetSuffix() ${QMAKE_FILE_OUT}
- DUMMY_FILE = v8.pro
- mkv8snapshot.input = DUMMY_FILE
- mkv8snapshot.output = $$V8_GENERATED_SOURCES_DIR/snapshot.cpp
- mkv8snapshot.variable_out = SOURCES
- mkv8snapshot.dependency_type = TYPE_C
- mkv8snapshot.name = generating[v8] ${QMAKE_FILE_IN}
- silent:mkv8snapshot.commands = @echo generating[v8] ${QMAKE_FILE_IN} && $$mkv8snapshot.commands
- QMAKE_EXTRA_COMPILERS += mkv8snapshot
-} else {
- SOURCES += $$V8SRC/snapshot-empty.cc
-}
diff --git a/src/v8/v8base.pri b/src/v8/v8base.pri
deleted file mode 100644
index f0d7c00451..0000000000
--- a/src/v8/v8base.pri
+++ /dev/null
@@ -1,19 +0,0 @@
-V8DIR = $$(V8DIR)
-isEmpty(V8DIR) {
- V8DIR = $$PWD/../3rdparty/v8
-} else {
- message(using external V8 from $$V8DIR)
-}
-
-*-g++*: {
- QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter
- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
-
- # mksnapshot hangs if gcc 4.5 is used
- # for reference look at http://code.google.com/p/v8/issues/detail?id=884
- equals(QT_GCC_MAJOR_VERSION, 4): equals(QT_GCC_MINOR_VERSION, 5) {
- message(because of a bug in gcc / v8 we need to add -fno-strict-aliasing)
- QMAKE_CFLAGS += -fno-strict-aliasing
- QMAKE_CXXFLAGS += -fno-strict-aliasing
- }
-}
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
index b7e4594ca1..baf34b2fbc 100644
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
@@ -2,4 +2,4 @@
get_filename_component(_qt5_widgets_install_prefix ${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR} ABSOLUTE)
# Not Required by default:
-set(QT_UIC_EXECUTABLE \"${_qt5_widgets_install_prefix}/$$CMAKE_BIN_DIR/uic\")
+set(QT_UIC_EXECUTABLE \"${_qt5_widgets_install_prefix}/$$CMAKE_BIN_DIR/uic$$CMAKE_BIN_SUFFIX\")
diff --git a/src/widgets/Qt5WidgetsMacros.cmake b/src/widgets/Qt5WidgetsMacros.cmake
index 7ebc7e6673..88f259191e 100644
--- a/src/widgets/Qt5WidgetsMacros.cmake
+++ b/src/widgets/Qt5WidgetsMacros.cmake
@@ -39,27 +39,27 @@
include(CMakeParseArguments)
-# QT5_WRAP_UI(outfiles inputfile ... )
+# qt5_wrap_ui(outfiles inputfile ... )
-MACRO (QT5_WRAP_UI outfiles )
- set(options)
- set(oneValueArgs)
- set(multiValueArgs OPTIONS)
+function(QT5_WRAP_UI outfiles )
+ set(options)
+ set(oneValueArgs)
+ set(multiValueArgs OPTIONS)
- cmake_parse_arguments(_WRAP_UI "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ cmake_parse_arguments(_WRAP_UI "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
- set(ui_files ${_WRAP_UI_UNPARSED_ARGUMENTS})
- set(ui_options ${_WRAP_UI_OPTIONS})
+ set(ui_files ${_WRAP_UI_UNPARSED_ARGUMENTS})
+ set(ui_options ${_WRAP_UI_OPTIONS})
- FOREACH (it ${ui_files})
- GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_UIC_EXECUTABLE}
- ARGS ${ui_options} -o ${outfile} ${infile}
- MAIN_DEPENDENCY ${infile} VERBATIM)
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH (it)
-
-ENDMACRO (QT5_WRAP_UI)
+ foreach(it ${ui_files})
+ get_filename_component(outfile ${it} NAME_WE)
+ get_filename_component(infile ${it} ABSOLUTE)
+ set(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
+ add_custom_command(OUTPUT ${outfile}
+ COMMAND ${QT_UIC_EXECUTABLE}
+ ARGS ${ui_options} -o ${outfile} ${infile}
+ MAIN_DEPENDENCY ${infile} VERBATIM)
+ list(APPEND ${outfiles} ${outfile})
+ endforeach()
+ set(${outfiles} ${${outfiles}} PARENT_SCOPE)
+endfunction()
diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp
index a1c53e934e..ae09b011dd 100644
--- a/src/widgets/accessible/qaccessiblewidget.cpp
+++ b/src/widgets/accessible/qaccessiblewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -159,6 +159,8 @@ public:
\ingroup accessibility
\inmodule QtWidgets
+ This class is part of \l {Accessibility for QWidget Applications}.
+
This class is convenient to use as a base class for custom
implementations of QAccessibleInterfaces that provide information
about widget objects.
@@ -188,6 +190,7 @@ QAccessibleWidget::QAccessibleWidget(QWidget *w, QAccessible::Role role, const Q
d->asking = 0;
}
+/*! \reimp */
QWindow *QAccessibleWidget::window() const
{
return widget()->windowHandle();
@@ -222,28 +225,6 @@ QObject *QAccessibleWidget::parentObject() const
}
/*! \reimp */
-int QAccessibleWidget::childAt(int x, int y) const
-{
- QWidget *w = widget();
- if (!w->isVisible())
- return -1;
- QPoint gp = w->mapToGlobal(QPoint(0, 0));
- if (!QRect(gp.x(), gp.y(), w->width(), w->height()).contains(x, y))
- return -1;
-
- for (int i = 0; i < childCount(); ++i) {
- QAccessibleInterface *childIface = child(i);
- bool found = false;
- if (childIface->rect().contains(x, y))
- found = true;
- delete childIface;
- if (found)
- return i + 1;
- }
- return 0;
-}
-
-/*! \reimp */
QRect QAccessibleWidget::rect() const
{
QWidget *w = widget();
@@ -385,11 +366,7 @@ QAccessible::Relation QAccessibleWidget::relationTo(const QAccessibleInterface *
}
QObject *parent = object()->parent();
- if (o == parent)
- return relation | QAccessible::Child;
-
if (o->parent() == parent) {
- relation |= QAccessible::Sibling;
QAccessibleInterface *sibIface = QAccessible::queryAccessibleInterface(o);
Q_ASSERT(sibIface);
QRect wg = rect();
@@ -397,7 +374,7 @@ QAccessible::Relation QAccessibleWidget::relationTo(const QAccessibleInterface *
if (wg.intersects(sg)) {
QAccessibleInterface *pIface = 0;
pIface = sibIface->parent();
- if (pIface && !((sibIface->state() | state()) & QAccessible::Invisible)) {
+ if (pIface && !(sibIface->state().invisible | state().invisible)) {
int wi = pIface->indexOfChild(this);
int si = pIface->indexOfChild(sibIface);
@@ -407,31 +384,16 @@ QAccessible::Relation QAccessibleWidget::relationTo(const QAccessibleInterface *
relation |= QAccessible::Covered;
}
delete pIface;
- } else {
- QPoint wc = wg.center();
- QPoint sc = sg.center();
- if (wc.x() < sc.x())
- relation |= QAccessible::Left;
- else if(wc.x() > sc.x())
- relation |= QAccessible::Right;
- if (wc.y() < sc.y())
- relation |= QAccessible::Up;
- else if (wc.y() > sc.y())
- relation |= QAccessible::Down;
}
delete sibIface;
return relation;
}
- if (isAncestor(o, object()))
- return relation | QAccessible::Descendent;
- if (isAncestor(object(), o))
- return relation | QAccessible::Ancestor;
-
return relation;
}
+/*! \reimp */
QAccessibleInterface *QAccessibleWidget::parent() const
{
QObject *parentWidget= widget()->parentWidget();
@@ -440,6 +402,7 @@ QAccessibleInterface *QAccessibleWidget::parent() const
return QAccessible::queryAccessibleInterface(parentWidget);
}
+/*! \reimp */
QAccessibleInterface *QAccessibleWidget::child(int index) const
{
QWidgetList childList = childWidgets(widget());
@@ -459,132 +422,20 @@ int QAccessibleWidget::navigate(QAccessible::RelationFlag relation, int entry,
QObject *targetObject = 0;
switch (relation) {
- // Hierarchical
- case QAccessible::Self:
- targetObject = object();
- break;
- case QAccessible::Child:
- qWarning() << "QAccessibleWidget::navigate is deprecated for QAccessible::Child in:" << object()->metaObject()->className();
- *target = child(entry - 1);
- return *target ? 0 : -1;
- case QAccessible::Ancestor:
- qWarning() << "QAccessibleWidget::navigate is deprecated for QAccessible::Ancestor in:" << object()->metaObject()->className();
- *target = parent();
- return *target ? 0 : -1;
- case QAccessible::Sibling:
- {
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(parentObject());
- if (!iface)
- return -1;
-
- *target = iface->child(entry - 1);
- delete iface;
- if (*target)
- return 0;
- }
- break;
-
- // Geometrical
- case QAccessible::Left:
- // fall through
- case QAccessible::Right:
- // fall through
- case QAccessible::Up:
- // fall through
- case QAccessible::Down:
- {
- QAccessibleInterface *pIface = parent();
- if (!pIface)
- return -1;
-
- QRect startg = rect();
- QPoint startc = startg.center();
- QAccessibleInterface *candidate = 0;
- int mindist = 100000;
- int sibCount = pIface->childCount();
- for (int i = 0; i < sibCount; ++i) {
- QAccessibleInterface *sibling = 0;
- sibling = pIface->child(i);
- Q_ASSERT(sibling);
- if ((relationTo(sibling) & QAccessible::Self) || (sibling->state() & QAccessible::Invisible)) {
- //ignore ourself and invisible siblings
- delete sibling;
- continue;
- }
-
- QRect sibg = sibling->rect();
- QPoint sibc = sibg.center();
- QPoint sibp;
- QPoint startp;
- QPoint distp;
- switch (relation) {
- case QAccessible::Left:
- startp = QPoint(startg.left(), startg.top() + startg.height() / 2);
- sibp = QPoint(sibg.right(), sibg.top() + sibg.height() / 2);
- if (QPoint(sibc - startc).x() >= 0) {
- delete sibling;
- continue;
- }
- distp = sibp - startp;
- break;
- case QAccessible::Right:
- startp = QPoint(startg.right(), startg.top() + startg.height() / 2);
- sibp = QPoint(sibg.left(), sibg.top() + sibg.height() / 2);
- if (QPoint(sibc - startc).x() <= 0) {
- delete sibling;
- continue;
- }
- distp = sibp - startp;
- break;
- case QAccessible::Up:
- startp = QPoint(startg.left() + startg.width() / 2, startg.top());
- sibp = QPoint(sibg.left() + sibg.width() / 2, sibg.bottom());
- if (QPoint(sibc - startc).y() >= 0) {
- delete sibling;
- continue;
- }
- distp = sibp - startp;
- break;
- case QAccessible::Down:
- startp = QPoint(startg.left() + startg.width() / 2, startg.bottom());
- sibp = QPoint(sibg.left() + sibg.width() / 2, sibg.top());
- if (QPoint(sibc - startc).y() <= 0) {
- delete sibling;
- continue;
- }
- distp = sibp - startp;
- break;
- default:
- break;
- }
-
- int dist = (int)qSqrt((qreal)distp.x() * distp.x() + distp.y() * distp.y());
- if (dist < mindist) {
- delete candidate;
- candidate = sibling;
- mindist = dist;
- } else {
- delete sibling;
- }
- }
- delete pIface;
- *target = candidate;
- if (*target)
- return 0;
- }
- break;
case QAccessible::Covers:
if (entry > 0) {
- QAccessibleInterface *pIface = QAccessible::queryAccessibleInterface(parentObject());
+ QAccessibleInterface *pIface = parent();
if (!pIface)
return -1;
QRect r = rect();
int sibCount = pIface->childCount();
QAccessibleInterface *sibling = 0;
- for (int i = pIface->indexOfChild(this) + 1; i <= sibCount && entry; ++i) {
+ // FIXME: this code looks very suspicious
+ // why start at this index?
+ for (int i = pIface->indexOfChild(this) + 2; i <= sibCount && entry; ++i) {
sibling = pIface->child(i - 1);
- if (!sibling || (sibling->state() & QAccessible::Invisible)) {
+ if (!sibling || (sibling->state().invisible)) {
delete sibling;
sibling = 0;
continue;
@@ -611,10 +462,11 @@ int QAccessibleWidget::navigate(QAccessible::RelationFlag relation, int entry,
QRect r = rect();
int index = pIface->indexOfChild(this);
QAccessibleInterface *sibling = 0;
- for (int i = 1; i < index && entry; ++i) {
- sibling = pIface->child(i - 1);
+ // FIXME: why end at index?
+ for (int i = 0; i < index && entry; ++i) {
+ sibling = pIface->child(i);
Q_ASSERT(sibling);
- if (!sibling || (sibling->state() & QAccessible::Invisible)) {
+ if (!sibling || (sibling->state().invisible)) {
delete sibling;
sibling = 0;
continue;
@@ -746,10 +598,7 @@ int QAccessibleWidget::childCount() const
int QAccessibleWidget::indexOfChild(const QAccessibleInterface *child) const
{
QWidgetList cl = childWidgets(widget());
- int index = cl.indexOf(qobject_cast<QWidget *>(child->object()));
- if (index != -1)
- ++index;
- return index;
+ return cl.indexOf(qobject_cast<QWidget *>(child->object()));
}
// from qwidget.cpp
@@ -808,6 +657,7 @@ QString QAccessibleWidget::text(QAccessible::Text t) const
return str;
}
+/*! \reimp */
QStringList QAccessibleWidget::actionNames() const
{
QStringList names;
@@ -818,6 +668,7 @@ QStringList QAccessibleWidget::actionNames() const
return names;
}
+/*! \reimp */
void QAccessibleWidget::doAction(const QString &actionName)
{
if (!widget()->isEnabled())
@@ -830,6 +681,7 @@ void QAccessibleWidget::doAction(const QString &actionName)
}
}
+/*! \reimp */
QStringList QAccessibleWidget::keyBindingsForAction(const QString & /* actionName */) const
{
return QStringList();
@@ -844,37 +696,40 @@ QAccessible::Role QAccessibleWidget::role() const
/*! \reimp */
QAccessible::State QAccessibleWidget::state() const
{
- QAccessible::State state = QAccessible::Normal;
+ QAccessible::State state;
QWidget *w = widget();
if (w->testAttribute(Qt::WA_WState_Visible) == false)
- state |= QAccessible::Invisible;
+ state.invisible = true;
if (w->focusPolicy() != Qt::NoFocus && w->isActiveWindow())
- state |= QAccessible::Focusable;
+ state.focusable = true;
if (w->hasFocus())
- state |= QAccessible::Focused;
+ state.focused = true;
if (!w->isEnabled())
- state |= QAccessible::Unavailable;
+ state.disabled = true;
if (w->isWindow()) {
if (w->windowFlags() & Qt::WindowSystemMenuHint)
- state |= QAccessible::Movable;
+ state.movable = true;
if (w->minimumSize() != w->maximumSize())
- state |= QAccessible::Sizeable;
+ state.sizeable = true;
}
return state;
}
+/*! \reimp */
QColor QAccessibleWidget::foregroundColor() const
{
return widget()->palette().color(widget()->foregroundRole());
}
+/*! \reimp */
QColor QAccessibleWidget::backgroundColor() const
{
return widget()->palette().color(widget()->backgroundRole());
}
+/*! \reimp */
void *QAccessibleWidget::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::ActionInterface)
diff --git a/src/widgets/accessible/qaccessiblewidget.h b/src/widgets/accessible/qaccessiblewidget.h
index b807dbc088..da217b94ca 100644
--- a/src/widgets/accessible/qaccessiblewidget.h
+++ b/src/widgets/accessible/qaccessiblewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -64,7 +64,6 @@ public:
int indexOfChild(const QAccessibleInterface *child) const;
QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
- int childAt(int x, int y) const;
QRect rect() const;
QAccessibleInterface *parent() const;
diff --git a/src/widgets/animation/qguivariantanimation.cpp b/src/widgets/animation/qguivariantanimation.cpp
index f99b74e2ab..2167e4a173 100644
--- a/src/widgets/animation/qguivariantanimation.cpp
+++ b/src/widgets/animation/qguivariantanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 1803cba01d..777e4cc4ba 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -425,34 +425,13 @@ void QWellArray::keyPressEvent(QKeyEvent* e)
//////////// QWellArray END
-static bool initrgb = false;
-static QRgb stdrgb[6*8];
-static QRgb cusrgb[2*8];
-static bool customSet = false;
-
-
-static void initRGB()
-{
- if (initrgb)
- return;
- initrgb = true;
- int i = 0;
- for (int g = 0; g < 4; g++)
- for (int r = 0; r < 4; r++)
- for (int b = 0; b < 3; b++)
- stdrgb[i++] = qRgb(r * 255 / 3, g * 255 / 3, b * 255 / 2);
-
- for (i = 0; i < 2*8; i++)
- cusrgb[i] = 0xffffffff;
-}
-
/*!
Returns the number of custom colors supported by QColorDialog. All
color dialogs share the same custom colors.
*/
int QColorDialog::customCount()
{
- return 2 * 8;
+ return QColorDialogOptions::customColorCount();
}
/*!
@@ -462,10 +441,7 @@ int QColorDialog::customCount()
*/
QRgb QColorDialog::customColor(int index)
{
- if (uint(index) >= uint(customCount()))
- return qRgb(255, 255, 255);
- initRGB();
- return cusrgb[index];
+ return QColorDialogOptions::customColor(index);
}
/*!
@@ -477,11 +453,7 @@ QRgb QColorDialog::customColor(int index)
*/
void QColorDialog::setCustomColor(int index, QRgb color)
{
- if (uint(index) >= uint(customCount()))
- return;
- initRGB();
- customSet = true;
- cusrgb[index] = color;
+ QColorDialogOptions::setCustomColor(index, color);
}
/*!
@@ -494,10 +466,7 @@ void QColorDialog::setCustomColor(int index, QRgb color)
void QColorDialog::setStandardColor(int index, QRgb color)
{
- if (uint(index) >= uint(6 * 8))
- return;
- initRGB();
- stdrgb[index] = color;
+ QColorDialogOptions::setStandardColor(index, color);
}
static inline void rgb2hsv(QRgb rgb, int &h, int &s, int &v)
@@ -1421,9 +1390,10 @@ bool QColorDialogPrivate::selectColor(const QColor &col)
int i = 0, j = 0;
// Check standard colors
if (standard) {
+ const QRgb *standardColors = QColorDialogOptions::standardColors();
for (i = 0; i < 6; i++) {
for (j = 0; j < 8; j++) {
- if (color == stdrgb[i + j*6]) {
+ if (color == standardColors[i + j*6]) {
_q_newStandard(i, j);
standard->setCurrent(i, j);
standard->setSelected(i, j);
@@ -1435,9 +1405,10 @@ bool QColorDialogPrivate::selectColor(const QColor &col)
}
// Check custom colors
if (custom) {
+ const QRgb *customColors = QColorDialogOptions::customColors();
for (i = 0; i < 2; i++) {
for (j = 0; j < 8; j++) {
- if (color == cusrgb[i + j*2]) {
+ if (color == customColors[i + j*2]) {
_q_newCustom(i, j);
custom->setCurrent(i, j);
custom->setSelected(i, j);
@@ -1461,8 +1432,8 @@ void QColorDialogPrivate::_q_newColorTypedIn(QRgb rgb)
void QColorDialogPrivate::_q_newCustom(int r, int c)
{
- int i = r+2*c;
- setCurrentColor(cusrgb[i]);
+ const int i = r + 2 * c;
+ setCurrentColor(QColorDialogOptions::customColor(i));
nextCust = i;
if (standard)
standard->setSelected(-1,-1);
@@ -1470,7 +1441,7 @@ void QColorDialogPrivate::_q_newCustom(int r, int c)
void QColorDialogPrivate::_q_newStandard(int r, int c)
{
- setCurrentColor(stdrgb[r+c*6]);
+ setCurrentColor(QColorDialogOptions::standardColor(r + c * 6));
if (custom)
custom->setSelected(-1,-1);
}
@@ -1509,21 +1480,6 @@ void QColorDialogPrivate::init(const QColor &initial)
topLay->addLayout(leftLay);
}
- initRGB();
-
-#ifndef QT_NO_SETTINGS
- if (!customSet) {
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
- for (int i = 0; i < 2*8; ++i) {
- QVariant v = settings.value(QLatin1String("Qt/customColors/") + QString::number(i));
- if (v.isValid()) {
- QRgb rgb = v.toUInt();
- cusrgb[i] = rgb;
- }
- }
- }
-#endif
-
#if defined(QT_SMALL_COLORDIALOG)
# if defined(Q_WS_S60)
const bool nonTouchUI = !S60->hasTouchscreen;
@@ -1533,7 +1489,7 @@ void QColorDialogPrivate::init(const QColor &initial)
#endif
if (!smallDisplay) {
- standard = new QColorWell(q, 6, 8, stdrgb);
+ standard = new QColorWell(q, 6, 8, QColorDialogOptions::standardColors());
lblBasicColors = new QLabel(q);
#ifndef QT_NO_SHORTCUT
lblBasicColors->setBuddy(standard);
@@ -1546,7 +1502,7 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay->addStretch();
#endif
- custom = new QColorWell(q, 2, 8, cusrgb);
+ custom = new QColorWell(q, 2, 8, QColorDialogOptions::customColors());
custom->setAcceptDrops(true);
q->connect(custom, SIGNAL(selected(int,int)), SLOT(_q_newCustom(int,int)));
@@ -1657,22 +1613,22 @@ void QColorDialogPrivate::initHelper(QPlatformDialogHelper *h)
QColorDialog *d = q_func();
QObject::connect(h, SIGNAL(currentColorChanged(QColor)), d, SIGNAL(currentColorChanged(QColor)));
QObject::connect(h, SIGNAL(colorSelected(QColor)), d, SIGNAL(colorSelected(QColor)));
+ static_cast<QPlatformColorDialogHelper *>(h)->setOptions(options);
+}
+
+void QColorDialogPrivate::helperPrepareShow(QPlatformDialogHelper *)
+{
+ options->setWindowTitle(q_func()->windowTitle());
}
void QColorDialogPrivate::_q_addCustom()
{
- cusrgb[nextCust] = cs->currentColor();
+ QColorDialogOptions::setCustomColor(nextCust, cs->currentColor());
if (custom)
custom->update();
nextCust = (nextCust+1) % 16;
}
-void QColorDialogPrivate::_q_platformRunNativeAppModalPanel()
-{
- if (nativeDialogInUse)
- platformHelper()->_q_platformRunNativeAppModalPanel();
-}
-
void QColorDialogPrivate::retranslateStrings()
{
if (!smallDisplay) {
@@ -1800,8 +1756,7 @@ QColor QColorDialog::selectedColor() const
void QColorDialog::setOption(ColorDialogOption option, bool on)
{
Q_D(QColorDialog);
- if (!(d->opts & option) != !on)
- setOptions(d->opts ^ option);
+ d->options->setOption(static_cast<QColorDialogOptions::ColorDialogOption>(option), on);
}
/*!
@@ -1815,7 +1770,7 @@ void QColorDialog::setOption(ColorDialogOption option, bool on)
bool QColorDialog::testOption(ColorDialogOption option) const
{
Q_D(const QColorDialog);
- return (d->opts & option) != 0;
+ return d->options->testOption(static_cast<QColorDialogOptions::ColorDialogOption>(option));
}
/*!
@@ -1834,11 +1789,10 @@ void QColorDialog::setOptions(ColorDialogOptions options)
{
Q_D(QColorDialog);
- ColorDialogOptions changed = (options ^ d->opts);
- if (!changed)
+ if (QColorDialog::options() == options)
return;
- d->opts = options;
+ d->options->setOptions(QColorDialogOptions::ColorDialogOptions(int(options)));
d->buttons->setVisible(!(options & NoButtons));
d->showAlpha(options & ShowAlphaChannel);
}
@@ -1846,7 +1800,7 @@ void QColorDialog::setOptions(ColorDialogOptions options)
QColorDialog::ColorDialogOptions QColorDialog::options() const
{
Q_D(const QColorDialog);
- return d->opts;
+ return QColorDialog::ColorDialogOptions(int(d->options->options()));
}
/*!
@@ -1922,7 +1876,7 @@ void QColorDialog::setVisible(bool visible)
}
#else
- if (!(d->opts & DontUseNativeDialog))
+ if (!(options() & DontUseNativeDialog))
d->setNativeDialogVisible(visible);
if (d->nativeDialogInUse) {
@@ -2026,14 +1980,6 @@ QColorDialog::~QColorDialog()
QColorDialogPrivate::sharedColorPanelAvailable = true;
}
#endif
-
-#ifndef QT_NO_SETTINGS
- if (!customSet) {
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
- for (int i = 0; i < 2*8; ++i)
- settings.setValue(QLatin1String("Qt/customColors/") + QString::number(i), cusrgb[i]);
- }
-#endif
}
/*!
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h
index 1d21c06f99..1bdb0b41a2 100644
--- a/src/widgets/dialogs/qcolordialog.h
+++ b/src/widgets/dialogs/qcolordialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qcolordialog_mac.mm b/src/widgets/dialogs/qcolordialog_mac.mm
index 1d77751e2b..bdf5e1cccd 100644
--- a/src/widgets/dialogs/qcolordialog_mac.mm
+++ b/src/widgets/dialogs/qcolordialog_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qcolordialog_p.h b/src/widgets/dialogs/qcolordialog_p.h
index 39d7192b1d..a6149017d7 100644
--- a/src/widgets/dialogs/qcolordialog_p.h
+++ b/src/widgets/dialogs/qcolordialog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,6 +56,7 @@
#include "private/qdialog_p.h"
#include "qcolordialog.h"
+#include "qsharedpointer.h"
#ifndef QT_NO_COLORDIALOG
@@ -75,6 +76,8 @@ class QColorDialogPrivate : public QDialogPrivate
Q_DECLARE_PUBLIC(QColorDialog)
public:
+ QColorDialogPrivate() : options(new QColorDialogOptions) {}
+
QPlatformColorDialogHelper *platformColorDialogHelper() const
{ return static_cast<QPlatformColorDialogHelper *>(platformHelper()); }
@@ -92,7 +95,6 @@ public:
void retranslateStrings();
void _q_addCustom();
- void _q_platformRunNativeAppModalPanel();
void _q_newHsv(int h, int s, int v);
void _q_newColorTypedIn(QRgb rgb);
@@ -115,7 +117,8 @@ public:
QColor selectedQColor;
int nextCust;
bool smallDisplay;
- QColorDialog::ColorDialogOptions opts;
+ QSharedPointer<QColorDialogOptions> options;
+
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
@@ -138,6 +141,7 @@ public:
#endif
private:
virtual void initHelper(QPlatformDialogHelper *h);
+ virtual void helperPrepareShow(QPlatformDialogHelper *h);
};
#endif // QT_NO_COLORDIALOG
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 363d3bf592..af11fc971d 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -66,10 +66,16 @@ QPlatformDialogHelper *QDialogPrivate::platformHelper() const
if (!m_platformHelperCreated) {
QDialogPrivate *ncThis = const_cast<QDialogPrivate *>(this);
m_platformHelperCreated = true;
+ QDialog *dialog = ncThis->q_func();
m_platformHelper = QGuiApplicationPrivate::platformTheme()
- ->createPlatformDialogHelper(ncThis->q_func());
- if (m_platformHelper)
+ ->createPlatformDialogHelper(dialog);
+ if (m_platformHelper) {
+ QObject::connect(m_platformHelper, SIGNAL(accept()), dialog, SLOT(accept()));
+ QObject::connect(m_platformHelper, SIGNAL(reject()), dialog, SLOT(reject()));
+ QObject::connect(m_platformHelper, SIGNAL(launchNativeAppModalPanel()),
+ dialog, SLOT(_q_platformRunNativeAppModalPanel()));
ncThis->initHelper(m_platformHelper);
+ }
}
return m_platformHelper;
}
@@ -85,7 +91,11 @@ bool QDialogPrivate::setNativeDialogVisible(bool visible)
{
if (QPlatformDialogHelper *helper = platformHelper()) {
if (visible) {
- nativeDialogInUse = helper->show_sys(parentWindow());
+ helperPrepareShow(helper);
+ QPlatformDialogHelper::ShowFlags flags(0);
+ if (q_func()->isModal())
+ flags |= QPlatformDialogHelper::ShowModal;
+ nativeDialogInUse = helper->show_sys(flags, q_func()->windowFlags(), parentWindow());
} else {
helper->hide_sys();
}
@@ -93,6 +103,13 @@ bool QDialogPrivate::setNativeDialogVisible(bool visible)
return nativeDialogInUse;
}
+void QDialogPrivate::_q_platformRunNativeAppModalPanel()
+{
+ if (nativeDialogInUse)
+ platformHelper()->_q_platformRunNativeAppModalPanel();
+}
+
+
QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
{
if (const QPlatformDialogHelper *helper = platformHelper())
@@ -503,6 +520,8 @@ int QDialog::exec()
setAttribute(Qt::WA_ShowModal, wasShowModal);
int res = result();
+ if (d->nativeDialogInUse)
+ d->helperDone(static_cast<QDialog::DialogCode>(res), d->platformHelper());
if (deleteOnClose)
delete this;
return res;
diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h
index d4171ece47..8329e6460a 100644
--- a/src/widgets/dialogs/qdialog.h
+++ b/src/widgets/dialogs/qdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -118,7 +118,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QDialog)
Q_DISABLE_COPY(QDialog)
-
+ Q_PRIVATE_SLOT(d_func(), void _q_platformRunNativeAppModalPanel())
#ifdef Q_WS_WINCE_WM
Q_PRIVATE_SLOT(d_func(), void _q_doneAction())
diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h
index 3d90686b6d..ecdfff03fd 100644
--- a/src/widgets/dialogs/qdialog_p.h
+++ b/src/widgets/dialogs/qdialog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -79,6 +79,7 @@ public:
nativeDialogInUse(false), m_platformHelper(0), m_platformHelperCreated(false)
{}
~QDialogPrivate() { delete m_platformHelper; }
+ void _q_platformRunNativeAppModalPanel();
QWindow *parentWindow() const;
bool setNativeDialogVisible(bool visible);
@@ -115,6 +116,8 @@ public:
private:
virtual void initHelper(QPlatformDialogHelper *) {}
+ virtual void helperPrepareShow(QPlatformDialogHelper *) {}
+ virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) {}
mutable QPlatformDialogHelper *m_platformHelper;
mutable bool m_platformHelperCreated;
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index e87551cd80..1c950a7158 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qerrormessage.h b/src/widgets/dialogs/qerrormessage.h
index 3736526f93..c43df749f7 100644
--- a/src/widgets/dialogs/qerrormessage.h
+++ b/src/widgets/dialogs/qerrormessage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 0f107c6b0a..2f49a226e9 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -507,16 +507,14 @@ QFileDialogPrivate::QFileDialogPrivate()
proxyModel(0),
#endif
model(0),
- fileMode(QFileDialog::AnyFile),
- acceptMode(QFileDialog::AcceptOpen),
currentHistoryLocation(-1),
renameAction(0),
deleteAction(0),
showHiddenAction(0),
useDefaultCaption(true),
defaultFileTypes(true),
- fileNameLabelExplicitlySat(false),
- qFileDialogUi(0)
+ qFileDialogUi(0),
+ options(new QFileDialogOptions)
{
}
@@ -524,12 +522,49 @@ QFileDialogPrivate::~QFileDialogPrivate()
{
}
+void QFileDialogPrivate::initHelper(QPlatformDialogHelper *h)
+{
+ QFileDialog *d = q_func();
+ QObject::connect(h, SIGNAL(fileSelected(QString)), d, SIGNAL(fileSelected(QString)));
+ QObject::connect(h, SIGNAL(filesSelected(QStringList)), d, SIGNAL(filesSelected(QStringList)));
+ QObject::connect(h, SIGNAL(currentChanged(QString)), d, SIGNAL(currentChanged(QString)));
+ QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SIGNAL(directoryEntered(QString)));
+ QObject::connect(h, SIGNAL(filterSelected(QString)), d, SIGNAL(filterSelected(QString)));
+ static_cast<QPlatformFileDialogHelper *>(h)->setOptions(options);
+}
+
+void QFileDialogPrivate::helperPrepareShow(QPlatformDialogHelper *)
+{
+ Q_Q(QFileDialog);
+ options->setWindowTitle(q->windowTitle());
+ options->setViewMode(static_cast<QFileDialogOptions::ViewMode>(q->viewMode()));
+ options->setHistory(q->history());
+ options->setSidebarUrls(qFileDialogUi->sidebar->urls());
+ const QDir directory = q->directory();
+ options->setInitialDirectory(directory.exists() ?
+ directory.absolutePath() :
+ QString());
+ options->setInitiallySelectedNameFilter(q->selectedNameFilter());
+ options->setInitiallySelectedFiles(q->selectedFiles());
+}
+
+void QFileDialogPrivate::helperDone(QDialog::DialogCode code, QPlatformDialogHelper *)
+{
+ if (code == QDialog::Accepted) {
+ Q_Q(QFileDialog);
+ q->setViewMode(static_cast<QFileDialog::ViewMode>(options->viewMode()));
+ q->setSidebarUrls(options->sidebarUrls());
+ q->setHistory(options->history());
+ }
+}
+
void QFileDialogPrivate::retranslateWindowTitle()
{
Q_Q(QFileDialog);
if (!useDefaultCaption || setWindowTitle != q->windowTitle())
return;
- if (acceptMode == QFileDialog::AcceptOpen) {
+ if (q->acceptMode() == QFileDialog::AcceptOpen) {
+ const QFileDialog::FileMode fileMode = q->fileMode();
if (fileMode == QFileDialog::DirectoryOnly || fileMode == QFileDialog::Directory)
q->setWindowTitle(QFileDialog::tr("Find Directory"));
else
@@ -545,6 +580,46 @@ void QFileDialogPrivate::setLastVisitedDirectory(const QString &dir)
*lastVisitedDir() = dir;
}
+void QFileDialogPrivate::updateFileNameLabel()
+{
+ if (!options->isLabelExplicitlySet(QFileDialogOptions::FileName)) {
+ switch (q_func()->fileMode()) {
+ case QFileDialog::DirectoryOnly:
+ case QFileDialog::Directory:
+ setLabelTextControl(QFileDialog::FileName, QFileDialog::tr("Directory:"));
+ break;
+ default:
+ setLabelTextControl(QFileDialog::FileName, QFileDialog::tr("File &name:"));
+ break;
+ }
+ }
+}
+
+void QFileDialogPrivate::updateOkButtonText(bool saveAsOnFolder)
+{
+ Q_Q(QFileDialog);
+ // 'Save as' at a folder: Temporarily change to "Open".
+ if (saveAsOnFolder) {
+ setLabelTextControl(QFileDialog::Accept, QFileDialog::tr("&Open"));
+ } else if (options->isLabelExplicitlySet(QFileDialogOptions::Accept)) {
+ setLabelTextControl(QFileDialog::Accept, options->labelText(QFileDialogOptions::Accept));
+ return;
+ } else {
+ switch (q->fileMode()) {
+ case QFileDialog::DirectoryOnly:
+ case QFileDialog::Directory:
+ setLabelTextControl(QFileDialog::Accept, QFileDialog::tr("&Choose"));
+ break;
+ default:
+ setLabelTextControl(QFileDialog::Accept,
+ q->acceptMode() == QFileDialog::AcceptOpen ?
+ QFileDialog::tr("&Open") :
+ QFileDialog::tr("&Save"));
+ break;
+ }
+ }
+}
+
void QFileDialogPrivate::retranslateStrings()
{
Q_Q(QFileDialog);
@@ -569,15 +644,7 @@ void QFileDialogPrivate::retranslateStrings()
showHiddenAction->setText(QFileDialog::tr("Show &hidden files"));
newFolderAction->setText(QFileDialog::tr("&New Folder"));
qFileDialogUi->retranslateUi(q);
-
- if (!fileNameLabelExplicitlySat){
- if (fileMode == QFileDialog::DirectoryOnly || fileMode == QFileDialog::Directory) {
- q->setLabelText(QFileDialog::FileName, QFileDialog::tr("Directory:"));
- } else {
- q->setLabelText(QFileDialog::FileName, QFileDialog::tr("File &name:"));
- }
- fileNameLabelExplicitlySat = false;
- }
+ updateFileNameLabel();
}
void QFileDialogPrivate::emitFilesSelected(const QStringList &files)
@@ -595,7 +662,7 @@ bool QFileDialogPrivate::canBeNativeDialog()
return true;
if (q->testAttribute(Qt::WA_DontShowOnScreen))
return false;
- if (opts & QFileDialog::DontUseNativeDialog)
+ if (q->options() & QFileDialog::DontUseNativeDialog)
return false;
QLatin1String staticName(QFileDialog::staticMetaObject.className());
@@ -612,9 +679,9 @@ bool QFileDialogPrivate::canBeNativeDialog()
*/
void QFileDialog::setOption(Option option, bool on)
{
- Q_D(QFileDialog);
- if (!(d->opts & option) != !on)
- setOptions(d->opts ^ option);
+ const QFileDialog::Options previousOptions = options();
+ if (!(previousOptions & option) != !on)
+ setOptions(previousOptions ^ option);
}
/*!
@@ -628,7 +695,7 @@ void QFileDialog::setOption(Option option, bool on)
bool QFileDialog::testOption(Option option) const
{
Q_D(const QFileDialog);
- return (d->opts & option) != 0;
+ return d->options->testOption(static_cast<QFileDialogOptions::FileDialogOption>(option));
}
/*!
@@ -648,11 +715,11 @@ void QFileDialog::setOptions(Options options)
{
Q_D(QFileDialog);
- Options changed = (options ^ d->opts);
+ Options changed = (options ^ QFileDialog::options());
if (!changed)
return;
- d->opts = options;
+ d->options->setOptions(QFileDialogOptions::FileDialogOptions(int(options)));
if (changed & DontResolveSymlinks)
d->model->setResolveSymlinks(!(options & DontResolveSymlinks));
if (changed & ReadOnly) {
@@ -663,7 +730,7 @@ void QFileDialog::setOptions(Options options)
d->deleteAction->setEnabled(!ro);
}
if (changed & HideNameFilterDetails)
- setNameFilters(d->nameFilters);
+ setNameFilters(d->options->nameFilters());
if (changed & ShowDirsOnly)
setFilter((options & ShowDirsOnly) ? filter() & ~QDir::Files : filter() | QDir::Files);
@@ -672,7 +739,7 @@ void QFileDialog::setOptions(Options options)
QFileDialog::Options QFileDialog::options() const
{
Q_D(const QFileDialog);
- return d->opts;
+ return QFileDialog::Options(int(d->options->options()));
}
/*!
@@ -942,6 +1009,7 @@ QStringList QFileDialogPrivate::addDefaultSuffixToFiles(const QStringList filesT
QString name = toInternal(filesToFix.at(i));
QFileInfo info(name);
// if the filename has no suffix, add the default suffix
+ const QString defaultSuffix = options->defaultSuffix();
if (!defaultSuffix.isEmpty() && !info.isDir() && name.lastIndexOf(QLatin1Char('.')) == -1)
name += QLatin1Char('.') + defaultSuffix;
if (info.isAbsolute()) {
@@ -981,8 +1049,8 @@ QStringList QFileDialog::selectedFiles() const
if (files.isEmpty() && !d->lineEdit()->text().isEmpty())
files = d->typedFiles();
-
- if (files.isEmpty() && !(d->fileMode == ExistingFile || d->fileMode == ExistingFiles))
+ const FileMode fm = fileMode();
+ if (files.isEmpty() && !(fm == ExistingFile || fm == ExistingFiles))
files.append(d->rootIndex().data(QFileSystemModel::FilePathRole).toString());
return files;
}
@@ -1095,12 +1163,7 @@ void QFileDialog::setNameFilters(const QStringList &filters)
for (int i = 0; i < filters.count(); ++i) {
cleanedFilters << filters[i].simplified();
}
- d->nameFilters = cleanedFilters;
-
- if (d->nativeDialogInUse){
- d->setNameFilters_sys(cleanedFilters);
- return;
- }
+ d->options->setNameFilters(cleanedFilters);
d->qFileDialogUi->fileTypeCombo->clear();
if (cleanedFilters.isEmpty())
@@ -1132,7 +1195,7 @@ void QFileDialog::setFilters(const QStringList &filters)
*/
QStringList QFileDialog::nameFilters() const
{
- return d_func()->nameFilters;
+ return d_func()->options->nameFilters();
}
/*!
@@ -1236,6 +1299,7 @@ void QFileDialog::setFilter(QDir::Filters filters)
{
Q_D(QFileDialog);
d->model->setFilter(filters);
+ d->options->setFilter(filters);
if (d->nativeDialogInUse){
d->setFilter_sys();
return;
@@ -1286,7 +1350,7 @@ QFileDialog::ViewMode QFileDialog::viewMode() const
void QFileDialog::setFileMode(QFileDialog::FileMode mode)
{
Q_D(QFileDialog);
- d->fileMode = mode;
+ d->options->setFileMode(static_cast<QFileDialogOptions::FileMode>(mode));
d->retranslateWindowTitle();
// keep ShowDirsOnly option in sync with fileMode (BTW, DirectoryOnly is obsolete)
@@ -1303,24 +1367,13 @@ void QFileDialog::setFileMode(QFileDialog::FileMode mode)
// set filter
d->model->setFilter(d->filterForMode(filter()));
// setup file type for directory
- QString buttonText = (d->acceptMode == AcceptOpen ? tr("&Open") : tr("&Save"));
if (mode == DirectoryOnly || mode == Directory) {
d->qFileDialogUi->fileTypeCombo->clear();
d->qFileDialogUi->fileTypeCombo->addItem(tr("Directories"));
d->qFileDialogUi->fileTypeCombo->setEnabled(false);
-
- if (!d->fileNameLabelExplicitlySat){
- setLabelText(FileName, tr("Directory:"));
- d->fileNameLabelExplicitlySat = false;
- }
- buttonText = tr("&Choose");
- } else {
- if (!d->fileNameLabelExplicitlySat){
- setLabelText(FileName, tr("File &name:"));
- d->fileNameLabelExplicitlySat = false;
- }
}
- setLabelText(Accept, buttonText);
+ d->updateFileNameLabel();
+ d->updateOkButtonText();
if (d->nativeDialogInUse){
d->setFilter_sys();
return;
@@ -1333,7 +1386,7 @@ void QFileDialog::setFileMode(QFileDialog::FileMode mode)
QFileDialog::FileMode QFileDialog::fileMode() const
{
Q_D(const QFileDialog);
- return d->fileMode;
+ return static_cast<FileMode>(d->options->fileMode());
}
/*!
@@ -1349,16 +1402,11 @@ QFileDialog::FileMode QFileDialog::fileMode() const
void QFileDialog::setAcceptMode(QFileDialog::AcceptMode mode)
{
Q_D(QFileDialog);
- d->acceptMode = mode;
- bool directoryMode = (d->fileMode == Directory || d->fileMode == DirectoryOnly);
+ d->options->setAcceptMode(static_cast<QFileDialogOptions::AcceptMode>(mode));
QDialogButtonBox::StandardButton button = (mode == AcceptOpen ? QDialogButtonBox::Open : QDialogButtonBox::Save);
d->qFileDialogUi->buttonBox->setStandardButtons(button | QDialogButtonBox::Cancel);
d->qFileDialogUi->buttonBox->button(button)->setEnabled(false);
d->_q_updateOkButton();
- if (mode == AcceptOpen && directoryMode)
- setLabelText(Accept, tr("&Choose"));
- else
- setLabelText(Accept, (mode == AcceptOpen ? tr("&Open") : tr("&Save")));
if (mode == AcceptSave) {
d->qFileDialogUi->lookInCombo->setEditable(false);
}
@@ -1415,7 +1463,7 @@ QModelIndex QFileDialogPrivate::select(const QModelIndex &index) const {
QFileDialog::AcceptMode QFileDialog::acceptMode() const
{
Q_D(const QFileDialog);
- return d->acceptMode;
+ return static_cast<AcceptMode>(d->options->acceptMode());
}
/*!
@@ -1490,13 +1538,13 @@ bool QFileDialog::confirmOverwrite() const
void QFileDialog::setDefaultSuffix(const QString &suffix)
{
Q_D(QFileDialog);
- d->defaultSuffix = suffix;
+ d->options->setDefaultSuffix(suffix);
}
QString QFileDialog::defaultSuffix() const
{
Q_D(const QFileDialog);
- return d->defaultSuffix;
+ return d->options->defaultSuffix();
}
/*!
@@ -1587,42 +1635,46 @@ QFileIconProvider *QFileDialog::iconProvider() const
return d->model->iconProvider();
}
-/*!
- Sets the \a text shown in the filedialog in the specified \a label.
-*/
-void QFileDialog::setLabelText(DialogLabel label, const QString &text)
+void QFileDialogPrivate::setLabelTextControl(QFileDialog::DialogLabel label, const QString &text)
{
- Q_D(QFileDialog);
- QPushButton *button;
switch (label) {
- case LookIn:
- d->qFileDialogUi->lookInLabel->setText(text);
+ case QFileDialog::LookIn:
+ qFileDialogUi->lookInLabel->setText(text);
break;
- case FileName:
- d->qFileDialogUi->fileNameLabel->setText(text);
- d->fileNameLabelExplicitlySat = true;
+ case QFileDialog::FileName:
+ qFileDialogUi->fileNameLabel->setText(text);
break;
- case FileType:
- d->qFileDialogUi->fileTypeLabel->setText(text);
+ case QFileDialog::FileType:
+ qFileDialogUi->fileTypeLabel->setText(text);
break;
- case Accept:
- d->acceptLabel = text;
- if (acceptMode() == AcceptOpen)
- button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Open);
- else
- button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Save);
- if (button)
- button->setText(text);
+ case QFileDialog::Accept:
+ if (q_func()->acceptMode() == QFileDialog::AcceptOpen) {
+ if (QPushButton *button = qFileDialogUi->buttonBox->button(QDialogButtonBox::Open))
+ button->setText(text);
+ } else {
+ if (QPushButton *button = qFileDialogUi->buttonBox->button(QDialogButtonBox::Save))
+ button->setText(text);
+ }
break;
- case Reject:
- button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Cancel);
- if (button)
+ case QFileDialog::Reject:
+ if (QPushButton *button = qFileDialogUi->buttonBox->button(QDialogButtonBox::Cancel))
button->setText(text);
break;
}
}
/*!
+ Sets the \a text shown in the filedialog in the specified \a label.
+*/
+
+void QFileDialog::setLabelText(DialogLabel label, const QString &text)
+{
+ Q_D(QFileDialog);
+ d->options->setLabelText(static_cast<QFileDialogOptions::DialogLabel>(label), text);
+ d->setLabelTextControl(label, text);
+}
+
+/*!
Returns the text shown in the filedialog in the specified \a label.
*/
QString QFileDialog::labelText(DialogLabel label) const
@@ -2136,7 +2188,7 @@ void QFileDialog::accept()
return;
}
- switch (d->fileMode) {
+ switch (fileMode()) {
case DirectoryOnly:
case Directory: {
QString fn = files.first();
@@ -2235,7 +2287,7 @@ void QFileDialogPrivate::init(const QString &directory, const QString &nameFilte
createWidgets();
createMenuActions();
retranslateStrings();
- q->setFileMode(fileMode);
+ q->setFileMode(QFileDialog::AnyFile);
#ifndef QT_NO_SETTINGS
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
@@ -2271,6 +2323,7 @@ void QFileDialogPrivate::createWidgets()
{
Q_Q(QFileDialog);
model = new QFileSystemModel(q);
+ options->setFilter(model->filter());
model->setObjectName(QLatin1String("qt_filesystem_model"));
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
model->setNameFilterDisables(helper->defaultNameFilterDisables());
@@ -2290,22 +2343,21 @@ void QFileDialogPrivate::createWidgets()
QList<QUrl> initialBookmarks;
initialBookmarks << QUrl::fromLocalFile(QLatin1String(""))
<< QUrl::fromLocalFile(QDir::homePath());
- qFileDialogUi->sidebar->init(model, initialBookmarks);
+ qFileDialogUi->sidebar->setModelAndUrls(model, initialBookmarks);
QFileDialog::connect(qFileDialogUi->sidebar, SIGNAL(goToUrl(QUrl)),
q, SLOT(_q_goToUrl(QUrl)));
QObject::connect(qFileDialogUi->buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
-
- qFileDialogUi->lookInCombo->init(this);
+ qFileDialogUi->lookInCombo->setFileDialogPrivate(this);
QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(activated(QString)), q, SLOT(_q_goToDirectory(QString)));
qFileDialogUi->lookInCombo->setInsertPolicy(QComboBox::NoInsert);
qFileDialogUi->lookInCombo->setDuplicatesEnabled(false);
// filename
- qFileDialogUi->fileNameEdit->init(this);
+ qFileDialogUi->fileNameEdit->setFileDialogPrivate(this);
#ifndef QT_NO_SHORTCUT
qFileDialogUi->fileNameLabel->setBuddy(qFileDialogUi->fileNameEdit);
#endif
@@ -2329,7 +2381,7 @@ void QFileDialogPrivate::createWidgets()
QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)),
q, SIGNAL(filterSelected(QString)));
- qFileDialogUi->listView->init(this);
+ qFileDialogUi->listView->setFileDialogPrivate(this);
qFileDialogUi->listView->setModel(model);
QObject::connect(qFileDialogUi->listView, SIGNAL(activated(QModelIndex)),
q, SLOT(_q_enterDirectory(QModelIndex)));
@@ -2341,7 +2393,7 @@ void QFileDialogPrivate::createWidgets()
QObject::connect(shortcut, SIGNAL(activated()), q, SLOT(_q_deleteCurrent()));
#endif
- qFileDialogUi->treeView->init(this);
+ qFileDialogUi->treeView->setFileDialogPrivate(this);
qFileDialogUi->treeView->setModel(model);
QHeaderView *treeHeader = qFileDialogUi->treeView->header();
QFontMetrics fm(q->font());
@@ -2850,10 +2902,11 @@ void QFileDialogPrivate::_q_autoCompleteFileName(const QString &text)
void QFileDialogPrivate::_q_updateOkButton()
{
Q_Q(QFileDialog);
- QPushButton *button = qFileDialogUi->buttonBox->button((acceptMode == QFileDialog::AcceptOpen)
+ QPushButton *button = qFileDialogUi->buttonBox->button((q->acceptMode() == QFileDialog::AcceptOpen)
? QDialogButtonBox::Open : QDialogButtonBox::Save);
if (!button)
return;
+ const QFileDialog::FileMode fileMode = q->fileMode();
bool enableButton = true;
bool isOpenDirectory = false;
@@ -2863,8 +2916,7 @@ void QFileDialogPrivate::_q_updateOkButton()
if (lineEditText.startsWith(QLatin1String("//")) || lineEditText.startsWith(QLatin1Char('\\'))) {
button->setEnabled(true);
- if (acceptMode == QFileDialog::AcceptSave)
- button->setText(acceptLabel);
+ updateOkButtonText();
return;
}
@@ -2938,8 +2990,7 @@ void QFileDialogPrivate::_q_updateOkButton()
}
button->setEnabled(enableButton);
- if (acceptMode == QFileDialog::AcceptSave)
- button->setText(isOpenDirectory ? QFileDialog::tr("&Open") : acceptLabel);
+ updateOkButtonText(isOpenDirectory);
}
/*!
@@ -2964,6 +3015,7 @@ void QFileDialogPrivate::_q_enterDirectory(const QModelIndex &index)
QModelIndex sourceIndex = index.model() == proxyModel ? mapToSource(index) : index;
QString path = sourceIndex.data(QFileSystemModel::FilePathRole).toString();
if (path.isEmpty() || model->isDir(sourceIndex)) {
+ const QFileDialog::FileMode fileMode = q->fileMode();
q->setDirectory(path);
emit q->directoryEntered(path);
if (fileMode == QFileDialog::Directory
@@ -3032,14 +3084,16 @@ QStringList QFileDialogPrivate::qt_clean_filter_list(const QString &filter)
*/
void QFileDialogPrivate::_q_useNameFilter(int index)
{
+ QStringList nameFilters = options->nameFilters();
if (index == nameFilters.size()) {
QAbstractItemModel *comboModel = qFileDialogUi->fileTypeCombo->model();
nameFilters.append(comboModel->index(comboModel->rowCount() - 1, 0).data().toString());
+ options->setNameFilters(nameFilters);
}
QString nameFilter = nameFilters.at(index);
QStringList newNameFilters = qt_clean_filter_list(nameFilter);
- if (acceptMode == QFileDialog::AcceptSave) {
+ if (q_func()->acceptMode() == QFileDialog::AcceptSave) {
QString newNameFilterExtension;
if (newNameFilters.count() > 0)
newNameFilterExtension = QFileInfo(newNameFilters.at(0)).suffix();
@@ -3066,6 +3120,7 @@ void QFileDialogPrivate::_q_useNameFilter(int index)
*/
void QFileDialogPrivate::_q_selectionChanged()
{
+ const QFileDialog::FileMode fileMode = q_func()->fileMode();
QModelIndexList indexes = qFileDialogUi->listView->selectionModel()->selectedRows();
bool stripDirs = (fileMode != QFileDialog::DirectoryOnly && fileMode != QFileDialog::Directory);
@@ -3121,18 +3176,13 @@ void QFileDialogPrivate::_q_rowsInserted(const QModelIndex &parent)
void QFileDialogPrivate::_q_fileRenamed(const QString &path, const QString oldName, const QString newName)
{
+ const QFileDialog::FileMode fileMode = q_func()->fileMode();
if (fileMode == QFileDialog::Directory || fileMode == QFileDialog::DirectoryOnly) {
if (path == rootPath() && lineEdit()->text() == oldName)
lineEdit()->setText(newName);
}
}
-void QFileDialogPrivate::_q_platformRunNativeAppModalPanel()
-{
- if (nativeDialogInUse)
- platformHelper()->_q_platformRunNativeAppModalPanel();
-}
-
/*!
\internal
@@ -3181,7 +3231,7 @@ QString QFileDialogPrivate::getEnvironmentVariable(const QString &string)
return string;
}
-void QFileDialogComboBox::init(QFileDialogPrivate *d_pointer) {
+void QFileDialogComboBox::setFileDialogPrivate(QFileDialogPrivate *d_pointer) {
d_ptr = d_pointer;
urlModel = new QUrlModel(this);
urlModel->showFullPath = true;
@@ -3257,7 +3307,7 @@ QFileDialogListView::QFileDialogListView(QWidget *parent) : QListView(parent)
{
}
-void QFileDialogListView::init(QFileDialogPrivate *d_pointer)
+void QFileDialogListView::setFileDialogPrivate(QFileDialogPrivate *d_pointer)
{
d_ptr = d_pointer;
setSelectionBehavior(QAbstractItemView::SelectRows);
@@ -3294,7 +3344,7 @@ QFileDialogTreeView::QFileDialogTreeView(QWidget *parent) : QTreeView(parent)
{
}
-void QFileDialogTreeView::init(QFileDialogPrivate *d_pointer)
+void QFileDialogTreeView::setFileDialogPrivate(QFileDialogPrivate *d_pointer)
{
d_ptr = d_pointer;
setSelectionBehavior(QAbstractItemView::SelectRows);
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index df33fdb265..ac011e634a 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfiledialog.ui b/src/widgets/dialogs/qfiledialog.ui
index 9d61de351f..ff86e9cc13 100644
--- a/src/widgets/dialogs/qfiledialog.ui
+++ b/src/widgets/dialogs/qfiledialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfiledialog_embedded.ui b/src/widgets/dialogs/qfiledialog_embedded.ui
index f067d31f62..5eb9f52a12 100644
--- a/src/widgets/dialogs/qfiledialog_embedded.ui
+++ b/src/widgets/dialogs/qfiledialog_embedded.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfiledialog_mac.mm b/src/widgets/dialogs/qfiledialog_mac.mm
index 1a9f36892d..fe3c41a4b7 100644
--- a/src/widgets/dialogs/qfiledialog_mac.mm
+++ b/src/widgets/dialogs/qfiledialog_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index 383734950c..30c73ade7b 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -130,6 +130,9 @@ public:
QStringList typedFiles() const;
QStringList addDefaultSuffixToFiles(const QStringList filesToFix) const;
bool removeDirectory(const QString &path);
+ void setLabelTextControl(QFileDialog::DialogLabel label, const QString &text);
+ inline void updateFileNameLabel();
+ void updateOkButtonText(bool saveAsOnFolder = false);
inline QModelIndex mapToSource(const QModelIndex &index) const;
inline QModelIndex mapFromSource(const QModelIndex &index) const;
@@ -170,6 +173,7 @@ public:
QDir::Filters filterForMode(QDir::Filters filters) const
{
+ const QFileDialog::FileMode fileMode = q_func()->fileMode();
if (fileMode == QFileDialog::DirectoryOnly) {
filters |= QDir::Drives | QDir::AllDirs | QDir::Dirs;
filters &= ~QDir::Files;
@@ -224,7 +228,6 @@ public:
void _q_autoCompleteFileName(const QString &);
void _q_rowsInserted(const QModelIndex & parent);
void _q_fileRenamed(const QString &path, const QString oldName, const QString newName);
- void _q_platformRunNativeAppModalPanel();
static QStringList qt_clean_filter_list(const QString &filter);
static const char *qt_file_dialog_filter_reg_exp;
@@ -242,10 +245,6 @@ public:
QFSCompleter *completer;
#endif //QT_NO_FSCOMPLETER
- QFileDialog::FileMode fileMode;
- QFileDialog::AcceptMode acceptMode;
- bool confirmOverwrite;
- QString defaultSuffix;
QString setWindowTitle;
QStringList currentHistory;
@@ -258,8 +257,6 @@ public:
bool useDefaultCaption;
bool defaultFileTypes;
- bool fileNameLabelExplicitlySat;
- QStringList nameFilters;
// setVisible_sys returns true if it ends up showing a native
// dialog. Returning false means that a non-native dialog must be
@@ -273,7 +270,6 @@ public:
void selectFile_sys(const QString &filename);
QStringList selectedFiles_sys() const;
void setFilter_sys();
- void setNameFilters_sys(const QStringList &filters);
void selectNameFilter_sys(const QString &filter);
QString selectedNameFilter_sys() const;
//////////////////////////////////////////////
@@ -286,12 +282,14 @@ public:
QByteArray memberToDisconnectOnClose;
QByteArray signalToDisconnectOnClose;
- QFileDialog::Options opts;
+ QSharedPointer<QFileDialogOptions> options;
~QFileDialogPrivate();
private:
virtual void initHelper(QPlatformDialogHelper *);
+ virtual void helperPrepareShow(QPlatformDialogHelper *);
+ virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *);
Q_DISABLE_COPY(QFileDialogPrivate)
};
@@ -300,7 +298,7 @@ class QFileDialogLineEdit : public QLineEdit
{
public:
QFileDialogLineEdit(QWidget *parent = 0) : QLineEdit(parent), hideOnEsc(false), d_ptr(0){}
- void init(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
+ void setFileDialogPrivate(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
void keyPressEvent(QKeyEvent *e);
bool hideOnEsc;
private:
@@ -311,7 +309,7 @@ class QFileDialogComboBox : public QComboBox
{
public:
QFileDialogComboBox(QWidget *parent = 0) : QComboBox(parent), urlModel(0) {}
- void init(QFileDialogPrivate *d_pointer);
+ void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
void showPopup();
void setHistory(const QStringList &paths);
QStringList history() const { return m_history; }
@@ -327,7 +325,7 @@ class QFileDialogListView : public QListView
{
public:
QFileDialogListView(QWidget *parent = 0);
- void init(QFileDialogPrivate *d_pointer);
+ void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
QSize sizeHint() const;
protected:
void keyPressEvent(QKeyEvent *e);
@@ -339,7 +337,7 @@ class QFileDialogTreeView : public QTreeView
{
public:
QFileDialogTreeView(QWidget *parent);
- void init(QFileDialogPrivate *d_pointer);
+ void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
QSize sizeHint() const;
protected:
@@ -348,16 +346,6 @@ private:
QFileDialogPrivate *d_ptr;
};
-void QFileDialogPrivate::initHelper(QPlatformDialogHelper *h)
-{
- QFileDialog *d = q_func();
- QObject::connect(h, SIGNAL(fileSelected(QString)), d, SIGNAL(fileSelected(QString)));
- QObject::connect(h, SIGNAL(filesSelected(QStringList)), d, SIGNAL(filesSelected(QStringList)));
- QObject::connect(h, SIGNAL(currentChanged(QString)), d, SIGNAL(currentChanged(QString)));
- QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SIGNAL(directoryEntered(QString)));
- QObject::connect(h, SIGNAL(filterSelected(QString)), d, SIGNAL(filterSelected(QString)));
-}
-
inline QModelIndex QFileDialogPrivate::mapToSource(const QModelIndex &index) const {
#ifdef QT_NO_PROXYMODEL
return index;
@@ -427,12 +415,6 @@ inline void QFileDialogPrivate::setFilter_sys()
helper->setFilter_sys();
}
-inline void QFileDialogPrivate::setNameFilters_sys(const QStringList &filters)
-{
- if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
- helper->setNameFilters_sys(filters);
-}
-
inline void QFileDialogPrivate::selectNameFilter_sys(const QString &filter)
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp
index 315b93131f..bce8b3ecc1 100644
--- a/src/widgets/dialogs/qfileinfogatherer.cpp
+++ b/src/widgets/dialogs/qfileinfogatherer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -280,10 +280,11 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil
{
#ifndef QT_NO_FILESYSTEMWATCHER
if (files.isEmpty()
- && !watcher->directories().contains(path)
&& !path.isEmpty()
&& !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
- watcher->addPath(path);
+ QMutexLocker locker(&mutex);
+ if (!watcher->directories().contains(path))
+ watcher->addPath(path);
}
#endif
diff --git a/src/widgets/dialogs/qfileinfogatherer_p.h b/src/widgets/dialogs/qfileinfogatherer_p.h
index 98217c1dc8..3621c6b6ad 100644
--- a/src/widgets/dialogs/qfileinfogatherer_p.h
+++ b/src/widgets/dialogs/qfileinfogatherer_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 9de79e0e81..e44a9ea882 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfilesystemmodel.h b/src/widgets/dialogs/qfilesystemmodel.h
index ce907cd10e..09e8d9d529 100644
--- a/src/widgets/dialogs/qfilesystemmodel.h
+++ b/src/widgets/dialogs/qfilesystemmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h
index 3d5f5b7f00..2ab7838dad 100644
--- a/src/widgets/dialogs/qfilesystemmodel_p.h
+++ b/src/widgets/dialogs/qfilesystemmodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 1935a5aa73..c8fb36d9d6 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -495,6 +495,12 @@ void QFontDialogPrivate::initHelper(QPlatformDialogHelper *h)
QFontDialog *d = q_func();
QObject::connect(h, SIGNAL(currentFontChanged(QFont)), d, SIGNAL(currentFontChanged(QFont)));
QObject::connect(h, SIGNAL(fontSelected(QFont)), d, SIGNAL(fontSelected(QFont)));
+ static_cast<QPlatformFontDialogHelper *>(h)->setOptions(options);
+}
+
+void QFontDialogPrivate::helperPrepareShow(QPlatformDialogHelper *)
+{
+ options->setWindowTitle(q_func()->windowTitle());
}
/*
@@ -888,8 +894,7 @@ QFont QFontDialog::selectedFont() const
void QFontDialog::setOption(FontDialogOption option, bool on)
{
Q_D(QFontDialog);
- if (!(d->opts & option) != !on)
- setOptions(d->opts ^ option);
+ d->options->setOption(static_cast<QFontDialogOptions::FontDialogOption>(option), on);
}
/*!
@@ -901,7 +906,7 @@ void QFontDialog::setOption(FontDialogOption option, bool on)
bool QFontDialog::testOption(FontDialogOption option) const
{
Q_D(const QFontDialog);
- return (d->opts & option) != 0;
+ return d->options->testOption(static_cast<QFontDialogOptions::FontDialogOption>(option));
}
/*!
@@ -921,18 +926,17 @@ void QFontDialog::setOptions(FontDialogOptions options)
{
Q_D(QFontDialog);
- FontDialogOptions changed = (options ^ d->opts);
- if (!changed)
+ if (QFontDialog::options() == options)
return;
- d->opts = options;
+ d->options->setOptions(QFontDialogOptions::FontDialogOptions(int(options)));
d->buttonBox->setVisible(!(options & NoButtons));
}
QFontDialog::FontDialogOptions QFontDialog::options() const
{
Q_D(const QFontDialog);
- return d->opts;
+ return QFontDialog::FontDialogOptions(int(d->options->options()));
}
#ifdef Q_WS_MAC
@@ -1043,7 +1047,7 @@ bool QFontDialogPrivate::canBeNativeDialog()
return true;
if (q->testAttribute(Qt::WA_DontShowOnScreen))
return false;
- if (opts & QFontDialog::DontUseNativeDialog)
+ if (options->options() & QFontDialog::DontUseNativeDialog)
return false;
QLatin1String staticName(QFontDialog::staticMetaObject.className());
diff --git a/src/widgets/dialogs/qfontdialog.h b/src/widgets/dialogs/qfontdialog.h
index 469a5680e1..f5353d512f 100644
--- a/src/widgets/dialogs/qfontdialog.h
+++ b/src/widgets/dialogs/qfontdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfontdialog_mac.mm b/src/widgets/dialogs/qfontdialog_mac.mm
index d4d3c6a6f0..71b142cd48 100644
--- a/src/widgets/dialogs/qfontdialog_mac.mm
+++ b/src/widgets/dialogs/qfontdialog_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qfontdialog_p.h b/src/widgets/dialogs/qfontdialog_p.h
index ef4e933624..506d52b0b6 100644
--- a/src/widgets/dialogs/qfontdialog_p.h
+++ b/src/widgets/dialogs/qfontdialog_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,6 +58,7 @@
#include "qfontdatabase.h"
#include "qfontdialog.h"
#include "qplatformdialoghelper_qpa.h"
+#include "qsharedpointer.h"
#ifndef QT_NO_FONTDIALOG
@@ -78,7 +79,7 @@ class QFontDialogPrivate : public QDialogPrivate
public:
inline QFontDialogPrivate()
- : writingSystem(QFontDatabase::Any)
+ : writingSystem(QFontDatabase::Any), options(new QFontDialogOptions)
{ }
QPlatformFontDialogHelper *platformFontDialogHelper() const
@@ -138,7 +139,7 @@ public:
int size;
bool smoothScalable;
QFont selectedFont;
- QFontDialog::FontDialogOptions opts;
+ QSharedPointer<QFontDialogOptions> options;
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
@@ -163,6 +164,7 @@ public:
private:
virtual void initHelper(QPlatformDialogHelper *);
+ virtual void helperPrepareShow(QPlatformDialogHelper *);
};
#endif // QT_NO_FONTDIALOG
diff --git a/src/widgets/dialogs/qfscompleter_p.h b/src/widgets/dialogs/qfscompleter_p.h
index e078542cdc..c25bcf20cb 100644
--- a/src/widgets/dialogs/qfscompleter_p.h
+++ b/src/widgets/dialogs/qfscompleter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index 808858a711..dc7e30368b 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h
index 93abdaec22..164e0d1014 100644
--- a/src/widgets/dialogs/qinputdialog.h
+++ b/src/widgets/dialogs/qinputdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 1dbdeff1a7..fdba17d0ce 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -538,8 +538,8 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 6
This is the approach recommended in the
- \l{http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/chapter_18_section_7.html}
- {Mac OS X Guidlines}. Similar guidlines apply for the other
+ \l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID}
+ {Mac OS X Guidelines}. Similar guidelines apply for the other
platforms, but note the different ways the
\l{QMessageBox::informativeText} {informative text} is handled for
different platforms.
@@ -1778,7 +1778,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
"to comply with the terms of the GNU GPL version 3.0.</p>"
"<p>Please see <a href=\"http://qt.nokia.com/products/licensing\">qt.nokia.com/products/licensing</a> "
"for an overview of Qt licensing.</p>"
- "<p>Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</p>"
+ "<p>Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).</p>"
"<p>Qt is a Nokia product. See <a href=\"http://qt.nokia.com/\">qt.nokia.com</a> "
"for more information.</p>"
);
diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h
index ebfd28a1aa..4774389a69 100644
--- a/src/widgets/dialogs/qmessagebox.h
+++ b/src/widgets/dialogs/qmessagebox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qnspanelproxy_mac.mm b/src/widgets/dialogs/qnspanelproxy_mac.mm
index 1de548413a..4f171eab74 100644
--- a/src/widgets/dialogs/qnspanelproxy_mac.mm
+++ b/src/widgets/dialogs/qnspanelproxy_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index c38d79e58c..3cf576462d 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qprogressdialog.h b/src/widgets/dialogs/qprogressdialog.h
index b981e5ef63..6089de3f80 100644
--- a/src/widgets/dialogs/qprogressdialog.h
+++ b/src/widgets/dialogs/qprogressdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp
index 8efbb8dfcd..b62afec9bf 100644
--- a/src/widgets/dialogs/qsidebar.cpp
+++ b/src/widgets/dialogs/qsidebar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -371,7 +371,7 @@ QSidebar::QSidebar(QWidget *parent) : QListView(parent)
{
}
-void QSidebar::init(QFileSystemModel *model, const QList<QUrl> &newUrls)
+void QSidebar::setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUrls)
{
// ### TODO make icon size dynamic
setIconSize(QSize(24,24));
diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h
index 6ad2716780..265408b4ef 100644
--- a/src/widgets/dialogs/qsidebar_p.h
+++ b/src/widgets/dialogs/qsidebar_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -121,7 +121,7 @@ Q_SIGNALS:
public:
QSidebar(QWidget *parent = 0);
- void init(QFileSystemModel *model, const QList<QUrl> &newUrls);
+ void setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUrls);
~QSidebar();
QSize sizeHint() const;
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 81e23fbb18..dbdff5e34d 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qwizard.h b/src/widgets/dialogs/qwizard.h
index 77eef53037..f9af57c0b1 100644
--- a/src/widgets/dialogs/qwizard.h
+++ b/src/widgets/dialogs/qwizard.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index 075c8b81bb..06640a5864 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h
index f53a9ba75c..ab16d293af 100644
--- a/src/widgets/dialogs/qwizard_win_p.h
+++ b/src/widgets/dialogs/qwizard_win_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/effects/qgraphicseffect.cpp b/src/widgets/effects/qgraphicseffect.cpp
index 45f31d8062..ac33bffd6c 100644
--- a/src/widgets/effects/qgraphicseffect.cpp
+++ b/src/widgets/effects/qgraphicseffect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/effects/qgraphicseffect.h b/src/widgets/effects/qgraphicseffect.h
index 0ee6b26463..e8e97aa7e7 100644
--- a/src/widgets/effects/qgraphicseffect.h
+++ b/src/widgets/effects/qgraphicseffect.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/effects/qgraphicseffect_p.h b/src/widgets/effects/qgraphicseffect_p.h
index ac15f04d05..b2859f9a41 100644
--- a/src/widgets/effects/qgraphicseffect_p.h
+++ b/src/widgets/effects/qgraphicseffect_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp
index 9cdedc19a3..826bf2e93d 100644
--- a/src/widgets/effects/qpixmapfilter.cpp
+++ b/src/widgets/effects/qpixmapfilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/effects/qpixmapfilter_p.h b/src/widgets/effects/qpixmapfilter_p.h
index b0edd8d4b0..3f6ed069a1 100644
--- a/src/widgets/effects/qpixmapfilter_p.h
+++ b/src/widgets/effects/qpixmapfilter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraph_p.h b/src/widgets/graphicsview/qgraph_p.h
index 3b9d839a17..676000ac3e 100644
--- a/src/widgets/graphicsview/qgraph_p.h
+++ b/src/widgets/graphicsview/qgraph_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -121,8 +121,8 @@ public:
private:
const Graph *g;
- Q_TYPENAME QHash<Vertex *, QHash<Vertex *, EdgeData *> * >::const_iterator row;
- Q_TYPENAME QHash<Vertex *, EdgeData *>::const_iterator column;
+ typename QHash<Vertex *, QHash<Vertex *, EdgeData *> * >::const_iterator row;
+ typename QHash<Vertex *, EdgeData *>::const_iterator column;
};
const_iterator constBegin() const {
@@ -228,7 +228,7 @@ public:
QString edges;
QSet<Vertex *> setOfVertices = vertices();
- for (Q_TYPENAME QSet<Vertex*>::const_iterator it = setOfVertices.begin(); it != setOfVertices.end(); ++it) {
+ for (typename QSet<Vertex*>::const_iterator it = setOfVertices.begin(); it != setOfVertices.end(); ++it) {
Vertex *v = *it;
QList<Vertex*> adjacents = adjacentVertices(v);
for (int i = 0; i < adjacents.count(); ++i) {
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
index 3bd83ae6c4..3fb768d30a 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.h b/src/widgets/graphicsview/qgraphicsanchorlayout.h
index 4e57dbccf9..8db6391987 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index c9bda58123..2ac3953676 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index d78e5c89c3..21524e9157 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.cpp b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
index dd4102fdb9..fb4cf954e4 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.h b/src/widgets/graphicsview/qgraphicsgridlayout.h
index c6bc2229b6..749af57b0a 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index b30d29e704..eb77aee9ae 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index 811305ac9d..3873857b8a 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsitem_p.h b/src/widgets/graphicsview/qgraphicsitem_p.h
index 3cd77f3cdb..beedbfaa27 100644
--- a/src/widgets/graphicsview/qgraphicsitem_p.h
+++ b/src/widgets/graphicsview/qgraphicsitem_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.cpp b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
index a0b7ea4002..10c292bed1 100644
--- a/src/widgets/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.h b/src/widgets/graphicsview/qgraphicsitemanimation.h
index a6425a50e4..1f17d7e2e5 100644
--- a/src/widgets/graphicsview/qgraphicsitemanimation.h
+++ b/src/widgets/graphicsview/qgraphicsitemanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayout.cpp b/src/widgets/graphicsview/qgraphicslayout.cpp
index 0f463334cc..6c8a2662be 100644
--- a/src/widgets/graphicsview/qgraphicslayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayout.h b/src/widgets/graphicsview/qgraphicslayout.h
index 6b19f0e622..4e5b2a982a 100644
--- a/src/widgets/graphicsview/qgraphicslayout.h
+++ b/src/widgets/graphicsview/qgraphicslayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.cpp b/src/widgets/graphicsview/qgraphicslayout_p.cpp
index c0df2c0d64..ce3525b68d 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicslayout_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.h b/src/widgets/graphicsview/qgraphicslayout_p.h
index f11bfbf38c..ea98a4a679 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.h
+++ b/src/widgets/graphicsview/qgraphicslayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.cpp b/src/widgets/graphicsview/qgraphicslayoutitem.cpp
index 5eaf0a516e..ff53f1fd95 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/widgets/graphicsview/qgraphicslayoutitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.h b/src/widgets/graphicsview/qgraphicslayoutitem.h
index c617959a06..926a2b15dc 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem.h
+++ b/src/widgets/graphicsview/qgraphicslayoutitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem_p.h b/src/widgets/graphicsview/qgraphicslayoutitem_p.h
index 244c699faa..c13402dc49 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem_p.h
+++ b/src/widgets/graphicsview/qgraphicslayoutitem_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.cpp b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
index ee0db09df0..eeb4c0b01c 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.h b/src/widgets/graphicsview/qgraphicslinearlayout.h
index 5d2d5c309f..6d869197cf 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.h
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index 1b03879804..2eadec0ef1 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.h b/src/widgets/graphicsview/qgraphicsproxywidget.h
index 9f0a711c46..141b61bf09 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget_p.h b/src/widgets/graphicsview/qgraphicsproxywidget_p.h
index 86aec5f86b..e3e2cd174b 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget_p.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 791f25aa27..a8c3f8dee6 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -5777,8 +5777,8 @@ void QGraphicsScenePrivate::updateTouchPointsForItem(QGraphicsItem *item, QTouch
for (int i = 0; i < touchPoints.count(); ++i) {
QTouchEvent::TouchPoint &touchPoint = touchPoints[i];
touchPoint.setRect(item->mapFromScene(touchPoint.sceneRect()).boundingRect());
- touchPoint.setStartPos(item->d_ptr->genericMapFromScene(touchPoint.startScenePos(), touchEvent->widget()));
- touchPoint.setLastPos(item->d_ptr->genericMapFromScene(touchPoint.lastScenePos(), touchEvent->widget()));
+ touchPoint.setStartPos(item->d_ptr->genericMapFromScene(touchPoint.startScenePos(), static_cast<QWidget *>(touchEvent->target())));
+ touchPoint.setLastPos(item->d_ptr->genericMapFromScene(touchPoint.lastScenePos(), static_cast<QWidget *>(touchEvent->target())));
}
touchEvent->setTouchPoints(touchPoints);
}
@@ -5819,7 +5819,7 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent)
// determine which item this touch point will go to
cachedItemsUnderMouse = itemsAtPosition(touchPoint.screenPos().toPoint(),
touchPoint.scenePos(),
- sceneTouchEvent->widget());
+ static_cast<QWidget *>(sceneTouchEvent->target()));
item = cachedItemsUnderMouse.isEmpty() ? 0 : cachedItemsUnderMouse.first();
}
@@ -5888,13 +5888,13 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent)
}
QTouchEvent touchEvent(eventType);
- touchEvent.setWidget(sceneTouchEvent->widget());
+ touchEvent.setWindow(sceneTouchEvent->window());
+ touchEvent.setTarget(sceneTouchEvent->target());
touchEvent.setDevice(sceneTouchEvent->device());
touchEvent.setModifiers(sceneTouchEvent->modifiers());
touchEvent.setTouchPointStates(it.value().first);
touchEvent.setTouchPoints(it.value().second);
touchEvent.setTimestamp(sceneTouchEvent->timestamp());
- touchEvent.setWindow(sceneTouchEvent->window());
switch (touchEvent.type()) {
case QEvent::TouchBegin:
@@ -5935,7 +5935,7 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
const QTouchEvent::TouchPoint &firstTouchPoint = touchEvent->touchPoints().first();
cachedItemsUnderMouse = itemsAtPosition(firstTouchPoint.screenPos().toPoint(),
firstTouchPoint.scenePos(),
- touchEvent->widget());
+ static_cast<QWidget *>(touchEvent->target()));
}
Q_ASSERT(cachedItemsUnderMouse.first() == origin);
diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h
index 1b475e4d02..4e06a7483e 100644
--- a/src/widgets/graphicsview/qgraphicsscene.h
+++ b/src/widgets/graphicsview/qgraphicsscene.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
index cc8a558ad3..8b35fb0022 100644
--- a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscene_bsp_p.h b/src/widgets/graphicsview/qgraphicsscene_bsp_p.h
index 2e8149867b..d371ba5f66 100644
--- a/src/widgets/graphicsview/qgraphicsscene_bsp_p.h
+++ b/src/widgets/graphicsview/qgraphicsscene_bsp_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscene_p.h b/src/widgets/graphicsview/qgraphicsscene_p.h
index 8cb24457d6..a693c0c309 100644
--- a/src/widgets/graphicsview/qgraphicsscene_p.h
+++ b/src/widgets/graphicsview/qgraphicsscene_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
index 979ce6823b..1c4653d522 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -601,7 +601,7 @@ QList<QGraphicsItem *> QGraphicsSceneBspTreeIndex::items(Qt::SortOrder order) co
10 items.
*/
-int QGraphicsSceneBspTreeIndex::bspTreeDepth()
+int QGraphicsSceneBspTreeIndex::bspTreeDepth() const
{
Q_D(const QGraphicsSceneBspTreeIndex);
return d->bspTreeDepth;
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
index 0b353c74a4..b3b31fca6a 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -83,7 +83,7 @@ public:
QList<QGraphicsItem *> estimateTopLevelItems(const QRectF &rect, Qt::SortOrder order) const;
QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const;
- int bspTreeDepth();
+ int bspTreeDepth() const;
void setBspTreeDepth(int depth);
protected Q_SLOTS:
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp
index 4927b6933f..ca6ff59bec 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.h b/src/widgets/graphicsview/qgraphicssceneevent.h
index f3677fbef8..cf88a66e3c 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.h
+++ b/src/widgets/graphicsview/qgraphicssceneevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicssceneindex.cpp b/src/widgets/graphicsview/qgraphicssceneindex.cpp
index d5ca504cae..8fb6c666a0 100644
--- a/src/widgets/graphicsview/qgraphicssceneindex.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneindex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicssceneindex_p.h b/src/widgets/graphicsview/qgraphicssceneindex_p.h
index d7e01f64b3..eff75e89b1 100644
--- a/src/widgets/graphicsview/qgraphicssceneindex_p.h
+++ b/src/widgets/graphicsview/qgraphicssceneindex_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscenelinearindex.cpp b/src/widgets/graphicsview/qgraphicsscenelinearindex.cpp
index 9a4b3389bc..08fcdaf08d 100644
--- a/src/widgets/graphicsview/qgraphicsscenelinearindex.cpp
+++ b/src/widgets/graphicsview/qgraphicsscenelinearindex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
index 37ba363c1e..fdd6a82bda 100644
--- a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicstransform.cpp b/src/widgets/graphicsview/qgraphicstransform.cpp
index c0cc571bd4..33e3a3cc4d 100644
--- a/src/widgets/graphicsview/qgraphicstransform.cpp
+++ b/src/widgets/graphicsview/qgraphicstransform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicstransform.h b/src/widgets/graphicsview/qgraphicstransform.h
index 4bceecc47c..8e93a5ee76 100644
--- a/src/widgets/graphicsview/qgraphicstransform.h
+++ b/src/widgets/graphicsview/qgraphicstransform.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicstransform_p.h b/src/widgets/graphicsview/qgraphicstransform_p.h
index d2b851fe97..976ffed2c3 100644
--- a/src/widgets/graphicsview/qgraphicstransform_p.h
+++ b/src/widgets/graphicsview/qgraphicstransform_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 2ebd4ecc63..4c5c586ec9 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -2836,7 +2836,7 @@ bool QGraphicsView::viewportEvent(QEvent *event)
if (d->scene && d->sceneInteractionAllowed) {
// Convert and deliver the touch event to the scene.
QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
- touchEvent->setWidget(viewport());
+ touchEvent->setTarget(viewport());
QGraphicsViewPrivate::translateTouchEvent(d, touchEvent);
(void) QApplication::sendEvent(d->scene, touchEvent);
}
diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h
index 19b5753938..2e33548a29 100644
--- a/src/widgets/graphicsview/qgraphicsview.h
+++ b/src/widgets/graphicsview/qgraphicsview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicsview_p.h b/src/widgets/graphicsview/qgraphicsview_p.h
index 535679f1d8..c8b36bc89f 100644
--- a/src/widgets/graphicsview/qgraphicsview_p.h
+++ b/src/widgets/graphicsview/qgraphicsview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index e1fbdd4aa8..c415c704bc 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicswidget.h b/src/widgets/graphicsview/qgraphicswidget.h
index 8222886411..b469b64acd 100644
--- a/src/widgets/graphicsview/qgraphicswidget.h
+++ b/src/widgets/graphicsview/qgraphicswidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.cpp b/src/widgets/graphicsview/qgraphicswidget_p.cpp
index fd5afaabf4..40333fd1b5 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.h b/src/widgets/graphicsview/qgraphicswidget_p.h
index 16c5303235..99f5661b98 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.h
+++ b/src/widgets/graphicsview/qgraphicswidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgridlayoutengine.cpp b/src/widgets/graphicsview/qgridlayoutengine.cpp
index 66b4a5b6b4..d5eeea68f2 100644
--- a/src/widgets/graphicsview/qgridlayoutengine.cpp
+++ b/src/widgets/graphicsview/qgridlayoutengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qgridlayoutengine_p.h b/src/widgets/graphicsview/qgridlayoutengine_p.h
index f947d67d5a..f8ef75ab12 100644
--- a/src/widgets/graphicsview/qgridlayoutengine_p.h
+++ b/src/widgets/graphicsview/qgridlayoutengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qsimplex_p.cpp b/src/widgets/graphicsview/qsimplex_p.cpp
index eb8bcb8c1f..0a1472a384 100644
--- a/src/widgets/graphicsview/qsimplex_p.cpp
+++ b/src/widgets/graphicsview/qsimplex_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/graphicsview/qsimplex_p.h b/src/widgets/graphicsview/qsimplex_p.h
index 3df82c6ccf..82f65bac01 100644
--- a/src/widgets/graphicsview/qsimplex_p.h
+++ b/src/widgets/graphicsview/qsimplex_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/itemviews.pri b/src/widgets/itemviews/itemviews.pri
index 7ef704546e..d5a5012f83 100644
--- a/src/widgets/itemviews/itemviews.pri
+++ b/src/widgets/itemviews/itemviews.pri
@@ -4,7 +4,6 @@ HEADERS += \
itemviews/qabstractitemview.h \
itemviews/qabstractitemview_p.h \
itemviews/qheaderview.h \
- itemviews/qidentityproxymodel.h \
itemviews/qlistview.h \
itemviews/qlistview_p.h \
itemviews/qbsptree_p.h \
@@ -14,8 +13,6 @@ HEADERS += \
itemviews/qtreeview_p.h \
itemviews/qabstractitemdelegate.h \
itemviews/qitemdelegate.h \
- itemviews/qitemselectionmodel.h \
- itemviews/qitemselectionmodel_p.h \
itemviews/qdirmodel.h \
itemviews/qlistwidget.h \
itemviews/qlistwidget_p.h \
@@ -26,14 +23,10 @@ HEADERS += \
itemviews/qwidgetitemdata_p.h \
itemviews/qproxymodel.h \
itemviews/qproxymodel_p.h \
- itemviews/qabstractproxymodel.h \
- itemviews/qabstractproxymodel_p.h \
- itemviews/qsortfilterproxymodel.h \
itemviews/qitemeditorfactory.h \
itemviews/qitemeditorfactory_p.h \
itemviews/qstandarditemmodel.h \
itemviews/qstandarditemmodel_p.h \
- itemviews/qstringlistmodel.h \
itemviews/qtreewidgetitemiterator.h \
itemviews/qdatawidgetmapper.h \
itemviews/qfileiconprovider.h \
@@ -45,24 +38,19 @@ HEADERS += \
SOURCES += \
itemviews/qabstractitemview.cpp \
itemviews/qheaderview.cpp \
- itemviews/qidentityproxymodel.cpp \
itemviews/qlistview.cpp \
itemviews/qbsptree.cpp \
itemviews/qtableview.cpp \
itemviews/qtreeview.cpp \
itemviews/qabstractitemdelegate.cpp \
itemviews/qitemdelegate.cpp \
- itemviews/qitemselectionmodel.cpp \
itemviews/qdirmodel.cpp \
itemviews/qlistwidget.cpp \
itemviews/qtablewidget.cpp \
itemviews/qtreewidget.cpp \
itemviews/qproxymodel.cpp \
- itemviews/qabstractproxymodel.cpp \
- itemviews/qsortfilterproxymodel.cpp \
itemviews/qitemeditorfactory.cpp \
itemviews/qstandarditemmodel.cpp \
- itemviews/qstringlistmodel.cpp \
itemviews/qtreewidgetitemiterator.cpp \
itemviews/qdatawidgetmapper.cpp \
itemviews/qfileiconprovider.cpp \
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index bdc5d69f56..5e000b4d70 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -347,7 +347,6 @@ QString QAbstractItemDelegate::elidedText(const QFontMetrics &fontMetrics, int w
\sa QHelpEvent
*/
-// ### Qt 5: Make this a virtual non-slot function
bool QAbstractItemDelegate::helpEvent(QHelpEvent *event,
QAbstractItemView *view,
const QStyleOptionViewItem &option,
diff --git a/src/widgets/itemviews/qabstractitemdelegate.h b/src/widgets/itemviews/qabstractitemdelegate.h
index f494f0b8c8..315feda69e 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.h
+++ b/src/widgets/itemviews/qabstractitemdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -108,11 +108,10 @@ public:
static QString elidedText(const QFontMetrics &fontMetrics, int width,
Qt::TextElideMode mode, const QString &text);
-public Q_SLOTS:
- bool helpEvent(QHelpEvent *event,
- QAbstractItemView *view,
- const QStyleOptionViewItem &option,
- const QModelIndex &index);
+ virtual bool helpEvent(QHelpEvent *event,
+ QAbstractItemView *view,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index);
Q_SIGNALS:
void commitData(QWidget *editor);
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index 06544e3146..f4a45fb22e 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -673,8 +673,8 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
disconnect(d->model, SIGNAL(destroyed()),
this, SLOT(_q_modelDestroyed()));
- disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
- this, SLOT(dataChanged(QModelIndex,QModelIndex)));
+ disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)),
+ this, SLOT(dataChanged(QModelIndex,QModelIndex,QSet<int>)));
disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
this, SLOT(_q_headerDataChanged()));
disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
@@ -683,6 +683,8 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
+ disconnect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_rowsMoved(QModelIndex,int,int,QModelIndex,int)));
disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(_q_rowsInserted(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
@@ -691,6 +693,8 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
this, SLOT(_q_columnsRemoved(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
this, SLOT(_q_columnsInserted(QModelIndex,int,int)));
+ disconnect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_columnsMoved(QModelIndex,int,int,QModelIndex,int)));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(reset()));
disconnect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
@@ -709,8 +713,8 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
if (d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
connect(d->model, SIGNAL(destroyed()),
this, SLOT(_q_modelDestroyed()));
- connect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
- this, SLOT(dataChanged(QModelIndex,QModelIndex)));
+ connect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)),
+ this, SLOT(dataChanged(QModelIndex,QModelIndex,QSet<int>)));
connect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
this, SLOT(_q_headerDataChanged()));
connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
@@ -721,12 +725,16 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
+ connect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_rowsMoved(QModelIndex,int,int,QModelIndex,int)));
connect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(_q_columnsAboutToBeRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
this, SLOT(_q_columnsRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
this, SLOT(_q_columnsInserted(QModelIndex,int,int)));
+ connect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_columnsMoved(QModelIndex,int,int,QModelIndex,int)));
connect(d->model, SIGNAL(modelReset()), this, SLOT(reset()));
connect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
@@ -1658,15 +1666,11 @@ bool QAbstractItemView::viewportEvent(QEvent *event)
QStyleOptionViewItemV4 option = d->viewOptionsV4();
option.rect = visualRect(index);
option.state |= (index == currentIndex() ? QStyle::State_HasFocus : QStyle::State_None);
- bool retval = false;
- // ### Qt 5: make this a normal function call to a virtual function
- QMetaObject::invokeMethod(d->delegateForIndex(index), "helpEvent",
- Q_RETURN_ARG(bool, retval),
- Q_ARG(QHelpEvent *, he),
- Q_ARG(QAbstractItemView *, this),
- Q_ARG(QStyleOptionViewItem, option),
- Q_ARG(QModelIndex, index));
- return retval;
+
+ QAbstractItemDelegate *delegate = d->delegateForIndex(index);
+ if (!delegate)
+ return false;
+ return delegate->helpEvent(he, this, option, index);
}
case QEvent::FontChange:
d->doDelayedItemsLayout(); // the size of the items will change
@@ -3218,7 +3222,7 @@ void QAbstractItemView::update(const QModelIndex &index)
inclusive. If just one item is changed \a topLeft == \a
bottomRight.
*/
-void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &)
{
// Single item changed
Q_D(QAbstractItemView);
@@ -4292,6 +4296,7 @@ QPixmap QAbstractItemViewPrivate::renderToPixmap(const QModelIndexList &indexes,
for (int j = 0; j < paintPairs.count(); ++j) {
option.rect = paintPairs.at(j).first.translated(-r->topLeft());
const QModelIndex &current = paintPairs.at(j).second;
+ adjustViewOptionsForIndex(&option, current);
delegateForIndex(current)->paint(&painter, option, current);
}
return pixmap;
diff --git a/src/widgets/itemviews/qabstractitemview.h b/src/widgets/itemviews/qabstractitemview.h
index 25501e67c5..5ab41bae23 100644
--- a/src/widgets/itemviews/qabstractitemview.h
+++ b/src/widgets/itemviews/qabstractitemview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,7 +44,7 @@
#include <QtWidgets/qabstractscrollarea.h>
#include <QtCore/qabstractitemmodel.h>
-#include <QtWidgets/qitemselectionmodel.h>
+#include <QtCore/qitemselectionmodel.h>
#include <QtWidgets/qabstractitemdelegate.h>
QT_BEGIN_HEADER
@@ -241,7 +241,7 @@ public Q_SLOTS:
void update(const QModelIndex &index);
protected Q_SLOTS:
- virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles = QSet<int>());
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h
index 031e325cff..801bb82d85 100644
--- a/src/widgets/itemviews/qabstractitemview_p.h
+++ b/src/widgets/itemviews/qabstractitemview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -197,6 +197,8 @@ public:
#endif
virtual QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
+ // reimplemented in subclasses
+ virtual void adjustViewOptionsForIndex(QStyleOptionViewItemV4*, const QModelIndex&) const {}
inline void releaseEditor(QWidget *editor) const {
if (editor) {
diff --git a/src/widgets/itemviews/qbsptree.cpp b/src/widgets/itemviews/qbsptree.cpp
index 89f98f50f3..a049b9d095 100644
--- a/src/widgets/itemviews/qbsptree.cpp
+++ b/src/widgets/itemviews/qbsptree.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qbsptree_p.h b/src/widgets/itemviews/qbsptree_p.h
index c98efba6fa..d7404010d1 100644
--- a/src/widgets/itemviews/qbsptree_p.h
+++ b/src/widgets/itemviews/qbsptree_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qcolumnview.cpp b/src/widgets/itemviews/qcolumnview.cpp
index 3b4bcae847..8b4db02961 100644
--- a/src/widgets/itemviews/qcolumnview.cpp
+++ b/src/widgets/itemviews/qcolumnview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qcolumnview.h b/src/widgets/itemviews/qcolumnview.h
index b6d8687808..ac734c131d 100644
--- a/src/widgets/itemviews/qcolumnview.h
+++ b/src/widgets/itemviews/qcolumnview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qcolumnview_p.h b/src/widgets/itemviews/qcolumnview_p.h
index 0da719e756..ce1275e220 100644
--- a/src/widgets/itemviews/qcolumnview_p.h
+++ b/src/widgets/itemviews/qcolumnview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qcolumnviewgrip.cpp b/src/widgets/itemviews/qcolumnviewgrip.cpp
index 19b8c1aa78..ce25fdac03 100644
--- a/src/widgets/itemviews/qcolumnviewgrip.cpp
+++ b/src/widgets/itemviews/qcolumnviewgrip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h
index 13bdb3694b..2991f070eb 100644
--- a/src/widgets/itemviews/qcolumnviewgrip_p.h
+++ b/src/widgets/itemviews/qcolumnviewgrip_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qdatawidgetmapper.cpp b/src/widgets/itemviews/qdatawidgetmapper.cpp
index 8f5203936d..34699039c4 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.cpp
+++ b/src/widgets/itemviews/qdatawidgetmapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -104,7 +104,7 @@ public:
void populate();
// private slots
- void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &);
void _q_commitData(QWidget *);
void _q_closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint);
void _q_modelDestroyed();
@@ -182,7 +182,7 @@ static bool qContainsIndex(const QModelIndex &idx, const QModelIndex &topLeft,
&& idx.column() >= topLeft.column() && idx.column() <= bottomRight.column();
}
-void QDataWidgetMapperPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QDataWidgetMapperPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &)
{
if (topLeft.parent() != rootIndex)
return; // not in our hierarchy
@@ -369,8 +369,8 @@ void QDataWidgetMapper::setModel(QAbstractItemModel *model)
return;
if (d->model) {
- disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this,
- SLOT(_q_dataChanged(QModelIndex,QModelIndex)));
+ disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)), this,
+ SLOT(_q_dataChanged(QModelIndex,QModelIndex,QSet<int>)));
disconnect(d->model, SIGNAL(destroyed()), this,
SLOT(_q_modelDestroyed()));
}
@@ -380,8 +380,8 @@ void QDataWidgetMapper::setModel(QAbstractItemModel *model)
d->model = model;
- connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
- SLOT(_q_dataChanged(QModelIndex,QModelIndex)));
+ connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)),
+ SLOT(_q_dataChanged(QModelIndex,QModelIndex,QSet<int>)));
connect(model, SIGNAL(destroyed()), SLOT(_q_modelDestroyed()));
}
diff --git a/src/widgets/itemviews/qdatawidgetmapper.h b/src/widgets/itemviews/qdatawidgetmapper.h
index ebb180fa20..5ffb666fbd 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.h
+++ b/src/widgets/itemviews/qdatawidgetmapper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -113,7 +113,7 @@ Q_SIGNALS:
private:
Q_DECLARE_PRIVATE(QDataWidgetMapper)
Q_DISABLE_COPY(QDataWidgetMapper)
- Q_PRIVATE_SLOT(d_func(), void _q_dataChanged(const QModelIndex &, const QModelIndex &))
+ Q_PRIVATE_SLOT(d_func(), void _q_dataChanged(const QModelIndex &, const QModelIndex &, const QSet<int> &))
Q_PRIVATE_SLOT(d_func(), void _q_commitData(QWidget *))
Q_PRIVATE_SLOT(d_func(), void _q_closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint))
Q_PRIVATE_SLOT(d_func(), void _q_modelDestroyed())
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index c80662414a..aa74f604e5 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qdirmodel.h b/src/widgets/itemviews/qdirmodel.h
index 4ad89065f9..ee6ec3f4aa 100644
--- a/src/widgets/itemviews/qdirmodel.h
+++ b/src/widgets/itemviews/qdirmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp
index 1821171de8..a085f37d6c 100644
--- a/src/widgets/itemviews/qfileiconprovider.cpp
+++ b/src/widgets/itemviews/qfileiconprovider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qfileiconprovider.h b/src/widgets/itemviews/qfileiconprovider.h
index fcaaa9f78e..2b90e800a9 100644
--- a/src/widgets/itemviews/qfileiconprovider.h
+++ b/src/widgets/itemviews/qfileiconprovider.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 36784f6424..c9bc3423b0 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -370,6 +370,8 @@ void QHeaderView::setModel(QAbstractItemModel *model)
this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_layoutAboutToBeChanged()));
} else {
QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(sectionsInserted(QModelIndex,int,int)));
@@ -377,11 +379,13 @@ void QHeaderView::setModel(QAbstractItemModel *model)
this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_layoutAboutToBeChanged()));
}
QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
this, SLOT(headerDataChanged(Qt::Orientation,int,int)));
- QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()),
- this, SLOT(_q_layoutAboutToBeChanged()));
+ QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()),
+ this, SLOT(_q_layoutAboutToBeChanged()));
}
if (model && model != QAbstractItemModelPrivate::staticEmptyModel()) {
@@ -389,9 +393,11 @@ void QHeaderView::setModel(QAbstractItemModel *model)
QObject::connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
this, SLOT(sectionsInserted(QModelIndex,int,int)));
QObject::connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
+ this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
QObject::connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
- this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ QObject::connect(model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_layoutAboutToBeChanged()));
} else {
QObject::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(sectionsInserted(QModelIndex,int,int)));
@@ -399,6 +405,8 @@ void QHeaderView::setModel(QAbstractItemModel *model)
this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
QObject::connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ QObject::connect(model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_layoutAboutToBeChanged()));
}
QObject::connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
this, SLOT(headerDataChanged(Qt::Orientation,int,int)));
@@ -884,8 +892,12 @@ void QHeaderView::resizeSection(int logical, int size)
if (stretchLastSection() && visual == d->lastVisibleVisualIndex())
d->lastSectionSize = size;
- if (size != oldSize)
- d->createSectionSpan(visual, visual, size, d->headerSectionResizeMode(visual));
+ d->createSectionSpan(visual, visual, size, d->headerSectionResizeMode(visual));
+
+ if (!updatesEnabled()) {
+ emit sectionResized(logical, oldSize, size);
+ return;
+ }
int w = d->viewport->width();
int h = d->viewport->height();
@@ -2405,7 +2417,13 @@ bool QHeaderView::viewportEvent(QEvent *e)
}
return true; }
#endif // QT_NO_STATUSTIP
- case QEvent::Hide:
+ case QEvent::Hide: {
+ d->invalidateCachedSizeHint();
+ QAbstractScrollArea *parent = qobject_cast<QAbstractScrollArea *>(parentWidget());
+ if (parent && parent->isVisible()) // Only resize if we have a visible parent
+ resizeSections();
+ emit geometriesChanged();
+ break;}
case QEvent::Show:
case QEvent::FontChange:
case QEvent::StyleChange:
@@ -2637,7 +2655,7 @@ void QHeaderView::scrollContentsBy(int dx, int dy)
\reimp
\internal
*/
-void QHeaderView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QHeaderView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &)
{
Q_D(QHeaderView);
d->invalidateCachedSizeHint();
diff --git a/src/widgets/itemviews/qheaderview.h b/src/widgets/itemviews/qheaderview.h
index c9793759a1..1ad79a96e1 100644
--- a/src/widgets/itemviews/qheaderview.h
+++ b/src/widgets/itemviews/qheaderview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -211,7 +211,7 @@ protected:
void updateGeometries();
void scrollContentsBy(int dx, int dy);
- void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles = QSet<int>());
void rowsInserted(const QModelIndex &parent, int start, int end);
QRect visualRect(const QModelIndex &index) const;
diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h
index b2b8d686b5..923ab36f72 100644
--- a/src/widgets/itemviews/qheaderview_p.h
+++ b/src/widgets/itemviews/qheaderview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index 72f358ce68..e130953c38 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -468,7 +468,7 @@ void QItemDelegate::paint(QPainter *painter,
value = index.data(Qt::CheckStateRole);
if (value.isValid()) {
checkState = static_cast<Qt::CheckState>(value.toInt());
- checkRect = check(opt, opt.rect, value);
+ checkRect = doCheck(opt, opt.rect, value);
}
// do the layout
@@ -625,7 +625,7 @@ void QItemDelegate::updateEditorGeometry(QWidget *editor,
QString text = QItemDelegatePrivate::replaceNewLine(index.data(Qt::DisplayRole).toString());
QRect pixmapRect = QRect(QPoint(0, 0), option.decorationSize).intersected(pixmap.rect());
QRect textRect = textRectangle(0, option.rect, option.font, text);
- QRect checkRect = check(option, textRect, index.data(Qt::CheckStateRole));
+ QRect checkRect = doCheck(option, textRect, index.data(Qt::CheckStateRole));
QStyleOptionViewItem opt = option;
opt.showDecorationSelected = true; // let the editor take up all available space
doLayout(opt, &checkRect, &pixmapRect, &textRect, false);
@@ -1079,7 +1079,7 @@ QRect QItemDelegate::rect(const QStyleOptionViewItem &option,
Q_D(const QItemDelegate);
QVariant value = index.data(role);
if (role == Qt::CheckStateRole)
- return check(option, option.rect, value);
+ return doCheck(option, option.rect, value);
if (value.isValid() && !value.isNull()) {
switch (value.type()) {
case QVariant::Invalid:
@@ -1109,20 +1109,8 @@ QRect QItemDelegate::rect(const QStyleOptionViewItem &option,
/*!
\internal
-
- Note that on Mac, if /usr/include/AssertMacros.h is included prior
- to QItemDelegate, and the application is building in debug mode, the
- check(assertion) will conflict with QItemDelegate::check.
-
- To avoid this problem, add
-
- #ifdef check
- #undef check
- #endif
-
- after including AssertMacros.h
*/
-QRect QItemDelegate::check(const QStyleOptionViewItem &option,
+QRect QItemDelegate::doCheck(const QStyleOptionViewItem &option,
const QRect &bounding, const QVariant &value) const
{
if (value.isValid()) {
@@ -1280,7 +1268,7 @@ bool QItemDelegate::editorEvent(QEvent *event,
if ((event->type() == QEvent::MouseButtonRelease)
|| (event->type() == QEvent::MouseButtonDblClick)
|| (event->type() == QEvent::MouseButtonPress)) {
- QRect checkRect = check(option, option.rect, Qt::Checked);
+ QRect checkRect = doCheck(option, option.rect, Qt::Checked);
QRect emptyRect;
doLayout(option, &checkRect, &emptyRect, &emptyRect, false);
QMouseEvent *me = static_cast<QMouseEvent*>(event);
diff --git a/src/widgets/itemviews/qitemdelegate.h b/src/widgets/itemviews/qitemdelegate.h
index 97f3cc820e..5ea6b33f2d 100644
--- a/src/widgets/itemviews/qitemdelegate.h
+++ b/src/widgets/itemviews/qitemdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -120,7 +120,7 @@ protected:
QPixmap decoration(const QStyleOptionViewItem &option, const QVariant &variant) const;
QPixmap *selected(const QPixmap &pixmap, const QPalette &palette, bool enabled) const;
- QRect check(const QStyleOptionViewItem &option, const QRect &bounding,
+ QRect doCheck(const QStyleOptionViewItem &option, const QRect &bounding,
const QVariant &variant) const;
QRect textRectangle(QPainter *painter, const QRect &rect,
const QFont &font, const QString &text) const;
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index 7ff3622ec4..506ca79702 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qitemeditorfactory.h b/src/widgets/itemviews/qitemeditorfactory.h
index b48cac224f..3d3359dc1a 100644
--- a/src/widgets/itemviews/qitemeditorfactory.h
+++ b/src/widgets/itemviews/qitemeditorfactory.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qitemeditorfactory_p.h b/src/widgets/itemviews/qitemeditorfactory_p.h
index effa6f26a2..613d4e0e81 100644
--- a/src/widgets/itemviews/qitemeditorfactory_p.h
+++ b/src/widgets/itemviews/qitemeditorfactory_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 44ae7246c4..d0b5821c93 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -730,10 +730,10 @@ QSize QListView::contentsSize() const
/*!
\reimp
*/
-void QListView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QListView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles)
{
d_func()->commonListView->dataChanged(topLeft, bottomRight);
- QAbstractItemView::dataChanged(topLeft, bottomRight);
+ QAbstractItemView::dataChanged(topLeft, bottomRight, roles);
}
/*!
diff --git a/src/widgets/itemviews/qlistview.h b/src/widgets/itemviews/qlistview.h
index 8e1a04492f..f78806fef1 100644
--- a/src/widgets/itemviews/qlistview.h
+++ b/src/widgets/itemviews/qlistview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -147,7 +147,7 @@ protected:
void resizeContents(int width, int height);
QSize contentsSize() const;
- void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles = QSet<int>());
void rowsInserted(const QModelIndex &parent, int start, int end);
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h
index 6a7acf669d..b959e66686 100644
--- a/src/widgets/itemviews/qlistview_p.h
+++ b/src/widgets/itemviews/qlistview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index a4aaa6b4b6..d99d63c15f 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qlistwidget.h b/src/widgets/itemviews/qlistwidget.h
index 750b85b4c1..b119b62046 100644
--- a/src/widgets/itemviews/qlistwidget.h
+++ b/src/widgets/itemviews/qlistwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,7 @@
#include <QtWidgets/qlistview.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvector.h>
-#include <QtWidgets/qitemselectionmodel.h>
+#include <QtCore/qitemselectionmodel.h>
QT_BEGIN_HEADER
diff --git a/src/widgets/itemviews/qlistwidget_p.h b/src/widgets/itemviews/qlistwidget_p.h
index 2e879cc5d7..9d6b28d813 100644
--- a/src/widgets/itemviews/qlistwidget_p.h
+++ b/src/widgets/itemviews/qlistwidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qproxymodel.cpp b/src/widgets/itemviews/qproxymodel.cpp
index bc76bf1623..861cb95ca4 100644
--- a/src/widgets/itemviews/qproxymodel.cpp
+++ b/src/widgets/itemviews/qproxymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qproxymodel.h b/src/widgets/itemviews/qproxymodel.h
index 948f9a07c9..870ea7b003 100644
--- a/src/widgets/itemviews/qproxymodel.h
+++ b/src/widgets/itemviews/qproxymodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qproxymodel_p.h b/src/widgets/itemviews/qproxymodel_p.h
index 0a8668d2f8..3b73e844dc 100644
--- a/src/widgets/itemviews/qproxymodel_p.h
+++ b/src/widgets/itemviews/qproxymodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qstandarditemmodel.cpp b/src/widgets/itemviews/qstandarditemmodel.cpp
index 293420beb7..7bfece75ac 100644
--- a/src/widgets/itemviews/qstandarditemmodel.cpp
+++ b/src/widgets/itemviews/qstandarditemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qstandarditemmodel.h b/src/widgets/itemviews/qstandarditemmodel.h
index b1e70fffad..41047f7ed5 100644
--- a/src/widgets/itemviews/qstandarditemmodel.h
+++ b/src/widgets/itemviews/qstandarditemmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qstandarditemmodel_p.h b/src/widgets/itemviews/qstandarditemmodel_p.h
index dc2b5b9a3f..9fcddbe7d1 100644
--- a/src/widgets/itemviews/qstandarditemmodel_p.h
+++ b/src/widgets/itemviews/qstandarditemmodel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index 35d8d3d85b..bf6cbdb7a4 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qstyleditemdelegate.h b/src/widgets/itemviews/qstyleditemdelegate.h
index 6dda0041c9..67f7182446 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.h
+++ b/src/widgets/itemviews/qstyleditemdelegate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index ec629cad8e..625a7e353b 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtableview.h b/src/widgets/itemviews/qtableview.h
index 29f3793836..d2773c650e 100644
--- a/src/widgets/itemviews/qtableview.h
+++ b/src/widgets/itemviews/qtableview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtableview_p.h b/src/widgets/itemviews/qtableview_p.h
index dce0ed06ac..49ec36f680 100644
--- a/src/widgets/itemviews/qtableview_p.h
+++ b/src/widgets/itemviews/qtableview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 6485fa503d..abfba19117 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h
index d7332542d2..37b6d0f530 100644
--- a/src/widgets/itemviews/qtablewidget.h
+++ b/src/widgets/itemviews/qtablewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtablewidget_p.h b/src/widgets/itemviews/qtablewidget_p.h
index 7b7fc21ce8..881c4bd8a3 100644
--- a/src/widgets/itemviews/qtablewidget_p.h
+++ b/src/widgets/itemviews/qtablewidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 5674162b05..368be3a6c8 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -664,7 +664,7 @@ void QTreeView::setFirstColumnSpanned(int row, const QModelIndex &parent, bool s
/*!
\reimp
*/
-void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles)
{
Q_D(QTreeView);
@@ -706,7 +706,7 @@ void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &botto
d->updateScrollBars();
d->viewport->update();
}
- QAbstractItemView::dataChanged(topLeft, bottomRight);
+ QAbstractItemView::dataChanged(topLeft, bottomRight, roles);
}
/*!
@@ -1378,6 +1378,31 @@ QItemViewPaintPairs QTreeViewPrivate::draggablePaintPairs(const QModelIndexList
return ret;
}
+void QTreeViewPrivate::adjustViewOptionsForIndex(QStyleOptionViewItemV4 *option, const QModelIndex &current) const
+{
+ const int row = current.row();
+ option->state = option->state | (viewItems.at(row).expanded ? QStyle::State_Open : QStyle::State_None)
+ | (viewItems.at(row).hasChildren ? QStyle::State_Children : QStyle::State_None)
+ | (viewItems.at(row).hasMoreSiblings ? QStyle::State_Sibling : QStyle::State_None);
+
+ option->showDecorationSelected = (selectionBehavior & QTreeView::SelectRows)
+ || option->showDecorationSelected;
+
+ QVector<int> logicalIndices; // index = visual index of visible columns only. data = logical index.
+ QVector<QStyleOptionViewItemV4::ViewItemPosition> viewItemPosList; // vector of left/middle/end for each logicalIndex, visible columns only.
+ calcLogicalIndices(&logicalIndices, &viewItemPosList);
+
+ int columnIndex = 0;
+ for (int visualIndex = 0; visualIndex < current.column(); ++visualIndex) {
+ int logicalIndex = header->logicalIndex(visualIndex);
+ if (!header->isSectionHidden(logicalIndex)) {
+ ++columnIndex;
+ }
+ }
+
+ option->viewItemPosition = viewItemPosList.at(columnIndex);
+}
+
/*!
\since 4.2
@@ -1463,6 +1488,59 @@ static inline bool ancestorOf(QObject *widget, QObject *other)
return false;
}
+void QTreeViewPrivate::calcLogicalIndices(QVector<int> *logicalIndices, QVector<QStyleOptionViewItemV4::ViewItemPosition> *itemPositions) const
+{
+ const int left = (spanning ? header->visualIndex(0) : leftAndRight.first);
+ const int right = (spanning ? header->visualIndex(0) : leftAndRight.second);
+ const int columnCount = header->count();
+ /* 'left' and 'right' are the left-most and right-most visible visual indices.
+ Compute the first visible logical indices before and after the left and right.
+ We will use these values to determine the QStyleOptionViewItemV4::viewItemPosition. */
+ int logicalIndexBeforeLeft = -1, logicalIndexAfterRight = -1;
+ for (int visualIndex = left - 1; visualIndex >= 0; --visualIndex) {
+ int logicalIndex = header->logicalIndex(visualIndex);
+ if (!header->isSectionHidden(logicalIndex)) {
+ logicalIndexBeforeLeft = logicalIndex;
+ break;
+ }
+ }
+
+ for (int visualIndex = left; visualIndex < columnCount; ++visualIndex) {
+ int logicalIndex = header->logicalIndex(visualIndex);
+ if (!header->isSectionHidden(logicalIndex)) {
+ if (visualIndex > right) {
+ logicalIndexAfterRight = logicalIndex;
+ break;
+ }
+ logicalIndices->append(logicalIndex);
+ }
+ }
+
+ itemPositions->resize(logicalIndices->count());
+ for (int currentLogicalSection = 0; currentLogicalSection < logicalIndices->count(); ++currentLogicalSection) {
+ const int headerSection = logicalIndices->at(currentLogicalSection);
+ // determine the viewItemPosition depending on the position of column 0
+ int nextLogicalSection = currentLogicalSection + 1 >= logicalIndices->count()
+ ? logicalIndexAfterRight
+ : logicalIndices->at(currentLogicalSection + 1);
+ int prevLogicalSection = currentLogicalSection - 1 < 0
+ ? logicalIndexBeforeLeft
+ : logicalIndices->at(currentLogicalSection - 1);
+ QStyleOptionViewItemV4::ViewItemPosition pos;
+ if (columnCount == 1 || (nextLogicalSection == 0 && prevLogicalSection == -1)
+ || (headerSection == 0 && nextLogicalSection == -1) || spanning)
+ pos = QStyleOptionViewItemV4::OnlyOne;
+ else if (headerSection == 0 || (nextLogicalSection != 0 && prevLogicalSection == -1))
+ pos = QStyleOptionViewItemV4::Beginning;
+ else if (nextLogicalSection == 0 || nextLogicalSection == -1)
+ pos = QStyleOptionViewItemV4::End;
+ else
+ pos = QStyleOptionViewItemV4::Middle;
+ (*itemPositions)[currentLogicalSection] = pos;
+ }
+}
+
+
/*!
Draws the row in the tree view that contains the model item \a index,
using the \a painter given. The \a option control how the item is
@@ -1531,33 +1609,13 @@ void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &option,
int width, height = option.rect.height();
int position;
QModelIndex modelIndex;
- int columnCount = header->count();
const bool hoverRow = selectionBehavior() == QAbstractItemView::SelectRows
&& index.parent() == hover.parent()
&& index.row() == hover.row();
- /* 'left' and 'right' are the left-most and right-most visible visual indices.
- Compute the first visible logical indices before and after the left and right.
- We will use these values to determine the QStyleOptionViewItemV4::viewItemPosition. */
- int logicalIndexBeforeLeft = -1, logicalIndexAfterRight = -1;
- for (int visualIndex = left - 1; visualIndex >= 0; --visualIndex) {
- int logicalIndex = header->logicalIndex(visualIndex);
- if (!header->isSectionHidden(logicalIndex)) {
- logicalIndexBeforeLeft = logicalIndex;
- break;
- }
- }
- QVector<int> logicalIndices; // vector of currently visibly logical indices
- for (int visualIndex = left; visualIndex < columnCount; ++visualIndex) {
- int logicalIndex = header->logicalIndex(visualIndex);
- if (!header->isSectionHidden(logicalIndex)) {
- if (visualIndex > right) {
- logicalIndexAfterRight = logicalIndex;
- break;
- }
- logicalIndices.append(logicalIndex);
- }
- }
+ QVector<int> logicalIndices;
+ QVector<QStyleOptionViewItemV4::ViewItemPosition> viewItemPosList; // vector of left/middle/end for each logicalIndex
+ d->calcLogicalIndices(&logicalIndices, &viewItemPosList);
for (int currentLogicalSection = 0; currentLogicalSection < logicalIndices.count(); ++currentLogicalSection) {
int headerSection = logicalIndices.at(currentLogicalSection);
@@ -1579,22 +1637,7 @@ void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &option,
continue;
opt.state = state;
- // determine the viewItemPosition depending on the position of column 0
- int nextLogicalSection = currentLogicalSection + 1 >= logicalIndices.count()
- ? logicalIndexAfterRight
- : logicalIndices.at(currentLogicalSection + 1);
- int prevLogicalSection = currentLogicalSection - 1 < 0
- ? logicalIndexBeforeLeft
- : logicalIndices.at(currentLogicalSection - 1);
- if (columnCount == 1 || (nextLogicalSection == 0 && prevLogicalSection == -1)
- || (headerSection == 0 && nextLogicalSection == -1) || spanning)
- opt.viewItemPosition = QStyleOptionViewItemV4::OnlyOne;
- else if (headerSection == 0 || (nextLogicalSection != 0 && prevLogicalSection == -1))
- opt.viewItemPosition = QStyleOptionViewItemV4::Beginning;
- else if (nextLogicalSection == 0 || nextLogicalSection == -1)
- opt.viewItemPosition = QStyleOptionViewItemV4::End;
- else
- opt.viewItemPosition = QStyleOptionViewItemV4::Middle;
+ opt.viewItemPosition = viewItemPosList.at(currentLogicalSection);
// fake activeness when row editor has focus
if (indexWidgetHasFocus)
diff --git a/src/widgets/itemviews/qtreeview.h b/src/widgets/itemviews/qtreeview.h
index 8c49375d1d..bc68fd413a 100644
--- a/src/widgets/itemviews/qtreeview.h
+++ b/src/widgets/itemviews/qtreeview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -144,7 +144,7 @@ public:
void sortByColumn(int column, Qt::SortOrder order);
- void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles = QSet<int>());
void selectAll();
Q_SIGNALS:
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h
index 5a90b15389..7f6413d76c 100644
--- a/src/widgets/itemviews/qtreeview_p.h
+++ b/src/widgets/itemviews/qtreeview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -97,6 +97,7 @@ public:
void initialize();
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
+ void adjustViewOptionsForIndex(QStyleOptionViewItemV4 *option, const QModelIndex &current) const;
#ifndef QT_NO_ANIMATION
struct AnimatedOperation : public QVariantAnimation
@@ -167,6 +168,10 @@ public:
void paintAlternatingRowColors(QPainter *painter, QStyleOptionViewItemV4 *option, int y, int bottom) const;
+ // logicalIndices: vector of currently visibly logical indices
+ // itemPositions: vector of view item positions (beginning/middle/end/onlyone)
+ void calcLogicalIndices(QVector<int> *logicalIndices, QVector<QStyleOptionViewItemV4::ViewItemPosition> *itemPositions) const;
+
QHeaderView *header;
int indent;
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index 8c32e0ce87..71797b182c 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtreewidget.h b/src/widgets/itemviews/qtreewidget.h
index ec4b0d8585..9f30e94580 100644
--- a/src/widgets/itemviews/qtreewidget.h
+++ b/src/widgets/itemviews/qtreewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtreewidget_p.h b/src/widgets/itemviews/qtreewidget_p.h
index 1ead6837c1..a26666dd40 100644
--- a/src/widgets/itemviews/qtreewidget_p.h
+++ b/src/widgets/itemviews/qtreewidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtreewidgetitemiterator.cpp b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
index f538917a09..5fdab5d024 100644
--- a/src/widgets/itemviews/qtreewidgetitemiterator.cpp
+++ b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtreewidgetitemiterator.h b/src/widgets/itemviews/qtreewidgetitemiterator.h
index 8d27afe2c3..d994b88b12 100644
--- a/src/widgets/itemviews/qtreewidgetitemiterator.h
+++ b/src/widgets/itemviews/qtreewidgetitemiterator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qtreewidgetitemiterator_p.h b/src/widgets/itemviews/qtreewidgetitemiterator_p.h
index 5ece7fd7b6..c338b944a1 100644
--- a/src/widgets/itemviews/qtreewidgetitemiterator_p.h
+++ b/src/widgets/itemviews/qtreewidgetitemiterator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/itemviews/qwidgetitemdata_p.h b/src/widgets/itemviews/qwidgetitemdata_p.h
index e7a08de378..cae3e8d1ff 100644
--- a/src/widgets/itemviews/qwidgetitemdata_p.h
+++ b/src/widgets/itemviews/qwidgetitemdata_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 22162895f7..408e088f0f 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1185,22 +1185,19 @@ void QAction::activate(ActionEvent event)
{
Q_D(QAction);
if(event == Trigger) {
- QObject *guard = this;
- QMetaObject::addGuard(&guard);
+ QWeakPointer<QObject> guard = this;
if(d->checkable) {
// the checked action of an exclusive group cannot be unchecked
if (d->checked && (d->group && d->group->isExclusive()
&& d->group->checkedAction() == this)) {
- if (guard)
+ if (!guard.isNull())
emit triggered(true);
- QMetaObject::removeGuard(&guard);
return;
}
setChecked(!d->checked);
}
- if (guard)
+ if (!guard.isNull())
emit triggered(d->checked);
- QMetaObject::removeGuard(&guard);
} else if(event == Hover) {
emit hovered();
}
@@ -1266,97 +1263,6 @@ void QAction::activate(ActionEvent event)
*/
/*!
- \fn void QAction::setMenuText(const QString &text)
-
- Use setText() instead.
-*/
-
-/*!
- \fn QString QAction::menuText() const
-
- Use text() instead.
-*/
-
-/*!
- \fn bool QAction::isOn() const
-
- Use isChecked() instead.
-*/
-
-/*!
- \fn void QAction::setOn(bool b)
-
- Use setChecked() instead.
-*/
-
-/*!
- \fn bool QAction::isToggleAction() const
-
- Use isCheckable() instead.
-*/
-
-/*!
- \fn void QAction::setToggleAction(bool b)
-
- Use setCheckable() instead.
-*/
-
-/*!
- \fn void QAction::setIconSet(const QIcon &i)
-
- Use setIcon() instead.
-*/
-
-/*!
- \fn bool QAction::addTo(QWidget *w)
-
- Use QWidget::addAction() instead.
-
- \oldcode
- action->addTo(widget);
- \newcode
- widget->addAction(action);
- \endcode
-*/
-
-/*!
- \fn bool QAction::removeFrom(QWidget *w)
-
- Use QWidget::removeAction() instead.
-
- \oldcode
- action->removeFrom(widget);
- \newcode
- widget->removeAction(action);
- \endcode
-*/
-
-/*!
- \fn void QAction::setAccel(const QKeySequence &shortcut)
-
- Use setShortcut() instead.
-*/
-
-/*!
- \fn QIcon QAction::iconSet() const
-
- Use icon() instead.
-*/
-
-/*!
- \fn QKeySequence QAction::accel() const
-
- Use shortcut() instead.
-*/
-
-/*!
- \fn void QAction::activated(int i);
-
- Use triggered() instead.
-*/
-
-
-/*!
\property QAction::menuRole
\brief the action's menu role
\since 4.2
diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h
index 5c163c2314..a2cafa2027 100644
--- a/src/widgets/kernel/qaction.h
+++ b/src/widgets/kernel/qaction.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qaction_p.h b/src/widgets/kernel/qaction_p.h
index 8f9e1f0f8e..d57cd05cff 100644
--- a/src/widgets/kernel/qaction_p.h
+++ b/src/widgets/kernel/qaction_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qactiongroup.cpp b/src/widgets/kernel/qactiongroup.cpp
index 0397883009..67e0ee7adf 100644
--- a/src/widgets/kernel/qactiongroup.cpp
+++ b/src/widgets/kernel/qactiongroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qactiongroup.h b/src/widgets/kernel/qactiongroup.h
index 5379ef4197..bdef33294c 100644
--- a/src/widgets/kernel/qactiongroup.h
+++ b/src/widgets/kernel/qactiongroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index afd5fb70e1..fc295eb874 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -139,7 +139,6 @@ QT_BEGIN_NAMESPACE
Q_CORE_EXPORT void qt_call_post_routines();
-QApplication::Type qt_appType=QApplication::Tty;
QApplicationPrivate *QApplicationPrivate::self = 0;
QInputContext *QApplicationPrivate::inputContext = 0;
@@ -157,7 +156,6 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
: QApplicationPrivateBase(argc, argv, flags)
{
application_type = type;
- qt_appType = type;
#ifndef QT_NO_SESSIONMANAGER
is_session_restored = false;
@@ -366,14 +364,6 @@ QApplicationPrivate::~QApplicationPrivate()
*/
/*!
- \enum QApplication::Type
-
- \value Tty a console application
- \value GuiClient a GUI client application
- \value GuiServer a GUI server application (for Qt for Embedded Linux)
-*/
-
-/*!
\enum QApplication::ColorSpec
\value NormalColor the default color allocation policy
@@ -441,7 +431,6 @@ bool QApplicationPrivate::obey_desktop_settings = true; // use winsys res
#ifndef QT_NO_WHEELEVENT
int QApplicationPrivate::wheel_scroll_lines; // number of lines to scroll
#endif
-bool qt_is_gui_used;
bool Q_WIDGETS_EXPORT qt_tab_all_widgets = true;
bool qt_in_tab_key_event = false;
int qt_antialiasing_threshold = -1;
@@ -743,11 +732,11 @@ void QApplicationPrivate::construct(
{
initResources();
- qt_is_gui_used = (qt_appType != QApplication::Tty);
+ qt_is_gui_used = (application_type != QApplication::Tty);
process_cmdline();
// Must be called before initialize()
- qt_init(this, qt_appType
+ qt_init(this, application_type
#ifdef Q_WS_X11
, dpy, visual, cmap
#endif
@@ -873,7 +862,7 @@ void QApplicationPrivate::initialize()
QWidgetPrivate::mapper = new QWidgetMapper;
QWidgetPrivate::allWidgets = new QWidgetSet;
- if (qt_appType != QApplication::Tty)
+ if (application_type != QApplication::Tty)
(void) QApplication::style(); // trigger creation of application style
#ifndef QT_NO_STATEMACHINE
// trigger registering of QStateMachine's GUI types
@@ -917,7 +906,9 @@ void QApplicationPrivate::initialize()
*/
QApplication::Type QApplication::type()
{
- return qt_appType;
+ if (QApplicationPrivate::instance())
+ return (QCoreApplication::Type)QApplicationPrivate::instance()->application_type;
+ return Tty;
}
/*****************************************************************************
@@ -1275,7 +1266,7 @@ QStyle *QApplication::style()
{
if (QApplicationPrivate::app_style)
return QApplicationPrivate::app_style;
- if (!qt_is_gui_used) {
+ if (qApp->type() == QApplication::Tty) {
Q_ASSERT(!"No style available in non-gui applications!");
return 0;
}
@@ -2311,9 +2302,6 @@ void QApplication::setActiveWindow(QWidget* act)
}
}
-#if !defined(Q_WS_MAC)
- QWidget *previousActiveWindow = QApplicationPrivate::active_window;
-#endif
QApplicationPrivate::active_window = window;
if (QApplicationPrivate::active_window) {
@@ -2335,13 +2323,6 @@ void QApplication::setActiveWindow(QWidget* act)
QEvent windowActivate(QEvent::WindowActivate);
QEvent windowDeactivate(QEvent::WindowDeactivate);
-#if !defined(Q_WS_MAC)
- if (!previousActiveWindow) {
- QEvent appActivate(QEvent::ApplicationActivate);
- sendSpontaneousEvent(qApp, &appActivate);
- }
-#endif
-
for (int i = 0; i < toBeActivated.size(); ++i) {
QWidget *w = toBeActivated.at(i);
sendSpontaneousEvent(w, &windowActivate);
@@ -2361,13 +2342,6 @@ void QApplication::setActiveWindow(QWidget* act)
sendSpontaneousEvent(w, &activationChange);
}
-#if !defined(Q_WS_MAC)
- if (!QApplicationPrivate::active_window) {
- QEvent appDeactivate(QEvent::ApplicationDeactivate);
- sendSpontaneousEvent(qApp, &appDeactivate);
- }
-#endif
-
if (QApplicationPrivate::popupWidgets == 0) { // !inPopupMode()
// then focus events
if (!QApplicationPrivate::active_window && QApplicationPrivate::focus_widget) {
@@ -3449,8 +3423,6 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
case QEvent::Style:
case QEvent::IconDrag:
case QEvent::StyleChange:
- case QEvent::AccessibilityHelp:
- case QEvent::AccessibilityDescription:
case QEvent::GraphicsSceneDragEnter:
case QEvent::GraphicsSceneDragMove:
case QEvent::GraphicsSceneDragLeave:
@@ -3896,7 +3868,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
while (widget) {
// first, try to deliver the touch event
bool acceptTouchEvents = widget->testAttribute(Qt::WA_AcceptTouchEvents);
- touchEvent->setWidget(widget);
+ touchEvent->setTarget(widget);
touchEvent->setAccepted(acceptTouchEvents);
QWeakPointer<QWidget> p = widget;
res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
@@ -3912,7 +3884,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
// the first widget to accept the TouchBegin gets an implicit grab.
for (int i = 0; i < touchEvent->touchPoints().count(); ++i) {
const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().at(i);
- d->widgetForTouchPointId[touchPoint.id()] = widget;
+ d->activeTouchPoints[QGuiApplicationPrivate::ActiveTouchPointsKey(touchEvent->device(), touchPoint.id())].target = widget;
}
break;
} else if (p.isNull() || widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) {
@@ -3920,7 +3892,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
}
QPoint offset = widget->pos();
widget = widget->parentWidget();
- touchEvent->setWidget(widget);
+ touchEvent->setTarget(widget);
for (int i = 0; i < touchEvent->_touchPoints.size(); ++i) {
QTouchEvent::TouchPoint &pt = touchEvent->_touchPoints[i];
QRectF rect = pt.rect();
@@ -4965,31 +4937,29 @@ int QApplication::keyboardInputInterval()
// Input Method support
// ************************************************************************
-/*!
+/*
This function replaces the QInputContext instance used by the application
with \a inputContext.
Qt takes ownership of the given \a inputContext.
-
- \sa inputContext()
*/
-void QApplication::setInputContext(QInputContext *inputContext)
+void QApplicationPrivate::setInputContext(QInputContext *newInputContext)
{
- if (inputContext == QApplicationPrivate::inputContext)
+ Q_Q(QApplication);
+
+ if (newInputContext == inputContext)
return;
- if (!inputContext) {
- qWarning("QApplication::setInputContext: called with 0 input context");
+ if (!newInputContext) {
+ qWarning("QApplicationPrivate::setInputContext: called with 0 input context");
return;
}
- delete QApplicationPrivate::inputContext;
- QApplicationPrivate::inputContext = inputContext;
- QApplicationPrivate::inputContext->setParent(this);
+ delete inputContext;
+ inputContext = newInputContext;
+ inputContext->setParent(q);
}
/*!
Returns the QInputContext instance used by the application.
-
- \sa setInputContext()
*/
QInputContext *QApplication::inputContext() const
{
@@ -5176,41 +5146,43 @@ void QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEven
rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta);
touchPoint.d->rect = rect;
- if (touchPoint.state() == Qt::TouchPointPressed) {
- touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;
- touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;
- }
+ touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;
+ touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;
}
}
void QApplicationPrivate::initializeMultitouch()
{
- widgetForTouchPointId.clear();
- appCurrentTouchPoints.clear();
-
initializeMultitouch_sys();
}
void QApplicationPrivate::cleanupMultitouch()
{
cleanupMultitouch_sys();
-
- widgetForTouchPointId.clear();
- appCurrentTouchPoints.clear();
}
-int QApplicationPrivate::findClosestTouchPointId(const QPointF &screenPos)
+QWidget *QApplicationPrivate::findClosestTouchPointTarget(QTouchDevice *device, const QPointF &screenPos)
{
int closestTouchPointId = -1;
+ QObject *closestTarget = 0;
qreal closestDistance = qreal(0.);
- foreach (const QTouchEvent::TouchPoint &touchPoint, appCurrentTouchPoints) {
- qreal distance = QLineF(screenPos, touchPoint.screenPos()).length();
- if (closestTouchPointId == -1 || distance < closestDistance) {
- closestTouchPointId = touchPoint.id();
- closestDistance = distance;
+ QHash<ActiveTouchPointsKey, ActiveTouchPointsValue>::const_iterator it = activeTouchPoints.constBegin(),
+ ite = activeTouchPoints.constEnd();
+ while (it != ite) {
+ if (it.key().device == device) {
+ const QTouchEvent::TouchPoint &touchPoint = it->touchPoint;
+ qreal dx = screenPos.x() - touchPoint.screenPos().x();
+ qreal dy = screenPos.y() - touchPoint.screenPos().y();
+ qreal distance = dx * dx + dy * dy;
+ if (closestTouchPointId == -1 || distance < closestDistance) {
+ closestTouchPointId = touchPoint.id();
+ closestDistance = distance;
+ closestTarget = it.value().target.data();
+ }
}
+ ++it;
}
- return closestTouchPointId;
+ return static_cast<QWidget *>(closestTarget);
}
void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
@@ -5230,94 +5202,47 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
touchPoint.d = touchPoint.d->detach();
// update state
- QWeakPointer<QWidget> widget;
- switch (touchPoint.state()) {
- case Qt::TouchPointPressed:
- {
+ QWeakPointer<QObject> target;
+ ActiveTouchPointsKey touchInfoKey(device, touchPoint.id());
+ ActiveTouchPointsValue &touchInfo = d->activeTouchPoints[touchInfoKey];
+ if (touchPoint.state() == Qt::TouchPointPressed) {
if (device->type() == QTouchDevice::TouchPad) {
// on touch-pads, send all touch points to the same widget
- widget = d->widgetForTouchPointId.isEmpty()
- ? QWeakPointer<QWidget>()
- : d->widgetForTouchPointId.constBegin().value();
+ target = d->activeTouchPoints.isEmpty()
+ ? QWeakPointer<QObject>()
+ : d->activeTouchPoints.constBegin().value().target;
}
- if (!widget) {
+ if (!target) {
// determine which widget this event will go to
if (!window)
window = QApplication::topLevelAt(touchPoint.screenPos().toPoint());
if (!window)
continue;
- widget = window->childAt(window->mapFromGlobal(touchPoint.screenPos().toPoint()));
- if (!widget)
- widget = window;
+ target = window->childAt(window->mapFromGlobal(touchPoint.screenPos().toPoint()));
+ if (!target)
+ target = window;
}
if (device->type() == QTouchDevice::TouchScreen) {
- int closestTouchPointId = d->findClosestTouchPointId(touchPoint.screenPos());
- QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId).data();
+ QWidget *closestWidget = d->findClosestTouchPointTarget(device, touchPoint.screenPos());
+ QWidget *widget = static_cast<QWidget *>(target.data());
if (closestWidget
- && (widget.data()->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget.data()))) {
- widget = closestWidget;
+ && (widget->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget))) {
+ target = closestWidget;
}
}
- d->widgetForTouchPointId[touchPoint.id()] = widget;
- touchPoint.d->startScreenPos = touchPoint.screenPos();
- touchPoint.d->lastScreenPos = touchPoint.screenPos();
- touchPoint.d->startNormalizedPos = touchPoint.normalizedPos();
- touchPoint.d->lastNormalizedPos = touchPoint.normalizedPos();
- if (touchPoint.pressure() < qreal(0.))
- touchPoint.d->pressure = qreal(1.);
-
- d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint);
- break;
- }
- case Qt::TouchPointReleased:
- {
- widget = d->widgetForTouchPointId.take(touchPoint.id());
- if (!widget)
- continue;
-
- QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id());
- touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
- touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
- touchPoint.d->startPos = previousTouchPoint.startPos();
- touchPoint.d->lastPos = previousTouchPoint.pos();
- touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();
- touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
- if (touchPoint.pressure() < qreal(0.))
- touchPoint.d->pressure = qreal(0.);
- break;
- }
- default:
- widget = d->widgetForTouchPointId.value(touchPoint.id());
- if (!widget)
+ touchInfo.target = target;
+ } else {
+ target = touchInfo.target;
+ if (!target)
continue;
-
- Q_ASSERT(d->appCurrentTouchPoints.contains(touchPoint.id()));
- QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id());
- touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
- touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
- touchPoint.d->startPos = previousTouchPoint.startPos();
- touchPoint.d->lastPos = previousTouchPoint.pos();
- touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();
- touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
- if (touchPoint.pressure() < qreal(0.))
- touchPoint.d->pressure = qreal(1.);
- d->appCurrentTouchPoints[touchPoint.id()] = touchPoint;
- break;
}
- Q_ASSERT(widget.data() != 0);
-
- // make the *scene* functions return the same as the *screen* functions
- touchPoint.d->sceneRect = touchPoint.screenRect();
- touchPoint.d->startScenePos = touchPoint.startScreenPos();
- touchPoint.d->lastScenePos = touchPoint.lastScreenPos();
+ Q_ASSERT(target.data() != 0);
- StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget.data()];
+ StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[static_cast<QWidget *>(target.data())];
maskAndPoints.first |= touchPoint.state();
- if (touchPoint.isPrimary())
- maskAndPoints.first |= Qt::TouchPointPrimary;
maskAndPoints.second.append(touchPoint);
}
@@ -5332,7 +5257,7 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
continue;
QEvent::Type eventType;
- switch (it.value().first & Qt::TouchPointStateMask) {
+ switch (it.value().first) {
case Qt::TouchPointPressed:
eventType = QEvent::TouchBegin;
break;
@@ -5355,6 +5280,7 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
updateTouchPointsForWidget(widget, &touchEvent);
touchEvent.setTimestamp(timestamp);
touchEvent.setWindow(window->windowHandle());
+ touchEvent.setTarget(widget);
switch (touchEvent.type()) {
case QEvent::TouchBegin:
@@ -5376,14 +5302,6 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
}
}
-Q_WIDGETS_EXPORT void qt_translateRawTouchEvent(QWidget *window,
- QTouchDevice *device,
- const QList<QTouchEvent::TouchPoint> &touchPoints,
- ulong timestamp)
-{
- QApplicationPrivate::translateRawTouchEvent(window, device, touchPoints, timestamp);
-}
-
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 1792d2f05d..4347aa3521 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -98,7 +98,6 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled)
public:
- enum Type { Tty, GuiClient, GuiServer };
#ifndef qdoc
QApplication(int &argc, char **argv, int = ApplicationFlags);
@@ -224,7 +223,6 @@ public:
#endif
#ifndef QT_NO_IM
- void setInputContext(QInputContext *);
QInputContext *inputContext() const;
#endif
@@ -243,7 +241,6 @@ public:
#endif
Q_SIGNALS:
- void lastWindowClosed();
void focusChanged(QWidget *old, QWidget *now);
#ifndef QT_NO_SESSIONMANAGER
void commitDataRequest(QSessionManager &sessionManager);
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 3841cef62f..f8d02ed437 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -88,7 +88,7 @@ class QTouchDevice;
class QGestureManager;
#endif
-extern bool qt_is_gui_used;
+extern Q_GUI_EXPORT bool qt_is_gui_used;
#ifndef QT_NO_CLIPBOARD
extern QClipboard *qt_clipboard;
#endif
@@ -120,37 +120,6 @@ struct QTabletDeviceData
inline QPointF scaleCoord(int coordX, int coordY, int outOriginX, int outExtentX,
int outOriginY, int outExtentY) const;
#endif
-
-#ifdef Q_WS_X11
- QPointer<QWidget> widgetToGetPress;
-#endif
-
-#ifdef Q_WS_X11
- int deviceType;
- enum {
- TOTAL_XINPUT_EVENTS = 64
- };
- void *device;
- int eventCount;
- long unsigned int eventList[TOTAL_XINPUT_EVENTS]; // XEventClass is in fact a long unsigned int
-
- int xinput_motion;
- int xinput_key_press;
- int xinput_key_release;
- int xinput_button_press;
- int xinput_button_release;
- int xinput_proximity_in;
- int xinput_proximity_out;
-#elif defined(Q_WS_WIN)
- qint64 llId;
- int currentDevice;
- int currentPointerType;
-#elif defined(Q_WS_MAC)
- quint64 tabletUniqueID;
- int tabletDeviceType;
- int tabletPointerType;
- int capabilityMask;
-#endif
};
static inline int sign(int x)
@@ -189,80 +158,6 @@ QMacTabletHash *qt_mac_tablet_hash();
# endif
#endif
-
-#if defined(Q_WS_WIN)
-typedef BOOL (WINAPI *PtrRegisterTouchWindow)(HWND, ULONG);
-typedef BOOL (WINAPI *PtrGetTouchInputInfo)(HANDLE, UINT, PVOID, int);
-typedef BOOL (WINAPI *PtrCloseTouchInputHandle)(HANDLE);
-
-#ifndef QT_NO_GESTURES
-typedef BOOL (WINAPI *PtrGetGestureInfo)(HANDLE, PVOID);
-typedef BOOL (WINAPI *PtrGetGestureExtraArgs)(HANDLE, UINT, PBYTE);
-typedef BOOL (WINAPI *PtrCloseGestureInfoHandle)(HANDLE);
-typedef BOOL (WINAPI *PtrSetGestureConfig)(HWND, DWORD, UINT, PVOID, UINT);
-typedef BOOL (WINAPI *PtrGetGestureConfig)(HWND, DWORD, DWORD, PUINT, PVOID, UINT);
-
-typedef BOOL (WINAPI *PtrBeginPanningFeedback)(HWND);
-typedef BOOL (WINAPI *PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL);
-typedef BOOL (WINAPI *PtrEndPanningFeedback)(HWND, BOOL);
-
-#ifndef WM_GESTURE
-# define WM_GESTURE 0x0119
-
-# define GID_BEGIN 1
-# define GID_END 2
-# define GID_ZOOM 3
-# define GID_PAN 4
-# define GID_ROTATE 5
-# define GID_TWOFINGERTAP 6
-# define GID_ROLLOVER 7
-
-typedef struct tagGESTUREINFO
-{
- UINT cbSize;
- DWORD dwFlags;
- DWORD dwID;
- HWND hwndTarget;
- POINTS ptsLocation;
- DWORD dwInstanceID;
- DWORD dwSequenceID;
- ULONGLONG ullArguments;
- UINT cbExtraArgs;
-} GESTUREINFO;
-
-# define GC_PAN 0x00000001
-# define GC_PAN_WITH_SINGLE_FINGER_VERTICALLY 0x00000002
-# define GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY 0x00000004
-
-# define GC_ZOOM 0x00000001
-# define GC_ROTATE 0x00000001
-
-typedef struct tagGESTURECONFIG
-{
- DWORD dwID;
- DWORD dwWant;
- DWORD dwBlock;
-} GESTURECONFIG;
-
-# define GID_ROTATE_ANGLE_FROM_ARGUMENT(arg) ((((double)(arg) / 65535.0) * 4.0 * 3.14159265) - 2.0*3.14159265)
-
-#endif // WM_GESTURE
-
-#if defined(Q_WS_WINCE_WM) && defined(QT_WINCE_GESTURES)
-#undef GID_ZOOM
-#define GID_ZOOM 0xf000
-#undef GID_ROTATE
-#define GID_ROTATE 0xf001
-#undef GID_TWOFINGERTAP
-#define GID_TWOFINGERTAP 0xf002
-#undef GID_ROLLOVER
-#define GID_ROLLOVER 0xf003
-#endif
-
-#endif // QT_NO_GESTURES
-
-#endif // Q_WS_WIN
-
struct FontHash : public QHash<QByteArray, QFont>
{
FontHash();
@@ -356,6 +251,10 @@ public:
QPoint toolTipPos, toolTipGlobalPos, hoverGlobalPos;
QPointer<QWidget> toolTipWidget;
+#ifndef QT_NO_IM
+ void setInputContext(QInputContext *);
+#endif
+
static QInputContext *inputContext;
static Qt::MouseButtons mouse_buttons;
@@ -472,14 +371,12 @@ public:
QPixmap *ignore_cursor;
#endif
- QMap<int, QWeakPointer<QWidget> > widgetForTouchPointId;
- QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints;
static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent);
void initializeMultitouch();
void initializeMultitouch_sys();
void cleanupMultitouch();
void cleanupMultitouch_sys();
- int findClosestTouchPointId(const QPointF &screenPos);
+ QWidget *findClosestTouchPointTarget(QTouchDevice *device, const QPointF &screenPos);
void appendTouchPoint(const QTouchEvent::TouchPoint &touchPoint);
void removeTouchPoint(int touchPointId);
static void translateRawTouchEvent(QWidget *widget,
@@ -487,62 +384,11 @@ public:
const QList<QTouchEvent::TouchPoint> &touchPoints,
ulong timestamp);
-#if defined(Q_WS_WIN)
- static bool HasTouchSupport;
- static PtrRegisterTouchWindow RegisterTouchWindow;
- static PtrGetTouchInputInfo GetTouchInputInfo;
- static PtrCloseTouchInputHandle CloseTouchInputHandle;
-
- QHash<DWORD, int> touchInputIDToTouchPointID;
- bool translateTouchEvent(const MSG &msg);
-
-#ifndef QT_NO_GESTURES
- PtrGetGestureInfo GetGestureInfo;
- PtrGetGestureExtraArgs GetGestureExtraArgs;
- PtrCloseGestureInfoHandle CloseGestureInfoHandle;
- PtrSetGestureConfig SetGestureConfig;
- PtrGetGestureConfig GetGestureConfig;
- PtrBeginPanningFeedback BeginPanningFeedback;
- PtrUpdatePanningFeedback UpdatePanningFeedback;
- PtrEndPanningFeedback EndPanningFeedback;
-#endif // QT_NO_GESTURES
-#endif
-
-#ifdef QT_RX71_MULTITOUCH
- bool hasRX71MultiTouch;
-
- struct RX71TouchPointState {
- QSocketNotifier *socketNotifier;
- QTouchEvent::TouchPoint touchPoint;
-
- int minX, maxX, scaleX;
- int minY, maxY, scaleY;
- int minZ, maxZ;
- };
- QList<RX71TouchPointState> allRX71TouchPoints;
-
- bool readRX71MultiTouchEvents(int deviceNumber);
- void fakeMouseEventFromRX71TouchEvent();
- void _q_readRX71MultiTouchEvents();
-#endif
-
-#if defined(Q_OS_SYMBIAN)
- int pressureSupported;
- int maxTouchPressure;
- QList<QTouchEvent::TouchPoint> appAllTouchPoints;
-
- bool useTranslucentEGLSurfaces;
-#endif
-
private:
#ifdef Q_WS_QWS
QMap<const QScreen*, QRect> maxWindowRects;
#endif
-#ifdef Q_OS_SYMBIAN
- QHash<TInt, TUint> scanCodeCache;
-#endif
-
static QApplicationPrivate *self;
static void giveFocusAccordingToFocusPolicy(QWidget *w,
@@ -554,11 +400,6 @@ private:
static bool isAlien(QWidget *);
};
-Q_WIDGETS_EXPORT void qt_translateRawTouchEvent(QWidget *window,
- QTouchDevice *device,
- const QList<QTouchEvent::TouchPoint> &touchPoints,
- ulong timestamp);
-
#if defined(Q_WS_WIN)
extern void qt_win_set_cursor(QWidget *, bool);
#elif defined(Q_WS_X11)
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp
index 8732a194e8..d61b8560a8 100644
--- a/src/widgets/kernel/qapplication_qpa.cpp
+++ b/src/widgets/kernel/qapplication_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -383,7 +383,7 @@ QPlatformNativeInterface *QApplication::platformNativeInterface()
return pi->nativeInterface();
}
-void qt_init(QApplicationPrivate *, int type)
+void qt_init(QApplicationPrivate *priv, int type)
{
Q_UNUSED(type);
@@ -393,7 +393,7 @@ void qt_init(QApplicationPrivate *, int type)
qApp->setObjectName(appName);
#ifndef QT_NO_QWS_INPUTMETHODS
- qApp->setInputContext(new QInputContext(qApp));
+ priv->setInputContext(new QInputContext(qApp));
#endif
}
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp
index 059c59fa1c..e8d653e25d 100644
--- a/src/widgets/kernel/qboxlayout.cpp
+++ b/src/widgets/kernel/qboxlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qboxlayout.h b/src/widgets/kernel/qboxlayout.h
index 5031972226..8df0fbca94 100644
--- a/src/widgets/kernel/qboxlayout.h
+++ b/src/widgets/kernel/qboxlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qdesktopwidget.cpp b/src/widgets/kernel/qdesktopwidget.cpp
index 8c25d72f84..871715fed4 100644
--- a/src/widgets/kernel/qdesktopwidget.cpp
+++ b/src/widgets/kernel/qdesktopwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qdesktopwidget.h b/src/widgets/kernel/qdesktopwidget.h
index e1ed8cfa07..ec38b32239 100644
--- a/src/widgets/kernel/qdesktopwidget.h
+++ b/src/widgets/kernel/qdesktopwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qdesktopwidget.qdoc b/src/widgets/kernel/qdesktopwidget.qdoc
index 06a52af893..10690dfe35 100644
--- a/src/widgets/kernel/qdesktopwidget.qdoc
+++ b/src/widgets/kernel/qdesktopwidget.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qdesktopwidget_qpa.cpp b/src/widgets/kernel/qdesktopwidget_qpa.cpp
index 380daee8c0..8ac2b357c6 100644
--- a/src/widgets/kernel/qdesktopwidget_qpa.cpp
+++ b/src/widgets/kernel/qdesktopwidget_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qdesktopwidget_qpa_p.h b/src/widgets/kernel/qdesktopwidget_qpa_p.h
index 01ba44875d..50b5f4826e 100644
--- a/src/widgets/kernel/qdesktopwidget_qpa_p.h
+++ b/src/widgets/kernel/qdesktopwidget_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 6430472462..955ef4e3c7 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -93,7 +93,7 @@ void FixedColumnMatrix<T, NumColumns>::addRow(const T &value)
template <class T, int NumColumns>
void FixedColumnMatrix<T, NumColumns>::insertRow(int r, const T &value)
{
- Q_TYPENAME Storage::iterator it = m_storage.begin();
+ typename Storage::iterator it = m_storage.begin();
it += r * NumColumns;
m_storage.insert(it, NumColumns, value);
}
diff --git a/src/widgets/kernel/qformlayout.h b/src/widgets/kernel/qformlayout.h
index 05bb57d981..b37d2b6e3a 100644
--- a/src/widgets/kernel/qformlayout.h
+++ b/src/widgets/kernel/qformlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesture.cpp b/src/widgets/kernel/qgesture.cpp
index 12a0eaf45a..f79b577765 100644
--- a/src/widgets/kernel/qgesture.cpp
+++ b/src/widgets/kernel/qgesture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesture.h b/src/widgets/kernel/qgesture.h
index 610ae2b9f6..25dba1c886 100644
--- a/src/widgets/kernel/qgesture.h
+++ b/src/widgets/kernel/qgesture.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesture_p.h b/src/widgets/kernel/qgesture_p.h
index 85d1c85884..be8e38cd7f 100644
--- a/src/widgets/kernel/qgesture_p.h
+++ b/src/widgets/kernel/qgesture_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp
index 5b5d8dcb2a..5abbbde4cb 100644
--- a/src/widgets/kernel/qgesturemanager.cpp
+++ b/src/widgets/kernel/qgesturemanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesturemanager_p.h b/src/widgets/kernel/qgesturemanager_p.h
index 6c8cbb9cd0..800d7c5ad9 100644
--- a/src/widgets/kernel/qgesturemanager_p.h
+++ b/src/widgets/kernel/qgesturemanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesturerecognizer.cpp b/src/widgets/kernel/qgesturerecognizer.cpp
index 98f8b0a758..fc0e918987 100644
--- a/src/widgets/kernel/qgesturerecognizer.cpp
+++ b/src/widgets/kernel/qgesturerecognizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgesturerecognizer.h b/src/widgets/kernel/qgesturerecognizer.h
index 019f856f09..92f9f622c0 100644
--- a/src/widgets/kernel/qgesturerecognizer.h
+++ b/src/widgets/kernel/qgesturerecognizer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgridlayout.cpp b/src/widgets/kernel/qgridlayout.cpp
index 9168346e30..80834a0105 100644
--- a/src/widgets/kernel/qgridlayout.cpp
+++ b/src/widgets/kernel/qgridlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qgridlayout.h b/src/widgets/kernel/qgridlayout.h
index ef95d29cd1..f72ed32dcb 100644
--- a/src/widgets/kernel/qgridlayout.h
+++ b/src/widgets/kernel/qgridlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qguiplatformplugin.cpp b/src/widgets/kernel/qguiplatformplugin.cpp
index 8acc7ec90d..7faf17b9ab 100644
--- a/src/widgets/kernel/qguiplatformplugin.cpp
+++ b/src/widgets/kernel/qguiplatformplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -148,7 +148,7 @@ QString QGuiPlatformPlugin::styleName()
return QLatin1String("CDE"); // default style for X11 on Solaris
#elif defined(Q_WS_X11) && defined(Q_OS_IRIX)
return QLatin1String("SGI"); // default style for X11 on IRIX
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
return QLatin1String("Macintosh"); // default style for all Mac's
#elif defined(Q_WS_X11)
QString stylename;
diff --git a/src/widgets/kernel/qguiplatformplugin_p.h b/src/widgets/kernel/qguiplatformplugin_p.h
index 84319b71a0..74a01b9d58 100644
--- a/src/widgets/kernel/qguiplatformplugin_p.h
+++ b/src/widgets/kernel/qguiplatformplugin_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qicon.cpp b/src/widgets/kernel/qicon.cpp
index de7544f09a..185542420e 100644
--- a/src/widgets/kernel/qicon.cpp
+++ b/src/widgets/kernel/qicon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1161,6 +1161,14 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon)
#endif //QT_NO_DATASTREAM
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QIcon &i)
+{
+ dbg.nospace() << "QIcon(" << i.name() << ')';
+ return dbg.space();
+}
+#endif
+
/*!
\fn DataPtr &QIcon::data_ptr()
\internal
diff --git a/src/widgets/kernel/qicon.h b/src/widgets/kernel/qicon.h
index 3c527eb974..a72ae236f1 100644
--- a/src/widgets/kernel/qicon.h
+++ b/src/widgets/kernel/qicon.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -136,6 +136,10 @@ Q_WIDGETS_EXPORT QDataStream &operator<<(QDataStream &, const QIcon &);
Q_WIDGETS_EXPORT QDataStream &operator>>(QDataStream &, QIcon &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_WIDGETS_EXPORT QDebug operator<<(QDebug dbg, const QIcon &);
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/widgets/kernel/qicon_p.h b/src/widgets/kernel/qicon_p.h
index 7ba471b002..02ac3afed4 100644
--- a/src/widgets/kernel/qicon_p.h
+++ b/src/widgets/kernel/qicon_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qiconengine.cpp b/src/widgets/kernel/qiconengine.cpp
index 52e8cfd384..930d7e1699 100644
--- a/src/widgets/kernel/qiconengine.cpp
+++ b/src/widgets/kernel/qiconengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qiconengine.h b/src/widgets/kernel/qiconengine.h
index 63cfcbff5e..083ceee33d 100644
--- a/src/widgets/kernel/qiconengine.h
+++ b/src/widgets/kernel/qiconengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qiconengineplugin.cpp b/src/widgets/kernel/qiconengineplugin.cpp
index 2775fb201d..895572120e 100644
--- a/src/widgets/kernel/qiconengineplugin.cpp
+++ b/src/widgets/kernel/qiconengineplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qiconengineplugin.h b/src/widgets/kernel/qiconengineplugin.h
index c228e8666b..1bd9075866 100644
--- a/src/widgets/kernel/qiconengineplugin.h
+++ b/src/widgets/kernel/qiconengineplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qiconloader.cpp b/src/widgets/kernel/qiconloader.cpp
index 45959c03ef..d8bef74dd8 100644
--- a/src/widgets/kernel/qiconloader.cpp
+++ b/src/widgets/kernel/qiconloader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qiconloader_p.h b/src/widgets/kernel/qiconloader_p.h
index 1c6c0cb1a5..840a2858b6 100644
--- a/src/widgets/kernel/qiconloader_p.h
+++ b/src/widgets/kernel/qiconloader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qinputcontext.cpp b/src/widgets/kernel/qinputcontext.cpp
index 66595e8ee4..27576193e9 100644
--- a/src/widgets/kernel/qinputcontext.cpp
+++ b/src/widgets/kernel/qinputcontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qinputcontext.h b/src/widgets/kernel/qinputcontext.h
index 8a80d72ac2..147061f221 100644
--- a/src/widgets/kernel/qinputcontext.h
+++ b/src/widgets/kernel/qinputcontext.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index ebf9cf6cae..a682354df1 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h
index 65fccb13fa..4d9213c1ec 100644
--- a/src/widgets/kernel/qlayout.h
+++ b/src/widgets/kernel/qlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qlayout_p.h b/src/widgets/kernel/qlayout_p.h
index e282360418..cc80987500 100644
--- a/src/widgets/kernel/qlayout_p.h
+++ b/src/widgets/kernel/qlayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qlayoutengine.cpp b/src/widgets/kernel/qlayoutengine.cpp
index a7470aabaa..38e6555658 100644
--- a/src/widgets/kernel/qlayoutengine.cpp
+++ b/src/widgets/kernel/qlayoutengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qlayoutengine_p.h b/src/widgets/kernel/qlayoutengine_p.h
index 9be9ecd321..5f5d0aa49e 100644
--- a/src/widgets/kernel/qlayoutengine_p.h
+++ b/src/widgets/kernel/qlayoutengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 5fcda5dfea..732c941c74 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,7 @@
#include "qlayout.h"
#include "qapplication.h"
+#include "qdebug.h"
#include "qlayoutengine_p.h"
#include "qmenubar.h"
#include "qtoolbar.h"
@@ -836,4 +837,13 @@ int QWidgetItemV2::heightForWidth(int width) const
return height;
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QSizePolicy &p)
+{
+ dbg.nospace() << "QSizePolicy(horizontalPolicy = " << p.horizontalPolicy()
+ << ", verticalPolicy = " << p.verticalPolicy() << ')';
+ return dbg.space();
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qlayoutitem.h b/src/widgets/kernel/qlayoutitem.h
index d03f77654b..a09dcf33de 100644
--- a/src/widgets/kernel/qlayoutitem.h
+++ b/src/widgets/kernel/qlayoutitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qplatformdialoghelper_qpa.cpp b/src/widgets/kernel/qplatformdialoghelper_qpa.cpp
index daf864ff30..cfe2b15572 100644
--- a/src/widgets/kernel/qplatformdialoghelper_qpa.cpp
+++ b/src/widgets/kernel/qplatformdialoghelper_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,11 @@
#include "qplatformdialoghelper_qpa.h"
#include <QtCore/QVariant>
+#include <QtCore/QSharedData>
+#include <QtCore/QSettings>
+#include <QtCore/QHash>
+#include <QtCore/QUrl>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
@@ -87,4 +92,465 @@ QVariant QPlatformDialogHelper::defaultStyleHint(QPlatformDialogHelper::StyleHi
return QVariant();
}
+void QPlatformDialogHelper::emitLaunchNativeAppModalPanel()
+{
+ emit launchNativeAppModalPanel();
+}
+
+// Font dialog
+
+class QFontDialogOptionsPrivate : public QSharedData
+{
+public:
+ QFontDialogOptionsPrivate() : options(0) {}
+
+ QFontDialogOptions::FontDialogOptions options;
+ QString windowTitle;
+};
+
+QFontDialogOptions::QFontDialogOptions() : d(new QFontDialogOptionsPrivate)
+{
+}
+
+QFontDialogOptions::QFontDialogOptions(const QFontDialogOptions &rhs) : d(rhs.d)
+{
+}
+
+QFontDialogOptions &QFontDialogOptions::operator=(const QFontDialogOptions &rhs)
+{
+ if (this != &rhs)
+ d = rhs.d;
+ return *this;
+}
+
+QFontDialogOptions::~QFontDialogOptions()
+{
+}
+
+QString QFontDialogOptions::windowTitle() const
+{
+ return d->windowTitle;
+}
+
+void QFontDialogOptions::setWindowTitle(const QString &title)
+{
+ d->windowTitle = title;
+}
+
+void QFontDialogOptions::setOption(QFontDialogOptions::FontDialogOption option, bool on)
+{
+ if (!(d->options & option) != !on)
+ setOptions(d->options ^ option);
+}
+
+bool QFontDialogOptions::testOption(QFontDialogOptions::FontDialogOption option) const
+{
+ return d->options & option;
+}
+
+void QFontDialogOptions::setOptions(FontDialogOptions options)
+{
+ if (options != d->options)
+ d->options = options;
+}
+
+QFontDialogOptions::FontDialogOptions QFontDialogOptions::options() const
+{
+ return d->options;
+}
+
+const QSharedPointer<QFontDialogOptions> &QPlatformFontDialogHelper::options() const
+{
+ return m_options;
+}
+
+void QPlatformFontDialogHelper::setOptions(const QSharedPointer<QFontDialogOptions> &options)
+{
+ m_options = options;
+}
+
+// Color dialog
+
+class QColorDialogStaticData
+{
+public:
+ enum { CustomColorCount = 16, StandardColorCount = 6 * 8 };
+
+ QColorDialogStaticData();
+ inline void readSettings();
+ inline void writeSettings() const;
+
+ QRgb customRgb[CustomColorCount];
+ QRgb standardRgb[StandardColorCount];
+ bool customSet;
+};
+
+QColorDialogStaticData::QColorDialogStaticData() : customSet(false)
+{
+ int i = 0;
+ for (int g = 0; g < 4; ++g)
+ for (int r = 0; r < 4; ++r)
+ for (int b = 0; b < 3; ++b)
+ standardRgb[i++] = qRgb(r * 255 / 3, g * 255 / 3, b * 255 / 2);
+ qFill(customRgb, customRgb + CustomColorCount, 0xffffffff);
+ readSettings();
+}
+
+void QColorDialogStaticData::readSettings()
+{
+#ifndef QT_NO_SETTINGS
+ const QSettings settings(QSettings::UserScope, QStringLiteral("Trolltech"));
+ for (int i = 0; i < int(CustomColorCount); ++i) {
+ const QVariant v = settings.value(QStringLiteral("Qt/customColors/") + QString::number(i));
+ if (v.isValid())
+ customRgb[i] = v.toUInt();
+ }
+#endif
+}
+
+void QColorDialogStaticData::writeSettings() const
+{
+#ifndef QT_NO_SETTINGS
+ if (!customSet) {
+ QSettings settings(QSettings::UserScope, QStringLiteral("Trolltech"));
+ for (int i = 0; i < int(CustomColorCount); ++i)
+ settings.setValue(QStringLiteral("Qt/customColors/") + QString::number(i), customRgb[i]);
+ }
+#endif
+}
+
+Q_GLOBAL_STATIC(QColorDialogStaticData, qColorDialogStaticData)
+
+class QColorDialogOptionsPrivate : public QSharedData
+{
+public:
+ QColorDialogOptionsPrivate() : options(0) {}
+ // Write out settings around destruction of dialogs
+ ~QColorDialogOptionsPrivate() { qColorDialogStaticData()->writeSettings(); }
+
+ QColorDialogOptions::ColorDialogOptions options;
+ QString windowTitle;
+};
+
+QColorDialogOptions::QColorDialogOptions() : d(new QColorDialogOptionsPrivate)
+{
+}
+
+QColorDialogOptions::QColorDialogOptions(const QColorDialogOptions &rhs) : d(rhs.d)
+{
+}
+
+QColorDialogOptions &QColorDialogOptions::operator=(const QColorDialogOptions &rhs)
+{
+ if (this != &rhs)
+ d = rhs.d;
+ return *this;
+}
+
+QColorDialogOptions::~QColorDialogOptions()
+{
+}
+
+QString QColorDialogOptions::windowTitle() const
+{
+ return d->windowTitle;
+}
+
+void QColorDialogOptions::setWindowTitle(const QString &title)
+{
+ d->windowTitle = title;
+}
+
+void QColorDialogOptions::setOption(QColorDialogOptions::ColorDialogOption option, bool on)
+{
+ if (!(d->options & option) != !on)
+ setOptions(d->options ^ option);
+}
+
+bool QColorDialogOptions::testOption(QColorDialogOptions::ColorDialogOption option) const
+{
+ return d->options & option;
+}
+
+void QColorDialogOptions::setOptions(ColorDialogOptions options)
+{
+ if (options != d->options)
+ d->options = options;
+}
+
+QColorDialogOptions::ColorDialogOptions QColorDialogOptions::options() const
+{
+ return d->options;
+}
+
+int QColorDialogOptions::customColorCount()
+{
+ return QColorDialogStaticData::CustomColorCount;
+}
+
+QRgb QColorDialogOptions::customColor(int index)
+{
+ if (uint(index) >= uint(QColorDialogStaticData::CustomColorCount))
+ return qRgb(255, 255, 255);
+ return qColorDialogStaticData()->customRgb[index];
+}
+
+QRgb *QColorDialogOptions::customColors()
+{
+ return qColorDialogStaticData()->customRgb;
+}
+
+void QColorDialogOptions::setCustomColor(int index, QRgb color)
+{
+ if (uint(index) >= uint(QColorDialogStaticData::CustomColorCount))
+ return;
+ qColorDialogStaticData()->customSet;
+ qColorDialogStaticData()->customRgb[index] = color;
+}
+
+QRgb *QColorDialogOptions::standardColors()
+{
+ return qColorDialogStaticData()->standardRgb;
+}
+
+QRgb QColorDialogOptions::standardColor(int index)
+{
+ if (uint(index) >= uint(QColorDialogStaticData::StandardColorCount))
+ return qRgb(255, 255, 255);
+ return qColorDialogStaticData()->standardRgb[index];
+}
+
+void QColorDialogOptions::setStandardColor(int index, QRgb color)
+{
+ if (uint(index) >= uint(QColorDialogStaticData::StandardColorCount))
+ return;
+ qColorDialogStaticData()->standardRgb[index] = color;
+}
+
+const QSharedPointer<QColorDialogOptions> &QPlatformColorDialogHelper::options() const
+{
+ return m_options;
+}
+
+void QPlatformColorDialogHelper::setOptions(const QSharedPointer<QColorDialogOptions> &options)
+{
+ m_options = options;
+}
+
+// File dialog
+
+class QFileDialogOptionsPrivate : public QSharedData
+{
+public:
+ QFileDialogOptionsPrivate() : options(0),
+ viewMode(QFileDialogOptions::Detail),
+ fileMode(QFileDialogOptions::AnyFile),
+ acceptMode(QFileDialogOptions::AcceptOpen),
+ filters(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs)
+ {}
+
+ QFileDialogOptions::FileDialogOptions options;
+ QString windowTitle;
+
+ QFileDialogOptions::ViewMode viewMode;
+ QFileDialogOptions::FileMode fileMode;
+ QFileDialogOptions::AcceptMode acceptMode;
+ QString labels[QFileDialogOptions::DialogLabelCount];
+ QDir::Filters filters;
+ QList<QUrl> sidebarUrls;
+ QStringList nameFilters;
+ QString defaultSuffix;
+ QStringList history;
+ QString initialDirectory;
+ QString initiallySelectedNameFilter;
+ QStringList initiallySelectedFiles;
+};
+
+QFileDialogOptions::QFileDialogOptions() : d(new QFileDialogOptionsPrivate)
+{
+}
+
+QFileDialogOptions::QFileDialogOptions(const QFileDialogOptions &rhs) : d(rhs.d)
+{
+}
+
+QFileDialogOptions &QFileDialogOptions::operator=(const QFileDialogOptions &rhs)
+{
+ if (this != &rhs)
+ d = rhs.d;
+ return *this;
+}
+
+QFileDialogOptions::~QFileDialogOptions()
+{
+}
+
+QString QFileDialogOptions::windowTitle() const
+{
+ return d->windowTitle;
+}
+
+void QFileDialogOptions::setWindowTitle(const QString &title)
+{
+ d->windowTitle = title;
+}
+
+void QFileDialogOptions::setOption(QFileDialogOptions::FileDialogOption option, bool on)
+{
+ if (!(d->options & option) != !on)
+ setOptions(d->options ^ option);
+}
+
+bool QFileDialogOptions::testOption(QFileDialogOptions::FileDialogOption option) const
+{
+ return d->options & option;
+}
+
+void QFileDialogOptions::setOptions(FileDialogOptions options)
+{
+ if (options != d->options)
+ d->options = options;
+}
+
+QFileDialogOptions::FileDialogOptions QFileDialogOptions::options() const
+{
+ return d->options;
+}
+
+QDir::Filters QFileDialogOptions::filter() const
+{
+ return d->filters;
+}
+
+void QFileDialogOptions::setFilter(QDir::Filters filters)
+{
+ d->filters = filters;
+}
+
+void QFileDialogOptions::setViewMode(QFileDialogOptions::ViewMode mode)
+{
+ d->viewMode = mode;
+}
+
+QFileDialogOptions::ViewMode QFileDialogOptions::viewMode() const
+{
+ return d->viewMode;
+}
+
+void QFileDialogOptions::setFileMode(QFileDialogOptions::FileMode mode)
+{
+ d->fileMode = mode;
+}
+
+QFileDialogOptions::FileMode QFileDialogOptions::fileMode() const
+{
+ return d->fileMode;
+}
+
+void QFileDialogOptions::setAcceptMode(QFileDialogOptions::AcceptMode mode)
+{
+ d->acceptMode = mode;
+}
+
+QFileDialogOptions::AcceptMode QFileDialogOptions::acceptMode() const
+{
+ return d->acceptMode;
+}
+
+void QFileDialogOptions::setSidebarUrls(const QList<QUrl> &urls)
+{
+ d->sidebarUrls = urls;
+}
+
+QList<QUrl> QFileDialogOptions::sidebarUrls() const
+{
+ return d->sidebarUrls;
+}
+
+void QFileDialogOptions::setNameFilters(const QStringList &filters)
+{
+ d->nameFilters = filters;
+}
+
+QStringList QFileDialogOptions::nameFilters() const
+{
+ return d->nameFilters;
+}
+
+void QFileDialogOptions::setDefaultSuffix(const QString &suffix)
+{
+ d->defaultSuffix = suffix;
+}
+
+QString QFileDialogOptions::defaultSuffix() const
+{
+ return d->defaultSuffix;
+}
+
+void QFileDialogOptions::setHistory(const QStringList &paths)
+{
+ d->history = paths;
+}
+
+QStringList QFileDialogOptions::history() const
+{
+ return d->history;
+}
+
+void QFileDialogOptions::setLabelText(QFileDialogOptions::DialogLabel label, const QString &text)
+{
+ if (label >= 0 && label < DialogLabelCount)
+ d->labels[label] = text;
+}
+
+QString QFileDialogOptions::labelText(QFileDialogOptions::DialogLabel label) const
+{
+ return (label >= 0 && label < DialogLabelCount) ? d->labels[label] : QString();
+}
+
+bool QFileDialogOptions::isLabelExplicitlySet(DialogLabel label)
+{
+ return label >= 0 && label < DialogLabelCount && !d->labels[label].isEmpty();
+}
+
+QString QFileDialogOptions::initialDirectory() const
+{
+ return d->initialDirectory;
+}
+
+void QFileDialogOptions::setInitialDirectory(const QString &directory)
+{
+ d->initialDirectory = directory;
+}
+
+QString QFileDialogOptions::initiallySelectedNameFilter() const
+{
+ return d->initiallySelectedNameFilter;
+}
+
+void QFileDialogOptions::setInitiallySelectedNameFilter(const QString &filter)
+{
+ d->initiallySelectedNameFilter = filter;
+}
+
+QStringList QFileDialogOptions::initiallySelectedFiles() const
+{
+ return d->initiallySelectedFiles;
+}
+
+void QFileDialogOptions::setInitiallySelectedFiles(const QStringList &files)
+{
+ d->initiallySelectedFiles = files;
+}
+
+const QSharedPointer<QFileDialogOptions> &QPlatformFileDialogHelper::options() const
+{
+ return m_options;
+}
+
+void QPlatformFileDialogHelper::setOptions(const QSharedPointer<QFileDialogOptions> &options)
+{
+ m_options = options;
+}
+
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qplatformdialoghelper_qpa.h b/src/widgets/kernel/qplatformdialoghelper_qpa.h
index 970de611bc..b0b8b3a5b3 100644
--- a/src/widgets/kernel/qplatformdialoghelper_qpa.h
+++ b/src/widgets/kernel/qplatformdialoghelper_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,8 +42,13 @@
#ifndef QPLATFORMDIALOGHELPER_H
#define QPLATFORMDIALOGHELPER_H
-#include <qglobal.h>
-#include <qobject.h>
+#include <QtCore/QtGlobal>
+#include <QtCore/QObject>
+#include <QtCore/QList>
+#include <QtCore/QSharedDataPointer>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QDir>
+#include <QtGui/QRgb>
QT_BEGIN_HEADER
@@ -56,6 +61,10 @@ class QColor;
class QFont;
class QWindow;
class QVariant;
+class QUrl;
+class QColorDialogOptionsPrivate;
+class QFontDialogOptionsPrivate;
+class QFileDialogOptionsPrivate;
class Q_WIDGETS_EXPORT QPlatformDialogHelper : public QObject
{
@@ -65,6 +74,11 @@ public:
SnapToDefaultButton
};
enum DialogCode { Rejected, Accepted };
+ enum ShowFlag {
+ ShowModal = 0x00000001
+ };
+
+ Q_DECLARE_FLAGS(ShowFlags, ShowFlag)
QPlatformDialogHelper();
virtual ~QPlatformDialogHelper();
@@ -75,24 +89,104 @@ public:
virtual void _q_platformRunNativeAppModalPanel() = 0;
virtual void deleteNativeDialog_sys() = 0;
- virtual bool show_sys(QWindow *parent) = 0;
+ virtual bool show_sys(ShowFlags showFlags,
+ Qt::WindowFlags windowFlags,
+ QWindow *parent) = 0;
virtual void hide_sys() = 0;
virtual DialogCode dialogResultCode_sys() = 0;
static QVariant defaultStyleHint(QPlatformDialogHelper::StyleHint hint);
+
+Q_SIGNALS:
+ void launchNativeAppModalPanel();
+ void accept();
+ void reject();
+
+protected Q_SLOTS:
+ void emitLaunchNativeAppModalPanel();
+};
+
+class Q_WIDGETS_EXPORT QColorDialogOptions
+{
+public:
+ enum ColorDialogOption {
+ ShowAlphaChannel = 0x00000001,
+ NoButtons = 0x00000002,
+ DontUseNativeDialog = 0x00000004
+ };
+
+ Q_DECLARE_FLAGS(ColorDialogOptions, ColorDialogOption)
+
+ QColorDialogOptions();
+ QColorDialogOptions(const QColorDialogOptions &rhs);
+ QColorDialogOptions &operator=(const QColorDialogOptions &rhs);
+ ~QColorDialogOptions();
+
+ QString windowTitle() const;
+ void setWindowTitle(const QString &);
+
+ void setOption(ColorDialogOption option, bool on = true);
+ bool testOption(ColorDialogOption option) const;
+ void setOptions(ColorDialogOptions options);
+ ColorDialogOptions options() const;
+
+ static int customColorCount();
+ static QRgb customColor(int index);
+ static QRgb *customColors();
+ static void setCustomColor(int index, QRgb color);
+
+ static QRgb *standardColors();
+ static QRgb standardColor(int index);
+ static void setStandardColor(int index, QRgb color);
+
+private:
+ QSharedDataPointer<QColorDialogOptionsPrivate> d;
};
class Q_WIDGETS_EXPORT QPlatformColorDialogHelper : public QPlatformDialogHelper
{
Q_OBJECT
public:
+ const QSharedPointer<QColorDialogOptions> &options() const;
+ void setOptions(const QSharedPointer<QColorDialogOptions> &options);
+
virtual void setCurrentColor_sys(const QColor &) = 0;
virtual QColor currentColor_sys() const = 0;
Q_SIGNALS:
void currentColorChanged(const QColor &color);
void colorSelected(const QColor &color);
+
+private:
+ QSharedPointer<QColorDialogOptions> m_options;
+};
+
+class Q_WIDGETS_EXPORT QFontDialogOptions
+{
+public:
+ enum FontDialogOption {
+ NoButtons = 0x00000001,
+ DontUseNativeDialog = 0x00000002
+ };
+
+ Q_DECLARE_FLAGS(FontDialogOptions, FontDialogOption)
+
+ QFontDialogOptions();
+ QFontDialogOptions(const QFontDialogOptions &rhs);
+ QFontDialogOptions &operator=(const QFontDialogOptions &rhs);
+ ~QFontDialogOptions();
+
+ QString windowTitle() const;
+ void setWindowTitle(const QString &);
+
+ void setOption(FontDialogOption option, bool on = true);
+ bool testOption(FontDialogOption option) const;
+ void setOptions(FontDialogOptions options);
+ FontDialogOptions options() const;
+
+private:
+ QSharedDataPointer<QFontDialogOptionsPrivate> d;
};
class Q_WIDGETS_EXPORT QPlatformFontDialogHelper : public QPlatformDialogHelper
@@ -102,9 +196,89 @@ public:
virtual void setCurrentFont_sys(const QFont &) = 0;
virtual QFont currentFont_sys() const = 0;
+ const QSharedPointer<QFontDialogOptions> &options() const;
+ void setOptions(const QSharedPointer<QFontDialogOptions> &options);
+
Q_SIGNALS:
void currentFontChanged(const QFont &font);
void fontSelected(const QFont &font);
+
+private:
+ QSharedPointer<QFontDialogOptions> m_options;
+};
+
+class Q_WIDGETS_EXPORT QFileDialogOptions
+{
+public:
+ enum ViewMode { Detail, List };
+ enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly };
+ enum AcceptMode { AcceptOpen, AcceptSave };
+ enum DialogLabel { LookIn, FileName, FileType, Accept, Reject, DialogLabelCount };
+
+ enum FileDialogOption
+ {
+ ShowDirsOnly = 0x00000001,
+ DontResolveSymlinks = 0x00000002,
+ DontConfirmOverwrite = 0x00000004,
+ DontUseSheet = 0x00000008,
+ DontUseNativeDialog = 0x00000010,
+ ReadOnly = 0x00000020,
+ HideNameFilterDetails = 0x00000040
+ };
+ Q_DECLARE_FLAGS(FileDialogOptions, FileDialogOption)
+
+ QFileDialogOptions();
+ QFileDialogOptions(const QFileDialogOptions &rhs);
+ QFileDialogOptions &operator=(const QFileDialogOptions &rhs);
+ ~QFileDialogOptions();
+
+ QString windowTitle() const;
+ void setWindowTitle(const QString &);
+
+ void setOption(FileDialogOption option, bool on = true);
+ bool testOption(FileDialogOption option) const;
+ void setOptions(FileDialogOptions options);
+ FileDialogOptions options() const;
+
+ QDir::Filters filter() const;
+ void setFilter(QDir::Filters filters);
+
+ void setViewMode(ViewMode mode);
+ ViewMode viewMode() const;
+
+ void setFileMode(FileMode mode);
+ FileMode fileMode() const;
+
+ void setAcceptMode(AcceptMode mode);
+ AcceptMode acceptMode() const;
+
+ void setSidebarUrls(const QList<QUrl> &urls);
+ QList<QUrl> sidebarUrls() const;
+
+ void setNameFilters(const QStringList &filters);
+ QStringList nameFilters() const;
+
+ void setDefaultSuffix(const QString &suffix);
+ QString defaultSuffix() const;
+
+ void setHistory(const QStringList &paths);
+ QStringList history() const;
+
+ void setLabelText(DialogLabel label, const QString &text);
+ QString labelText(DialogLabel label) const;
+ bool isLabelExplicitlySet(DialogLabel label);
+
+ QString initialDirectory() const;
+ void setInitialDirectory(const QString &);
+
+ QString initiallySelectedNameFilter() const;
+ void setInitiallySelectedNameFilter(const QString &);
+
+ QStringList initiallySelectedFiles() const;
+ void setInitiallySelectedFiles(const QStringList &);
+
+private:
+ QSharedDataPointer<QFileDialogOptionsPrivate> d;
};
class Q_WIDGETS_EXPORT QPlatformFileDialogHelper : public QPlatformDialogHelper
@@ -117,16 +291,21 @@ public:
virtual void selectFile_sys(const QString &filename) = 0;
virtual QStringList selectedFiles_sys() const = 0;
virtual void setFilter_sys() = 0;
- virtual void setNameFilters_sys(const QStringList &filters) = 0;
virtual void selectNameFilter_sys(const QString &filter) = 0;
virtual QString selectedNameFilter_sys() const = 0;
+ const QSharedPointer<QFileDialogOptions> &options() const;
+ void setOptions(const QSharedPointer<QFileDialogOptions> &options);
+
Q_SIGNALS:
void fileSelected(const QString &file);
void filesSelected(const QStringList &files);
void currentChanged(const QString &path);
void directoryEntered(const QString &directory);
void filterSelected(const QString &filter);
+
+private:
+ QSharedPointer<QFileDialogOptions> m_options;
};
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qplatformmenu_qpa.cpp b/src/widgets/kernel/qplatformmenu_qpa.cpp
index fd5cc78bf0..2a11884a67 100644
--- a/src/widgets/kernel/qplatformmenu_qpa.cpp
+++ b/src/widgets/kernel/qplatformmenu_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qplatformmenu_qpa.h b/src/widgets/kernel/qplatformmenu_qpa.h
index d2736ed354..b6473c0b15 100644
--- a/src/widgets/kernel/qplatformmenu_qpa.h
+++ b/src/widgets/kernel/qplatformmenu_qpa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 94f809d199..cb2d08956b 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -521,9 +521,9 @@ void QShortcut::setContext(Qt::ShortcutContext context)
d->redoGrab(qApp->d_func()->shortcutMap);
}
-Qt::ShortcutContext QShortcut::context()
+Qt::ShortcutContext QShortcut::context() const
{
- Q_D(QShortcut);
+ Q_D(const QShortcut);
return d->sc_context;
}
diff --git a/src/widgets/kernel/qshortcut.h b/src/widgets/kernel/qshortcut.h
index 6e3c647852..077028ccd3 100644
--- a/src/widgets/kernel/qshortcut.h
+++ b/src/widgets/kernel/qshortcut.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -77,7 +77,7 @@ public:
bool isEnabled() const;
void setContext(Qt::ShortcutContext context);
- Qt::ShortcutContext context();
+ Qt::ShortcutContext context() const;
void setWhatsThis(const QString &text);
QString whatsThis() const;
diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h
index 826991ceb3..8932eb8ed8 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -181,6 +181,10 @@ Q_WIDGETS_EXPORT QDataStream &operator<<(QDataStream &, const QSizePolicy &);
Q_WIDGETS_EXPORT QDataStream &operator>>(QDataStream &, QSizePolicy &);
#endif
+#ifndef QT_NO_DEBUG_STREAM
+Q_WIDGETS_EXPORT QDebug operator<<(QDebug dbg, const QSizePolicy &);
+#endif
+
inline void QSizePolicy::transpose() {
Policy hData = horizontalPolicy();
Policy vData = verticalPolicy();
diff --git a/src/widgets/kernel/qsizepolicy.qdoc b/src/widgets/kernel/qsizepolicy.qdoc
index e4d1cc137c..a0e565caff 100644
--- a/src/widgets/kernel/qsizepolicy.qdoc
+++ b/src/widgets/kernel/qsizepolicy.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qsoftkeymanager.cpp b/src/widgets/kernel/qsoftkeymanager.cpp
index 7d7c56fe84..a7c128337f 100644
--- a/src/widgets/kernel/qsoftkeymanager.cpp
+++ b/src/widgets/kernel/qsoftkeymanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qsoftkeymanager_common_p.h b/src/widgets/kernel/qsoftkeymanager_common_p.h
index fc484dc3c6..121d4f8e22 100644
--- a/src/widgets/kernel/qsoftkeymanager_common_p.h
+++ b/src/widgets/kernel/qsoftkeymanager_common_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qsoftkeymanager_p.h b/src/widgets/kernel/qsoftkeymanager_p.h
index d58b546d74..ad49a1b586 100644
--- a/src/widgets/kernel/qsoftkeymanager_p.h
+++ b/src/widgets/kernel/qsoftkeymanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 950db2178c..7179ddc62c 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qstackedlayout.h b/src/widgets/kernel/qstackedlayout.h
index d895d139ab..e80e909eae 100644
--- a/src/widgets/kernel/qstackedlayout.h
+++ b/src/widgets/kernel/qstackedlayout.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index a557342023..3a9bd2bc38 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qstandardgestures_p.h b/src/widgets/kernel/qstandardgestures_p.h
index be30d70058..28b0b71797 100644
--- a/src/widgets/kernel/qstandardgestures_p.h
+++ b/src/widgets/kernel/qstandardgestures_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h
index 012d92ce8c..8e8985d21f 100644
--- a/src/widgets/kernel/qt_widgets_pch.h
+++ b/src/widgets/kernel/qt_widgets_pch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index fb1b67922d..fc0efc3dc2 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qtooltip.h b/src/widgets/kernel/qtooltip.h
index 3d537f40af..8218a18338 100644
--- a/src/widgets/kernel/qtooltip.h
+++ b/src/widgets/kernel/qtooltip.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 7a53dc3415..e1a1cd05ef 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,7 @@
#ifndef QT_NO_WHATSTHIS
#include "qpointer.h"
#include "qapplication.h"
+#include <private/qguiapplication_p.h>
#include "qdesktopwidget.h"
#include "qevent.h"
#include "qpixmap.h"
@@ -59,12 +60,6 @@
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
#endif
-#if defined(Q_WS_WIN)
-#include "qt_windows.h"
-#ifndef SPI_GETDROPSHADOW
-#define SPI_GETDROPSHADOW 0x1024
-#endif
-#endif
QT_BEGIN_NAMESPACE
@@ -221,15 +216,9 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
+ Qt::TextWordWrap + Qt::TextExpandTabs,
text);
}
-#if defined(Q_WS_WIN)
- if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
- && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
- {
- BOOL shadow;
- SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0);
- shadowWidth = shadow ? 0 : 6;
- }
-#endif
+ shadowWidth =
+ QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::DropShadow).toBool() ?
+ 0 : 6;
resize(r.width() + 2*hMargin + shadowWidth, r.height() + 2*vMargin + shadowWidth);
}
diff --git a/src/widgets/kernel/qwhatsthis.h b/src/widgets/kernel/qwhatsthis.h
index 9ef96e7197..93e97ddff8 100644
--- a/src/widgets/kernel/qwhatsthis.h
+++ b/src/widgets/kernel/qwhatsthis.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 7ec37bb929..531a217b1d 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1469,10 +1469,6 @@ QWidget::~QWidget()
delete d->needsFlush;
d->needsFlush = 0;
- // set all QPointers for this object to zero
- if (d->hasGuards)
- QObjectPrivate::clearGuards(this);
-
if (d->declarativeData) {
QAbstractDeclarativeData::destroyed(d->declarativeData, this);
d->declarativeData = 0; // don't activate again in ~QObject
@@ -6559,6 +6555,9 @@ QByteArray QWidget::saveGeometry() const
#ifdef Q_WS_MAC
<< newFramePosition
<< newNormalPosition
+#else
+ << frameGeometry()
+ << normalGeometry()
#endif // Q_WS_MAC
<< qint32(QApplication::desktop()->screenNumber(this))
<< quint8(windowState() & Qt::WindowMaximized)
@@ -8188,26 +8187,6 @@ bool QWidget::event(QEvent *event)
event->ignore();
break;
#endif
-#ifndef QT_NO_ACCESSIBILITY
- case QEvent::AccessibilityDescription:
- case QEvent::AccessibilityHelp: {
- QAccessibleEvent *ev = static_cast<QAccessibleEvent *>(event);
- switch (ev->type()) {
-#ifndef QT_NO_TOOLTIP
- case QEvent::AccessibilityDescription:
- ev->setValue(d->toolTip);
- break;
-#endif
-#ifndef QT_NO_WHATSTHIS
- case QEvent::AccessibilityHelp:
- ev->setValue(d->whatsThis);
- break;
-#endif
- default:
- return false;
- }
- break; }
-#endif
case QEvent::EmbeddingControl:
d->topData()->frameStrut.setCoords(0 ,0, 0, 0);
data->fstrut_dirty = false;
@@ -8248,40 +8227,7 @@ bool QWidget::event(QEvent *event)
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
{
-#ifndef Q_WS_MAC
- QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
- const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().first();
- if (touchPoint.isPrimary() || touchEvent->device()->type() == QTouchDevice::TouchPad)
- break;
-
- // fake a mouse event!
- QEvent::Type eventType = QEvent::None;
- switch (touchEvent->type()) {
- case QEvent::TouchBegin:
- eventType = QEvent::MouseButtonPress;
- break;
- case QEvent::TouchUpdate:
- eventType = QEvent::MouseMove;
- break;
- case QEvent::TouchEnd:
- eventType = QEvent::MouseButtonRelease;
- break;
- default:
- Q_ASSERT(!true);
- break;
- }
- if (eventType == QEvent::None)
- break;
-
- QMouseEvent mouseEvent(eventType,
- touchPoint.pos(),
- touchPoint.scenePos(),
- touchPoint.screenPos(),
- Qt::LeftButton,
- Qt::LeftButton,
- touchEvent->modifiers());
- (void) QApplication::sendEvent(this, &mouseEvent);
-#endif // Q_WS_MAC
+ event->ignore();
break;
}
#ifndef QT_NO_GESTURES
@@ -10317,45 +10263,6 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
d->registerTouchWindow();
#endif
break;
- case Qt::WA_LockPortraitOrientation:
- case Qt::WA_LockLandscapeOrientation:
- case Qt::WA_AutoOrientation: {
- const Qt::WidgetAttribute orientations[3] = {
- Qt::WA_LockPortraitOrientation,
- Qt::WA_LockLandscapeOrientation,
- Qt::WA_AutoOrientation
- };
-
- if (on) {
- // We can only have one of these set at a time
- for (int i = 0; i < 3; ++i) {
- if (orientations[i] != attribute)
- setAttribute_internal(orientations[i], false, data, d);
- }
- }
-
-#ifdef Q_WS_S60
- CAknAppUiBase* appUi = static_cast<CAknAppUiBase*>(CEikonEnv::Static()->EikAppUi());
- const CAknAppUiBase::TAppUiOrientation s60orientations[] = {
- CAknAppUiBase::EAppUiOrientationPortrait,
- CAknAppUiBase::EAppUiOrientationLandscape,
- CAknAppUiBase::EAppUiOrientationAutomatic
- };
- CAknAppUiBase::TAppUiOrientation s60orientation = CAknAppUiBase::EAppUiOrientationUnspecified;
- for (int i = 0; i < 3; ++i) {
- if (testAttribute(orientations[i])) {
- s60orientation = s60orientations[i];
- break;
- }
- }
- QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
- S60->orientationSet = true;
- QSymbianControl *window = static_cast<QSymbianControl *>(internalWinId());
- if (window)
- window->ensureFixNativeOrientation();
-#endif
- break;
- }
default:
break;
}
@@ -10834,337 +10741,6 @@ void QWidget::stackUnder(QWidget* w)
QApplication::sendEvent(this, &e);
}
-/*!
- \enum QWidget::BackgroundOrigin
-
- \compat
-
- \value WidgetOrigin
- \value ParentOrigin
- \value WindowOrigin
- \value AncestorOrigin
-
-*/
-
-/*!
- \fn bool QWidget::isVisibleToTLW() const
-
- Use isVisible() instead.
-*/
-
-/*!
- \fn void QWidget::iconify()
-
- Use showMinimized() instead.
-*/
-
-/*!
- \fn void QWidget::constPolish() const
-
- Use ensurePolished() instead.
-*/
-
-/*!
- \fn void QWidget::reparent(QWidget *parent, Qt::WindowFlags f, const QPoint &p, bool showIt)
-
- Use setParent() to change the parent or the widget's widget flags;
- use move() to move the widget, and use show() to show the widget.
-*/
-
-/*!
- \fn void QWidget::reparent(QWidget *parent, const QPoint &p, bool showIt)
-
- Use setParent() to change the parent; use move() to move the
- widget, and use show() to show the widget.
-*/
-
-/*!
- \fn void QWidget::recreate(QWidget *parent, Qt::WindowFlags f, const QPoint & p, bool showIt)
-
- Use setParent() to change the parent or the widget's widget flags;
- use move() to move the widget, and use show() to show the widget.
-*/
-
-/*!
- \fn bool QWidget::hasMouse() const
-
- Use testAttribute(Qt::WA_UnderMouse) instead.
-*/
-
-/*!
- \fn bool QWidget::ownCursor() const
-
- Use testAttribute(Qt::WA_SetCursor) instead.
-*/
-
-/*!
- \fn bool QWidget::ownFont() const
-
- Use testAttribute(Qt::WA_SetFont) instead.
-*/
-
-/*!
- \fn void QWidget::unsetFont()
-
- Use setFont(QFont()) instead.
-*/
-
-/*!
- \fn bool QWidget::ownPalette() const
-
- Use testAttribute(Qt::WA_SetPalette) instead.
-*/
-
-/*!
- \fn void QWidget::unsetPalette()
-
- Use setPalette(QPalette()) instead.
-*/
-
-/*!
- \fn void QWidget::setEraseColor(const QColor &color)
-
- Use the palette instead.
-
- \oldcode
- widget->setEraseColor(color);
- \newcode
- QPalette palette;
- palette.setColor(widget->backgroundRole(), color);
- widget->setPalette(palette);
- \endcode
-*/
-
-/*!
- \fn void QWidget::setErasePixmap(const QPixmap &pixmap)
-
- Use the palette instead.
-
- \oldcode
- widget->setErasePixmap(pixmap);
- \newcode
- QPalette palette;
- palette.setBrush(widget->backgroundRole(), QBrush(pixmap));
- widget->setPalette(palette);
- \endcode
-*/
-
-/*!
- \fn void QWidget::setPaletteForegroundColor(const QColor &color)
-
- Use the palette directly.
-
- \oldcode
- widget->setPaletteForegroundColor(color);
- \newcode
- QPalette palette;
- palette.setColor(widget->foregroundRole(), color);
- widget->setPalette(palette);
- \endcode
-*/
-
-/*!
- \fn void QWidget::setPaletteBackgroundColor(const QColor &color)
-
- Use the palette directly.
-
- \oldcode
- widget->setPaletteBackgroundColor(color);
- \newcode
- QPalette palette;
- palette.setColor(widget->backgroundRole(), color);
- widget->setPalette(palette);
- \endcode
-*/
-
-/*!
- \fn void QWidget::setPaletteBackgroundPixmap(const QPixmap &pixmap)
-
- Use the palette directly.
-
- \oldcode
- widget->setPaletteBackgroundPixmap(pixmap);
- \newcode
- QPalette palette;
- palette.setBrush(widget->backgroundRole(), QBrush(pixmap));
- widget->setPalette(palette);
- \endcode
-*/
-
-/*!
- \fn void QWidget::setBackgroundPixmap(const QPixmap &pixmap)
-
- Use the palette instead.
-
- \oldcode
- widget->setBackgroundPixmap(pixmap);
- \newcode
- QPalette palette;
- palette.setBrush(widget->backgroundRole(), QBrush(pixmap));
- widget->setPalette(palette);
- \endcode
-*/
-
-/*!
- \fn void QWidget::setBackgroundColor(const QColor &color)
-
- Use the palette instead.
-
- \oldcode
- widget->setBackgroundColor(color);
- \newcode
- QPalette palette;
- palette.setColor(widget->backgroundRole(), color);
- widget->setPalette(palette);
- \endcode
-*/
-
-
-/*!
- \fn QWidget *QWidget::parentWidget(bool sameWindow) const
-
- Use the no-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::setKeyCompression(bool b)
-
- Use setAttribute(Qt::WA_KeyCompression, b) instead.
-*/
-
-/*!
- \fn void QWidget::setFont(const QFont &f, bool b)
-
- Use the single-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::setPalette(const QPalette &p, bool b)
-
- Use the single-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::setBackgroundOrigin(BackgroundOrigin background)
-
- \obsolete
-*/
-
-/*!
- \fn BackgroundOrigin QWidget::backgroundOrigin() const
-
- \obsolete
-
- Always returns \c WindowOrigin.
-*/
-
-/*!
- \fn QPoint QWidget::backgroundOffset() const
-
- \obsolete
-
- Always returns QPoint().
-*/
-
-/*!
- \fn void QWidget::repaint(bool b)
-
- The boolean parameter \a b is ignored. Use the no-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::repaint(int x, int y, int w, int h, bool b)
-
- The boolean parameter \a b is ignored. Use the four-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::repaint(const QRect &r, bool b)
-
- The boolean parameter \a b is ignored. Use the single rect-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::repaint(const QRegion &rgn, bool b)
-
- The boolean parameter \a b is ignored. Use the single region-argument overload instead.
-*/
-
-/*!
- \fn void QWidget::erase()
-
- Drawing may only take place in a QPaintEvent. Overload
- paintEvent() to do your erasing and call update() to schedule a
- replaint whenever necessary. See also QPainter.
-*/
-
-/*!
- \fn void QWidget::erase(int x, int y, int w, int h)
-
- Drawing may only take place in a QPaintEvent. Overload
- paintEvent() to do your erasing and call update() to schedule a
- replaint whenever necessary. See also QPainter.
-*/
-
-/*!
- \fn void QWidget::erase(const QRect &rect)
-
- Drawing may only take place in a QPaintEvent. Overload
- paintEvent() to do your erasing and call update() to schedule a
- replaint whenever necessary. See also QPainter.
-*/
-
-/*!
- \fn void QWidget::drawText(const QPoint &p, const QString &s)
-
- Drawing may only take place in a QPaintEvent. Overload
- paintEvent() to do your drawing and call update() to schedule a
- replaint whenever necessary. See also QPainter.
-*/
-
-/*!
- \fn void QWidget::drawText(int x, int y, const QString &s)
-
- Drawing may only take place in a QPaintEvent. Overload
- paintEvent() to do your drawing and call update() to schedule a
- replaint whenever necessary. See also QPainter.
-*/
-
-/*!
- \fn QWidget *QWidget::childAt(const QPoint &p, bool includeThis) const
-
- Use the single point argument overload instead.
-*/
-
-/*!
- \fn void QWidget::setCaption(const QString &c)
-
- Use setWindowTitle() instead.
-*/
-
-/*!
- \fn void QWidget::setIcon(const QPixmap &i)
-
- Use setWindowIcon() instead.
-*/
-
-/*!
- \fn void QWidget::setIconText(const QString &it)
-
- Use setWindowIconText() instead.
-*/
-
-/*!
- \fn QString QWidget::caption() const
-
- Use windowTitle() instead.
-*/
-
-/*!
- \fn QString QWidget::iconText() const
-
- Use windowIconText() instead.
-*/
/*!
\fn bool QWidget::isTopLevel() const
@@ -11184,84 +10760,6 @@ void QWidget::stackUnder(QWidget* w)
*/
/*!
- \fn void QWidget::setInputMethodEnabled(bool enabled)
-
- Use setAttribute(Qt::WA_InputMethodEnabled, \a enabled) instead.
-*/
-
-/*!
- \fn bool QWidget::isInputMethodEnabled() const
-
- Use testAttribute(Qt::WA_InputMethodEnabled) instead.
-*/
-
-/*!
- \fn void QWidget::setActiveWindow()
-
- Use activateWindow() instead.
-*/
-
-/*!
- \fn bool QWidget::isShown() const
-
- Use !isHidden() instead (notice the exclamation mark), or use isVisible() to check whether the widget is visible.
-*/
-
-/*!
- \fn bool QWidget::isDialog() const
-
- Use windowType() == Qt::Dialog instead.
-*/
-
-/*!
- \fn bool QWidget::isPopup() const
-
- Use windowType() == Qt::Popup instead.
-*/
-
-/*!
- \fn bool QWidget::isDesktop() const
-
- Use windowType() == Qt::Desktop instead.
-*/
-
-/*!
- \fn void QWidget::polish()
-
- Use ensurePolished() instead.
-*/
-
-/*!
- \fn QWidget *QWidget::childAt(int x, int y, bool includeThis) const
-
- Use the childAt() overload that doesn't have an \a includeThis parameter.
-
- \oldcode
- return widget->childAt(x, y, true);
- \newcode
- QWidget *child = widget->childAt(x, y, true);
- if (child)
- return child;
- if (widget->rect().contains(x, y))
- return widget;
- \endcode
-*/
-
-/*!
- \fn void QWidget::setSizePolicy(QSizePolicy::Policy hor, QSizePolicy::Policy ver, bool hfw)
- \compat
-
- Use the \l sizePolicy property and heightForWidth() function instead.
-*/
-
-/*!
- \fn bool QWidget::isUpdatesEnabled() const
- \compat
-
- Use the \l updatesEnabled property instead.
-*/
-
-/*!
\macro QWIDGETSIZE_MAX
\relates QWidget
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index f97b343463..60d4b8b698 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -746,16 +746,8 @@ private:
#endif // QT_NO_GESTURES
friend class QWidgetEffectSourcePrivate;
-#ifdef Q_WS_MAC
- friend class QCoreGraphicsPaintEnginePrivate;
- friend QPoint qt_mac_posInWindow(const QWidget *w);
- friend OSWindowRef qt_mac_window_for(const QWidget *w);
+#ifdef Q_OS_MAC
friend bool qt_mac_is_metal(const QWidget *w);
- friend OSViewRef qt_mac_nativeview_for(const QWidget *w);
- friend void qt_event_request_window_change(QWidget *widget);
- friend bool qt_mac_sendMacEventToWidget(QWidget *widget, EventRef ref);
- friend class QRasterWindowSurface;
- friend class QUnifiedToolbarSurface;
#endif
friend Q_WIDGETS_EXPORT QWidgetData *qt_qwidget_data(QWidget *widget);
friend Q_WIDGETS_EXPORT QWidgetPrivate *qt_widget_private(QWidget *widget);
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index c890dfe70c..43c3eaeff0 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index f1e0835b8b..fb4543cd14 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetaction.cpp b/src/widgets/kernel/qwidgetaction.cpp
index a2c2477922..caab1c16e6 100644
--- a/src/widgets/kernel/qwidgetaction.cpp
+++ b/src/widgets/kernel/qwidgetaction.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetaction.h b/src/widgets/kernel/qwidgetaction.h
index 31d58a819a..62ef05596b 100644
--- a/src/widgets/kernel/qwidgetaction.h
+++ b/src/widgets/kernel/qwidgetaction.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetaction_p.h b/src/widgets/kernel/qwidgetaction_p.h
index 99439d9919..ff8a37425c 100644
--- a/src/widgets/kernel/qwidgetaction_p.h
+++ b/src/widgets/kernel/qwidgetaction_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index d151d5e9e1..0eb9407925 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index 4d43a90322..2d28cae88e 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp
index 18fec508ea..f2ca99d040 100644
--- a/src/widgets/kernel/qwidgetsvariant.cpp
+++ b/src/widgets/kernel/qwidgetsvariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -49,7 +49,7 @@
QT_BEGIN_NAMESPACE
-
+namespace {
static void construct(QVariant::Private *x, const void *copy)
{
switch (x->type) {
@@ -97,10 +97,8 @@ static bool isNull(const QVariant::Private *d)
case QVariant::Icon:
return v_cast<QIcon>(d)->isNull();
#endif
- default:
- Q_ASSERT(false);
}
- return true;
+ return false;
}
static bool compare(const QVariant::Private *a, const QVariant::Private *b)
@@ -119,6 +117,34 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b)
return false;
}
+static bool convert(const QVariant::Private *d, QVariant::Type type, void *result, bool *ok)
+{
+ Q_UNUSED(d);
+ Q_UNUSED(type);
+ Q_UNUSED(result);
+ if (ok)
+ *ok = false;
+ return false;
+}
+
+#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
+static void streamDebug(QDebug dbg, const QVariant &v)
+{
+ QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr());
+ switch (d->type) {
+#ifndef QT_NO_ICON
+ case QVariant::Icon:
+ dbg.nospace() << *v_cast<QIcon>(d);
+ break;
+#endif
+ case QVariant::SizePolicy:
+ dbg.nospace() << *v_cast<QSizePolicy>(d);
+ break;
+ default:
+ dbg.nospace() << "QVariant::Type(" << d->type << ")";
+ }
+}
+#endif
static const QVariant::Handler widgets_handler = {
construct,
@@ -129,19 +155,17 @@ static const QVariant::Handler widgets_handler = {
0,
#endif
compare,
- 0,
+ convert,
0,
#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
- 0
+ streamDebug
#else
0
#endif
};
-extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeWidgetsHelper;
-
#define QT_IMPL_METATYPEINTERFACE_WIDGETS_TYPES(MetaTypeName, MetaTypeId, RealName) \
- QMetaTypeInterface(static_cast<RealName*>(0)),
+ QT_METATYPE_INTERFACE_INIT(RealName),
static const QMetaTypeInterface qVariantWidgetsHelper[] = {
QT_FOR_EACH_STATIC_WIDGETS_CLASS(QT_IMPL_METATYPEINTERFACE_WIDGETS_TYPES)
@@ -149,18 +173,20 @@ static const QMetaTypeInterface qVariantWidgetsHelper[] = {
#undef QT_IMPL_METATYPEINTERFACE_WIDGETS_TYPES
-extern Q_GUI_EXPORT const QVariant::Handler *qt_widgets_variant_handler;
+} // namespace
+
+extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeWidgetsHelper;
void qRegisterWidgetsVariant()
{
- qt_widgets_variant_handler = &widgets_handler;
qMetaTypeWidgetsHelper = qVariantWidgetsHelper;
+ QVariantPrivate::registerHandler(QModulesPrivate::Widgets, &widgets_handler);
}
Q_CONSTRUCTOR_FUNCTION(qRegisterWidgetsVariant)
void qUnregisterWidgetsVariant()
{
- qt_widgets_variant_handler = 0;
+ QVariantPrivate::unregisterHandler(QModulesPrivate::Widgets);
qMetaTypeWidgetsHelper = 0;
}
Q_DESTRUCTOR_FUNCTION(qUnregisterWidgetsVariant)
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp
index e3178db8c9..b89dca7357 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa.cpp
+++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/kernel/qwidgetwindow_qpa_p.h b/src/widgets/kernel/qwidgetwindow_qpa_p.h
index 906b96c47b..82448ab5fd 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa_p.h
+++ b/src/widgets/kernel/qwidgetwindow_qpa_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qapplication_mac.mm b/src/widgets/platforms/mac/qapplication_mac.mm
index cab207e667..13fb6fd624 100644
--- a/src/widgets/platforms/mac/qapplication_mac.mm
+++ b/src/widgets/platforms/mac/qapplication_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qclipboard_mac.cpp b/src/widgets/platforms/mac/qclipboard_mac.cpp
index b8a4d2915d..3ec4bfb8c1 100644
--- a/src/widgets/platforms/mac/qclipboard_mac.cpp
+++ b/src/widgets/platforms/mac/qclipboard_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoaintrospection_mac.mm b/src/widgets/platforms/mac/qcocoaintrospection_mac.mm
index 7388f5a4e9..e68aacb4a0 100644
--- a/src/widgets/platforms/mac/qcocoaintrospection_mac.mm
+++ b/src/widgets/platforms/mac/qcocoaintrospection_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoaintrospection_p.h b/src/widgets/platforms/mac/qcocoaintrospection_p.h
index e18646d063..9521957382 100644
--- a/src/widgets/platforms/mac/qcocoaintrospection_p.h
+++ b/src/widgets/platforms/mac/qcocoaintrospection_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoapanel_mac.mm b/src/widgets/platforms/mac/qcocoapanel_mac.mm
index 2dca64d5ff..115f78b153 100644
--- a/src/widgets/platforms/mac/qcocoapanel_mac.mm
+++ b/src/widgets/platforms/mac/qcocoapanel_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoapanel_mac_p.h b/src/widgets/platforms/mac/qcocoapanel_mac_p.h
index 43282be7c6..19eab92dbf 100644
--- a/src/widgets/platforms/mac/qcocoapanel_mac_p.h
+++ b/src/widgets/platforms/mac/qcocoapanel_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoasharedwindowmethods_mac_p.h b/src/widgets/platforms/mac/qcocoasharedwindowmethods_mac_p.h
index f5a93d98d2..edafcfccdf 100644
--- a/src/widgets/platforms/mac/qcocoasharedwindowmethods_mac_p.h
+++ b/src/widgets/platforms/mac/qcocoasharedwindowmethods_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoaview_mac.mm b/src/widgets/platforms/mac/qcocoaview_mac.mm
index 61a5ee10ff..f4b2b8d707 100644
--- a/src/widgets/platforms/mac/qcocoaview_mac.mm
+++ b/src/widgets/platforms/mac/qcocoaview_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoaview_mac_p.h b/src/widgets/platforms/mac/qcocoaview_mac_p.h
index 928e489abe..e534e7ab47 100644
--- a/src/widgets/platforms/mac/qcocoaview_mac_p.h
+++ b/src/widgets/platforms/mac/qcocoaview_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoawindow_mac.mm b/src/widgets/platforms/mac/qcocoawindow_mac.mm
index 730504f672..918e5a0a13 100644
--- a/src/widgets/platforms/mac/qcocoawindow_mac.mm
+++ b/src/widgets/platforms/mac/qcocoawindow_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoawindow_mac_p.h b/src/widgets/platforms/mac/qcocoawindow_mac_p.h
index 704e6bd01c..83ecb7c13e 100644
--- a/src/widgets/platforms/mac/qcocoawindow_mac_p.h
+++ b/src/widgets/platforms/mac/qcocoawindow_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac.mm b/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac.mm
index 9e3b4cfee7..f1b38148be 100644
--- a/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac.mm
+++ b/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac_p.h b/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac_p.h
index 7ac8a28539..cd497849a7 100644
--- a/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac_p.h
+++ b/src/widgets/platforms/mac/qcocoawindowcustomthemeframe_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoawindowdelegate_mac.mm b/src/widgets/platforms/mac/qcocoawindowdelegate_mac.mm
index 44fb9b6eba..fc89821f41 100644
--- a/src/widgets/platforms/mac/qcocoawindowdelegate_mac.mm
+++ b/src/widgets/platforms/mac/qcocoawindowdelegate_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcocoawindowdelegate_mac_p.h b/src/widgets/platforms/mac/qcocoawindowdelegate_mac_p.h
index 261d1d192a..27906e116c 100644
--- a/src/widgets/platforms/mac/qcocoawindowdelegate_mac_p.h
+++ b/src/widgets/platforms/mac/qcocoawindowdelegate_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qcolormap_mac.cpp b/src/widgets/platforms/mac/qcolormap_mac.cpp
index 0c3fd70468..de920d7144 100644
--- a/src/widgets/platforms/mac/qcolormap_mac.cpp
+++ b/src/widgets/platforms/mac/qcolormap_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qdesktopwidget_mac.mm b/src/widgets/platforms/mac/qdesktopwidget_mac.mm
index 0bf213303e..9869eeeab2 100644
--- a/src/widgets/platforms/mac/qdesktopwidget_mac.mm
+++ b/src/widgets/platforms/mac/qdesktopwidget_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qdesktopwidget_mac_p.h b/src/widgets/platforms/mac/qdesktopwidget_mac_p.h
index e1ca7e7a37..a2d7552120 100644
--- a/src/widgets/platforms/mac/qdesktopwidget_mac_p.h
+++ b/src/widgets/platforms/mac/qdesktopwidget_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qdnd_mac.mm b/src/widgets/platforms/mac/qdnd_mac.mm
index 73acb93f0b..b5543024c0 100644
--- a/src/widgets/platforms/mac/qdnd_mac.mm
+++ b/src/widgets/platforms/mac/qdnd_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qeventdispatcher_mac.mm b/src/widgets/platforms/mac/qeventdispatcher_mac.mm
index 2a5227c19f..0056ebeca8 100644
--- a/src/widgets/platforms/mac/qeventdispatcher_mac.mm
+++ b/src/widgets/platforms/mac/qeventdispatcher_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qeventdispatcher_mac_p.h b/src/widgets/platforms/mac/qeventdispatcher_mac_p.h
index 241adf2fce..57797b070b 100644
--- a/src/widgets/platforms/mac/qeventdispatcher_mac_p.h
+++ b/src/widgets/platforms/mac/qeventdispatcher_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qkeymapper_mac.cpp b/src/widgets/platforms/mac/qkeymapper_mac.cpp
index df18511b4f..3cacb098aa 100644
--- a/src/widgets/platforms/mac/qkeymapper_mac.cpp
+++ b/src/widgets/platforms/mac/qkeymapper_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qmacdefines_mac.h b/src/widgets/platforms/mac/qmacdefines_mac.h
index d0accf872f..9f27dfa584 100644
--- a/src/widgets/platforms/mac/qmacdefines_mac.h
+++ b/src/widgets/platforms/mac/qmacdefines_mac.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qmacgesturerecognizer_mac.mm b/src/widgets/platforms/mac/qmacgesturerecognizer_mac.mm
index 6e77f41d2d..54823aa04f 100644
--- a/src/widgets/platforms/mac/qmacgesturerecognizer_mac.mm
+++ b/src/widgets/platforms/mac/qmacgesturerecognizer_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qmacgesturerecognizer_mac_p.h b/src/widgets/platforms/mac/qmacgesturerecognizer_mac_p.h
index 8d1bd337d7..c77ead3c21 100644
--- a/src/widgets/platforms/mac/qmacgesturerecognizer_mac_p.h
+++ b/src/widgets/platforms/mac/qmacgesturerecognizer_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qmacinputcontext_mac.cpp b/src/widgets/platforms/mac/qmacinputcontext_mac.cpp
index 43da4a911f..ee0bf70427 100644
--- a/src/widgets/platforms/mac/qmacinputcontext_mac.cpp
+++ b/src/widgets/platforms/mac/qmacinputcontext_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qmacinputcontext_p.h b/src/widgets/platforms/mac/qmacinputcontext_p.h
index 4fb3eb57b6..7a7ef9687b 100644
--- a/src/widgets/platforms/mac/qmacinputcontext_p.h
+++ b/src/widgets/platforms/mac/qmacinputcontext_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qmime_mac.cpp b/src/widgets/platforms/mac/qmime_mac.cpp
index a9843b7e87..730f672ecd 100644
--- a/src/widgets/platforms/mac/qmime_mac.cpp
+++ b/src/widgets/platforms/mac/qmime_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qnsframeview_mac_p.h b/src/widgets/platforms/mac/qnsframeview_mac_p.h
index 72245c1782..1534ad1461 100644
--- a/src/widgets/platforms/mac/qnsframeview_mac_p.h
+++ b/src/widgets/platforms/mac/qnsframeview_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qnsthemeframe_mac_p.h b/src/widgets/platforms/mac/qnsthemeframe_mac_p.h
index a1fa4ef1d8..1768ad8687 100644
--- a/src/widgets/platforms/mac/qnsthemeframe_mac_p.h
+++ b/src/widgets/platforms/mac/qnsthemeframe_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qnstitledframe_mac_p.h b/src/widgets/platforms/mac/qnstitledframe_mac_p.h
index 18a6155925..531b943646 100644
--- a/src/widgets/platforms/mac/qnstitledframe_mac_p.h
+++ b/src/widgets/platforms/mac/qnstitledframe_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qpaintdevice_mac.cpp b/src/widgets/platforms/mac/qpaintdevice_mac.cpp
index 50bd4b8490..01f4a18bf6 100644
--- a/src/widgets/platforms/mac/qpaintdevice_mac.cpp
+++ b/src/widgets/platforms/mac/qpaintdevice_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -100,53 +100,4 @@ Q_WIDGETS_EXPORT GrafPtr qt_mac_qd_context(const QPaintDevice *device)
extern CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *pdev);
-/*! \internal
-
- Returns the CoreGraphics CGContextRef of the paint device. 0 is
- returned if it can't be obtained. It is the caller's responsiblity to
- CGContextRelease the context when finished using it.
-
- \warning This function is only available on Mac OS X.
-*/
-
-Q_WIDGETS_EXPORT CGContextRef qt_mac_cg_context(const QPaintDevice *pdev)
-{
- if (pdev->devType() == QInternal::Pixmap) {
- const QPixmap *pm = static_cast<const QPixmap*>(pdev);
- CGColorSpaceRef colorspace = qt_mac_colorSpaceForDeviceType(pdev);
- uint flags = kCGImageAlphaPremultipliedFirst;
-#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
- flags |= kCGBitmapByteOrder32Host;
-#endif
- CGContextRef ret = 0;
-
- // It would make sense to put this into a mac #ifdef'ed
- // virtual function in the QPlatformPixmap at some point
- if (pm->data->classId() == QPlatformPixmap::MacClass) {
- const QMacPlatformPixmap *pmData = static_cast<const QMacPlatformPixmap*>(pm->data.data());
- ret = CGBitmapContextCreate(pmData->pixels, pmData->w, pmData->h,
- 8, pmData->bytesPerRow, colorspace,
- flags);
- if(!ret)
- qWarning("QPaintDevice: Unable to create context for pixmap (%d/%d/%d)",
- pmData->w, pmData->h, (pmData->bytesPerRow * pmData->h));
- } else if (pm->data->classId() == QPlatformPixmap::RasterClass) {
- QImage *image = pm->data->buffer();
- ret = CGBitmapContextCreate(image->bits(), image->width(), image->height(),
- 8, image->bytesPerLine(), colorspace, flags);
- }
-
- CGContextTranslateCTM(ret, 0, pm->height());
- CGContextScaleCTM(ret, 1, -1);
- return ret;
- } else if (pdev->devType() == QInternal::Widget) {
- CGContextRef ret = static_cast<CGContextRef>(static_cast<const QWidget *>(pdev)->macCGHandle());
- CGContextRetain(ret);
- return ret;
- } else if (pdev->devType() == QInternal::MacQuartz) {
- return static_cast<const QMacQuartzPaintDevice *>(pdev)->cgContext();
- }
- return 0;
-}
-
QT_END_NAMESPACE
diff --git a/src/widgets/platforms/mac/qpaintengine_mac.cpp b/src/widgets/platforms/mac/qpaintengine_mac.cpp
index af8e0e36c3..f1e397e7b0 100644
--- a/src/widgets/platforms/mac/qpaintengine_mac.cpp
+++ b/src/widgets/platforms/mac/qpaintengine_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -87,60 +87,6 @@ extern QPixmap qt_pixmapForBrush(int, bool); //qbrush.cpp
void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform);
-//Implemented for qt_mac_p.h
-QMacCGContext::QMacCGContext(QPainter *p)
-{
- QPaintEngine *pe = p->paintEngine();
- if (pe->type() == QPaintEngine::MacPrinter)
- pe = static_cast<QMacPrintEngine*>(pe)->paintEngine();
- pe->syncState();
- context = 0;
- if(pe->type() == QPaintEngine::CoreGraphics)
- context = static_cast<QCoreGraphicsPaintEngine*>(pe)->handle();
-
- int devType = p->device()->devType();
- if (pe->type() == QPaintEngine::Raster
- && (devType == QInternal::Widget ||
- devType == QInternal::Pixmap ||
- devType == QInternal::Image)) {
-
- extern CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice);
- CGColorSpaceRef colorspace = qt_mac_colorSpaceForDeviceType(pe->paintDevice());
- uint flags = kCGImageAlphaPremultipliedFirst;
-#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
- flags |= kCGBitmapByteOrder32Host;
-#endif
- const QImage *image = (const QImage *) pe->paintDevice();
-
- context = CGBitmapContextCreate((void *) image->bits(), image->width(), image->height(),
- 8, image->bytesPerLine(), colorspace, flags);
-
- CGContextTranslateCTM(context, 0, image->height());
- CGContextScaleCTM(context, 1, -1);
-
- if (devType == QInternal::Widget) {
- QRegion clip = p->paintEngine()->systemClip();
- QTransform native = p->deviceTransform();
- QTransform logical = p->combinedTransform();
-
- if (p->hasClipping()) {
- QRegion r = p->clipRegion();
- r.translate(native.dx(), native.dy());
- if (clip.isEmpty())
- clip = r;
- else
- clip &= r;
- }
- qt_mac_clip_cg(context, clip, 0);
-
- CGContextTranslateCTM(context, native.dx(), native.dy());
- }
- } else {
- CGContextRetain(context);
- }
-}
-
-
/*****************************************************************************
QCoreGraphicsPaintEngine utility functions
*****************************************************************************/
@@ -152,13 +98,6 @@ CGAffineTransform qt_mac_convert_transform_to_cg(const QTransform &t) {
return CGAffineTransformMake(t.m11(), t.m12(), t.m21(), t.m22(), t.dx(), t.dy());
}
-CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice)
-{
- bool isWidget = (paintDevice->devType() == QInternal::Widget);
- return QCoreGraphicsPaintEngine::macDisplayColorSpace(isWidget ? static_cast<const QWidget *>(paintDevice)
- : 0);
-}
-
inline static QCFType<CGColorRef> cgColorForQColor(const QColor &col, QPaintDevice *pdev)
{
CGFloat components[] = {
@@ -317,46 +256,6 @@ CGColorSpaceRef QCoreGraphicsPaintEngine::macGenericColorSpace()
return macDisplayColorSpace();
#endif
}
-void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform)
-{
- CGAffineTransform old_xform = CGAffineTransformIdentity;
- if(orig_xform) { //setup xforms
- old_xform = CGContextGetCTM(hd);
- CGContextConcatCTM(hd, CGAffineTransformInvert(old_xform));
- CGContextConcatCTM(hd, *orig_xform);
- }
-
- //do the clipping
- CGContextBeginPath(hd);
- if(rgn.isEmpty()) {
- CGContextAddRect(hd, CGRectMake(0, 0, 0, 0));
- } else {
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
- QCFType<HIMutableShapeRef> shape = rgn.toHIMutableShape();
- Q_ASSERT(!HIShapeIsEmpty(shape));
- HIShapeReplacePathInCGContext(shape, hd);
- } else
-#endif
- {
- QVector<QRect> rects = rgn.rects();
- const int count = rects.size();
- for(int i = 0; i < count; i++) {
- const QRect &r = rects[i];
- CGRect mac_r = CGRectMake(r.x(), r.y(), r.width(), r.height());
- CGContextAddRect(hd, mac_r);
- }
- }
-
- }
- CGContextClip(hd);
-
- if(orig_xform) {//reset xforms
- CGContextConcatCTM(hd, CGAffineTransformInvert(CGContextGetCTM(hd)));
- CGContextConcatCTM(hd, old_xform);
- }
-}
-
//pattern handling (tiling)
#if 1
diff --git a/src/widgets/platforms/mac/qpaintengine_mac_p.h b/src/widgets/platforms/mac/qpaintengine_mac_p.h
index 2434011e52..a8e27a808d 100644
--- a/src/widgets/platforms/mac/qpaintengine_mac_p.h
+++ b/src/widgets/platforms/mac/qpaintengine_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qpixmap_mac.cpp b/src/widgets/platforms/mac/qpixmap_mac.cpp
index 48835c7d46..3b2452c37c 100644
--- a/src/widgets/platforms/mac/qpixmap_mac.cpp
+++ b/src/widgets/platforms/mac/qpixmap_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qpixmap_mac_p.h b/src/widgets/platforms/mac/qpixmap_mac_p.h
index 4f53160074..582eef27b6 100644
--- a/src/widgets/platforms/mac/qpixmap_mac_p.h
+++ b/src/widgets/platforms/mac/qpixmap_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qprintengine_mac.mm b/src/widgets/platforms/mac/qprintengine_mac.mm
index b01d7a5762..9902b3216d 100644
--- a/src/widgets/platforms/mac/qprintengine_mac.mm
+++ b/src/widgets/platforms/mac/qprintengine_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qprintengine_mac_p.h b/src/widgets/platforms/mac/qprintengine_mac_p.h
index 6c17818fbd..349dfd10f2 100644
--- a/src/widgets/platforms/mac/qprintengine_mac_p.h
+++ b/src/widgets/platforms/mac/qprintengine_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qprinterinfo_mac.cpp b/src/widgets/platforms/mac/qprinterinfo_mac.cpp
index 455510d5d3..98492a5af6 100644
--- a/src/widgets/platforms/mac/qprinterinfo_mac.cpp
+++ b/src/widgets/platforms/mac/qprinterinfo_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qregion_mac.cpp b/src/widgets/platforms/mac/qregion_mac.cpp
index b929d9c283..71e7a3b44b 100644
--- a/src/widgets/platforms/mac/qregion_mac.cpp
+++ b/src/widgets/platforms/mac/qregion_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -47,75 +47,4 @@ QT_BEGIN_NAMESPACE
QRegion::QRegionData QRegion::shared_empty = { Q_BASIC_ATOMIC_INITIALIZER(1), 0 };
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
-OSStatus QRegion::shape2QRegionHelper(int inMessage, HIShapeRef,
- const CGRect *inRect, void *inRefcon)
-{
- QRegion *region = static_cast<QRegion *>(inRefcon);
- if (!region)
- return paramErr;
-
- switch (inMessage) {
- case kHIShapeEnumerateRect:
- *region += QRect(inRect->origin.x, inRect->origin.y,
- inRect->size.width, inRect->size.height);
- break;
- case kHIShapeEnumerateInit:
- // Assume the region is already setup correctly
- case kHIShapeEnumerateTerminate:
- default:
- break;
- }
- return noErr;
-}
-#endif
-
-/*!
- \internal
- Create's a mutable shape, it's the caller's responsibility to release.
- WARNING: this function clamps the coordinates to SHRT_MIN/MAX on 10.4 and below.
-*/
-HIMutableShapeRef QRegion::toHIMutableShape() const
-{
- HIMutableShapeRef shape = HIShapeCreateMutable();
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
- if (d->qt_rgn && d->qt_rgn->numRects) {
- int n = d->qt_rgn->numRects;
- const QRect *qt_r = (n == 1) ? &d->qt_rgn->extents : d->qt_rgn->rects.constData();
- while (n--) {
- CGRect cgRect = CGRectMake(qt_r->x(), qt_r->y(), qt_r->width(), qt_r->height());
- HIShapeUnionWithRect(shape, &cgRect);
- ++qt_r;
- }
- }
- } else
-#endif
- {
- }
- return shape;
-}
-
-
-
-QRegion QRegion::fromHIShapeRef(HIShapeRef shape)
-{
- QRegion returnRegion;
- returnRegion.detach();
- // Begin gratuitous #if-defery
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
-# ifndef Q_WS_MAC64
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
-# endif
- HIShapeEnumerate(shape, kHIShapeParseFromTopLeft, shape2QRegionHelper, &returnRegion);
-# ifndef Q_WS_MAC64
- } else
-# endif
-#endif
- {
- }
- return returnRegion;
-}
-
QT_END_NAMESPACE
diff --git a/src/widgets/platforms/mac/qt_cocoa_helpers_mac.mm b/src/widgets/platforms/mac/qt_cocoa_helpers_mac.mm
index 20bb6bffbb..348b989ec6 100644
--- a/src/widgets/platforms/mac/qt_cocoa_helpers_mac.mm
+++ b/src/widgets/platforms/mac/qt_cocoa_helpers_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -219,12 +219,6 @@ DnDParams *macCurrentDnDParameters()
}
#endif
-bool macWindowIsTextured( void * /*OSWindowRef*/ window )
-{
- OSWindowRef wnd = static_cast<OSWindowRef>(window);
- return ( [wnd styleMask] & NSTexturedBackgroundWindowMask ) ? true : false;
-}
-
void macWindowToolbarShow(const QWidget *widget, bool show )
{
OSWindowRef wnd = qt_mac_window_for(widget);
diff --git a/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h b/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h
index c85d39010c..bae479ec6a 100644
--- a/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h
+++ b/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -129,7 +129,6 @@ QT_BEGIN_NAMESPACE
Qt::MouseButtons qt_mac_get_buttons(int buttons);
Qt::MouseButton qt_mac_get_button(EventMouseButton button);
void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds = 0.15);
-bool macWindowIsTextured(void * /*OSWindowRef*/ window);
void macWindowToolbarShow(const QWidget *widget, bool show );
void macWindowToolbarSet( void * /*OSWindowRef*/ window, void* toolbarRef );
bool macWindowToolbarIsVisible( void * /*OSWindowRef*/ window );
@@ -140,7 +139,6 @@ void qt_mac_updateContentBorderMetricts(void * /*OSWindowRef */window, const ::H
void qt_mac_replaceDrawRect(void * /*OSWindowRef */window, QWidgetPrivate *widget);
void qt_mac_replaceDrawRectOriginal(void * /*OSWindowRef */window, QWidgetPrivate *widget);
void qt_mac_showBaseLineSeparator(void * /*OSWindowRef */window, bool show);
-void * /*NSImage */qt_mac_create_nsimage(const QPixmap &pm);
void qt_mac_update_mouseTracking(QWidget *widget);
OSStatus qt_mac_drawCGImage(CGContextRef cg, const CGRect *inbounds, CGImageRef);
bool qt_mac_checkForNativeSizeGrip(const QWidget *widget);
diff --git a/src/widgets/platforms/mac/qt_mac.cpp b/src/widgets/platforms/mac/qt_mac.cpp
index b3c9371d24..adf8f70cab 100644
--- a/src/widgets/platforms/mac/qt_mac.cpp
+++ b/src/widgets/platforms/mac/qt_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,24 +67,6 @@ QFont qfontForThemeFont(ThemeFontID themeID)
}
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
-static QColor qcolorFromCGColor(CGColorRef cgcolor)
-{
- QColor pc;
- CGColorSpaceModel model = CGColorSpaceGetModel(CGColorGetColorSpace(cgcolor));
- const CGFloat *components = CGColorGetComponents(cgcolor);
- if (model == kCGColorSpaceModelRGB) {
- pc.setRgbF(components[0], components[1], components[2], components[3]);
- } else if (model == kCGColorSpaceModelCMYK) {
- pc.setCmykF(components[0], components[1], components[2], components[3]);
- } else if (model == kCGColorSpaceModelMonochrome) {
- pc.setRgbF(components[0], components[0], components[0], components[1]);
- } else {
- // Colorspace we can't deal with.
- qWarning("Qt: qcolorFromCGColor: cannot convert from colorspace model: %d", model);
- Q_ASSERT(false);
- }
- return pc;
-}
static inline QColor leopardBrush(ThemeBrush brush)
{
diff --git a/src/widgets/platforms/mac/qt_mac_p.h b/src/widgets/platforms/mac/qt_mac_p.h
index 5a1d4ee42e..3b679c32ec 100644
--- a/src/widgets/platforms/mac/qt_mac_p.h
+++ b/src/widgets/platforms/mac/qt_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/platforms/mac/qwidget_mac.mm b/src/widgets/platforms/mac/qwidget_mac.mm
index dd958761a1..6c8413e42e 100644
--- a/src/widgets/platforms/mac/qwidget_mac.mm
+++ b/src/widgets/platforms/mac/qwidget_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qbasickeyeventtransition.cpp b/src/widgets/statemachine/qbasickeyeventtransition.cpp
index 615e642a7e..fca11eb036 100644
--- a/src/widgets/statemachine/qbasickeyeventtransition.cpp
+++ b/src/widgets/statemachine/qbasickeyeventtransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qbasickeyeventtransition_p.h b/src/widgets/statemachine/qbasickeyeventtransition_p.h
index 6a51260155..379c151e60 100644
--- a/src/widgets/statemachine/qbasickeyeventtransition_p.h
+++ b/src/widgets/statemachine/qbasickeyeventtransition_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qbasicmouseeventtransition.cpp b/src/widgets/statemachine/qbasicmouseeventtransition.cpp
index 0edf430af6..c05b262b66 100644
--- a/src/widgets/statemachine/qbasicmouseeventtransition.cpp
+++ b/src/widgets/statemachine/qbasicmouseeventtransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qbasicmouseeventtransition_p.h b/src/widgets/statemachine/qbasicmouseeventtransition_p.h
index 3a608cb0af..98a8f28ca8 100644
--- a/src/widgets/statemachine/qbasicmouseeventtransition_p.h
+++ b/src/widgets/statemachine/qbasicmouseeventtransition_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp
index f717662ace..928bbd5a53 100644
--- a/src/widgets/statemachine/qguistatemachine.cpp
+++ b/src/widgets/statemachine/qguistatemachine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -285,13 +285,6 @@ static QEvent *cloneEvent(QEvent *e)
case QEvent::HoverMove:
return new QHoverEvent(*static_cast<QHoverEvent*>(e));
- case QEvent::AccessibilityHelp:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::AccessibilityDescription:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
#ifdef QT_KEYPAD_NAVIGATION
case QEvent::EnterEditFocus:
return new QEvent(*e);
diff --git a/src/widgets/statemachine/qkeyeventtransition.cpp b/src/widgets/statemachine/qkeyeventtransition.cpp
index b1ff2e33b2..175d4924a9 100644
--- a/src/widgets/statemachine/qkeyeventtransition.cpp
+++ b/src/widgets/statemachine/qkeyeventtransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qkeyeventtransition.h b/src/widgets/statemachine/qkeyeventtransition.h
index 7862bd41d7..b22a4e0934 100644
--- a/src/widgets/statemachine/qkeyeventtransition.h
+++ b/src/widgets/statemachine/qkeyeventtransition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qmouseeventtransition.cpp b/src/widgets/statemachine/qmouseeventtransition.cpp
index 416529bddd..60c2c85159 100644
--- a/src/widgets/statemachine/qmouseeventtransition.cpp
+++ b/src/widgets/statemachine/qmouseeventtransition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/statemachine/qmouseeventtransition.h b/src/widgets/statemachine/qmouseeventtransition.h
index 7255a968ac..bdd64c5f3f 100644
--- a/src/widgets/statemachine/qmouseeventtransition.h
+++ b/src/widgets/statemachine/qmouseeventtransition.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcdestyle.cpp b/src/widgets/styles/qcdestyle.cpp
index 426ab19007..518461c279 100644
--- a/src/widgets/styles/qcdestyle.cpp
+++ b/src/widgets/styles/qcdestyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcdestyle.h b/src/widgets/styles/qcdestyle.h
index 854bfc6c69..b5293d30f3 100644
--- a/src/widgets/styles/qcdestyle.h
+++ b/src/widgets/styles/qcdestyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcleanlooksstyle.cpp b/src/widgets/styles/qcleanlooksstyle.cpp
index 567efa8851..42f9b38bd4 100644
--- a/src/widgets/styles/qcleanlooksstyle.cpp
+++ b/src/widgets/styles/qcleanlooksstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcleanlooksstyle.h b/src/widgets/styles/qcleanlooksstyle.h
index 1b35aa7969..94b3aa889c 100644
--- a/src/widgets/styles/qcleanlooksstyle.h
+++ b/src/widgets/styles/qcleanlooksstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcleanlooksstyle_p.h b/src/widgets/styles/qcleanlooksstyle_p.h
index 4df13c8a43..d9968bb531 100644
--- a/src/widgets/styles/qcleanlooksstyle_p.h
+++ b/src/widgets/styles/qcleanlooksstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 31311a50f4..c874770fdb 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,6 +44,7 @@
#include <qfile.h>
#include <qapplication.h>
+#include <private/qguiapplication_p.h>
#include <qbitmap.h>
#include <qcache.h>
#include <qdockwidget.h>
@@ -72,6 +73,7 @@
#include <qfileinfo.h>
#include <qdir.h>
#include <qsettings.h>
+#include <qvariant.h>
#include <qpixmapcache.h>
#include <private/qguiplatformplugin_p.h>
@@ -4313,7 +4315,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
#endif
case PM_MaximumDragDistance:
- ret = -1;
+ ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::MaximumScrollBarDragDistance).toInt();
break;
#ifndef QT_NO_SLIDER
@@ -4550,7 +4552,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
}
break;
case PM_TextCursorWidth:
- ret = 1;
+ ret = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::TextCursorWidth).toInt();
break;
case PM_TabBar_ScrollButtonOverlap:
ret = 1;
diff --git a/src/widgets/styles/qcommonstyle.h b/src/widgets/styles/qcommonstyle.h
index a4a7ac11c5..e023c702da 100644
--- a/src/widgets/styles/qcommonstyle.h
+++ b/src/widgets/styles/qcommonstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h
index 554a8130f6..10a9cd875a 100644
--- a/src/widgets/styles/qcommonstyle_p.h
+++ b/src/widgets/styles/qcommonstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qcommonstylepixmaps_p.h b/src/widgets/styles/qcommonstylepixmaps_p.h
index 93cd837fb7..73c183d485 100644
--- a/src/widgets/styles/qcommonstylepixmaps_p.h
+++ b/src/widgets/styles/qcommonstylepixmaps_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index 5cd7bae658..fd8a272851 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qdrawutil.h b/src/widgets/styles/qdrawutil.h
index 2f35d236b7..74347b09c1 100644
--- a/src/widgets/styles/qdrawutil.h
+++ b/src/widgets/styles/qdrawutil.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qgtkpainter.cpp b/src/widgets/styles/qgtkpainter.cpp
index 373732f924..a9d1ed2281 100644
--- a/src/widgets/styles/qgtkpainter.cpp
+++ b/src/widgets/styles/qgtkpainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qgtkpainter_p.h b/src/widgets/styles/qgtkpainter_p.h
index a9d4dc0dcd..b0874d2315 100644
--- a/src/widgets/styles/qgtkpainter_p.h
+++ b/src/widgets/styles/qgtkpainter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index da39c95a58..30e1371354 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qgtkstyle.h b/src/widgets/styles/qgtkstyle.h
index 1ca6e3cc85..26665dcd51 100644
--- a/src/widgets/styles/qgtkstyle.h
+++ b/src/widgets/styles/qgtkstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp
index a2fabde736..f3b41e0ba1 100644
--- a/src/widgets/styles/qgtkstyle_p.cpp
+++ b/src/widgets/styles/qgtkstyle_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qgtkstyle_p.h b/src/widgets/styles/qgtkstyle_p.h
index 55089268b3..656a187ded 100644
--- a/src/widgets/styles/qgtkstyle_p.h
+++ b/src/widgets/styles/qgtkstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qmacstyle.qdoc b/src/widgets/styles/qmacstyle.qdoc
index 709332aa1d..97baf80e9d 100644
--- a/src/widgets/styles/qmacstyle.qdoc
+++ b/src/widgets/styles/qmacstyle.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qmacstyle_mac.h b/src/widgets/styles/qmacstyle_mac.h
index bb9175cca8..7a3a4248b3 100644
--- a/src/widgets/styles/qmacstyle_mac.h
+++ b/src/widgets/styles/qmacstyle_mac.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
class QPalette;
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index f6eacd28dc..ca9b5cf234 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,17 +45,15 @@
*/
#include "qmacstyle_mac.h"
+#include "qmacstyle_mac_p.h"
+#include "qmacstylepixmaps_mac_p.h"
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
#define QMAC_QAQUASTYLE_SIZE_CONSTRAIN
//#define DEBUG_SIZE_CONSTRAINT
-#include <private/qapplication_p.h>
+#include <private/qcore_mac_p.h>
#include <private/qcombobox_p.h>
-#include <private/qmacstylepixmaps_mac_p.h>
-#include <private/qpaintengine_mac_p.h>
#include <private/qpainter_p.h>
-#include <private/qprintengine_mac_p.h>
#include <qapplication.h>
#include <qbitmap.h>
#include <qcheckbox.h>
@@ -97,11 +95,10 @@
#include <qlibrary.h>
#include <qdatetimeedit.h>
#include <qmath.h>
-#include <QtGui/qgraphicsproxywidget.h>
-#include <QtGui/qgraphicsview.h>
-#include <private/qt_cocoa_helpers_mac_p.h>
-#include "qmacstyle_mac_p.h"
+#include <QtWidgets/qgraphicsproxywidget.h>
+#include <QtWidgets/qgraphicsview.h>
#include <private/qstylehelper_p.h>
+#include <QtGui/QPlatformFontDatabase>
QT_BEGIN_NAMESPACE
@@ -138,9 +135,6 @@ typedef HIRect * (*PtrHIShapeGetBounds)(HIShapeRef, HIRect *);
static PtrHIShapeGetBounds ptrHIShapeGetBounds = 0;
static int closeButtonSize = 12;
-
-extern QRegion qt_mac_convert_mac_region(RgnHandle); //qregion_mac.cpp
-
static bool isVerticalTabs(const QTabBar::Shape shape) {
return (shape == QTabBar::RoundedEast
|| shape == QTabBar::TriangularEast
@@ -417,18 +411,247 @@ static inline ThemeTabDirection getTabDirection(QTabBar::Shape shape)
return ttd;
}
-QT_BEGIN_INCLUDE_NAMESPACE
-#include "moc_qmacstyle_mac.cpp"
-#include "moc_qmacstyle_mac_p.cpp"
-QT_END_INCLUDE_NAMESPACE
+static QString qt_mac_removeMnemonics(const QString &original)
+{
+ QString returnText(original.size(), 0);
+ int finalDest = 0;
+ int currPos = 0;
+ int l = original.length();
+ while (l) {
+ if (original.at(currPos) == QLatin1Char('&')
+ && (l == 1 || original.at(currPos + 1) != QLatin1Char('&'))) {
+ ++currPos;
+ --l;
+ if (l == 0)
+ break;
+ }
+ returnText[finalDest] = original.at(currPos);
+ ++currPos;
+ ++finalDest;
+ --l;
+ }
+ returnText.truncate(finalDest);
+ return returnText;
+}
-/*****************************************************************************
- External functions
- *****************************************************************************/
-extern CGContextRef qt_mac_cg_context(const QPaintDevice *); //qpaintdevice_mac.cpp
-extern QRegion qt_mac_convert_mac_region(HIShapeRef); //qregion_mac.cpp
-void qt_mac_dispose_rgn(RgnHandle r); //qregion_mac.cpp
-extern QPaintDevice *qt_mac_safe_pdev; //qapplication_mac.cpp
+class QMacCGContext
+{
+ CGContextRef context;
+public:
+ QMacCGContext(QPainter *p); //qpaintengine_mac.cpp
+ inline QMacCGContext() { context = 0; }
+ inline QMacCGContext(const QPaintDevice *pdev) {
+ extern CGContextRef qt_mac_cg_context(const QPaintDevice *);
+ context = qt_mac_cg_context(pdev);
+ }
+ inline QMacCGContext(CGContextRef cg, bool takeOwnership=false) {
+ context = cg;
+ if (!takeOwnership)
+ CGContextRetain(context);
+ }
+ inline QMacCGContext(const QMacCGContext &copy) : context(0) { *this = copy; }
+ inline ~QMacCGContext() {
+ if (context)
+ CGContextRelease(context);
+ }
+ inline bool isNull() const { return context; }
+ inline operator CGContextRef() { return context; }
+ inline QMacCGContext &operator=(const QMacCGContext &copy) {
+ if (context)
+ CGContextRelease(context);
+ context = copy.context;
+ CGContextRetain(context);
+ return *this;
+ }
+ inline QMacCGContext &operator=(CGContextRef cg) {
+ if (context)
+ CGContextRelease(context);
+ context = cg;
+ CGContextRetain(context); //we do not take ownership
+ return *this;
+ }
+};
+
+static QColor qcolorFromCGColor(CGColorRef cgcolor)
+{
+ QColor pc;
+ CGColorSpaceModel model = CGColorSpaceGetModel(CGColorGetColorSpace(cgcolor));
+ const CGFloat *components = CGColorGetComponents(cgcolor);
+ if (model == kCGColorSpaceModelRGB) {
+ pc.setRgbF(components[0], components[1], components[2], components[3]);
+ } else if (model == kCGColorSpaceModelCMYK) {
+ pc.setCmykF(components[0], components[1], components[2], components[3]);
+ } else if (model == kCGColorSpaceModelMonochrome) {
+ pc.setRgbF(components[0], components[0], components[0], components[1]);
+ } else {
+ // Colorspace we can't deal with.
+ qWarning("Qt: qcolorFromCGColor: cannot convert from colorspace model: %d", model);
+ Q_ASSERT(false);
+ }
+ return pc;
+}
+
+static inline QColor leopardBrush(ThemeBrush brush)
+{
+ QCFType<CGColorRef> cgClr = 0;
+ HIThemeBrushCreateCGColor(brush, &cgClr);
+ return qcolorFromCGColor(cgClr);
+}
+
+QColor qcolorForTheme(ThemeBrush brush)
+{
+ return leopardBrush(brush);
+}
+
+OSStatus qt_mac_shape2QRegionHelper(int inMessage, HIShapeRef, const CGRect *inRect, void *inRefcon)
+{
+ QRegion *region = static_cast<QRegion *>(inRefcon);
+ if (!region)
+ return paramErr;
+
+ switch (inMessage) {
+ case kHIShapeEnumerateRect:
+ *region += QRect(inRect->origin.x, inRect->origin.y,
+ inRect->size.width, inRect->size.height);
+ break;
+ case kHIShapeEnumerateInit:
+ // Assume the region is already setup correctly
+ case kHIShapeEnumerateTerminate:
+ default:
+ break;
+ }
+ return noErr;
+}
+
+
+/*!
+ \internal
+ Create's a mutable shape, it's the caller's responsibility to release.
+ WARNING: this function clamps the coordinates to SHRT_MIN/MAX on 10.4 and below.
+*/
+HIMutableShapeRef qt_mac_toHIMutableShape(const QRegion &region)
+{
+ HIMutableShapeRef shape = HIShapeCreateMutable();
+ if (region.rectCount() < 2 ) {
+ QRect qtRect = region.boundingRect();
+ CGRect cgRect = CGRectMake(qtRect.x(), qtRect.y(), qtRect.width(), qtRect.height());
+ HIShapeUnionWithRect(shape, &cgRect);
+ } else {
+ foreach (const QRect &qtRect, region.rects()) {
+ CGRect cgRect = CGRectMake(qtRect.x(), qtRect.y(), qtRect.width(), qtRect.height());
+ HIShapeUnionWithRect(shape, &cgRect);
+ }
+ }
+ return shape;
+}
+
+QRegion qt_mac_fromHIShapeRef(HIShapeRef shape)
+{
+ QRegion returnRegion;
+ //returnRegion.detach();
+ HIShapeEnumerate(shape, kHIShapeParseFromTopLeft, qt_mac_shape2QRegionHelper, &returnRegion);
+ return returnRegion;
+}
+
+CGColorSpaceRef m_genericColorSpace = 0;
+QHash<CGDirectDisplayID, CGColorSpaceRef> m_displayColorSpaceHash;
+bool m_postRoutineRegistered = false;
+
+CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget);
+CGColorSpaceRef qt_mac_genericColorSpace()
+{
+#if 0
+ if (!m_genericColorSpace) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) {
+ m_genericColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
+ } else
+#endif
+ {
+ m_genericColorSpace = CGColorSpaceCreateDeviceRGB();
+ }
+ if (!m_postRoutineRegistered) {
+ m_postRoutineRegistered = true;
+ qAddPostRoutine(QCoreGraphicsPaintEngine::cleanUpMacColorSpaces);
+ }
+ }
+ return m_genericColorSpace;
+#else
+ // Just return the main display colorspace for the moment.
+ return qt_mac_displayColorSpace(0);
+#endif
+}
+
+/*
+ Ideally, we should pass the widget in here, and use CGGetDisplaysWithRect() etc.
+ to support multiple displays correctly.
+*/
+CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget)
+{
+ CGColorSpaceRef colorSpace;
+
+ CGDirectDisplayID displayID;
+ CMProfileRef displayProfile = 0;
+ if (widget == 0) {
+ displayID = CGMainDisplayID();
+ } else {
+ displayID = CGMainDisplayID();
+ /*
+ ### get correct display
+ const QRect &qrect = widget->window()->geometry();
+ CGRect rect = CGRectMake(qrect.x(), qrect.y(), qrect.width(), qrect.height());
+ CGDisplayCount throwAway;
+ CGDisplayErr dErr = CGGetDisplaysWithRect(rect, 1, &displayID, &throwAway);
+ if (dErr != kCGErrorSuccess)
+ return macDisplayColorSpace(0); // fall back on main display
+ */
+ }
+ if ((colorSpace = m_displayColorSpaceHash.value(displayID)))
+ return colorSpace;
+
+ CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
+ if (err == noErr) {
+ colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile);
+ } else if (widget) {
+ return qt_mac_displayColorSpace(0); // fall back on main display
+ }
+
+ if (colorSpace == 0)
+ colorSpace = CGColorSpaceCreateDeviceRGB();
+
+ m_displayColorSpaceHash.insert(displayID, colorSpace);
+ CMCloseProfile(displayProfile);
+ if (!m_postRoutineRegistered) {
+ m_postRoutineRegistered = true;
+ void qt_mac_cleanUpMacColorSpaces();
+ qAddPostRoutine(qt_mac_cleanUpMacColorSpaces);
+ }
+ return colorSpace;
+}
+
+void qt_mac_cleanUpMacColorSpaces()
+{
+ if (m_genericColorSpace) {
+ CFRelease(m_genericColorSpace);
+ m_genericColorSpace = 0;
+ }
+ QHash<CGDirectDisplayID, CGColorSpaceRef>::const_iterator it = m_displayColorSpaceHash.constBegin();
+ while (it != m_displayColorSpaceHash.constEnd()) {
+ if (it.value())
+ CFRelease(it.value());
+ ++it;
+ }
+ m_displayColorSpaceHash.clear();
+}
+
+bool qt_macWindowIsTextured(const QWidget *window)
+{
+ NSWindow *nswindow = static_cast<NSWindow*>(
+ QApplication::platformNativeInterface()->nativeResourceForWindow("NSWindow", window->windowHandle()));
+ if (!nswindow)
+ return false;
+ return ([nswindow styleMask] & NSTexturedBackgroundWindowMask) ? true : false;
+}
/*****************************************************************************
QMacCGStyle globals
@@ -467,7 +690,7 @@ inline bool qt_mac_is_metal(const QWidget *w)
if (w->testAttribute(Qt::WA_MacBrushedMetal))
return true;
if (w->isWindow() && w->testAttribute(Qt::WA_WState_Created)) { // If not created will fall through to the opaque check and be fine anyway.
- return macWindowIsTextured(qt_mac_window_for(w));
+ return qt_macWindowIsTextured(w);
}
if (w->d_func()->isOpaque)
break;
@@ -1382,7 +1605,6 @@ void QMacStylePrivate::getSliderInfo(QStyle::ComplexControl cc, const QStyleOpti
tdi->trackInfo.scrollbar.viewsize = slider->pageStep;
}
}
-#endif
QMacStylePrivate::QMacStylePrivate(QMacStyle *style)
: timerID(-1), progressFrame(0), q(style), mouseDown(false)
@@ -1750,8 +1972,9 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QBrush
QPoint dummy;
const QPaintDevice *target = painter->device();
const QPaintDevice *redirected = QPainter::redirected(target, &dummy);
- const bool usePainter = redirected && redirected != target;
+ //const bool usePainter = redirected && redirected != target;
+#if 0
if (!usePainter && qt_mac_backgroundPattern
&& qt_mac_backgroundPattern->cacheKey() == brush.texture().cacheKey()) {
@@ -1772,10 +1995,11 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QBrush
CGContextRestoreGState(cg);
} else {
+#endif
const QRect rect(rgn.boundingRect());
painter->setClipRegion(rgn);
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
- }
+// }
}
void QMacStyle::polish(QPalette &pal)
@@ -1831,8 +2055,9 @@ void QMacStyle::polish(QWidget* w)
mtinfo.version = qt_mac_hitheme_version;
mtinfo.menuType = kThemeMenuTypePopUp;
HIRect rect = CGRectMake(0, 0, px.width(), px.height());
- HIThemeDrawMenuBackground(&rect, &mtinfo, QCFType<CGContextRef>(qt_mac_cg_context(&px)),
- kHIThemeOrientationNormal);
+ // ###
+ //HIThemeDrawMenuBackground(&rect, &mtinfo, QCFType<CGContextRef>(qt_mac_cg_context(&px)),
+ // kHIThemeOrientationNormal);
QPalette pal = w->palette();
QBrush background(px);
pal.setBrush(QPalette::All, QPalette::Window, background);
@@ -2309,11 +2534,12 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
ret = 100;
break;
case SH_ScrollBar_LeftClickAbsolutePosition: {
- extern bool qt_scrollbar_jump_to_pos; //qapplication_mac.cpp
if(QApplication::keyboardModifiers() & Qt::AltModifier)
- ret = !qt_scrollbar_jump_to_pos;
+ ret = false;
+ //ret = !qt_scrollbar_jump_to_pos;
else
- ret = qt_scrollbar_jump_to_pos;
+ ret = true;
+ //ret = qt_scrollbar_jump_to_pos;
break; }
case SH_TabBar_PreferNoArrows:
ret = true;
@@ -2547,7 +2773,8 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
mdi.menuType = kThemeMenuTypePopUp;
QCFType<HIShapeRef> shape;
HIThemeGetMenuBackgroundShape(&menuRect, &mdi, &shape);
- mask->region = QRegion::fromHIShapeRef(shape);
+
+ mask->region = qt_mac_fromHIShapeRef(shape);
}
}
break;
@@ -3404,7 +3631,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
QColor textColor = btn->palette.buttonText().color();
CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
textColor.blueF(), textColor.alphaF() };
- CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
+ CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
tti.fontID = themeId;
tti.horizontalFlushness = kHIThemeTextHorizontalFlushCenter;
@@ -3629,7 +3856,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
QColor textColor = myTab.palette.windowText().color();
CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
textColor.blueF(), textColor.alphaF() };
- CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
+ CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
switch (d->aquaSizeConstrain(opt, w)) {
default:
@@ -3810,7 +4037,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
QColor textColor = p->pen().color();
CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
textColor.blueF(), textColor.alphaF() };
- CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
+ CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
HIThemeTextInfo tti;
tti.version = qt_mac_hitheme_version;
@@ -4946,7 +5173,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
QColor textColor = groupBox->palette.windowText().color();
CGFloat colorComp[] = { textColor.redF(), textColor.greenF(),
textColor.blueF(), textColor.alphaF() };
- CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace());
+ CGContextSetFillColorSpace(cg, qt_mac_genericColorSpace());
CGContextSetFillColor(cg, colorComp);
tti.fontID = checkable ? kThemeSystemFont : kThemeSmallSystemFont;
tti.horizontalFlushness = kHIThemeTextHorizontalFlushCenter;
@@ -6075,4 +6302,135 @@ int QMacStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1,
return_SIZE(10, 8, 6); // guess
}
+void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform)
+{
+ CGAffineTransform old_xform = CGAffineTransformIdentity;
+ if (orig_xform) { //setup xforms
+ old_xform = CGContextGetCTM(hd);
+ CGContextConcatCTM(hd, CGAffineTransformInvert(old_xform));
+ CGContextConcatCTM(hd, *orig_xform);
+ }
+
+ //do the clipping
+ CGContextBeginPath(hd);
+ if (rgn.isEmpty()) {
+ CGContextAddRect(hd, CGRectMake(0, 0, 0, 0));
+ } else {
+ QCFType<HIMutableShapeRef> shape = qt_mac_toHIMutableShape(rgn);
+ Q_ASSERT(!HIShapeIsEmpty(shape));
+ HIShapeReplacePathInCGContext(shape, hd);
+ }
+ CGContextClip(hd);
+
+ if (orig_xform) {//reset xforms
+ CGContextConcatCTM(hd, CGAffineTransformInvert(CGContextGetCTM(hd)));
+ CGContextConcatCTM(hd, old_xform);
+ }
+}
+
+QMacCGContext::QMacCGContext(QPainter *p)
+{
+ QPaintEngine *pe = p->paintEngine();
+ pe->syncState();
+ context = 0;
+
+ int devType = p->device()->devType();
+ if (pe->type() == QPaintEngine::Raster
+ && (devType == QInternal::Widget ||
+ devType == QInternal::Pixmap ||
+ devType == QInternal::Image)) {
+
+ extern CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice);
+ CGColorSpaceRef colorspace = qt_mac_colorSpaceForDeviceType(pe->paintDevice());
+ uint flags = kCGImageAlphaPremultipliedFirst;
+ flags |= kCGBitmapByteOrder32Host;
+
+ const QImage *image = (const QImage *) pe->paintDevice();
+
+ context = CGBitmapContextCreate((void *) image->bits(), image->width(), image->height(),
+ 8, image->bytesPerLine(), colorspace, flags);
+
+ CGContextTranslateCTM(context, 0, image->height());
+ CGContextScaleCTM(context, 1, -1);
+
+ if (devType == QInternal::Widget) {
+ QRegion clip = p->paintEngine()->systemClip();
+ QTransform native = p->deviceTransform();
+ QTransform logical = p->combinedTransform();
+
+ if (p->hasClipping()) {
+ QRegion r = p->clipRegion();
+ r.translate(native.dx(), native.dy());
+ if (clip.isEmpty())
+ clip = r;
+ else
+ clip &= r;
+ }
+ qt_mac_clip_cg(context, clip, 0);
+
+ CGContextTranslateCTM(context, native.dx(), native.dy());
+ }
+ } else {
+ qDebug() << "QMacCGContext:: Unsupported painter devtype type" << devType;
+ }
+}
+
+CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice)
+{
+ bool isWidget = (paintDevice->devType() == QInternal::Widget);
+ return qt_mac_displayColorSpace(isWidget ? static_cast<const QWidget *>(paintDevice) : 0);
+}
+
+/*! \internal
+
+ Returns the CoreGraphics CGContextRef of the paint device. 0 is
+ returned if it can't be obtained. It is the caller's responsibility to
+ CGContextRelease the context when finished using it.
+
+ \warning This function is only available on Mac OS X.
+*/
+
+CGContextRef qt_mac_cg_context(const QPaintDevice *pdev)
+{
+ if (pdev->devType() == QInternal::Pixmap) {
+ const QPixmap *pm = static_cast<const QPixmap*>(pdev);
+ CGColorSpaceRef colorspace = qt_mac_colorSpaceForDeviceType(pdev);
+ uint flags = kCGImageAlphaPremultipliedFirst;
+ flags |= kCGBitmapByteOrder32Host;
+ CGContextRef ret = 0;
+
+ QPlatformPixmap *data = const_cast<QPixmap *>(pm)->data_ptr().data();
+ if (data->classId() == QPlatformPixmap::RasterClass) {
+ QImage *image = data->buffer();
+ ret = CGBitmapContextCreate(image->bits(), image->width(), image->height(),
+ 8, image->bytesPerLine(), colorspace, flags);
+ } else {
+ qDebug() << "qt_mac_cg_context: Unsupported pixmap class";
+ }
+
+ CGContextTranslateCTM(ret, 0, pm->height());
+ CGContextScaleCTM(ret, 1, -1);
+ return ret;
+ } else if (pdev->devType() == QInternal::Widget) {
+ //CGContextRef ret = static_cast<CGContextRef>(static_cast<const QWidget *>(pdev)->macCGHandle());
+ ///CGContextRetain(ret);
+ //return ret;
+ qDebug() << "qt_mac_cg_context: not implemented: Widget class";
+ return 0;
+ }
+ return 0;
+}
+
+/*
+FontHash::FontHash()
+{
+ QHash<QByteArray, QFont>::operator=(QGuiApplicationPrivate::platformIntegration()->fontDatabase()->defaultFonts());
+}
+
+Q_GLOBAL_STATIC(FontHash, app_fonts)
+FontHash *qt_app_fonts_hash()
+{
+ return app_fonts();
+}
+*/
QT_END_NAMESPACE
diff --git a/src/widgets/styles/qmacstyle_mac_p.h b/src/widgets/styles/qmacstyle_mac_p.h
index 747779249c..1739a382f3 100644
--- a/src/widgets/styles/qmacstyle_mac_p.h
+++ b/src/widgets/styles/qmacstyle_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,13 +43,13 @@
#ifndef QMACSTYLE_MAC_P_H
#define QMACSTYLE_MAC_P_H
-#include <qmacstyle_mac.h>
+#include <Carbon/Carbon.h>
+#undef check
+
+#include "qmacstyle_mac.h"
#include <private/qapplication_p.h>
#include <private/qcombobox_p.h>
-#include <private/qmacstylepixmaps_mac_p.h>
-#include <private/qpaintengine_mac_p.h>
#include <private/qpainter_p.h>
-#include <private/qprintengine_mac_p.h>
#include <private/qstylehelper_p.h>
#include <qapplication.h>
#include <qbitmap.h>
@@ -94,7 +94,8 @@
#include <qmath.h>
#include <QtWidgets/qgraphicsproxywidget.h>
#include <QtWidgets/qgraphicsview.h>
-#include <private/qt_cocoa_helpers_mac_p.h>
+
+
//
// W A R N I N G
@@ -109,21 +110,6 @@
QT_BEGIN_NAMESPACE
-#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)
-enum {
- kThemePushButtonTextured = 31,
- kThemePushButtonTexturedSmall = 32,
- kThemePushButtonTexturedMini = 33
-};
-
-/* Search fields */
-enum {
- kHIThemeFrameTextFieldRound = 1000,
- kHIThemeFrameTextFieldRoundSmall = 1001,
- kHIThemeFrameTextFieldRoundMini = 1002
-};
-#endif
-
/*
AHIG:
Apple Human Interface Guidelines
diff --git a/src/widgets/styles/qmacstylepixmaps_mac_p.h b/src/widgets/styles/qmacstylepixmaps_mac_p.h
index 7bd1a2b43e..3f852a63f3 100644
--- a/src/widgets/styles/qmacstylepixmaps_mac_p.h
+++ b/src/widgets/styles/qmacstylepixmaps_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qmotifstyle.cpp b/src/widgets/styles/qmotifstyle.cpp
index 46a64eb575..fc697454c1 100644
--- a/src/widgets/styles/qmotifstyle.cpp
+++ b/src/widgets/styles/qmotifstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qmotifstyle.h b/src/widgets/styles/qmotifstyle.h
index 35b3448289..0aa506d2ac 100644
--- a/src/widgets/styles/qmotifstyle.h
+++ b/src/widgets/styles/qmotifstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qmotifstyle_p.h b/src/widgets/styles/qmotifstyle_p.h
index 90e0c6d530..83394059e8 100644
--- a/src/widgets/styles/qmotifstyle_p.h
+++ b/src/widgets/styles/qmotifstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qplastiquestyle.cpp b/src/widgets/styles/qplastiquestyle.cpp
index 65e269f800..750d0765ef 100644
--- a/src/widgets/styles/qplastiquestyle.cpp
+++ b/src/widgets/styles/qplastiquestyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qplastiquestyle.h b/src/widgets/styles/qplastiquestyle.h
index d0afce6cf0..837e07a75f 100644
--- a/src/widgets/styles/qplastiquestyle.h
+++ b/src/widgets/styles/qplastiquestyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qproxystyle.cpp b/src/widgets/styles/qproxystyle.cpp
index b41e85f31c..56e3dc56b4 100644
--- a/src/widgets/styles/qproxystyle.cpp
+++ b/src/widgets/styles/qproxystyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qproxystyle.h b/src/widgets/styles/qproxystyle.h
index 96c5c34f18..e5d05eb3e5 100644
--- a/src/widgets/styles/qproxystyle.h
+++ b/src/widgets/styles/qproxystyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qproxystyle_p.h b/src/widgets/styles/qproxystyle_p.h
index 9ccd382cd3..3dc960afcd 100644
--- a/src/widgets/styles/qproxystyle_p.h
+++ b/src/widgets/styles/qproxystyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 44b8f3bc0f..e4000bef19 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index 6b296871d4..fcc8412414 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h
index dfb0e95731..3fd221938d 100644
--- a/src/widgets/styles/qstyle_p.h
+++ b/src/widgets/styles/qstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp
index 8c1b9cb7e1..cc19a895d0 100644
--- a/src/widgets/styles/qstylefactory.cpp
+++ b/src/widgets/styles/qstylefactory.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,7 +75,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_STYLE_MAC) && defined(Q_WS_MAC)
+#if !defined(QT_NO_STYLE_MAC) && defined(Q_OS_MAC)
QT_BEGIN_INCLUDE_NAMESPACE
# include "qmacstyle_mac.h"
QT_END_INCLUDE_NAMESPACE
diff --git a/src/widgets/styles/qstylefactory.h b/src/widgets/styles/qstylefactory.h
index b972c8e0e6..f98d37b26e 100644
--- a/src/widgets/styles/qstylefactory.h
+++ b/src/widgets/styles/qstylefactory.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp
index bf7cb49bcf..8f2d7364c1 100644
--- a/src/widgets/styles/qstylehelper.cpp
+++ b/src/widgets/styles/qstylehelper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,17 +46,13 @@
#include <private/qstyle_p.h>
#include <qmath.h>
-#if defined(Q_WS_WIN)
-#include "qt_windows.h"
-#elif defined(Q_WS_MAC)
-#include <private/qt_cocoa_helpers_mac_p.h>
-#endif
-
#include "qstylehelper_p.h"
#include <qstringbuilder.h>
QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT int qt_defaultDpiX();
+
namespace QStyleHelper {
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
@@ -81,20 +77,7 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &
qreal dpiScaled(qreal value)
{
- static qreal scale = -1;
- if (scale < 0) {
- scale = 1.0;
-#if defined(Q_WS_WIN)
- {
- HDC hdcScreen = GetDC(0);
- int dpi = GetDeviceCaps(hdcScreen, LOGPIXELSX);
- ReleaseDC(0, hdcScreen);
- scale = dpi/96.0;
- }
-#elif defined(Q_WS_MAC)
- scale = qt_mac_get_scalefactor();
-#endif
- }
+ static const qreal scale = qreal(qt_defaultDpiX()) / 96.0;
return value * scale;
}
diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h
index f2bb81929c..a193e2ec78 100644
--- a/src/widgets/styles/qstylehelper_p.h
+++ b/src/widgets/styles/qstylehelper_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 01e3f0e384..0e4a1e98f8 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 0640eef606..56203a6615 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylepainter.cpp b/src/widgets/styles/qstylepainter.cpp
index 3dc3f9dce7..9870f01dd0 100644
--- a/src/widgets/styles/qstylepainter.cpp
+++ b/src/widgets/styles/qstylepainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylepainter.h b/src/widgets/styles/qstylepainter.h
index ccb591c0f9..56c6684507 100644
--- a/src/widgets/styles/qstylepainter.h
+++ b/src/widgets/styles/qstylepainter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyleplugin.cpp b/src/widgets/styles/qstyleplugin.cpp
index 836f388c23..8a169d9797 100644
--- a/src/widgets/styles/qstyleplugin.cpp
+++ b/src/widgets/styles/qstyleplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstyleplugin.h b/src/widgets/styles/qstyleplugin.h
index ab55cdf54c..c9a35caaa4 100644
--- a/src/widgets/styles/qstyleplugin.h
+++ b/src/widgets/styles/qstyleplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index ab611aedde..b384ff7681 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylesheetstyle_default.cpp b/src/widgets/styles/qstylesheetstyle_default.cpp
index c9cfc435fa..580232f326 100644
--- a/src/widgets/styles/qstylesheetstyle_default.cpp
+++ b/src/widgets/styles/qstylesheetstyle_default.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h
index 1d38627edf..2d89f784d4 100644
--- a/src/widgets/styles/qstylesheetstyle_p.h
+++ b/src/widgets/styles/qstylesheetstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowscestyle.cpp b/src/widgets/styles/qwindowscestyle.cpp
index 39174f9855..fd3a391e54 100644
--- a/src/widgets/styles/qwindowscestyle.cpp
+++ b/src/widgets/styles/qwindowscestyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowscestyle.h b/src/widgets/styles/qwindowscestyle.h
index 3db9be58e2..dbb83a910e 100644
--- a/src/widgets/styles/qwindowscestyle.h
+++ b/src/widgets/styles/qwindowscestyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowscestyle_p.h b/src/widgets/styles/qwindowscestyle_p.h
index d32ac99d52..6b3b9a8bfe 100644
--- a/src/widgets/styles/qwindowscestyle_p.h
+++ b/src/widgets/styles/qwindowscestyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsmobilestyle.cpp b/src/widgets/styles/qwindowsmobilestyle.cpp
index 1e029a30e0..efba73fe80 100644
--- a/src/widgets/styles/qwindowsmobilestyle.cpp
+++ b/src/widgets/styles/qwindowsmobilestyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsmobilestyle.h b/src/widgets/styles/qwindowsmobilestyle.h
index 050f641888..65eb08707f 100644
--- a/src/widgets/styles/qwindowsmobilestyle.h
+++ b/src/widgets/styles/qwindowsmobilestyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsmobilestyle_p.h b/src/widgets/styles/qwindowsmobilestyle_p.h
index 32ebe911ef..23b395e3a6 100644
--- a/src/widgets/styles/qwindowsmobilestyle_p.h
+++ b/src/widgets/styles/qwindowsmobilestyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index f883ace67e..1029433fe6 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -392,16 +392,9 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
break;
#endif
case PM_MaximumDragDistance:
-#if defined(Q_OS_WIN)
- {
- HDC hdcScreen = GetDC(0);
- int dpi = GetDeviceCaps(hdcScreen, LOGPIXELSX);
- ReleaseDC(0, hdcScreen);
- ret = (int)(dpi * 1.375);
- }
-#else
- ret = 60;
-#endif
+ ret = QCommonStyle::pixelMetric(PM_MaximumDragDistance);
+ if (ret == -1)
+ ret = 60;
break;
#ifndef QT_NO_SLIDER
@@ -530,13 +523,6 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
ret = GetSystemMetrics(SM_CYFRAME);
#endif
break;
- case PM_TextCursorWidth: {
- DWORD caretWidth = 1;
-#if defined(SPI_GETCARETWIDTH)
- SystemParametersInfo(SPI_GETCARETWIDTH, 0, &caretWidth, 0);
-#endif
- ret = (int)caretWidth;
- break; }
#endif
case PM_ToolBarItemMargin:
ret = 1;
diff --git a/src/widgets/styles/qwindowsstyle.h b/src/widgets/styles/qwindowsstyle.h
index acecfa9140..5392409882 100644
--- a/src/widgets/styles/qwindowsstyle.h
+++ b/src/widgets/styles/qwindowsstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsstyle_p.h b/src/widgets/styles/qwindowsstyle_p.h
index 1e517e9e79..9861172873 100644
--- a/src/widgets/styles/qwindowsstyle_p.h
+++ b/src/widgets/styles/qwindowsstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index d83ad855c2..bbc07a5bd9 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsvistastyle.h b/src/widgets/styles/qwindowsvistastyle.h
index 68b489107e..dec8f16aee 100644
--- a/src/widgets/styles/qwindowsvistastyle.h
+++ b/src/widgets/styles/qwindowsvistastyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsvistastyle_p.h b/src/widgets/styles/qwindowsvistastyle_p.h
index 4167bc4d0f..8ed2ec421e 100644
--- a/src/widgets/styles/qwindowsvistastyle_p.h
+++ b/src/widgets/styles/qwindowsvistastyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp
index 8b13794d05..d8b33f3b0f 100644
--- a/src/widgets/styles/qwindowsxpstyle.cpp
+++ b/src/widgets/styles/qwindowsxpstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsxpstyle.h b/src/widgets/styles/qwindowsxpstyle.h
index 1cfd16479b..87bccc2271 100644
--- a/src/widgets/styles/qwindowsxpstyle.h
+++ b/src/widgets/styles/qwindowsxpstyle.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/qwindowsxpstyle_p.h b/src/widgets/styles/qwindowsxpstyle_p.h
index 05ab2ec2e4..1fb89cb478 100644
--- a/src/widgets/styles/qwindowsxpstyle_p.h
+++ b/src/widgets/styles/qwindowsxpstyle_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/styles/styles.pri b/src/widgets/styles/styles.pri
index cf7ee5a0a4..ef6827f74f 100644
--- a/src/widgets/styles/styles.pri
+++ b/src/widgets/styles/styles.pri
@@ -37,8 +37,7 @@ contains( styles, all ) {
styles = mac windows windowsxp windowsvista
}
-# TODO, re-enable qmacstyle in tests/auto/widgets/styles/sytles.pro when done
-styles -= mac
+!macx-*:styles -= mac
x11{
QMAKE_CXXFLAGS += $$QT_CFLAGS_QGTKSTYLE
diff --git a/src/widgets/util/qcolormap.h b/src/widgets/util/qcolormap.h
index ebb5142768..c0c3643985 100644
--- a/src/widgets/util/qcolormap.h
+++ b/src/widgets/util/qcolormap.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qcolormap.qdoc b/src/widgets/util/qcolormap.qdoc
index 88deabcfd6..fd6da862ec 100644
--- a/src/widgets/util/qcolormap.qdoc
+++ b/src/widgets/util/qcolormap.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qcolormap_qpa.cpp b/src/widgets/util/qcolormap_qpa.cpp
index 6ad3abb3aa..284809af24 100644
--- a/src/widgets/util/qcolormap_qpa.cpp
+++ b/src/widgets/util/qcolormap_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index e99dd9ffc5..aa38aba08e 100644
--- a/src/widgets/util/qcompleter.cpp
+++ b/src/widgets/util/qcompleter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -147,7 +147,7 @@
#ifndef QT_NO_COMPLETER
#include "QtWidgets/qscrollbar.h"
-#include "QtWidgets/qstringlistmodel.h"
+#include "QtCore/qstringlistmodel.h"
#include "QtWidgets/qdirmodel.h"
#include "QtWidgets/qfilesystemmodel.h"
#include "QtWidgets/qheaderview.h"
diff --git a/src/widgets/util/qcompleter.h b/src/widgets/util/qcompleter.h
index c7e1b6e945..68fe22f88f 100644
--- a/src/widgets/util/qcompleter.h
+++ b/src/widgets/util/qcompleter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qcompleter_p.h b/src/widgets/util/qcompleter_p.h
index 639c875568..94287c1ebf 100644
--- a/src/widgets/util/qcompleter_p.h
+++ b/src/widgets/util/qcompleter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,7 +59,7 @@
#ifndef QT_NO_COMPLETER
#include "QtWidgets/qtreeview.h"
-#include "QtWidgets/qabstractproxymodel.h"
+#include "QtCore/qabstractproxymodel.h"
#include "qcompleter.h"
#include "QtWidgets/qitemdelegate.h"
#include "QtGui/qpainter.h"
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index fbbefcf89f..843a2fa95c 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qflickgesture_p.h b/src/widgets/util/qflickgesture_p.h
index 23c8b6e788..6a9630ede6 100644
--- a/src/widgets/util/qflickgesture_p.h
+++ b/src/widgets/util/qflickgesture_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index 2ab19c40ab..fac6809ac6 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1524,10 +1524,8 @@ void QScrollerPrivate::handleDrag(const QPointF &position, qint64 timestamp)
dragDistance += deltaPixel;
// }
//qScrollerDebug() << "######################" << deltaPixel << position.y() << lastPosition.y();
- if (canScrollX)
- lastPosition.setX(position.x());
- if (canScrollY)
- lastPosition.setY(position.y());
+
+ lastPosition = position;
lastTimestamp = timestamp;
}
diff --git a/src/widgets/util/qscroller.h b/src/widgets/util/qscroller.h
index 3484139cbb..01d45a908e 100644
--- a/src/widgets/util/qscroller.h
+++ b/src/widgets/util/qscroller.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qscroller_mac.mm b/src/widgets/util/qscroller_mac.mm
index 81d18aaf6b..495469a04b 100644
--- a/src/widgets/util/qscroller_mac.mm
+++ b/src/widgets/util/qscroller_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qscroller_p.h b/src/widgets/util/qscroller_p.h
index b4f4db5e34..3b9fa988fe 100644
--- a/src/widgets/util/qscroller_p.h
+++ b/src/widgets/util/qscroller_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qscrollerproperties.cpp b/src/widgets/util/qscrollerproperties.cpp
index dda83c2b33..3a41aa7eb9 100644
--- a/src/widgets/util/qscrollerproperties.cpp
+++ b/src/widgets/util/qscrollerproperties.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qscrollerproperties.h b/src/widgets/util/qscrollerproperties.h
index 73c1125fe0..e7bcdbebe3 100644
--- a/src/widgets/util/qscrollerproperties.h
+++ b/src/widgets/util/qscrollerproperties.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qscrollerproperties_p.h b/src/widgets/util/qscrollerproperties_p.h
index 2e57a3f7dd..8c51f7aa4b 100644
--- a/src/widgets/util/qscrollerproperties_p.h
+++ b/src/widgets/util/qscrollerproperties_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index 3ca5d459a7..5803c2fef4 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon.h b/src/widgets/util/qsystemtrayicon.h
index 3327ce4223..0f1e7d74ee 100644
--- a/src/widgets/util/qsystemtrayicon.h
+++ b/src/widgets/util/qsystemtrayicon.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon_mac.mm b/src/widgets/util/qsystemtrayicon_mac.mm
index 5553c63723..278fa72a1a 100644
--- a/src/widgets/util/qsystemtrayicon_mac.mm
+++ b/src/widgets/util/qsystemtrayicon_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon_p.h b/src/widgets/util/qsystemtrayicon_p.h
index ce2404ae8b..7b743021e0 100644
--- a/src/widgets/util/qsystemtrayicon_p.h
+++ b/src/widgets/util/qsystemtrayicon_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp
index 9a4f12d02d..ce0e067648 100644
--- a/src/widgets/util/qsystemtrayicon_qpa.cpp
+++ b/src/widgets/util/qsystemtrayicon_qpa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon_win.cpp b/src/widgets/util/qsystemtrayicon_win.cpp
index 7a572849b0..6045116da5 100644
--- a/src/widgets/util/qsystemtrayicon_win.cpp
+++ b/src/widgets/util/qsystemtrayicon_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon_wince.cpp b/src/widgets/util/qsystemtrayicon_wince.cpp
index 7a403a3ee5..b1dbb8b85e 100644
--- a/src/widgets/util/qsystemtrayicon_wince.cpp
+++ b/src/widgets/util/qsystemtrayicon_wince.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp
index 86c27499b4..3ac3755f84 100644
--- a/src/widgets/util/qsystemtrayicon_x11.cpp
+++ b/src/widgets/util/qsystemtrayicon_x11.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundogroup.cpp b/src/widgets/util/qundogroup.cpp
index 44c00afe98..fd063b7e9f 100644
--- a/src/widgets/util/qundogroup.cpp
+++ b/src/widgets/util/qundogroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundogroup.h b/src/widgets/util/qundogroup.h
index ce2dac2503..fe06a678eb 100644
--- a/src/widgets/util/qundogroup.h
+++ b/src/widgets/util/qundogroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundostack.cpp b/src/widgets/util/qundostack.cpp
index 9841a09ce6..5f2ba870e0 100644
--- a/src/widgets/util/qundostack.cpp
+++ b/src/widgets/util/qundostack.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundostack.h b/src/widgets/util/qundostack.h
index 493d11fdb7..fc2c82ecf4 100644
--- a/src/widgets/util/qundostack.h
+++ b/src/widgets/util/qundostack.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundostack_p.h b/src/widgets/util/qundostack_p.h
index 1e5f99bc6c..31dff8452c 100644
--- a/src/widgets/util/qundostack_p.h
+++ b/src/widgets/util/qundostack_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundoview.cpp b/src/widgets/util/qundoview.cpp
index c95e89f76e..c498355f1f 100644
--- a/src/widgets/util/qundoview.cpp
+++ b/src/widgets/util/qundoview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/util/qundoview.h b/src/widgets/util/qundoview.h
index 9df2995f9d..ee944dd259 100644
--- a/src/widgets/util/qundoview.h
+++ b/src/widgets/util/qundoview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index ae5b06024a..efe0ff3389 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractbutton.h b/src/widgets/widgets/qabstractbutton.h
index 6527c6cd32..9b3aa5642a 100644
--- a/src/widgets/widgets/qabstractbutton.h
+++ b/src/widgets/widgets/qabstractbutton.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractbutton_p.h b/src/widgets/widgets/qabstractbutton_p.h
index d2d4c06bff..9688d27773 100644
--- a/src/widgets/widgets/qabstractbutton_p.h
+++ b/src/widgets/widgets/qabstractbutton_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 801160d080..655ed83069 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -572,7 +572,7 @@ void QAbstractScrollArea::setViewport(QWidget *widget)
d->layoutChildren();
if (isVisible())
d->viewport->show();
- QMetaObject::invokeMethod(this, "setupViewport", Q_ARG(QWidget *, widget));
+ setupViewport(widget);
delete oldViewport;
}
}
diff --git a/src/widgets/widgets/qabstractscrollarea.h b/src/widgets/widgets/qabstractscrollarea.h
index 3f2a273297..fe602468f9 100644
--- a/src/widgets/widgets/qabstractscrollarea.h
+++ b/src/widgets/widgets/qabstractscrollarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -90,8 +90,7 @@ public:
QSize sizeHint() const;
-protected Q_SLOTS:
- void setupViewport(QWidget *viewport);
+ virtual void setupViewport(QWidget *viewport);
protected:
QAbstractScrollArea(QAbstractScrollAreaPrivate &dd, QWidget *parent = 0);
diff --git a/src/widgets/widgets/qabstractscrollarea_p.h b/src/widgets/widgets/qabstractscrollarea_p.h
index 5511d08f4e..2fe7e4423a 100644
--- a/src/widgets/widgets/qabstractscrollarea_p.h
+++ b/src/widgets/widgets/qabstractscrollarea_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp
index 694db0e125..d3dddde409 100644
--- a/src/widgets/widgets/qabstractslider.cpp
+++ b/src/widgets/widgets/qabstractslider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -943,60 +943,4 @@ bool QAbstractSlider::event(QEvent *e)
return QWidget::event(e);
}
-/*! \fn int QAbstractSlider::minValue() const
-
- Use minimum() instead.
-*/
-
-/*! \fn int QAbstractSlider::maxValue() const
-
- Use maximum() instead.
-*/
-
-/*! \fn int QAbstractSlider::lineStep() const
-
- Use singleStep() instead.
-*/
-
-/*! \fn void QAbstractSlider::setMinValue(int v)
-
- Use setMinimum() instead.
-*/
-
-/*! \fn void QAbstractSlider::setMaxValue(int v)
-
- Use setMaximum() instead.
-*/
-
-/*! \fn void QAbstractSlider::setLineStep(int v)
-
- Use setSingleStep() instead.
-*/
-
-/*! \fn void QAbstractSlider::addPage()
-
- Use triggerAction(QAbstractSlider::SliderPageStepAdd) instead.
-*/
-
-/*! \fn void QAbstractSlider::subtractPage()
-
- Use triggerAction(QAbstractSlider::SliderPageStepSub) instead.
-*/
-
-/*! \fn void QAbstractSlider::addLine()
-
- Use triggerAction(QAbstractSlider::SliderSingleStepAdd) instead.
-*/
-
-/*! \fn void QAbstractSlider::subtractLine()
-
- Use triggerAction(QAbstractSlider::SliderSingleStepSub) instead.
-*/
-
-/*! \fn void QAbstractSlider::setSteps(int single, int page)
-
- Use setSingleStep(\a single) followed by setPageStep(\a page)
- instead.
-*/
-
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qabstractslider.h b/src/widgets/widgets/qabstractslider.h
index b1f63a2c89..a19fc37451 100644
--- a/src/widgets/widgets/qabstractslider.h
+++ b/src/widgets/widgets/qabstractslider.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractslider_p.h b/src/widgets/widgets/qabstractslider_p.h
index fdbc0f9534..a4589c5d18 100644
--- a/src/widgets/widgets/qabstractslider_p.h
+++ b/src/widgets/widgets/qabstractslider_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index 82340d15ed..4f5a135842 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,6 +48,7 @@
#ifndef QT_NO_SPINBOX
#include <qapplication.h>
+#include <qstylehints.h>
#include <qclipboard.h>
#include <qdatetime.h>
#include <qdatetimeedit.h>
@@ -1169,15 +1170,6 @@ void QAbstractSpinBox::hideEvent(QHideEvent *event)
Remember that time value should be given in msecs.
*/
-static int getKeyboardAutoRepeatRate() {
- int ret = 30;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- DWORD time;
- if (SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &time, 0) != FALSE)
- ret = static_cast<int>(1000 / static_cast<int>(time)); // msecs
-#endif
- return ret; // msecs
-}
/*!
\reimp
@@ -1192,7 +1184,7 @@ void QAbstractSpinBox::timerEvent(QTimerEvent *event)
killTimer(d->spinClickThresholdTimerId);
d->spinClickThresholdTimerId = -1;
d->effectiveSpinRepeatRate = d->buttonState & Keyboard
- ? getKeyboardAutoRepeatRate()
+ ? qApp->styleHints()->keyboardAutoRepeatRate()
: d->spinClickTimerInterval;
d->spinClickTimerId = startTimer(d->effectiveSpinRepeatRate);
doStep = true;
diff --git a/src/widgets/widgets/qabstractspinbox.h b/src/widgets/widgets/qabstractspinbox.h
index fb3ae2f5ee..8f963dce0d 100644
--- a/src/widgets/widgets/qabstractspinbox.h
+++ b/src/widgets/widgets/qabstractspinbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qabstractspinbox_p.h b/src/widgets/widgets/qabstractspinbox_p.h
index 33d4e32875..67a09622a2 100644
--- a/src/widgets/widgets/qabstractspinbox_p.h
+++ b/src/widgets/widgets/qabstractspinbox_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qbuttongroup.cpp b/src/widgets/widgets/qbuttongroup.cpp
index 101488a359..992c542674 100644
--- a/src/widgets/widgets/qbuttongroup.cpp
+++ b/src/widgets/widgets/qbuttongroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -258,13 +258,3 @@
\sa setId()
*/
-
-/*! \fn void QButtonGroup::insert(QAbstractButton *b)
-
- Use addButton() instead.
-*/
-
-/*! \fn void QButtonGroup::remove(QAbstractButton *b)
-
- Use removeButton() instead.
-*/
diff --git a/src/widgets/widgets/qbuttongroup.h b/src/widgets/widgets/qbuttongroup.h
index 56f93c0332..17c60e9609 100644
--- a/src/widgets/widgets/qbuttongroup.h
+++ b/src/widgets/widgets/qbuttongroup.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcalendartextnavigator_p.h b/src/widgets/widgets/qcalendartextnavigator_p.h
index b602c6d51e..2ce5233cec 100644
--- a/src/widgets/widgets/qcalendartextnavigator_p.h
+++ b/src/widgets/widgets/qcalendartextnavigator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index f16a594953..3bd1e3ec4f 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcalendarwidget.h b/src/widgets/widgets/qcalendarwidget.h
index e73192c12d..1ab519386e 100644
--- a/src/widgets/widgets/qcalendarwidget.h
+++ b/src/widgets/widgets/qcalendarwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index cd49747f8c..386bd2b169 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcheckbox.h b/src/widgets/widgets/qcheckbox.h
index d9a1aaaf3d..37461f1f10 100644
--- a/src/widgets/widgets/qcheckbox.h
+++ b/src/widgets/widgets/qcheckbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcocoatoolbardelegate_mac.mm b/src/widgets/widgets/qcocoatoolbardelegate_mac.mm
index c6be7f131c..1127d01b19 100644
--- a/src/widgets/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/widgets/widgets/qcocoatoolbardelegate_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h b/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h
index 846c6933d8..56a4f4f062 100644
--- a/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h
+++ b/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 2764833b48..4cbd7eab7d 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index e297dae1b5..4a5050b945 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 2d3f261d6e..a9d792f07d 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp
index afd14f63c5..d61eeb6131 100644
--- a/src/widgets/widgets/qcommandlinkbutton.cpp
+++ b/src/widgets/widgets/qcommandlinkbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qcommandlinkbutton.h b/src/widgets/widgets/qcommandlinkbutton.h
index 9d01e37b1b..726e0360d2 100644
--- a/src/widgets/widgets/qcommandlinkbutton.h
+++ b/src/widgets/widgets/qcommandlinkbutton.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index f6b52658c7..871a394a80 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdatetimeedit.h b/src/widgets/widgets/qdatetimeedit.h
index a57a5f29e9..77c76c483e 100644
--- a/src/widgets/widgets/qdatetimeedit.h
+++ b/src/widgets/widgets/qdatetimeedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdatetimeedit_p.h b/src/widgets/widgets/qdatetimeedit_p.h
index 57799d5bc0..0669c7c330 100644
--- a/src/widgets/widgets/qdatetimeedit_p.h
+++ b/src/widgets/widgets/qdatetimeedit_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
index bc77faf993..26cea362c2 100644
--- a/src/widgets/widgets/qdial.cpp
+++ b/src/widgets/widgets/qdial.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -488,24 +488,6 @@ bool QDial::event(QEvent *e)
return QAbstractSlider::event(e);
}
-/*!
- \fn void QDial::dialPressed();
-
- Use QAbstractSlider::sliderPressed() instead.
-*/
-
-/*!
- \fn void QDial::dialMoved(int value);
-
- Use QAbstractSlider::sliderMoved() instead.
-*/
-
-/*!
- \fn void QDial::dialReleased();
-
- Use QAbstractSlider::sliderReleased() instead.
-*/
-
QT_END_NAMESPACE
#endif // QT_NO_DIAL
diff --git a/src/widgets/widgets/qdial.h b/src/widgets/widgets/qdial.h
index 317a50df35..724028d129 100644
--- a/src/widgets/widgets/qdial.h
+++ b/src/widgets/widgets/qdial.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index 8085369a3f..e53bd55129 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdialogbuttonbox.h b/src/widgets/widgets/qdialogbuttonbox.h
index 0a6e231e3f..2fca5a5791 100644
--- a/src/widgets/widgets/qdialogbuttonbox.h
+++ b/src/widgets/widgets/qdialogbuttonbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp
index 1a1f16a493..1acd93ed60 100644
--- a/src/widgets/widgets/qdockarealayout.cpp
+++ b/src/widgets/widgets/qdockarealayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdockarealayout_p.h b/src/widgets/widgets/qdockarealayout_p.h
index a341ad487b..46ac966798 100644
--- a/src/widgets/widgets/qdockarealayout_p.h
+++ b/src/widgets/widgets/qdockarealayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index c02c13fe1e..32a73c54ed 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdockwidget.h b/src/widgets/widgets/qdockwidget.h
index cc81db2fc2..d6270e4a99 100644
--- a/src/widgets/widgets/qdockwidget.h
+++ b/src/widgets/widgets/qdockwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h
index 4d3c4f4d70..2bf50d8aa6 100644
--- a/src/widgets/widgets/qdockwidget_p.h
+++ b/src/widgets/widgets/qdockwidget_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index adf1cc1f87..ab04e2314f 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qeffects_p.h b/src/widgets/widgets/qeffects_p.h
index bae2bbf54a..e26810835e 100644
--- a/src/widgets/widgets/qeffects_p.h
+++ b/src/widgets/widgets/qeffects_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qfocusframe.cpp b/src/widgets/widgets/qfocusframe.cpp
index 86187c2c4a..62dc8b64f2 100644
--- a/src/widgets/widgets/qfocusframe.cpp
+++ b/src/widgets/widgets/qfocusframe.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -147,7 +147,7 @@ void QFocusFrame::initStyleOption(QStyleOption *option) const
The focus frame will not monitor \a parent for updates but rather
can be placed manually or by using QFocusFrame::setWidget. A
QFocusFrame sets Qt::WA_NoChildEventsForParent attribute; as a
- result the parent will not receive a QEvent::ChildInserted event,
+ result the parent will not receive a QEvent::ChildAdded event,
this will make it possible to manually set the geometry of the
QFocusFrame inside of a QSplitter or other child event monitoring
widget.
diff --git a/src/widgets/widgets/qfocusframe.h b/src/widgets/widgets/qfocusframe.h
index f4f1d1c854..ed117ddd6c 100644
--- a/src/widgets/widgets/qfocusframe.h
+++ b/src/widgets/widgets/qfocusframe.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp
index 9090230029..845f37ccf1 100644
--- a/src/widgets/widgets/qfontcombobox.cpp
+++ b/src/widgets/widgets/qfontcombobox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qfontcombobox.h b/src/widgets/widgets/qfontcombobox.h
index b0007207da..33eec561af 100644
--- a/src/widgets/widgets/qfontcombobox.h
+++ b/src/widgets/widgets/qfontcombobox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp
index e017513541..d0de825467 100644
--- a/src/widgets/widgets/qframe.cpp
+++ b/src/widgets/widgets/qframe.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qframe.h b/src/widgets/widgets/qframe.h
index 4e11a6289b..51cd391185 100644
--- a/src/widgets/widgets/qframe.h
+++ b/src/widgets/widgets/qframe.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qframe_p.h b/src/widgets/widgets/qframe_p.h
index 8825abaf92..a74780fa60 100644
--- a/src/widgets/widgets/qframe_p.h
+++ b/src/widgets/widgets/qframe_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index c850021bdd..1bad9a5b56 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qgroupbox.h b/src/widgets/widgets/qgroupbox.h
index a4e2327267..70bc4cde38 100644
--- a/src/widgets/widgets/qgroupbox.h
+++ b/src/widgets/widgets/qgroupbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 2f0f43fbf4..1503085661 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlabel.h b/src/widgets/widgets/qlabel.h
index e249c2d876..5d61cafab0 100644
--- a/src/widgets/widgets/qlabel.h
+++ b/src/widgets/widgets/qlabel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h
index b6f2db6a25..8de0e301fd 100644
--- a/src/widgets/widgets/qlabel_p.h
+++ b/src/widgets/widgets/qlabel_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index 1b5fbe3417..48836a52d7 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlcdnumber.h b/src/widgets/widgets/qlcdnumber.h
index 6af2b185ea..fcea53ef28 100644
--- a/src/widgets/widgets/qlcdnumber.h
+++ b/src/widgets/widgets/qlcdnumber.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 4dc30d6542..5714052059 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -68,10 +68,6 @@
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
#endif
-#ifndef QT_NO_IM
-#include "qinputcontext.h"
-#include "qlist.h"
-#endif
#include "qabstractitemview.h"
#include "private/qstylesheetstyle_p.h"
@@ -490,9 +486,9 @@ void QLineEdit::setEchoMode(EchoMode mode)
imHints &= ~Qt::ImhHiddenText;
}
if (mode != Normal) {
- imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
} else {
- imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
}
setInputMethodHints(imHints);
d->control->setEchoMode(mode);
@@ -2062,15 +2058,6 @@ QMenu *QLineEdit::createStandardContextMenu()
d->selectAllAction = action;
connect(action, SIGNAL(triggered()), SLOT(selectAll()));
-#if !defined(QT_NO_IM)
- QInputContext *qic = inputContext();
- if (qic) {
- QList<QAction *> imActions = qic->actions();
- for (int i = 0; i < imActions.size(); ++i)
- popup->addAction(imActions.at(i));
- }
-#endif
-
#if defined(Q_WS_WIN) || defined(Q_WS_X11)
if (!d->control->isReadOnly() && qt_use_rtl_extensions) {
#else
diff --git a/src/widgets/widgets/qlineedit.h b/src/widgets/widgets/qlineedit.h
index 107710eccc..2daa893b3b 100644
--- a/src/widgets/widgets/qlineedit.h
+++ b/src/widgets/widgets/qlineedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index b17651e1d3..c54f60f62e 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,7 +51,7 @@
#include "qaccessible.h"
#endif
#ifndef QT_NO_IM
-#include "qinputcontext.h"
+#include "qinputpanel.h"
#include "qlist.h"
#endif
@@ -249,23 +249,22 @@ void QLineEditPrivate::resetInputPanel()
/*!
This function is not intended as polymorphic usage. Just a shared code
- fragment that calls QInputContext::mouseHandler for this
+ fragment that calls QInputPanel::invokeAction for this
class.
*/
bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e )
{
#if !defined QT_NO_IM
- Q_Q(QLineEdit);
if ( control->composeMode() ) {
int tmp_cursor = xToPos(e->pos().x());
int mousePos = tmp_cursor - control->cursor();
if ( mousePos < 0 || mousePos > control->preeditAreaText().length() )
mousePos = -1;
- QInputContext *qic = q->inputContext();
- if (qic && mousePos >= 0) {
- // may be causing reset() in some input methods
- qic->mouseHandler(mousePos, e);
+ if (mousePos >= 0) {
+ if (e->type() == QEvent::MouseButtonRelease)
+ qApp->inputPanel()->invokeAction(QInputPanel::Click, mousePos);
+
return true;
}
}
diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h
index 076f2fcf11..206e835a74 100644
--- a/src/widgets/widgets/qlineedit_p.h
+++ b/src/widgets/widgets/qlineedit_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.h b/src/widgets/widgets/qmaccocoaviewcontainer_mac.h
index 48eac4f490..8824fde912 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.h
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index b79ee3d4e0..8facb4db61 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmacnativewidget_mac.h b/src/widgets/widgets/qmacnativewidget_mac.h
index 935feac58e..2b4d4fbdae 100644
--- a/src/widgets/widgets/qmacnativewidget_mac.h
+++ b/src/widgets/widgets/qmacnativewidget_mac.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmacnativewidget_mac.mm b/src/widgets/widgets/qmacnativewidget_mac.mm
index 08f78158ee..925ef3d8a9 100644
--- a/src/widgets/widgets/qmacnativewidget_mac.mm
+++ b/src/widgets/widgets/qmacnativewidget_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 014700f389..ad1890a708 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmainwindow.h b/src/widgets/widgets/qmainwindow.h
index 88cff31841..43d269ef6f 100644
--- a/src/widgets/widgets/qmainwindow.h
+++ b/src/widgets/widgets/qmainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index ebabf2d93c..32d893630f 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmainwindowlayout_mac.mm b/src/widgets/widgets/qmainwindowlayout_mac.mm
index ba5d1d5673..b6fcca88fa 100644
--- a/src/widgets/widgets/qmainwindowlayout_mac.mm
+++ b/src/widgets/widgets/qmainwindowlayout_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 9d3f127158..34d94119ad 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index f66c71315a..021af9be0b 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmdiarea.h b/src/widgets/widgets/qmdiarea.h
index f1ffb29e53..fbd07ad249 100644
--- a/src/widgets/widgets/qmdiarea.h
+++ b/src/widgets/widgets/qmdiarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmdiarea_p.h b/src/widgets/widgets/qmdiarea_p.h
index 18a022d7dd..e80c6b5ecb 100644
--- a/src/widgets/widgets/qmdiarea_p.h
+++ b/src/widgets/widgets/qmdiarea_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp
index 7fd2bd2a58..f2190313e9 100644
--- a/src/widgets/widgets/qmdisubwindow.cpp
+++ b/src/widgets/widgets/qmdisubwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmdisubwindow.h b/src/widgets/widgets/qmdisubwindow.h
index 88074c7ca5..332619c3b4 100644
--- a/src/widgets/widgets/qmdisubwindow.h
+++ b/src/widgets/widgets/qmdisubwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmdisubwindow_p.h b/src/widgets/widgets/qmdisubwindow_p.h
index d04a7d4b75..83a91fb39b 100644
--- a/src/widgets/widgets/qmdisubwindow_p.h
+++ b/src/widgets/widgets/qmdisubwindow_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index b8ba2cdf5d..a255b840dc 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -500,7 +500,7 @@ void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister)
menu->blockSignals(false);
#endif // QT_NO_EFFECTS
if (!justRegister)
- menu->hide();
+ menu->close();
}
void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst)
diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h
index 49bf8295ec..645a15bdc8 100644
--- a/src/widgets/widgets/qmenu.h
+++ b/src/widgets/widgets/qmenu.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index df15512b3e..a6e700b528 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenu_wince.cpp b/src/widgets/widgets/qmenu_wince.cpp
index b0c6c1bd12..26a9302efb 100644
--- a/src/widgets/widgets/qmenu_wince.cpp
+++ b/src/widgets/widgets/qmenu_wince.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenu_wince_resource_p.h b/src/widgets/widgets/qmenu_wince_resource_p.h
index 42de05f319..b40a9526e5 100644
--- a/src/widgets/widgets/qmenu_wince_resource_p.h
+++ b/src/widgets/widgets/qmenu_wince_resource_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 1ceea3e78c..2908d4723e 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h
index 0eb668e373..84fb378064 100644
--- a/src/widgets/widgets/qmenubar.h
+++ b/src/widgets/widgets/qmenubar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index e9201fc877..de1ab37a19 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index 98a8999a98..9f92406a04 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qplaintextedit.h b/src/widgets/widgets/qplaintextedit.h
index d5fa71bbb7..9860914b98 100644
--- a/src/widgets/widgets/qplaintextedit.h
+++ b/src/widgets/widgets/qplaintextedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qplaintextedit_p.h b/src/widgets/widgets/qplaintextedit_p.h
index 190156a684..8f880d9772 100644
--- a/src/widgets/widgets/qplaintextedit_p.h
+++ b/src/widgets/widgets/qplaintextedit_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 3db91a6b6e..e731b63c66 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -192,9 +192,8 @@ bool QProgressBarPrivate::repaintRequired() const
If minimum and maximum both are set to 0, the bar shows a busy
indicator instead of a percentage of steps. This is useful, for
- example, when using QFtp or QNetworkAccessManager to download
- items when they are unable to determine the size of the item being
- downloaded.
+ example, when using QNetworkAccessManager to download items when
+ they are unable to determine the size of the item being downloaded.
\table
\row \o \inlineimage macintosh-progressbar.png Screenshot of a Macintosh style progress bar
diff --git a/src/widgets/widgets/qprogressbar.h b/src/widgets/widgets/qprogressbar.h
index ac34f64a2e..cdb6d36dfd 100644
--- a/src/widgets/widgets/qprogressbar.h
+++ b/src/widgets/widgets/qprogressbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index e3993167ef..ff477ec1d7 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qpushbutton.h b/src/widgets/widgets/qpushbutton.h
index fefbd9e81f..1dc0a19542 100644
--- a/src/widgets/widgets/qpushbutton.h
+++ b/src/widgets/widgets/qpushbutton.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qpushbutton_p.h b/src/widgets/widgets/qpushbutton_p.h
index 0056288a98..d77b69a341 100644
--- a/src/widgets/widgets/qpushbutton_p.h
+++ b/src/widgets/widgets/qpushbutton_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index b9567a0a11..1cf321bd16 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qradiobutton.h b/src/widgets/widgets/qradiobutton.h
index f1d9f5500a..aa3458bf95 100644
--- a/src/widgets/widgets/qradiobutton.h
+++ b/src/widgets/widgets/qradiobutton.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qrubberband.cpp b/src/widgets/widgets/qrubberband.cpp
index d0ea05f5cd..bb67b292af 100644
--- a/src/widgets/widgets/qrubberband.cpp
+++ b/src/widgets/widgets/qrubberband.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qrubberband.h b/src/widgets/widgets/qrubberband.h
index 3d30004770..05b35a772b 100644
--- a/src/widgets/widgets/qrubberband.h
+++ b/src/widgets/widgets/qrubberband.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qscrollarea.cpp b/src/widgets/widgets/qscrollarea.cpp
index 48c179a9ab..9912b5e211 100644
--- a/src/widgets/widgets/qscrollarea.cpp
+++ b/src/widgets/widgets/qscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qscrollarea.h b/src/widgets/widgets/qscrollarea.h
index 2d62cc1bc4..0dcd280894 100644
--- a/src/widgets/widgets/qscrollarea.h
+++ b/src/widgets/widgets/qscrollarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qscrollarea_p.h b/src/widgets/widgets/qscrollarea_p.h
index 0e5e21b7c0..e36e99add2 100644
--- a/src/widgets/widgets/qscrollarea_p.h
+++ b/src/widgets/widgets/qscrollarea_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index b8cd81c6a7..47a10de702 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qscrollbar.h b/src/widgets/widgets/qscrollbar.h
index f51a000a12..ac6146cc3f 100644
--- a/src/widgets/widgets/qscrollbar.h
+++ b/src/widgets/widgets/qscrollbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp
index d4cfce984d..9f02c131ea 100644
--- a/src/widgets/widgets/qsizegrip.cpp
+++ b/src/widgets/widgets/qsizegrip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qsizegrip.h b/src/widgets/widgets/qsizegrip.h
index 144eb8e160..acac950b44 100644
--- a/src/widgets/widgets/qsizegrip.h
+++ b/src/widgets/widgets/qsizegrip.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qslider.cpp b/src/widgets/widgets/qslider.cpp
index 9dd73f8c96..0f646fc19d 100644
--- a/src/widgets/widgets/qslider.cpp
+++ b/src/widgets/widgets/qslider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qslider.h b/src/widgets/widgets/qslider.h
index c6620d253b..a050f229fb 100644
--- a/src/widgets/widgets/qslider.h
+++ b/src/widgets/widgets/qslider.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 47cc8bbcf3..89743740de 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1250,36 +1250,6 @@ QString QDoubleSpinBoxPrivate::textFromValue(const QVariant &f) const
return q->textFromValue(f.toDouble());
}
-/*!
- \fn void QSpinBox::setLineStep(int step)
-
- Use setSingleStep() instead.
-*/
-
-/*!
- \fn void QSpinBox::setMaxValue(int value)
-
- Use setMaximum() instead.
-*/
-
-/*!
- \fn void QSpinBox::setMinValue(int value)
-
- Use setMinimum() instead.
-*/
-
-/*!
- \fn int QSpinBox::maxValue() const
-
- Use maximum() instead.
-*/
-
-/*!
- \fn int QSpinBox::minValue() const
-
- Use minimum() instead.
-*/
-
/*! \reimp */
bool QSpinBox::event(QEvent *event)
{
diff --git a/src/widgets/widgets/qspinbox.h b/src/widgets/widgets/qspinbox.h
index 0846103cca..bfc91b1ecf 100644
--- a/src/widgets/widgets/qspinbox.h
+++ b/src/widgets/widgets/qspinbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 7140487463..4fb0f3fa76 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qsplashscreen.h b/src/widgets/widgets/qsplashscreen.h
index 133146943e..f58b78adcb 100644
--- a/src/widgets/widgets/qsplashscreen.h
+++ b/src/widgets/widgets/qsplashscreen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index b725ee039a..ca22e0718a 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1675,7 +1675,6 @@ void QSplitter::setStretchFactor(int index, int stretch)
}
-#ifndef QT_NO_TEXTSTREAM
/*!
\relates QSplitter
\obsolete
@@ -1706,7 +1705,6 @@ QTextStream& operator>>(QTextStream& ts, QSplitter& splitter)
splitter.restoreState(line.toAscii());
return ts;
}
-#endif // QT_NO_TEXTSTREAM
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qsplitter.h b/src/widgets/widgets/qsplitter.h
index 71252ede24..ee62ab76f2 100644
--- a/src/widgets/widgets/qsplitter.h
+++ b/src/widgets/widgets/qsplitter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -133,10 +133,8 @@ private:
friend class QSplitterHandle;
};
-#ifndef QT_NO_TEXTSTREAM
Q_WIDGETS_EXPORT QTextStream& operator<<(QTextStream&, const QSplitter&);
Q_WIDGETS_EXPORT QTextStream& operator>>(QTextStream&, QSplitter&);
-#endif
class QSplitterHandlePrivate;
class Q_WIDGETS_EXPORT QSplitterHandle : public QWidget
diff --git a/src/widgets/widgets/qsplitter_p.h b/src/widgets/widgets/qsplitter_p.h
index 05e7a35165..a06b65c5d3 100644
--- a/src/widgets/widgets/qsplitter_p.h
+++ b/src/widgets/widgets/qsplitter_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qstackedwidget.cpp b/src/widgets/widgets/qstackedwidget.cpp
index 4e9349e348..5544f241a9 100644
--- a/src/widgets/widgets/qstackedwidget.cpp
+++ b/src/widgets/widgets/qstackedwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qstackedwidget.h b/src/widgets/widgets/qstackedwidget.h
index e0275fe27f..8dc24dd56f 100644
--- a/src/widgets/widgets/qstackedwidget.h
+++ b/src/widgets/widgets/qstackedwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp
index 295d509444..357c3c72d1 100644
--- a/src/widgets/widgets/qstatusbar.cpp
+++ b/src/widgets/widgets/qstatusbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qstatusbar.h b/src/widgets/widgets/qstatusbar.h
index c983f6d199..e24e9da150 100644
--- a/src/widgets/widgets/qstatusbar.h
+++ b/src/widgets/widgets/qstatusbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 4fd7a31c41..c939c4aa7c 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtabbar.h b/src/widgets/widgets/qtabbar.h
index d33e6bbb1b..cfe9a90b47 100644
--- a/src/widgets/widgets/qtabbar.h
+++ b/src/widgets/widgets/qtabbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 69ca361967..2060e169f2 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index a01316145e..636a68994a 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -154,15 +154,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn void QTabWidget::selected(const QString &tabLabel)
-
- This signal is emitted whenever a tab is selected (raised),
- including during the first show().
-
- You can normally use currentChanged() instead.
-*/
-
-/*!
\fn void QTabWidget::currentChanged(int index)
This signal is emitted whenever the current page index changes.
@@ -1345,153 +1336,6 @@ void QTabWidget::clear()
removeTab(0);
}
-/*!
- \fn void QTabWidget::insertTab(QWidget *widget, const QString &label, int index)
-
- Use insertTab(index, widget, label) instead.
-*/
-
-/*!
- \fn void QTabWidget::insertTab(QWidget *widget, const QIcon& icon, const QString &label, int index)
-
- Use insertTab(index, widget, icon, label) instead.
-*/
-
-/*!
- \fn void QTabWidget::changeTab(QWidget *widget, const QString
- &label)
-
- Use setTabText() instead.
-
-*/
-
-/*!
- \fn void QTabWidget::changeTab(QWidget *widget, const QIcon& icon, const QString &label)
-
- Use setTabText() and setTabIcon() instead.
-*/
-
-/*!
- \fn bool QTabWidget::isTabEnabled( QWidget *widget) const
-
- Use isTabEnabled(tabWidget->indexOf(widget)) instead.
-*/
-
-/*!
- \fn void QTabWidget::setTabEnabled(QWidget *widget, bool b)
-
- Use setTabEnabled(tabWidget->indexOf(widget), b) instead.
-*/
-
-/*!
- \fn QString QTabWidget::tabLabel(QWidget *widget) const
-
- Use tabText(tabWidget->indexOf(widget)) instead.
-*/
-
-/*!
- \fn void QTabWidget::setTabLabel(QWidget *widget, const QString
- &label)
-
- Use setTabText(tabWidget->indexOf(widget), label) instead.
-*/
-
-/*!
- \fn QIcon QTabWidget::tabIconSet(QWidget * widget) const
-
- Use tabIcon(tabWidget->indexOf(widget)) instead.
-*/
-
-/*!
- \fn void QTabWidget::setTabIconSet(QWidget * widget, const QIcon & icon)
-
- Use setTabIcon(tabWidget->indexOf(widget), icon) instead.
-*/
-
-/*!
- \fn void QTabWidget::removeTabToolTip(QWidget * widget)
-
- Use setTabToolTip(tabWidget->indexOf(widget), QString()) instead.
-*/
-
-/*!
- \fn void QTabWidget::setTabToolTip(QWidget * widget, const QString & tip)
-
- Use setTabToolTip(tabWidget->indexOf(widget), tip) instead.
-*/
-
-/*!
- \fn QString QTabWidget::tabToolTip(QWidget * widget) const
-
- Use tabToolTip(tabWidget->indexOf(widget)) instead.
-*/
-
-/*!
- \fn QWidget * QTabWidget::currentPage() const
-
- Use currentWidget() instead.
-*/
-
-/*!
- \fn QWidget *QTabWidget::page(int index) const
-
- Use widget() instead.
-*/
-
-/*!
- \fn QString QTabWidget::label(int index) const
-
- Use tabText() instead.
-*/
-
-/*!
- \fn int QTabWidget::currentPageIndex() const
-
- Use currentIndex() instead.
-*/
-
-/*!
- \fn int QTabWidget::margin() const
-
- This function is kept only to make old code compile.
- This functionality is no longer supported by QTabWidget.
-
- \sa contentsRect(), setContentsMargins()
-*/
-
-/*!
- \fn void QTabWidget::setMargin(int margin)
-
- This function is kept only to make old code compile.
- This functionality is no longer supported by QTabWidget.
-
- \sa contentsRect(), setContentsMargins()
-*/
-
-/*!
- \fn void QTabWidget::setCurrentPage(int index)
-
- Use setCurrentIndex() instead.
-*/
-
-/*!
- \fn void QTabWidget::showPage(QWidget *widget)
-
- Use setCurrentIndex(indexOf(widget)) instead.
-*/
-
-/*!
- \fn void QTabWidget::removePage(QWidget *widget)
-
- Use removeTab(indexOf(widget)) instead.
-*/
-
-/*!
- \fn void QTabWidget::currentChanged(QWidget *widget)
-
- Use currentChanged(int) instead.
-*/
-
QT_END_NAMESPACE
#include "moc_qtabwidget.cpp"
diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h
index ff734ed722..432870df25 100644
--- a/src/widgets/widgets/qtabwidget.h
+++ b/src/widgets/widgets/qtabwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index e8fad6cebc..dbda9e3b94 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtextbrowser.h b/src/widgets/widgets/qtextbrowser.h
index b7ec942753..ee977be23b 100644
--- a/src/widgets/widgets/qtextbrowser.h
+++ b/src/widgets/widgets/qtextbrowser.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index cd55716daf..acd663eb8c 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -179,7 +179,6 @@ void QTextEditPrivate::init(const QString &html)
q->setFocusPolicy(Qt::WheelFocus);
q->setAttribute(Qt::WA_KeyCompression);
q->setAttribute(Qt::WA_InputMethodEnabled);
- q->setInputMethodHints(Qt::ImhMultiLine);
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::IBeamCursor);
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index ae9865977f..b86c0e0999 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtextedit_p.h b/src/widgets/widgets/qtextedit_p.h
index 3512c80ac4..e7f172ec0f 100644
--- a/src/widgets/widgets/qtextedit_p.h
+++ b/src/widgets/widgets/qtextedit_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 3d3ef4f7b5..6b1d414830 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -435,7 +435,7 @@ void QToolBarPrivate::plug(const QRect &r)
pop up a menu containing the items that does not currently fit in
the toolbar.
- When a QToolBar is not a child of a QMainWindow, it looses the ability
+ When a QToolBar is not a child of a QMainWindow, it loses the ability
to populate the extension pop up with widgets added to the toolbar using
addWidget(). Please use widget actions created by inheriting QWidgetAction
and implementing QWidgetAction::createWidget() instead.
diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h
index 3e85d74e49..4f51cf045d 100644
--- a/src/widgets/widgets/qtoolbar.h
+++ b/src/widgets/widgets/qtoolbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbar_p.h b/src/widgets/widgets/qtoolbar_p.h
index 70f1b6dca1..14ec575dc5 100644
--- a/src/widgets/widgets/qtoolbar_p.h
+++ b/src/widgets/widgets/qtoolbar_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index fbd5ef2cd7..2650f7676e 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbararealayout_p.h b/src/widgets/widgets/qtoolbararealayout_p.h
index 940901df96..b61b2c76c9 100644
--- a/src/widgets/widgets/qtoolbararealayout_p.h
+++ b/src/widgets/widgets/qtoolbararealayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbarextension.cpp b/src/widgets/widgets/qtoolbarextension.cpp
index c522b416f2..341bd9cbb3 100644
--- a/src/widgets/widgets/qtoolbarextension.cpp
+++ b/src/widgets/widgets/qtoolbarextension.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbarextension_p.h b/src/widgets/widgets/qtoolbarextension_p.h
index d7f28bf0f3..a60584f755 100644
--- a/src/widgets/widgets/qtoolbarextension_p.h
+++ b/src/widgets/widgets/qtoolbarextension_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index ac9be12ee2..2e5aaa61f2 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbarlayout_p.h b/src/widgets/widgets/qtoolbarlayout_p.h
index 4e4a8eab84..7c2a60d51a 100644
--- a/src/widgets/widgets/qtoolbarlayout_p.h
+++ b/src/widgets/widgets/qtoolbarlayout_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbarseparator.cpp b/src/widgets/widgets/qtoolbarseparator.cpp
index bd0ed9854f..4dd11679fa 100644
--- a/src/widgets/widgets/qtoolbarseparator.cpp
+++ b/src/widgets/widgets/qtoolbarseparator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbarseparator_p.h b/src/widgets/widgets/qtoolbarseparator_p.h
index 0f1eb05abc..5807c9f0b8 100644
--- a/src/widgets/widgets/qtoolbarseparator_p.h
+++ b/src/widgets/widgets/qtoolbarseparator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbox.cpp b/src/widgets/widgets/qtoolbox.cpp
index a0bd1708fe..2bf0dc0d9d 100644
--- a/src/widgets/widgets/qtoolbox.cpp
+++ b/src/widgets/widgets/qtoolbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbox.h b/src/widgets/widgets/qtoolbox.h
index ac4125229c..8e7ac52646 100644
--- a/src/widgets/widgets/qtoolbox.h
+++ b/src/widgets/widgets/qtoolbox.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index ba0db96272..5b3a328dcc 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qtoolbutton.h b/src/widgets/widgets/qtoolbutton.h
index 5ec507904a..c451e2cc13 100644
--- a/src/widgets/widgets/qtoolbutton.h
+++ b/src/widgets/widgets/qtoolbutton.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp
index 9df7dfc0eb..de92a53257 100644
--- a/src/widgets/widgets/qwidgetanimator.cpp
+++ b/src/widgets/widgets/qwidgetanimator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qwidgetanimator_p.h b/src/widgets/widgets/qwidgetanimator_p.h
index 40a2f274eb..d6e7a86e7b 100644
--- a/src/widgets/widgets/qwidgetanimator_p.h
+++ b/src/widgets/widgets/qwidgetanimator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 027512b6ae..e52193e20c 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,6 +56,22 @@
QT_BEGIN_NAMESPACE
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+static const int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY;
+#endif
+
+/*!
+ \macro QT_GUI_PASSWORD_ECHO_DELAY
+
+ \internal
+
+ Defines the amount of time in milliseconds the last entered character
+ should be displayed unmasked in the Password echo mode.
+
+ If not defined in qplatformdefs.h there will be no delay in masking
+ password characters.
+*/
+
/*!
\internal
@@ -93,9 +109,25 @@ void QWidgetLineControl::updateDisplayText(bool forceUpdate)
else
str = m_text;
- if (m_echoMode == QLineEdit::Password || (m_echoMode == QLineEdit::PasswordEchoOnEdit
- && !m_passwordEchoEditing))
+ if (m_echoMode == QLineEdit::Password) {
str.fill(m_passwordCharacter);
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ if (m_passwordEchoTimer != 0 && m_cursor > 0 && m_cursor <= m_text.length()) {
+ int cursor = m_cursor - 1;
+ QChar uc = m_text.at(cursor);
+ str[cursor] = uc;
+ if (cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) {
+ // second half of a surrogate, check if we have the first half as well,
+ // if yes restore both at once
+ uc = m_text.at(cursor - 1);
+ if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00)
+ str[cursor - 1] = uc;
+ }
+ }
+#endif
+ } else if (m_echoMode == QLineEdit::PasswordEchoOnEdit && !m_passwordEchoEditing) {
+ str.fill(m_passwordCharacter);
+ }
// replace certain non-printable characters with spaces (to avoid
// drawing boxes when using fonts that don't have glyphs for such
@@ -354,6 +386,7 @@ void QWidgetLineControl::init(const QString &txt)
*/
void QWidgetLineControl::updatePasswordEchoEditing(bool editing)
{
+ cancelPasswordEchoTimer();
m_passwordEchoEditing = editing;
updateDisplayText();
}
@@ -694,6 +727,8 @@ bool QWidgetLineControl::finishChange(int validateFromState, bool update, bool e
m_selDirty = false;
emit selectionChanged();
}
+ if (m_cursor == m_lastCursorPos)
+ updateMicroFocus();
emitCursorPositionChanged();
return true;
}
@@ -705,6 +740,7 @@ bool QWidgetLineControl::finishChange(int validateFromState, bool update, bool e
*/
void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edited)
{
+ cancelPasswordEchoTimer();
internalDeselect();
emit resetInputContext();
QString oldText = m_text;
@@ -757,6 +793,13 @@ void QWidgetLineControl::addCommand(const Command &cmd)
*/
void QWidgetLineControl::internalInsert(const QString &s)
{
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ if (m_echoMode == QLineEdit::Password) {
+ if (m_passwordEchoTimer != 0)
+ killTimer(m_passwordEchoTimer);
+ m_passwordEchoTimer = startTimer(qt_passwordEchoDelay);
+ }
+#endif
if (hasSelectedText())
addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend));
if (m_maskData) {
@@ -794,6 +837,7 @@ void QWidgetLineControl::internalInsert(const QString &s)
void QWidgetLineControl::internalDelete(bool wasBackspace)
{
if (m_cursor < (int) m_text.length()) {
+ cancelPasswordEchoTimer();
if (hasSelectedText())
addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend));
addCommand(Command((CommandType)((m_maskData ? 2 : 0) + (wasBackspace ? Remove : Delete)),
@@ -820,6 +864,7 @@ void QWidgetLineControl::internalDelete(bool wasBackspace)
void QWidgetLineControl::removeSelectedText()
{
if (m_selstart < m_selend && m_selend <= (int) m_text.length()) {
+ cancelPasswordEchoTimer();
separate();
int i ;
addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend));
@@ -1218,6 +1263,7 @@ void QWidgetLineControl::internalUndo(int until)
{
if (!isUndoAvailable())
return;
+ cancelPasswordEchoTimer();
internalDeselect();
while (m_undoState && m_undoState > until) {
Command& cmd = m_history[--m_undoState];
@@ -1422,6 +1468,12 @@ void QWidgetLineControl::timerEvent(QTimerEvent *event)
} else if (event->timerId() == m_tripleClickTimer) {
killTimer(m_tripleClickTimer);
m_tripleClickTimer = 0;
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ } else if (event->timerId() == m_passwordEchoTimer) {
+ killTimer(m_passwordEchoTimer);
+ m_passwordEchoTimer = 0;
+ updateDisplayText();
+#endif
}
}
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index e0c304279e..d8f27a4003 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -62,12 +62,15 @@
#include "QtWidgets/qstyleoption.h"
#include "QtCore/qpointer.h"
#include "QtGui/qclipboard.h"
+#include "QtGui/qinputpanel.h"
#include "QtCore/qpoint.h"
#include "QtWidgets/qcompleter.h"
#include "QtCore/qthread.h"
#include "qplatformdefs.h"
+#include "qplatformdefs.h"
+
QT_BEGIN_HEADER
#ifdef DrawText
@@ -252,6 +255,7 @@ public:
uint echoMode() const { return m_echoMode; }
void setEchoMode(uint mode)
{
+ cancelPasswordEchoTimer();
m_echoMode = mode;
m_passwordEchoEditing = false;
updateDisplayText();
@@ -301,7 +305,13 @@ public:
QString preeditAreaText() const { return m_textLayout.preeditAreaText(); }
void updatePasswordEchoEditing(bool editing);
- bool passwordEchoEditing() const { return m_passwordEchoEditing; }
+ bool passwordEchoEditing() const {
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ if (m_passwordEchoTimer != 0)
+ return true;
+#endif
+ return m_passwordEchoEditing ;
+ }
QChar passwordCharacter() const { return m_passwordCharacter; }
void setPasswordCharacter(const QChar &character) { m_passwordCharacter = character; updateDisplayText(); }
@@ -309,7 +319,7 @@ public:
Qt::LayoutDirection layoutDirection() const {
if (m_layoutDirection == Qt::LayoutDirectionAuto) {
if (m_text.isEmpty())
- return QApplication::keyboardInputDirection();
+ return qApp->inputPanel()->inputDirection();
return m_text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight;
}
return m_layoutDirection;
@@ -474,6 +484,18 @@ private:
bool m_passwordEchoEditing;
QChar m_passwordCharacter;
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ int m_passwordEchoTimer;
+#endif
+ void cancelPasswordEchoTimer()
+ {
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ if (m_passwordEchoTimer != 0) {
+ killTimer(m_passwordEchoTimer);
+ m_passwordEchoTimer = 0;
+ }
+#endif
+ }
int redoTextLayout() const;
#if defined(Q_WS_MAC)
diff --git a/src/widgets/widgets/qwidgetresizehandler.cpp b/src/widgets/widgets/qwidgetresizehandler.cpp
index f43e0f7dfa..5881d2360d 100644
--- a/src/widgets/widgets/qwidgetresizehandler.cpp
+++ b/src/widgets/widgets/qwidgetresizehandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qwidgetresizehandler_p.h b/src/widgets/widgets/qwidgetresizehandler_p.h
index 9d09d63967..5a355611fd 100644
--- a/src/widgets/widgets/qwidgetresizehandler_p.h
+++ b/src/widgets/widgets/qwidgetresizehandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index a55e001fc4..628848b0d7 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,7 +75,7 @@
#include <qvariant.h>
#include <qurl.h>
#include <qdesktopservices.h>
-#include <qinputcontext.h>
+#include <qinputpanel.h>
#include <qtooltip.h>
#include <qstyleoption.h>
#include <QtWidgets/qlineedit.h>
@@ -691,20 +691,30 @@ void QWidgetTextControlPrivate::extendWordwiseSelection(int suggestedNewPosition
if (!wordSelectionEnabled && (mouseXPosition < wordStartX || mouseXPosition > wordEndX))
return;
- // keep the already selected word even when moving to the left
- // (#39164)
- if (suggestedNewPosition < selectedWordOnDoubleClick.position())
- cursor.setPosition(selectedWordOnDoubleClick.selectionEnd());
- else
- cursor.setPosition(selectedWordOnDoubleClick.selectionStart());
+ if (wordSelectionEnabled) {
+ if (suggestedNewPosition < selectedWordOnDoubleClick.position()) {
+ cursor.setPosition(selectedWordOnDoubleClick.selectionEnd());
+ setCursorPosition(wordStartPos, QTextCursor::KeepAnchor);
+ } else {
+ cursor.setPosition(selectedWordOnDoubleClick.selectionStart());
+ setCursorPosition(wordEndPos, QTextCursor::KeepAnchor);
+ }
+ } else {
+ // keep the already selected word even when moving to the left
+ // (#39164)
+ if (suggestedNewPosition < selectedWordOnDoubleClick.position())
+ cursor.setPosition(selectedWordOnDoubleClick.selectionEnd());
+ else
+ cursor.setPosition(selectedWordOnDoubleClick.selectionStart());
- const qreal differenceToStart = mouseXPosition - wordStartX;
- const qreal differenceToEnd = wordEndX - mouseXPosition;
+ const qreal differenceToStart = mouseXPosition - wordStartX;
+ const qreal differenceToEnd = wordEndX - mouseXPosition;
- if (differenceToStart < differenceToEnd)
- setCursorPosition(wordStartPos, QTextCursor::KeepAnchor);
- else
- setCursorPosition(wordEndPos, QTextCursor::KeepAnchor);
+ if (differenceToStart < differenceToEnd)
+ setCursorPosition(wordStartPos, QTextCursor::KeepAnchor);
+ else
+ setCursorPosition(wordEndPos, QTextCursor::KeepAnchor);
+ }
if (interactionFlags & Qt::TextSelectableByMouse) {
#ifndef QT_NO_CLIPBOARD
@@ -1678,16 +1688,15 @@ void QWidgetTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button
emit q->cursorPositionChanged();
_q_updateCurrentCharFormatAndSelection();
#ifndef QT_NO_IM
- if (contextWidget) {
- if (QInputContext *ic = qApp->inputContext()) {
- ic->update();
- }
- }
+ if (contextWidget)
+ qApp->inputPanel()->update(Qt::ImQueryInput);
#endif //QT_NO_IM
} else {
//emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1)));
- if (cursor.position() != oldCursorPos)
+ if (cursor.position() != oldCursorPos) {
emit q->cursorPositionChanged();
+ emit q->microFocusChanged();
+ }
}
selectionChanged(true);
repaintOldAndNewSelection(oldSelection);
@@ -1734,8 +1743,10 @@ void QWidgetTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton but
repaintOldAndNewSelection(oldSelection);
- if (cursor.position() != oldCursorPos)
+ if (cursor.position() != oldCursorPos) {
emit q->cursorPositionChanged();
+ emit q->microFocusChanged();
+ }
if (interactionFlags & Qt::LinksAccessibleByMouse) {
if (!(button & Qt::LeftButton))
@@ -1807,34 +1818,32 @@ bool QWidgetTextControlPrivate::sendMouseEventToInputContext(
QEvent *e, QEvent::Type eventType, Qt::MouseButton button, const QPointF &pos,
Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint &globalPos)
{
+ Q_UNUSED(eventType);
+ Q_UNUSED(button);
+ Q_UNUSED(pos);
+ Q_UNUSED(modifiers);
+ Q_UNUSED(buttons);
+ Q_UNUSED(globalPos);
#if !defined(QT_NO_IM)
Q_Q(QWidgetTextControl);
if (contextWidget && isPreediting()) {
QTextLayout *layout = cursor.block().layout();
- QInputContext *ctx = qApp->inputContext();
int cursorPos = q->hitTest(pos, Qt::FuzzyHit) - cursor.position();
if (cursorPos < 0 || cursorPos > layout->preeditAreaText().length())
cursorPos = -1;
- if (ctx && cursorPos >= 0) {
- QMouseEvent ev(eventType, contextWidget->mapFromGlobal(globalPos),
- contextWidget->topLevelWidget()->mapFromGlobal(globalPos), globalPos,
- button, buttons, modifiers);
- ctx->mouseHandler(cursorPos, &ev);
- e->setAccepted(ev.isAccepted());
+ if (cursorPos >= 0) {
+ if (e->type() == QEvent::MouseButtonRelease)
+ qApp->inputPanel()->invokeAction(QInputPanel::Click, cursorPos);
+
+ e->setAccepted(true);
return true;
}
}
#else
Q_UNUSED(e);
- Q_UNUSED(eventType);
- Q_UNUSED(button);
- Q_UNUSED(pos);
- Q_UNUSED(modifiers);
- Q_UNUSED(buttons);
- Q_UNUSED(globalPos);
#endif
return false;
}
@@ -2157,17 +2166,6 @@ QMenu *QWidgetTextControl::createStandardContextMenu(const QPointF &pos, QWidget
a->setEnabled(!d->doc->isEmpty());
}
-#if !defined(QT_NO_IM)
- if (d->contextWidget) {
- QInputContext *qic = qApp->inputContext();
- if (qic) {
- QList<QAction *> imActions = qic->actions();
- for (int i = 0; i < imActions.size(); ++i)
- menu->addAction(imActions.at(i));
- }
- }
-#endif
-
#if defined(Q_WS_WIN) || defined(Q_WS_X11)
if ((d->interactionFlags & Qt::TextEditable) && qt_use_rtl_extensions) {
#else
diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h
index 1550959ebe..7425a7d878 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qwidgettextcontrol_p_p.h b/src/widgets/widgets/qwidgettextcontrol_p_p.h
index cf493aff71..7e49be7f7b 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qworkspace.cpp b/src/widgets/widgets/qworkspace.cpp
index 0d74635881..7aaeeb7282 100644
--- a/src/widgets/widgets/qworkspace.cpp
+++ b/src/widgets/widgets/qworkspace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/widgets/widgets/qworkspace.h b/src/widgets/widgets/qworkspace.h
index 843879a8e7..66fa57f5a4 100644
--- a/src/widgets/widgets/qworkspace.h
+++ b/src/widgets/widgets/qworkspace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/winmain/qtmain_win.cpp b/src/winmain/qtmain_win.cpp
index 2c0091bd89..439f5b859f 100644
--- a/src/winmain/qtmain_win.cpp
+++ b/src/winmain/qtmain_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 5aa7311e6c..3b1e2a8bb7 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -7457,6 +7457,7 @@ bool QDomHandler::characters(const QString& ch)
QScopedPointer<QDomEntityPrivate> e(new QDomEntityPrivate(doc, 0, entityName,
QString(), QString(), QString()));
e->value = ch;
+ e->ref.deref();
doc->doctype()->appendChild(e.data());
e.take();
n.reset(doc->createEntityReference(entityName));
@@ -7541,6 +7542,8 @@ bool QDomHandler::unparsedEntityDecl(const QString &name, const QString &publicI
{
QDomEntityPrivate* e = new QDomEntityPrivate(doc, 0, name,
publicId, systemId, notationName);
+ // keep the refcount balanced: appendChild() does a ref anyway.
+ e->ref.deref();
doc->doctype()->appendChild(e);
return true;
}
@@ -7553,6 +7556,8 @@ bool QDomHandler::externalEntityDecl(const QString &name, const QString &publicI
bool QDomHandler::notationDecl(const QString & name, const QString & publicId, const QString & systemId)
{
QDomNotationPrivate* n = new QDomNotationPrivate(doc, 0, name, publicId, systemId);
+ // keep the refcount balanced: appendChild() does a ref anyway.
+ n->ref.deref();
doc->doctype()->appendChild(n);
return true;
}
diff --git a/src/xml/dom/qdom.h b/src/xml/dom/qdom.h
index 87ccee21aa..d2ff10469d 100644
--- a/src/xml/dom/qdom.h
+++ b/src/xml/dom/qdom.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 067731bb67..bd13cca4ad 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/xml/sax/qxml.h b/src/xml/sax/qxml.h
index 52eea6ce76..7e0ef10d86 100644
--- a/src/xml/sax/qxml.h
+++ b/src/xml/sax/qxml.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/sync.profile b/sync.profile
index 221086a554..cabc8a3ab5 100644
--- a/sync.profile
+++ b/sync.profile
@@ -4,7 +4,6 @@
"QtPrintSupport" => "$basedir/src/printsupport",
"QtOpenGL" => "$basedir/src/opengl",
"QtCore" => "$basedir/src/corelib",
- "QtV8" => "$basedir/src/v8",
"QtXml" => "$basedir/src/xml",
"QtSql" => "$basedir/src/sql",
"QtNetwork" => "$basedir/src/network",
@@ -13,10 +12,8 @@
"QtPlatformSupport" => "$basedir/src/platformsupport",
);
%moduleheaders = ( # restrict the module headers to those found in relative path
- "QtV8" => "../3rdparty/v8/include",
);
@allmoduleheadersprivate = (
- "QtV8"
);
%classnames = (
"qglobal.h" => "QtGlobal",
@@ -38,11 +35,12 @@
"qtguiversion.h" => "QtGuiVersion",
"qtnetworkversion.h" => "QtNetworkVersion",
"qtopenglversion.h" => "QtOpenGLVersion",
- "qtopenvgversion.h" => "QtOpenVGVersion",
"qtsqlversion.h" => "QtSqlVersion",
"qttestversion.h" => "QtTestVersion",
- "qtv8version.h" => "QtV8Version",
"qtxmlversion.h" => "QtXmlVersion",
+ "qtwidgetsversion.h" => "QtWidgetsVersion",
+ "qtprintsupportversion.h" => "QtPrintSupportVersion",
+ "qtplatformsupportversion.h" => "QtPlatformSupportVersion",
);
%mastercontent = (
"core" => "#include <QtCore/QtCore>\n",
@@ -63,7 +61,6 @@
"QtOpenGL" => "$basedir/src/modules/qt_opengl.pri",
"QtSql" => "$basedir/src/modules/qt_sql.pri",
"QtTest" => "$basedir/src/modules/qt_testlib.pri",
- "QtV8" => "$basedir/src/modules/qt_v8.pri",
"QtXml" => "$basedir/src/modules/qt_xml.pri",
"QtPlatformSupport" => "$basedir/src/modules/qt_platformsupport.pri",
);
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 1fc1ba381c..05b6f84fa9 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -9,7 +9,6 @@ SUBDIRS += \
sql \
testlib \
tools \
- v8 \
xml \
other \
widgets \
@@ -17,7 +16,6 @@ SUBDIRS += \
cross_compile: SUBDIRS -= tools
!contains(QT_CONFIG, opengl): SUBDIRS -= opengl
!unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus
-!contains(QT_CONFIG, v8): SUBDIRS -= v8
# disable 'make check' on Mac OS X for the following subdirs for the time being
mac {
diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt
index 4c3ab7131c..d51bc30aab 100644
--- a/tests/auto/compilerwarnings/data/test_cpp.txt
+++ b/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
index 8fd5237606..deea511a5f 100644
--- a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
+++ b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -58,6 +58,9 @@ private slots:
void loopCount();
void state();
void totalDuration();
+ void avoidJumpAtStart();
+ void avoidJumpAtStartWithStop();
+ void avoidJumpAtStartWithRunning();
};
class TestableQAbstractAnimation : public QAbstractAnimation
@@ -65,10 +68,15 @@ class TestableQAbstractAnimation : public QAbstractAnimation
Q_OBJECT
public:
+ TestableQAbstractAnimation() : m_duration(10) {}
virtual ~TestableQAbstractAnimation() {};
- int duration() const { return 10; }
+ int duration() const { return m_duration; }
virtual void updateCurrentTime(int) {}
+
+ void setDuration(int duration) { m_duration = duration; }
+private:
+ int m_duration;
};
class DummyQAnimationGroup : public QAnimationGroup
@@ -150,6 +158,75 @@ void tst_QAbstractAnimation::totalDuration()
QCOMPARE(anim.totalDuration(), 50);
}
+void tst_QAbstractAnimation::avoidJumpAtStart()
+{
+ TestableQAbstractAnimation anim;
+ anim.setDuration(1000);
+
+ /*
+ the timer shouldn't actually start until we hit the event loop,
+ so the sleep should have no effect
+ */
+ anim.start();
+ QTest::qSleep(300);
+ QCoreApplication::processEvents();
+ QVERIFY(anim.currentTime() < 50);
+}
+
+void tst_QAbstractAnimation::avoidJumpAtStartWithStop()
+{
+ TestableQAbstractAnimation anim;
+ anim.setDuration(1000);
+
+ TestableQAbstractAnimation anim2;
+ anim2.setDuration(1000);
+
+ TestableQAbstractAnimation anim3;
+ anim3.setDuration(1000);
+
+ anim.start();
+ QTest::qWait(300);
+ anim.stop();
+
+ /*
+ same test as avoidJumpAtStart, but after there is a
+ running animation that is stopped
+ */
+ anim2.start();
+ QTest::qSleep(300);
+ anim3.start();
+ QCoreApplication::processEvents();
+ QVERIFY(anim2.currentTime() < 50);
+ QVERIFY(anim3.currentTime() < 50);
+}
+
+void tst_QAbstractAnimation::avoidJumpAtStartWithRunning()
+{
+ TestableQAbstractAnimation anim;
+ anim.setDuration(2000);
+
+ TestableQAbstractAnimation anim2;
+ anim2.setDuration(1000);
+
+ TestableQAbstractAnimation anim3;
+ anim3.setDuration(1000);
+
+ anim.start();
+ QTest::qWait(300); //make sure timer has started
+
+ /*
+ same test as avoidJumpAtStart, but with an
+ existing running animation
+ */
+ anim2.start();
+ QTest::qSleep(300); //force large delta for next tick
+ anim3.start();
+ QCoreApplication::processEvents();
+ QVERIFY(anim2.currentTime() < 50);
+ QVERIFY(anim3.currentTime() < 50);
+}
+
+
QTEST_MAIN(tst_QAbstractAnimation)
#include "tst_qabstractanimation.moc"
diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
index 4c111a88d4..1502e5c8d2 100644
--- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,7 +51,7 @@ class tst_QAnimationGroup : public QObject
{
Q_OBJECT
public Q_SLOTS:
- void init();
+ void initTestCase();
private slots:
void construction();
@@ -63,7 +63,7 @@ private slots:
void loopWithoutStartValue();
};
-void tst_QAnimationGroup::init()
+void tst_QAnimationGroup::initTestCase()
{
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
}
@@ -138,6 +138,7 @@ void tst_QAnimationGroup::emptyGroup()
{
QSequentialAnimationGroup group;
QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(groupStateChangedSpy.isValid());
QCOMPARE(group.state(), QAnimationGroup::Stopped);
group.start();
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index e091666c2a..755de9d0b8 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -261,6 +261,11 @@ void tst_QParallelAnimationGroup::stateChanged()
QSignalSpy spy3(anim3, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy spy4(anim4, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(spy1.isValid());
+ QVERIFY(spy2.isValid());
+ QVERIFY(spy3.isValid());
+ QVERIFY(spy4.isValid());
+
//first; let's start forward
group.start();
//all the animations should be started
@@ -432,6 +437,9 @@ void tst_QParallelAnimationGroup::updateChildrenWithRunningGroup()
QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(groupStateChangedSpy.isValid());
+ QVERIFY(childStateChangedSpy.isValid());
+
QCOMPARE(groupStateChangedSpy.count(), 0);
QCOMPARE(childStateChangedSpy.count(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -596,6 +604,9 @@ void tst_QParallelAnimationGroup::startGroupWithRunningChild()
QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(stateChangedSpy1.isValid());
+ QVERIFY(stateChangedSpy2.isValid());
+
QCOMPARE(stateChangedSpy1.count(), 0);
QCOMPARE(stateChangedSpy2.count(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -661,12 +672,21 @@ void tst_QParallelAnimationGroup::zeroDurationAnimation()
QSignalSpy stateChangedSpy1(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy1(&anim1, SIGNAL(finished()));
+ QVERIFY(stateChangedSpy1.isValid());
+ QVERIFY(finishedSpy1.isValid());
+
QSignalSpy stateChangedSpy2(&anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy2(&anim2, SIGNAL(finished()));
+ QVERIFY(stateChangedSpy2.isValid());
+ QVERIFY(finishedSpy2.isValid());
+
QSignalSpy stateChangedSpy3(&anim3, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy3(&anim3, SIGNAL(finished()));
+ QVERIFY(stateChangedSpy3.isValid());
+ QVERIFY(finishedSpy3.isValid());
+
group.addAnimation(&anim1);
group.addAnimation(&anim2);
group.addAnimation(&anim3);
@@ -741,6 +761,7 @@ void tst_QParallelAnimationGroup::stopUncontrolledAnimations()
loopsForever.setLoopCount(-1);
QSignalSpy stateChangedSpy(&anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(stateChangedSpy.isValid());
group.addAnimation(&anim1);
group.addAnimation(&notTimeDriven);
@@ -948,6 +969,7 @@ void tst_QParallelAnimationGroup::pauseResume()
QParallelAnimationGroup group;
TestAnimation2 *anim = new TestAnimation2(250, &group); // 0, duration = 250;
QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(spy.isValid());
QCOMPARE(group.duration(), 250);
group.start();
QTest::qWait(100);
diff --git a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
index ffd4ce47e1..68ada06669 100644
--- a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
+++ b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
index 51b7359980..c8688c89f6 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -230,6 +230,10 @@ void tst_QPropertyAnimation::statesAndSignals()
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy currentLoopSpy(anim, SIGNAL(currentLoopChanged(int)));
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(runningSpy.isValid());
+ QVERIFY(currentLoopSpy.isValid());
+
anim->setCurrentTime(1);
anim->setCurrentTime(100);
QCOMPARE(finishedSpy.count(), 0);
@@ -305,6 +309,8 @@ void tst_QPropertyAnimation::deletion1()
//test that the animation is deleted correctly depending of the deletion flag passed in start()
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QVERIFY(runningSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
anim->setStartValue(10);
anim->setEndValue(20);
anim->setDuration(200);
@@ -348,6 +354,9 @@ void tst_QPropertyAnimation::deletion2()
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QVERIFY(runningSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+
anim->setStartValue(10);
anim->setEndValue(20);
anim->setDuration(200);
@@ -378,6 +387,10 @@ void tst_QPropertyAnimation::deletion3()
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+
+ QVERIFY(runningSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+
anim->start();
QTest::qWait(50);
@@ -474,6 +487,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning()
QPointer<QVariantAnimation> anim = new QPropertyAnimation(&o, "ole");
anim->setEndValue(100);
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(runningSpy.isValid());
anim->start(QVariantAnimation::DeleteWhenStopped);
QTest::qWait(anim->duration() + 100);
QTRY_COMPARE(runningSpy.count(), 2); //started and then stopped
@@ -484,6 +498,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning()
QPointer<QVariantAnimation> anim = new QPropertyAnimation(&o, "ole");
anim->setEndValue(100);
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(runningSpy.isValid());
anim->start(QVariantAnimation::DeleteWhenStopped);
QTest::qWait(anim->duration()/2);
QPointer<QVariantAnimation> anim2 = new QPropertyAnimation(&o, "ole");
@@ -834,6 +849,7 @@ void tst_QPropertyAnimation::zeroDurationStart()
{
DummyPropertyAnimation anim;
QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(spy.isValid());
anim.setDuration(0);
QCOMPARE(anim.state(), QAbstractAnimation::Stopped);
anim.start();
@@ -911,6 +927,7 @@ void tst_QPropertyAnimation::operationsInStates()
QPropertyAnimation anim(&o, "ole");
anim.setEndValue(100);
QSignalSpy spy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(spy.isValid());
anim.stop();
switch (originState) {
@@ -1071,6 +1088,7 @@ void tst_QPropertyAnimation::valueChanged()
anim.setEndValue(5);
anim.setDuration(1000);
QSignalSpy spy(&anim, SIGNAL(valueChanged(QVariant)));
+ QVERIFY(spy.isValid());
anim.start();
QTest::qWait(anim.duration() + 100);
@@ -1203,6 +1221,9 @@ void tst_QPropertyAnimation::zeroLoopCount()
QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+ QVERIFY(runningSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+
QCOMPARE(anim->state(), QAnimationGroup::Stopped);
QCOMPARE(anim->currentValue().toInt(), 0);
QCOMPARE(runningSpy.count(), 0);
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index c7a996444f..3751816dbc 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -642,6 +642,9 @@ void tst_QSequentialAnimationGroup::pauseAndResume()
QSignalSpy a1StateChangedSpy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(a1StateChangedSpy.isValid());
+ QVERIFY(seqStateChangedSpy.isValid());
+
QSequentialAnimationGroup group;
group.addAnimation(sequence);
@@ -746,6 +749,9 @@ void tst_QSequentialAnimationGroup::restart()
QSignalSpy seqCurrentAnimChangedSpy(sequence, SIGNAL(currentAnimationChanged(QAbstractAnimation*)));
QSignalSpy seqStateChangedSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(seqCurrentAnimChangedSpy.isValid());
+ QVERIFY(seqStateChangedSpy.isValid());
+
QVariantAnimation *anims[3];
QSignalSpy *animsStateChanged[3];
@@ -753,6 +759,7 @@ void tst_QSequentialAnimationGroup::restart()
anims[i] = new DummyPropertyAnimation;
anims[i]->setDuration(100);
animsStateChanged[i] = new QSignalSpy(anims[i], SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(animsStateChanged[i]->isValid());
}
anims[1]->setLoopCount(2);
@@ -816,6 +823,11 @@ void tst_QSequentialAnimationGroup::looping()
QSignalSpy a3Spy(a3_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy seqSpy(sequence, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(a1Spy.isValid());
+ QVERIFY(a2Spy.isValid());
+ QVERIFY(a3Spy.isValid());
+ QVERIFY(seqSpy.isValid());
+
a2_s_o1->setLoopCount(2);
sequence->addAnimation(a1_s_o1);
sequence->addAnimation(a2_s_o1);
@@ -824,6 +836,7 @@ void tst_QSequentialAnimationGroup::looping()
QSequentialAnimationGroup group;
QSignalSpy groupSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(groupSpy.isValid());
group.addAnimation(sequence);
group.setLoopCount(2);
@@ -1093,6 +1106,9 @@ void tst_QSequentialAnimationGroup::updateChildrenWithRunningGroup()
QSignalSpy groupStateChangedSpy(&group, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy childStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(groupStateChangedSpy.isValid());
+ QVERIFY(childStateChangedSpy.isValid());
+
QCOMPARE(groupStateChangedSpy.count(), 0);
QCOMPARE(childStateChangedSpy.count(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -1257,6 +1273,9 @@ void tst_QSequentialAnimationGroup::startGroupWithRunningChild()
QSignalSpy stateChangedSpy1(anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy stateChangedSpy2(anim2, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(stateChangedSpy1.isValid());
+ QVERIFY(stateChangedSpy2.isValid());
+
QCOMPARE(stateChangedSpy1.count(), 0);
QCOMPARE(stateChangedSpy2.count(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -1329,6 +1348,7 @@ void tst_QSequentialAnimationGroup::zeroDurationAnimation()
anim3->setDuration(0);
QSignalSpy stateChangedSpy(anim1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(stateChangedSpy.isValid());
group.addAnimation(anim1);
group.addAnimation(anim2);
@@ -1400,6 +1420,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
QSequentialAnimationGroup group;
UncontrolledAnimation notTimeDriven(&o1, &group);
QSignalSpy spy(&group, SIGNAL(finished()));
+ QVERIFY(spy.isValid());
group.start();
QCOMPARE(group.state(), QAnimationGroup::Running);
@@ -1419,6 +1440,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
spy.clear();
DummyPropertyAnimation anim(&group);
QSignalSpy animStateChangedSpy(&anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(animStateChangedSpy.isValid());
group.setCurrentTime(300);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -1620,6 +1642,7 @@ void tst_QSequentialAnimationGroup::pauseResume()
anim->setDuration(250);
anim->setEndValue(250);
QSignalSpy spy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QVERIFY(spy.isValid());
QCOMPARE(group.duration(), 250);
group.start();
QTest::qWait(100);
diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
index bb6d32ee41..b7e1015a13 100644
--- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
+++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
index 774cab1a9b..934f9f904b 100644
--- a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTextCodec>
int main(int argc, char **argv)
{
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index deb983c262..b6dcd3ed63 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -356,17 +356,18 @@ void tst_QTextCodec::codecForLocale()
break;
}
}
- if (!codec2) {
- QSKIP("Could not find a codec that is not already the codecForLocale()");
- }
- // set it, codecForLocale() should return it now
- QTextCodec::setCodecForLocale(codec2);
- QCOMPARE(QTextCodec::codecForLocale(), codec2);
+ // Only run the rest of the test if we could find a codec that is not
+ // already the codecForLocale().
+ if (codec2) {
+ // set it, codecForLocale() should return it now
+ QTextCodec::setCodecForLocale(codec2);
+ QCOMPARE(QTextCodec::codecForLocale(), codec2);
- // reset back to the default
- QTextCodec::setCodecForLocale(0);
- QCOMPARE(QTextCodec::codecForLocale(), codec);
+ // reset back to the default
+ QTextCodec::setCodecForLocale(0);
+ QCOMPARE(QTextCodec::codecForLocale(), codec);
+ }
#endif
}
diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
index f6726c3281..f6ff8b2208 100644
--- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
+++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
index 1dc35ceeb1..53694100ba 100644
--- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp b/tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
index 5aced3f8c1..a2145ca04f 100644
--- a/tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
+++ b/tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
index c7e35e2b75..4fad31b5c9 100644
--- a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,7 +67,7 @@ private slots:
void watchFinishedFuture();
void watchCanceledFuture();
void disconnectRunningFuture();
- void toMuchProgress();
+ void tooMuchProgress();
void progressText();
void sharedFutureInterface();
void changeFuture();
@@ -77,7 +77,7 @@ private slots:
void throttling();
void incrementalMapResults();
void incrementalFilterResults();
- void qfutureSynchornizer();
+ void qfutureSynchronizer();
void warnRace();
};
@@ -90,17 +90,20 @@ void tst_QFutureWatcher::startFinish()
{
QFutureWatcher<void> futureWatcher;
- QSignalSpy started(&futureWatcher, SIGNAL(started()));
- QSignalSpy finished(&futureWatcher, SIGNAL(finished()));
+ QSignalSpy startedSpy(&futureWatcher, SIGNAL(started()));
+ QSignalSpy finishedSpy(&futureWatcher, SIGNAL(finished()));
+
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
futureWatcher.setFuture(QtConcurrent::run(sleeper));
QTest::qWait(10); // spin the event loop to deliver queued signals.
- QCOMPARE(started.count(), 1);
- QCOMPARE(finished.count(), 0);
+ QCOMPARE(startedSpy.count(), 1);
+ QCOMPARE(finishedSpy.count(), 0);
futureWatcher.future().waitForFinished();
QTest::qWait(10);
- QCOMPARE(started.count(), 1);
- QCOMPARE(finished.count(), 1);
+ QCOMPARE(startedSpy.count(), 1);
+ QCOMPARE(finishedSpy.count(), 1);
}
void mapSleeper(int &)
@@ -323,6 +326,7 @@ void tst_QFutureWatcher::futureSignals()
f.setFuture(a.future());
QSignalSpy progressSpy(&f, SIGNAL(progressValueChanged(int)));
+ QVERIFY(progressSpy.isValid());
const int progress = 1;
a.setProgressValue(progress);
QTest::qWait(10);
@@ -333,6 +337,9 @@ void tst_QFutureWatcher::futureSignals()
QSignalSpy finishedSpy(&f, SIGNAL(finished()));
QSignalSpy resultReadySpy(&f, SIGNAL(resultReadyAt(int)));
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(resultReadySpy.isValid());
+
const int result = 10;
a.reportResult(&result);
QTest::qWait(10);
@@ -375,6 +382,11 @@ void tst_QFutureWatcher::watchFinishedFuture()
QSignalSpy resultReadySpy(&watcher, SIGNAL(resultReadyAt(int)));
QSignalSpy canceledSpy(&watcher, SIGNAL(canceled()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(resultReadySpy.isValid());
+ QVERIFY(canceledSpy.isValid());
+
watcher.setFuture(f);
QTest::qWait(10);
@@ -404,6 +416,11 @@ void tst_QFutureWatcher::watchCanceledFuture()
QSignalSpy resultReadySpy(&watcher, SIGNAL(resultReadyAt(int)));
QSignalSpy canceledSpy(&watcher, SIGNAL(canceled()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(resultReadySpy.isValid());
+ QVERIFY(canceledSpy.isValid());
+
watcher.setFuture(f);
QTest::qWait(10);
@@ -428,6 +445,9 @@ void tst_QFutureWatcher::disconnectRunningFuture()
QSignalSpy finishedSpy(watcher, SIGNAL(finished()));
QSignalSpy resultReadySpy(watcher, SIGNAL(resultReadyAt(int)));
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(resultReadySpy.isValid());
+
const int result = 10;
a.reportResult(&result);
QTest::qWait(10);
@@ -456,7 +476,7 @@ public:
}
};
-void tst_QFutureWatcher::toMuchProgress()
+void tst_QFutureWatcher::tooMuchProgress()
{
progressValues.clear();
ProgressObject o;
@@ -618,6 +638,7 @@ void tst_QFutureWatcher::changeFuture()
SignalSlotObject object;
connect(&watcher, SIGNAL(resultReadyAt(int)), &object, SLOT(resultReadyAt(int)));
QSignalSpy resultReadySpy(&watcher, SIGNAL(resultReadyAt(int)));
+ QVERIFY(resultReadySpy.isValid());
watcher.setFuture(a); // Watch 'a' which will genere a resultReady event.
watcher.setFuture(b); // But oh no! we're switching to another future
@@ -649,6 +670,7 @@ void tst_QFutureWatcher::cancelEvents()
SignalSlotObject object;
connect(&watcher, SIGNAL(resultReadyAt(int)), &object, SLOT(resultReadyAt(int)));
QSignalSpy resultReadySpy(&watcher, SIGNAL(resultReadyAt(int)));
+ QVERIFY(resultReadySpy.isValid());
watcher.setFuture(a);
watcher.cancel();
@@ -676,6 +698,7 @@ void tst_QFutureWatcher::pauseEvents()
SignalSlotObject object;
connect(&watcher, SIGNAL(resultReadyAt(int)), &object, SLOT(resultReadyAt(int)));
QSignalSpy resultReadySpy(&watcher, SIGNAL(resultReadyAt(int)));
+ QVERIFY(resultReadySpy.isValid());
watcher.setFuture(a);
watcher.pause();
@@ -701,6 +724,7 @@ void tst_QFutureWatcher::pauseEvents()
SignalSlotObject object;
connect(&watcher, SIGNAL(resultReadyAt(int)), &object, SLOT(resultReadyAt(int)));
QSignalSpy resultReadySpy(&watcher, SIGNAL(resultReadyAt(int)));
+ QVERIFY(resultReadySpy.isValid());
watcher.setFuture(a);
a.pause();
@@ -867,7 +891,7 @@ void tst_QFutureWatcher::incrementalFilterResults()
future.waitForFinished();
}
-void tst_QFutureWatcher::qfutureSynchornizer()
+void tst_QFutureWatcher::qfutureSynchronizer()
{
int taskCount = 1000;
QTime t;
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 91d61e29d4..272d8514ef 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,7 +59,7 @@ private slots:
void filteredReduced();
void resultAt();
void incrementalResults();
- void noDetatch();
+ void noDetach();
#ifndef QT_NO_STL
void stlContainers();
#endif
@@ -1461,7 +1461,7 @@ void tst_QtConcurrentFilter::incrementalResults()
QCOMPARE(future.results().count(), count / 2);
}
-void tst_QtConcurrentFilter::noDetatch()
+void tst_QtConcurrentFilter::noDetach()
{
{
QList<int> l = QList<int>() << 1;
diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index 96ba71b156..16f61513eb 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/functions.h b/tests/auto/corelib/concurrent/qtconcurrentmap/functions.h
index a3dcd3c300..ebca462676 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/functions.h
+++ b/tests/auto/corelib/concurrent/qtconcurrentmap/functions.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index a1dd1c7ab9..df74c028d3 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -74,7 +74,7 @@ private slots:
void exceptions();
#endif
void incrementalResults();
- void noDetatch();
+ void noDetach();
#ifndef QT_NO_STL
void stlContainers();
#endif
@@ -2279,7 +2279,7 @@ void tst_QtConcurrentMap::incrementalResults()
Test that mapped does not cause deep copies when holding
references to Qt containers.
*/
-void tst_QtConcurrentMap::noDetatch()
+void tst_QtConcurrentMap::noDetach()
{
{
QList<int> l = QList<int>() << 1;
diff --git a/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp b/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp
index f5b3f2965e..980fc6c282 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index 23f099bffa..96f705d00b 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index e020190ae3..858faa6eab 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -48,14 +48,13 @@ using namespace QtConcurrent;
class tst_QtConcurrentThreadEngine: public QObject
{
Q_OBJECT
-public:
- void threadCount();
private slots:
void runDirectly();
void result();
void runThroughStarter();
void cancel();
void throttle();
+ void threadCount();
void multipleResults();
void stresstest();
void cancelQueuedSlowUser();
@@ -279,6 +278,8 @@ public:
void tst_QtConcurrentThreadEngine::threadCount()
{
+ QSKIP("QTBUG-23333: This test is unstable");
+
const int repeats = 10;
for (int i = 0; i < repeats; ++i) {
ThreadCountUser t;
@@ -445,8 +446,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const Exception &) {
caught = true;
}
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// Blocking mode:
@@ -459,9 +459,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const Exception &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// test throwing the exception from the main thread (different code path)
@@ -473,9 +471,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const Exception &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// Asynchronous mode:
@@ -488,8 +484,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const QtConcurrent::UnhandledException &) {
caught = true;
}
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// Blocking mode:
@@ -502,9 +497,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const QtConcurrent::UnhandledException &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
// test throwing the exception from the main thread (different code path)
@@ -516,9 +509,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
} catch (const QtConcurrent::UnhandledException &) {
caught = true;
}
-
- if (!caught)
- QFAIL("did not get exception");
+ QVERIFY2(caught, "did not get exception");
}
}
diff --git a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
index ff26d5d2c3..e08ed2b3fc 100644
--- a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -205,9 +205,7 @@ void tst_QThreadPool::runTask()
QThreadPool manager;
ran = false;
manager.start(new TestTask());
- // Hang if task is not runned.
- while (ran == false)
- QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers
+ QTRY_VERIFY(ran);
}
/*
@@ -217,8 +215,7 @@ void tst_QThreadPool::singleton()
{
ran = false;
QThreadPool::globalInstance()->start(new TestTask());
- while (ran == false)
- QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers
+ QTRY_VERIFY(ran);
}
int *value = 0;
diff --git a/tests/auto/corelib/corelib.pro b/tests/auto/corelib/corelib.pro
index 50228990c9..84eb3f284c 100644
--- a/tests/auto/corelib/corelib.pro
+++ b/tests/auto/corelib/corelib.pro
@@ -5,6 +5,7 @@ SUBDIRS=\
concurrent \
global \
io \
+ itemmodels \
kernel \
plugin \
statemachine \
diff --git a/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp b/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp
index e4949348f4..35a74f154d 100644
--- a/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp
+++ b/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp
index 85e64a6d63..d80f401071 100644
--- a/tests/auto/corelib/global/qflags/tst_qflags.cpp
+++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
index f440e4eaa5..41fb311837 100644
--- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
+++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 3efdbf0433..23b9c6bbab 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
index 697ddfc9d2..f73884fe02 100644
--- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
+++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/global/qrand/tst_qrand.cpp b/tests/auto/corelib/global/qrand/tst_qrand.cpp
index 7ac778211c..71f14e28e2 100644
--- a/tests/auto/corelib/global/qrand/tst_qrand.cpp
+++ b/tests/auto/corelib/global/qrand/tst_qrand.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro
index e044eda1ca..ae0b4968b8 100644
--- a/tests/auto/corelib/io/io.pro
+++ b/tests/auto/corelib/io/io.pro
@@ -7,10 +7,12 @@ SUBDIRS=\
qdir \
qdiriterator \
qfile \
+ largefile \
qfileinfo \
qfilesystementry \
qfilesystemwatcher \
qiodevice \
+ qnodebug \
qprocess \
qprocessenvironment \
qresourceengine \
diff --git a/tests/auto/corelib/io/qfile/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro
index 4e629122ec..4e629122ec 100644
--- a/tests/auto/corelib/io/qfile/largefile/largefile.pro
+++ b/tests/auto/corelib/io/largefile/largefile.pro
diff --git a/tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp
index ce7b829738..ba2eced60a 100644
--- a/tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
index 9f8fcda01c..1bffd63d1b 100644
--- a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
+++ b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
index e2d422ad54..e2890d7891 100644
--- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index 3d3f5b4a97..d17bab3bc1 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,12 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include <QtGui/QtGui>
+#include <QtGui/QBitmap>
+#include <QtGui/QPixmap>
+#include <QtGui/QPicture>
+#include <QtGui/QTextLength>
+#include <QtGui/QPainter>
+#include <QtGui/QPen>
Q_DECLARE_METATYPE(QBitArray)
Q_DECLARE_METATYPE(qint64)
@@ -873,7 +878,7 @@ static void QBitArrayData(QBitArray *b, int index)
for (int i = 0; i < filler.length(); ++i) {
if (filler.at(i) == '1')
- b->setBit(i, TRUE);
+ b->setBit(i, true);
}
}
@@ -1100,11 +1105,17 @@ void tst_QDataStream::readQCursor(QDataStream *s)
QVERIFY(d5.shape() == test.shape()); //## lacks operator==
QVERIFY(d5.hotSpot() == test.hotSpot());
QVERIFY((d5.bitmap() != 0 && test.bitmap() != 0) || (d5.bitmap() == 0 && test.bitmap() == 0));
- if (d5.bitmap() != 0)
- QVERIFY(pixmapsAreEqual(d5.bitmap(), test.bitmap()));
+ if (d5.bitmap() != 0) {
+ QPixmap actual = *(d5.bitmap());
+ QPixmap expected = *(test.bitmap());
+ QCOMPARE(actual, expected);
+ }
QVERIFY((d5.mask() != 0 && test.mask() != 0) || (d5.mask() == 0 && test.mask() == 0));
- if (d5.mask() != 0)
- QVERIFY(pixmapsAreEqual(d5.mask(), test.mask()));
+ if (d5.mask() != 0) {
+ QPixmap actual = *(d5.mask());
+ QPixmap expected = *(test.mask());
+ QCOMPARE(actual, expected);
+ }
#endif
}
@@ -1307,83 +1318,83 @@ void tst_QDataStream::readQDateTime(QDataStream *s)
static QFont qFontData(int index)
{
switch (index) {
- case 0: return QFont("Courier", 20, QFont::Bold, TRUE);
- case 1: return QFont("Courier", 18, QFont::Bold, FALSE);
- case 2: return QFont("Courier", 16, QFont::Light, TRUE);
- case 3: return QFont("Courier", 14, QFont::Normal, FALSE);
- case 4: return QFont("Courier", 12, QFont::DemiBold, TRUE);
- case 5: return QFont("Courier", 10, QFont::Black, FALSE);
+ case 0: return QFont("Courier", 20, QFont::Bold, true);
+ case 1: return QFont("Courier", 18, QFont::Bold, false);
+ case 2: return QFont("Courier", 16, QFont::Light, true);
+ case 3: return QFont("Courier", 14, QFont::Normal, false);
+ case 4: return QFont("Courier", 12, QFont::DemiBold, true);
+ case 5: return QFont("Courier", 10, QFont::Black, false);
case 6:
{
- QFont f("Helvetica", 10, QFont::Normal, FALSE);
+ QFont f("Helvetica", 10, QFont::Normal, false);
f.setPixelSize(2);
- f.setUnderline(FALSE);
- f.setStrikeOut(FALSE);
- f.setFixedPitch(FALSE);
+ f.setUnderline(false);
+ f.setStrikeOut(false);
+ f.setFixedPitch(false);
return f;
}
case 7:
{
- QFont f("Helvetica", 10, QFont::Bold, FALSE);
+ QFont f("Helvetica", 10, QFont::Bold, false);
f.setPixelSize(4);
- f.setUnderline(TRUE);
- f.setStrikeOut(FALSE);
- f.setFixedPitch(FALSE);
+ f.setUnderline(true);
+ f.setStrikeOut(false);
+ f.setFixedPitch(false);
return f;
}
case 8:
{
- QFont f("Helvetica", 10, QFont::Light, FALSE);
+ QFont f("Helvetica", 10, QFont::Light, false);
f.setPixelSize(6);
- f.setUnderline(FALSE);
- f.setStrikeOut(TRUE);
- f.setFixedPitch(FALSE);
+ f.setUnderline(false);
+ f.setStrikeOut(true);
+ f.setFixedPitch(false);
return f;
}
case 9:
{
- QFont f("Helvetica", 10, QFont::DemiBold, FALSE);
+ QFont f("Helvetica", 10, QFont::DemiBold, false);
f.setPixelSize(8);
- f.setUnderline(FALSE);
- f.setStrikeOut(FALSE);
- f.setFixedPitch(TRUE);
+ f.setUnderline(false);
+ f.setStrikeOut(false);
+ f.setFixedPitch(true);
return f;
}
case 10:
{
- QFont f("Helvetica", 10, QFont::Black, FALSE);
+ QFont f("Helvetica", 10, QFont::Black, false);
f.setPixelSize(10);
- f.setUnderline(TRUE);
- f.setStrikeOut(TRUE);
- f.setFixedPitch(FALSE);
+ f.setUnderline(true);
+ f.setStrikeOut(true);
+ f.setFixedPitch(false);
return f;
}
case 11:
{
- QFont f("Helvetica", 10, QFont::Normal, TRUE);
+ QFont f("Helvetica", 10, QFont::Normal, true);
f.setPixelSize(12);
- f.setUnderline(FALSE);
- f.setStrikeOut(TRUE);
- f.setFixedPitch(TRUE);
+ f.setUnderline(false);
+ f.setStrikeOut(true);
+ f.setFixedPitch(true);
return f;
}
case 12:
{
- QFont f("Helvetica", 10, QFont::Bold, TRUE);
+ QFont f("Helvetica", 10, QFont::Bold, true);
f.setPixelSize(14);
- f.setUnderline(TRUE);
- f.setStrikeOut(TRUE);
- f.setFixedPitch(TRUE);
+ f.setUnderline(true);
+ f.setStrikeOut(true);
+ f.setFixedPitch(true);
return f;
}
case 13:
{
- QFont f("Helvetica", 10, QFont::Bold, TRUE);
+ QFont f("Helvetica", 10, QFont::Bold, true);
f.setStretch(200);
return f;
}
}
- return QFont("Courier", 18, QFont::Bold, TRUE);
+ return QFont("Courier", 18, QFont::Bold, true);
}
#define MAX_QFONT_DATA 14
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index f33a7eef5a..535807bfc3 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
#include <QtCore/QtDebug>
#include <QtTest/QtTest>
@@ -81,16 +81,34 @@ static void myMessageHandler(QtMsgType type, const char *msg)
s_msgType = type;
}
+// Helper class to ensure that the testlib message handler gets
+// restored at the end of each test function, even if the test
+// fails or throws an exception.
+class MessageHandlerSetter
+{
+public:
+ MessageHandlerSetter(QtMsgHandler newMsgHandler)
+ : oldMsgHandler(qInstallMsgHandler(newMsgHandler))
+ { }
+
+ ~MessageHandlerSetter()
+ {
+ qInstallMsgHandler(oldMsgHandler);
+ }
+
+private:
+ QtMsgHandler oldMsgHandler;
+};
+
/*! \internal
The qWarning() stream should be usable even if QT_NO_DEBUG is defined.
*/
void tst_QDebug::warningWithoutDebug() const
{
- qInstallMsgHandler(myMessageHandler);
+ MessageHandlerSetter mhs(myMessageHandler);
{ qWarning() << "A qWarning() message"; }
QCOMPARE(s_msgType, QtWarningMsg);
QCOMPARE(QString::fromLatin1(s_msg.data()), QString::fromLatin1("A qWarning() message "));
- qInstallMsgHandler(0);
}
/*! \internal
@@ -98,25 +116,23 @@ void tst_QDebug::warningWithoutDebug() const
*/
void tst_QDebug::criticalWithoutDebug() const
{
- qInstallMsgHandler(myMessageHandler);
+ MessageHandlerSetter mhs(myMessageHandler);
{ qCritical() << "A qCritical() message"; }
QCOMPARE(s_msgType, QtCriticalMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("A qCritical() message "));
- qInstallMsgHandler(0);
}
void tst_QDebug::debugWithQBool() const
{
- qInstallMsgHandler(myMessageHandler);
+ MessageHandlerSetter mhs(myMessageHandler);
{ qDebug() << QBool(false) << QBool(true); }
QCOMPARE(s_msgType, QtDebugMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("false true "));
- qInstallMsgHandler(0);
}
void tst_QDebug::veryLongWarningMessage() const
{
- qInstallMsgHandler(myMessageHandler);
+ MessageHandlerSetter mhs(myMessageHandler);
QString test;
{
QString part("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n");
@@ -126,7 +142,6 @@ void tst_QDebug::veryLongWarningMessage() const
}
QCOMPARE(s_msgType, QtWarningMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("Test output:\n")+test+QString::fromLatin1("\nend"));
- qInstallMsgHandler(0);
}
void tst_QDebug::qDebugQStringRef() const
@@ -136,27 +151,26 @@ void tst_QDebug::qDebugQStringRef() const
const QString in(QLatin1String("input"));
const QStringRef inRef(&in);
- qInstallMsgHandler(myMessageHandler);
+ MessageHandlerSetter mhs(myMessageHandler);
{ qDebug() << inRef; }
QCOMPARE(s_msgType, QtDebugMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("\"input\" "));
- qInstallMsgHandler(0);
}
/* Use a null QStringRef. */
{
const QStringRef inRef;
- qInstallMsgHandler(myMessageHandler);
+ MessageHandlerSetter mhs(myMessageHandler);
{ qDebug() << inRef; }
QCOMPARE(s_msgType, QtDebugMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("\"\" "));
- qInstallMsgHandler(0);
}
}
void tst_QDebug::defaultMessagehandler() const
{
+ MessageHandlerSetter mhs(0);
QtMsgHandler defaultMessageHandler1 = qInstallMsgHandler(0);
QtMsgHandler defaultMessageHandler2 = qInstallMsgHandler(myMessageHandler);
bool same = (*defaultMessageHandler1 == *defaultMessageHandler2);
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
index 74114760c9..01cbc13d40 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
index 74114760c9..01cbc13d40 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 5b48f9da00..1f4e05d0cd 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -100,6 +100,7 @@ private slots:
void removeRecursively_data();
void removeRecursively();
void removeRecursivelyFailure();
+ void removeRecursivelySymlink();
void exists_data();
void exists();
@@ -412,6 +413,31 @@ void tst_QDir::removeRecursivelyFailure()
QVERIFY(!dir.exists());
}
+void tst_QDir::removeRecursivelySymlink()
+{
+#ifndef Q_NO_SYMLINKS
+ const QString tmpdir = QDir::currentPath() + "/tmpdir/";
+ QDir().mkpath(tmpdir);
+ QDir currentDir;
+ currentDir.mkdir("myDir");
+ QFile("testfile").open(QIODevice::WriteOnly);
+ const QString link = tmpdir + "linkToDir.lnk";
+ const QString linkToFile = tmpdir + "linkToFile.lnk";
+#ifndef Q_NO_SYMLINKS_TO_DIRS
+ QVERIFY(QFile::link("../myDir", link));
+ QVERIFY(QFile::link("../testfile", linkToFile));
+#endif
+
+ QDir dir(tmpdir);
+ QVERIFY(dir.removeRecursively());
+ QVERIFY(QDir("myDir").exists()); // it didn't follow the symlink, good.
+ QVERIFY(QFile::exists("testfile"));
+
+ currentDir.rmdir("myDir");
+ QFile::remove("testfile");
+#endif
+}
+
void tst_QDir::exists_data()
{
QTest::addColumn<QString>("path");
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 8a7f1747b4..3b3b2b5a04 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro
index 8bb142c5b4..e2c714c67f 100644
--- a/tests/auto/corelib/io/qfile/qfile.pro
+++ b/tests/auto/corelib/io/qfile/qfile.pro
@@ -5,6 +5,4 @@ wince* {
SUBDIRS = test stdinprocess
}
-SUBDIRS += largefile
-
CONFIG += parallel_test
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
index 57a8d904f5..14cb28af6b 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
+++ b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,8 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QFile>
int main(int argc, char *argv[])
{
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 300f30e133..0549fe32f0 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -404,7 +404,7 @@ void tst_QFile::cleanupTestCase()
void tst_QFile::exists()
{
QFile f( QFINDTESTDATA("testfile.txt") );
- QCOMPARE( f.exists(), (bool)TRUE );
+ QVERIFY(f.exists());
QFile file("nobodyhassuchafile");
file.remove();
@@ -443,41 +443,41 @@ void tst_QFile::open_data()
#endif
QTest::newRow( "exist_readOnly" )
<< QString(QFINDTESTDATA("testfile.txt")) << int(QIODevice::ReadOnly)
- << (bool)TRUE << QFile::NoError;
+ << true << QFile::NoError;
QTest::newRow( "exist_writeOnly" )
<< QString("readonlyfile")
<< int(QIODevice::WriteOnly)
- << (bool)FALSE
+ << false
<< QFile::OpenError;
QTest::newRow( "exist_append" )
<< QString("readonlyfile") << int(QIODevice::Append)
- << (bool)FALSE << QFile::OpenError;
+ << false << QFile::OpenError;
QTest::newRow( "nonexist_readOnly" )
<< QString("nonExist.txt") << int(QIODevice::ReadOnly)
- << (bool)FALSE << QFile::OpenError;
+ << false << QFile::OpenError;
QTest::newRow("emptyfile")
<< QString("")
<< int(QIODevice::ReadOnly)
- << (bool)FALSE
+ << false
<< QFile::OpenError;
- QTest::newRow("nullfile") << QString() << int(QIODevice::ReadOnly) << (bool)FALSE
+ QTest::newRow("nullfile") << QString() << int(QIODevice::ReadOnly) << false
<< QFile::OpenError;
- QTest::newRow("two-dots") << QString(QFINDTESTDATA("two.dots.file")) << int(QIODevice::ReadOnly) << (bool)TRUE
+ QTest::newRow("two-dots") << QString(QFINDTESTDATA("two.dots.file")) << int(QIODevice::ReadOnly) << true
<< QFile::NoError;
QTest::newRow("readonlyfile") << QString("readonlyfile") << int(QIODevice::WriteOnly)
- << (bool)FALSE << QFile::OpenError;
+ << false << QFile::OpenError;
QTest::newRow("noreadfile") << QString("noreadfile") << int(QIODevice::ReadOnly)
- << (bool)FALSE << QFile::OpenError;
+ << false << QFile::OpenError;
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly)
- << (bool)TRUE << QFile::NoError;
+ << true << QFile::NoError;
QTest::newRow("uncFile") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" << int(QIODevice::ReadOnly)
<< true << QFile::NoError;
#endif
@@ -694,7 +694,7 @@ void tst_QFile::atEnd()
bool end = f.atEnd();
f.close();
- QCOMPARE( end, (bool)TRUE );
+ QVERIFY(end);
}
void tst_QFile::readLine()
@@ -832,7 +832,7 @@ void tst_QFile::readAllStdin()
QByteArray lotsOfData(1024, '@'); // 10 megs
QProcess process;
- process.start("stdinprocess/stdinprocess all");
+ process.start(QFINDTESTDATA("stdinprocess/stdinprocess")+" all");
QVERIFY( process.waitForStarted() );
for (int i = 0; i < 5; ++i) {
QTest::qWait(1000);
@@ -867,7 +867,7 @@ void tst_QFile::readLineStdin()
for (int i = 0; i < 2; ++i) {
QProcess process;
- process.start(QString("stdinprocess/stdinprocess line %1").arg(i), QIODevice::Text | QIODevice::ReadWrite);
+ process.start((QFINDTESTDATA("stdinprocess/stdinprocess")+QString(" line %1").arg(i)), QIODevice::Text | QIODevice::ReadWrite);
for (int i = 0; i < 5; ++i) {
QTest::qWait(1000);
process.write(lotsOfData);
@@ -901,7 +901,7 @@ void tst_QFile::readLineStdin_lineByLine()
#else
for (int i = 0; i < 2; ++i) {
QProcess process;
- process.start(QString("stdinprocess/stdinprocess line %1").arg(i), QIODevice::Text | QIODevice::ReadWrite);
+ process.start(QFINDTESTDATA("stdinprocess/stdinprocess")+ QString(" line %1").arg(i), QIODevice::Text | QIODevice::ReadWrite);
QVERIFY(process.waitForStarted());
for (int j = 0; j < 3; ++j) {
@@ -1483,14 +1483,15 @@ void tst_QFile::tailFile()
QVERIFY(tailFile.open(QFile::ReadOnly));
tailFile.seek(file.size());
- QSignalSpy readSignal(&tailFile, SIGNAL(readyRead()));
+ QSignalSpy readSignalSpy(&tailFile, SIGNAL(readyRead()));
+ QVERIFY(readSignalSpy.isValid());
file.write("", 1);
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
- QCOMPARE(readSignal.count(), 1);
+ QCOMPARE(readSignalSpy.count(), 1);
}
void tst_QFile::flush()
@@ -1939,7 +1940,7 @@ public:
virtual ~MyEngine() {}
void setFileName(const QString &) {}
- bool open(int ) { return false; }
+ bool open(QIODevice::OpenMode) { return false; }
bool close() { return false; }
bool flush() { return false; }
qint64 size() const { return 123 + number; }
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index c3979fce15..5764cee66d 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -49,6 +49,7 @@
#include <qdir.h>
#include <qfileinfo.h>
#ifdef Q_OS_UNIX
+#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -1492,41 +1493,53 @@ void tst_QFileInfo::testDecomposedUnicodeNames_data()
QTest::newRow("no decomposed") << currPath + QString::fromUtf8("/4 øøøcopy.pdf") << QString::fromUtf8("4 øøøcopy.pdf") << true;
}
-static void createFileNative(const QString &filePath)
+// This is a helper class that ensures that files created during the test
+// will be removed afterwards, even if the test fails or throws an exception.
+class NativeFileCreator
{
+public:
+ NativeFileCreator(const QString &filePath)
+ : m_filePath(filePath), m_error(0)
+ {
#ifdef Q_OS_UNIX
- int fd = open(filePath.normalized(QString::NormalizationForm_D).toUtf8().constData(), O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
- if (fd < 0) {
- QFAIL("couldn't create file");
- } else {
- close(fd);
- }
-#else
- Q_UNUSED(filePath);
+ int fd = open(m_filePath.normalized(QString::NormalizationForm_D).toUtf8().constData(), O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
+ if (fd >= 0)
+ close(fd);
+ else
+ m_error = errno;
#endif
-}
-
-static void removeFileNative(const QString &filePath)
-{
+ }
+ ~NativeFileCreator()
+ {
#ifdef Q_OS_UNIX
- unlink(filePath.normalized(QString::NormalizationForm_D).toUtf8().constData());
-#else
- Q_UNUSED(filePath);
+ if (m_error == 0)
+ unlink(m_filePath.normalized(QString::NormalizationForm_D).toUtf8().constData());
#endif
-}
+ }
+ int error() const
+ {
+ return m_error;
+ }
+
+private:
+ QString m_filePath;
+ int m_error;
+};
void tst_QFileInfo::testDecomposedUnicodeNames()
{
#ifndef Q_OS_MAC
QSKIP("This is a OS X only test (unless you know more about filesystems, then maybe you should try it ;)");
-#endif
+#else
QFETCH(QString, filePath);
- createFileNative(filePath);
+ NativeFileCreator nativeFileCreator(filePath);
+ int error = nativeFileCreator.error();
+ QVERIFY2(error == 0, qPrintable(QString("Couldn't create native file %1: %2").arg(filePath).arg(strerror(error))));
QFileInfo file(filePath);
QTEST(file.fileName(), "fileName");
QTEST(file.exists(), "exists");
- removeFileNative(filePath);
+#endif
}
void tst_QFileInfo::equalOperator() const
diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
index e8a7e945c3..cc75801638 100644
--- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
+++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index b9840bdb75..05b2539182 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,9 +56,6 @@ class tst_QFileSystemWatcher : public QObject
{
Q_OBJECT
-public:
- tst_QFileSystemWatcher();
-
private slots:
void basicTest_data();
void basicTest();
@@ -81,44 +78,18 @@ private slots:
void cleanup();
void destroyAfterQCoreApplication();
-private:
- QStringList do_force_engines;
- bool do_force_native;
};
-tst_QFileSystemWatcher::tst_QFileSystemWatcher()
- : do_force_native(false)
-{
-#ifdef Q_OS_LINUX
- // the inotify implementation in the kernel is known to be buggy in certain versions of the linux kernel
- do_force_engines << "native";
- do_force_engines << "dnotify";
-
-#ifdef QT_NO_INOTIFY
- if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
- do_force_engines << "inotify";
-#else
- if (inotify_init() != -1)
- do_force_engines << "inotify";
-#endif
-#elif defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD)
- // we have native engines for win32, macosx and freebsd
- do_force_engines << "native";
-#endif
-}
-
void tst_QFileSystemWatcher::basicTest_data()
{
QTest::addColumn<QString>("backend");
- foreach(QString engine, do_force_engines)
- QTest::newRow(engine.toLatin1().constData()) << engine;
- QTest::newRow("poller") << "poller";
+ QTest::newRow("native backend") << "native";
+ QTest::newRow("poller backend") << "poller";
}
void tst_QFileSystemWatcher::basicTest()
{
QFETCH(QString, backend);
- qDebug() << "Testing" << backend << "engine";
// create test file
QFile testFile("testfile.txt");
@@ -134,10 +105,10 @@ void tst_QFileSystemWatcher::basicTest()
// create watcher, forcing it to use a specific backend
QFileSystemWatcher watcher;
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
- watcher.removePath(testFile.fileName());
- watcher.addPath(testFile.fileName());
+ QVERIFY(watcher.addPath(testFile.fileName()));
QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(const QString &)));
+ QVERIFY(changedSpy.isValid());
QEventLoop eventLoop;
QTimer timer;
connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit()));
@@ -159,10 +130,7 @@ void tst_QFileSystemWatcher::basicTest()
testFile.close();
// waiting max 5 seconds for notification for file modification to trigger
- timer.start(5000);
- eventLoop.exec();
-
- QCOMPARE(changedSpy.count(), 1);
+ QTRY_COMPARE(changedSpy.count(), 1);
QCOMPARE(changedSpy.at(0).count(), 1);
QString fileName = changedSpy.at(0).at(0).toString();
@@ -171,7 +139,7 @@ void tst_QFileSystemWatcher::basicTest()
changedSpy.clear();
// remove the watch and modify the file, should not get a signal from the watcher
- watcher.removePath(testFile.fileName());
+ QVERIFY(watcher.removePath(testFile.fileName()));
testFile.open(QIODevice::WriteOnly | QIODevice::Truncate);
testFile.write(QByteArray("hello universe!"));
testFile.close();
@@ -183,31 +151,25 @@ void tst_QFileSystemWatcher::basicTest()
QCOMPARE(changedSpy.count(), 0);
// readd the file watch with a relative path
- watcher.addPath(testFile.fileName().prepend("./"));
+ QVERIFY(watcher.addPath(testFile.fileName().prepend("./")));
testFile.open(QIODevice::WriteOnly | QIODevice::Truncate);
testFile.write(QByteArray("hello multiverse!"));
testFile.close();
- timer.start(5000);
- eventLoop.exec();
-
- QVERIFY(changedSpy.count() > 0);
+ QTRY_VERIFY(changedSpy.count() > 0);
- watcher.removePath(testFile.fileName().prepend("./"));
+ QVERIFY(watcher.removePath(testFile.fileName().prepend("./")));
changedSpy.clear();
// readd the file watch
- watcher.addPath(testFile.fileName());
+ QVERIFY(watcher.addPath(testFile.fileName()));
// change the permissions, should get a signal from the watcher
testFile.setPermissions(QFile::ReadOwner);
// waiting max 5 seconds for notification for file permission modification to trigger
- timer.start(5000);
- eventLoop.exec();
-
- QCOMPARE(changedSpy.count(), 1);
+ QTRY_COMPARE(changedSpy.count(), 1);
QCOMPARE(changedSpy.at(0).count(), 1);
fileName = changedSpy.at(0).at(0).toString();
@@ -216,7 +178,7 @@ void tst_QFileSystemWatcher::basicTest()
changedSpy.clear();
// remove the watch and modify file permissions, should not get a signal from the watcher
- watcher.removePath(testFile.fileName());
+ QVERIFY(watcher.removePath(testFile.fileName()));
testFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOther);
// waiting max 5 seconds for notification for file modification to trigger
@@ -226,16 +188,15 @@ void tst_QFileSystemWatcher::basicTest()
QCOMPARE(changedSpy.count(), 0);
// readd the file watch
- watcher.addPath(testFile.fileName());
+ QVERIFY(watcher.addPath(testFile.fileName()));
// remove the file, should get a signal from the watcher
QVERIFY(testFile.remove());
// waiting max 5 seconds for notification for file removal to trigger
- timer.start(5000);
- eventLoop.exec();
-
- QVERIFY(changedSpy.count() == 1 || changedSpy.count() == 2); // removing a file on some filesystems seems to deliver 2 notifications
+ // > 0 && < 3 because some platforms may emit two changes
+ // XXX: which platforms? (QTBUG-23370)
+ QTRY_VERIFY(changedSpy.count() > 0 && changedSpy.count() < 3);
QCOMPARE(changedSpy.at(0).count(), 1);
fileName = changedSpy.at(0).at(0).toString();
@@ -260,7 +221,6 @@ void tst_QFileSystemWatcher::basicTest()
void tst_QFileSystemWatcher::watchDirectory()
{
QFETCH(QString, backend);
- qDebug() << "Testing" << backend << "engine";
QDir().mkdir("testDir");
QDir testDir("testDir");
@@ -270,9 +230,10 @@ void tst_QFileSystemWatcher::watchDirectory()
QFileSystemWatcher watcher;
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
- watcher.addPath(testDir.dirName());
+ QVERIFY(watcher.addPath(testDir.dirName()));
QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(const QString &)));
+ QVERIFY(changedSpy.isValid());
QEventLoop eventLoop;
QTimer timer;
connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit()));
@@ -285,7 +246,7 @@ void tst_QFileSystemWatcher::watchDirectory()
QString fileName;
// remove the watch, should not get notification of a new file
- watcher.removePath(testDir.dirName());
+ QVERIFY(watcher.removePath(testDir.dirName()));
QVERIFY(testFile.open(QIODevice::WriteOnly | QIODevice::Truncate));
testFile.close();
@@ -295,7 +256,7 @@ void tst_QFileSystemWatcher::watchDirectory()
QCOMPARE(changedSpy.count(), 0);
- watcher.addPath(testDir.dirName());
+ QVERIFY(watcher.addPath(testDir.dirName()));
// remove the file again, should get a signal from the watcher
QVERIFY(testFile.remove());
@@ -307,13 +268,10 @@ void tst_QFileSystemWatcher::watchDirectory()
QVERIFY(QDir().rmdir("testDir"));
// waiting max 5 seconds for notification for directory removal to trigger
- timer.start(5000);
- eventLoop.exec();
-
#ifdef Q_OS_WINCE
QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
#endif
- QCOMPARE(changedSpy.count(), 2);
+ QTRY_COMPARE(changedSpy.count(), 2);
QCOMPARE(changedSpy.at(0).count(), 1);
QCOMPARE(changedSpy.at(1).count(), 1);
@@ -341,30 +299,32 @@ void tst_QFileSystemWatcher::addPath()
{
QFileSystemWatcher watcher;
QString home = QDir::homePath();
- watcher.addPath(home);
+ QVERIFY(watcher.addPath(home));
QCOMPARE(watcher.directories().count(), 1);
QCOMPARE(watcher.directories().first(), home);
- watcher.addPath(home);
+
+ // second watch on an already-watched path should fail
+ QVERIFY(!watcher.addPath(home));
QCOMPARE(watcher.directories().count(), 1);
// With empty string
QTest::ignoreMessage(QtWarningMsg, "QFileSystemWatcher::addPath: path is empty");
- watcher.addPath(QString());
+ QVERIFY(watcher.addPath(QString()));
}
void tst_QFileSystemWatcher::removePath()
{
QFileSystemWatcher watcher;
QString home = QDir::homePath();
- watcher.addPath(home);
- watcher.removePath(home);
+ QVERIFY(watcher.addPath(home));
+ QVERIFY(watcher.removePath(home));
QCOMPARE(watcher.directories().count(), 0);
- watcher.removePath(home);
+ QVERIFY(!watcher.removePath(home));
QCOMPARE(watcher.directories().count(), 0);
// With empty string
QTest::ignoreMessage(QtWarningMsg, "QFileSystemWatcher::removePath: path is empty");
- watcher.removePath(QString());
+ QVERIFY(watcher.removePath(QString()));
}
void tst_QFileSystemWatcher::addPaths()
@@ -372,13 +332,13 @@ void tst_QFileSystemWatcher::addPaths()
QFileSystemWatcher watcher;
QStringList paths;
paths << QDir::homePath() << QDir::currentPath();
- watcher.addPaths(paths);
+ QCOMPARE(watcher.addPaths(paths), QStringList());
QCOMPARE(watcher.directories().count(), 2);
// With empty list
paths.clear();
QTest::ignoreMessage(QtWarningMsg, "QFileSystemWatcher::addPaths: list is empty");
- watcher.addPaths(paths);
+ QCOMPARE(watcher.addPaths(paths), QStringList());
}
void tst_QFileSystemWatcher::removePaths()
@@ -386,9 +346,9 @@ void tst_QFileSystemWatcher::removePaths()
QFileSystemWatcher watcher;
QStringList paths;
paths << QDir::homePath() << QDir::currentPath();
- watcher.addPaths(paths);
+ QCOMPARE(watcher.addPaths(paths), QStringList());
QCOMPARE(watcher.directories().count(), 2);
- watcher.removePaths(paths);
+ QCOMPARE(watcher.removePaths(paths), QStringList());
QCOMPARE(watcher.directories().count(), 0);
//With empty list
@@ -418,11 +378,13 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
QFileSystemWatcher watcher;
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
- watcher.addPath(testDir.dirName());
- watcher.addPath(testFileName);
+ QVERIFY(watcher.addPath(testDir.dirName()));
+ QVERIFY(watcher.addPath(testFileName));
QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(const QString &)));
QSignalSpy dirChangedSpy(&watcher, SIGNAL(directoryChanged(const QString &)));
+ QVERIFY(fileChangedSpy.isValid());
+ QVERIFY(dirChangedSpy.isValid());
QEventLoop eventLoop;
QTimer timer;
connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit()));
@@ -436,9 +398,8 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
testFile.write(QByteArray("hello again"));
testFile.close();
- timer.start(3000);
- eventLoop.exec();
- QVERIFY(fileChangedSpy.count() > 0);
+ QTRY_VERIFY(fileChangedSpy.count() > 0);
+
//according to Qt 4 documentation:
//void QFileSystemWatcher::directoryChanged ( const QString & path ) [signal]
//This signal is emitted when the directory at a specified path, is modified
@@ -448,9 +409,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
//sequence of changes will always generate this signal.
QVERIFY(dirChangedSpy.count() < 2);
- if (backend == "dnotify")
- QSKIP("dnotify is broken, skipping the rest of the test.");
-
fileChangedSpy.clear();
dirChangedSpy.clear();
QFile secondFile(secondFileName);
@@ -470,15 +428,14 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
QFile::remove(testFileName);
- timer.start(3000);
- eventLoop.exec();
- QVERIFY(fileChangedSpy.count() > 0);
+ QTRY_VERIFY(fileChangedSpy.count() > 0);
QCOMPARE(dirChangedSpy.count(), 1);
fileChangedSpy.clear();
dirChangedSpy.clear();
- watcher.removePath(testFileName);
+ // removing a deleted file should fail
+ QVERIFY(!watcher.removePath(testFileName));
QFile::remove(secondFileName);
timer.start(3000);
@@ -503,8 +460,17 @@ void tst_QFileSystemWatcher::nonExistingFile()
{
// Don't crash...
QFileSystemWatcher watcher;
- watcher.addPath("file_that_does_not_exist.txt");
- QVERIFY(true);
+ QVERIFY(!watcher.addPath("file_that_does_not_exist.txt"));
+
+ // Test that the paths returned in error aren't messed with
+ QCOMPARE(watcher.addPaths(QStringList() << "../..//./does-not-exist"),
+ QStringList() << "../..//./does-not-exist");
+
+ // empty path is not actually a failure
+ QCOMPARE(watcher.addPaths(QStringList() << QString()), QStringList());
+
+ // empty path is not actually a failure
+ QCOMPARE(watcher.removePaths(QStringList() << QString()), QStringList());
}
void tst_QFileSystemWatcher::removeFileAndUnWatch()
@@ -517,17 +483,17 @@ void tst_QFileSystemWatcher::removeFileAndUnWatch()
testFile.open(QIODevice::WriteOnly);
testFile.close();
}
- watcher.addPath(filename);
+ QVERIFY(watcher.addPath(filename));
QFile::remove(filename);
- watcher.removePath(filename);
+ QVERIFY(watcher.removePath(filename));
{
QFile testFile(filename);
testFile.open(QIODevice::WriteOnly);
testFile.close();
}
- watcher.addPath(filename);
+ QVERIFY(watcher.addPath(filename));
}
class SomeSingleton : public QObject
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index a67289f2a1..b1c02a6c02 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
#include <QtNetwork/QtNetwork>
#include <QtTest/QtTest>
diff --git a/tests/auto/corelib/io/qnodebug/qnodebug.pro b/tests/auto/corelib/io/qnodebug/qnodebug.pro
new file mode 100644
index 0000000000..2f951ab892
--- /dev/null
+++ b/tests/auto/corelib/io/qnodebug/qnodebug.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase parallel_test
+TARGET = tst_qnodebug
+QT = core testlib
+SOURCES = tst_qnodebug.cpp
diff --git a/tests/auto/v8/tst_v8.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
index 77a3413718..bca4d55037 100644
--- a/tests/auto/v8/tst_v8.cpp
+++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -38,61 +38,43 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <qtest.h>
-#include <private/v8.h>
-#include "v8test.h"
-using namespace v8;
+// This test is for "release" mode, with -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT
+#ifndef QT_NO_DEBUG
+#define QT_NO_DEBUG
+#endif
+#ifndef QT_NO_DEBUG_OUTPUT
+#define QT_NO_DEBUG_OUTPUT
+#endif
-class tst_v8 : public QObject
+#include <QtCore/QtCore>
+#include <QtCore/QtDebug>
+#include <QtTest/QtTest>
+
+class tst_QNoDebug: public QObject
{
Q_OBJECT
-public:
- tst_v8() {}
-
private slots:
- void initTestCase() {}
- void cleanupTestCase() {}
-
- void eval();
- void evalwithinwith();
- void userobjectcompare();
- void externalteardown();
- void globalcall();
+ void noDebugOutput() const;
+ void streaming() const;
};
-void tst_v8::eval()
-{
- QVERIFY(v8test_eval());
-}
-
-void tst_v8::evalwithinwith()
+void tst_QNoDebug::noDebugOutput() const
{
- QVERIFY(v8test_evalwithinwith());
-}
+ // should do nothing
+ qDebug() << "foo";
-void tst_v8::userobjectcompare()
-{
- QVERIFY(v8test_userobjectcompare());
+ // qWarning still works, though
+ QTest::ignoreMessage(QtWarningMsg, "bar ");
+ qWarning() << "bar";
}
-void tst_v8::externalteardown()
+void tst_QNoDebug::streaming() const
{
- QVERIFY(v8test_externalteardown());
-}
-
-void tst_v8::globalcall()
-{
- QVERIFY(v8test_globalcall());
-}
-
-int main(int argc, char *argv[])
-{
- V8::SetFlagsFromCommandLine(&argc, argv, true);
-
- QCoreApplication app(argc, argv);
- tst_v8 tc;
- return QTest::qExec(&tc, argc, argv);
+ QDateTime dt(QDate(1,2,3),QTime(4,5,6));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(\"%1\") ").arg(dt.toString())));
+ qWarning() << dt;
}
-#include "tst_v8.moc"
+QTEST_MAIN(tst_QNoDebug);
+#include "tst_qnodebug.moc"
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
index 360981f83c..947dc916f2 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
@@ -3,7 +3,3 @@ CONFIG += console
CONFIG -= app_bundle
QT = core
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
index 40e92c69be..5851ffe3da 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -38,7 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtCore>
+#include <QCoreApplication>
+#include <QFile>
int main(int argc, char **argv)
{
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pri b/tests/auto/corelib/io/qprocess/qprocess.pri
new file mode 100644
index 0000000000..8047bc4b39
--- /dev/null
+++ b/tests/auto/corelib/io/qprocess/qprocess.pri
@@ -0,0 +1,17 @@
+SUBPROGRAMS = \
+ testProcessCrash \
+ testProcessEcho \
+ testProcessEcho2 \
+ testProcessEcho3 \
+ testProcessEnvironment \
+ testProcessLoopback \
+ testProcessNormal \
+ testProcessOutput \
+ testProcessDeadWhileReading \
+ testProcessEOF \
+ testExitCodes \
+ testGuiProcess \
+ testDetached \
+ fileWriterProcess \
+ testSetWorkingDirectory \
+ testSoftExit
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pro b/tests/auto/corelib/io/qprocess/qprocess.pro
index 67c5f5437c..4155e3f73d 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pro
+++ b/tests/auto/corelib/io/qprocess/qprocess.pro
@@ -1,27 +1,14 @@
TEMPLATE = subdirs
-SUBDIRS = \
- testProcessCrash \
- testProcessEcho \
- testProcessEcho2 \
- testProcessEcho3 \
- testProcessEnvironment \
- testProcessLoopback \
- testProcessNormal \
- testProcessOutput \
- testProcessDeadWhileReading \
- testProcessEOF \
- testProcessSpacesArgs/nospace.pro \
- testExitCodes \
- testSpaceInName \
- testGuiProcess \
- testDetached \
- fileWriterProcess \
- testSetWorkingDirectory \
- testProcessSpacesArgs/onespace.pro \
- testProcessSpacesArgs/twospaces.pro \
- testSoftExit
+include(qprocess.pri)
+SUBDIRS = $$SUBPROGRAMS
+# Add special cases
+SUBDIRS += testProcessSpacesArgs/nospace.pro \
+ testProcessSpacesArgs/onespace.pro \
+ testProcessSpacesArgs/twospaces.pro \
+ testSpaceInName
win32:!wince*:SUBDIRS+=testProcessEchoGui
+test.depends += $$SUBDIRS
SUBDIRS += test
diff --git a/tests/auto/corelib/io/qprocess/test/test.pro b/tests/auto/corelib/io/qprocess/test/test.pro
index a8dba5eb8b..fb21800976 100644
--- a/tests/auto/corelib/io/qprocess/test/test.pro
+++ b/tests/auto/corelib/io/qprocess/test/test.pro
@@ -5,4 +5,12 @@ SOURCES = ../tst_qprocess.cpp
TARGET = ../tst_qprocess
-TESTDATA += ../testBatFiles/*
+win32:TESTDATA += ../testBatFiles/*
+
+include(../qprocess.pri)
+load(testcase) # for target.path and installTestHelperApp()
+for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file})
+installTestHelperApp("../testProcessSpacesArgs/nospace",testProcessSpacesArgs,nospace)
+installTestHelperApp("../testProcessSpacesArgs/one space",testProcessSpacesArgs,"one space")
+installTestHelperApp("../testProcessSpacesArgs/two space s",testProcessSpacesArgs,"two space s")
+installTestHelperApp("../test Space In Name/testSpaceInName","test Space In Name",testSpaceInName)
diff --git a/tests/auto/corelib/io/qprocess/testDetached/main.cpp b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
index 5b4ee790b9..bcf237f488 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
index e307379014..8d1fcba624 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
+++ b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
@@ -4,7 +4,3 @@ CONFIG += console
CONFIG -= app_bundle
INSTALLS =
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
index 4d6a49e8f5..1475b3354d 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
index afa8e4ccab..b08371804f 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
@@ -3,7 +3,3 @@ CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
index 90d4d4a962..c9e5d2e6a5 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
index 992188b443..8778da7ffe 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
@@ -1,8 +1,5 @@
SOURCES += main.cpp
QT += widgets
CONFIG += console
+CONFIG -= app_bundle
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
index e2ec87b3aa..b7c0511d77 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
index 98c5b966f2..7ccc976efc 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
@@ -3,7 +3,3 @@ CONFIG += console
CONFIG -= qt app_bundle
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
index 9e285b5012..97d9208e19 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
index a5f4697605..fbb3411d47 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
@@ -1,9 +1,5 @@
SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
index 28de5c2f3a..bf3d190630 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
index 4efdad997d..676318ac1e 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
@@ -4,7 +4,3 @@ CONFIG += console
win32:!win32-g++*:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
index a7eedff56d..0c915918e4 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
index f8dc695c17..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
@@ -1,8 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
index 1c18319bca..8f3bd70a3a 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
index f8dc695c17..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
@@ -1,8 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
index 62901a7789..c5eb4df307 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
index f8dc695c17..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
@@ -1,8 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
index b8c2bd6abd..877b3c6175 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro b/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro
index 65b408fc85..bedc76aa5b 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/testProcessEchoGui.pro
@@ -3,9 +3,5 @@ win32 {
!win32-borland:LIBS += -lUser32
}
-CONFIG -= qt
+CONFIG -= qt app_bundle
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
index 17ed5c61dc..146b61af0e 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
index 43378b6e17..a07ae00605 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
@@ -6,7 +6,3 @@ DESTDIR = ./
mac {
CONFIG -= app_bundle
}
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp b/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp
index 6803518400..78973f9f12 100644
--- a/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/auto/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
index f8dc695c17..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
@@ -1,8 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
index 008a0a2430..4fc8ea197c 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
index 98c5b966f2..7ccc976efc 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
@@ -3,7 +3,3 @@ CONFIG += console
CONFIG -= qt app_bundle
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
index d01739e3c0..5284607e9f 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
index f8dc695c17..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
@@ -1,8 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt
+CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
index 00944ba160..57fb68e841 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
index 93d0afb79f..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
@@ -2,7 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qproces
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/testProcessSpacesArgs
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
index 0146a6a985..527685e156 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
@@ -4,7 +4,3 @@ CONFIG += console
DESTDIR = ./
TARGET = "one space"
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/testProcessSpacesArgs
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
index f881c2a824..1a7fc32fd1 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
@@ -4,7 +4,3 @@ CONFIG += console
DESTDIR = ./
TARGET = "two space s"
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/testProcessSpacesArgs
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
index 0035c6253a..6ce8892354 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,9 @@
****************************************************************************/
-#include <QtCore>
+#include <QCoreApplication>
+#include <QByteArray>
+#include <QDir>
int main(int argc, char **argv)
{
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
index d6cc96b1e8..2ed59a7510 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
@@ -1,7 +1,4 @@
SOURCES = main.cpp
CONFIG += console
+CONFIG -= app_bundle
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
index b17ab4d9a6..fa368489d6 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
index 7bdf796926..87ba12c008 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index 5d4ec4fc21..d5f30bc35d 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
@@ -9,7 +9,3 @@ unix {
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-
-# This app is testdata for tst_qprocess
-target.path = $$[QT_INSTALL_TESTS]/tst_qprocess/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
index 3fadc68095..d42b8ed083 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
index eac0b59d9a..5a0314f601 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
@@ -6,7 +6,3 @@ DESTDIR = "../test Space In Name"
mac {
CONFIG -= app_bundle
}
-
-# This app is testdata for tst_qprocess
-target.path = "$$[QT_INSTALL_TESTS]/tst_qprocess/test Space In Name"
-INSTALLS += target
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 9d0121307c..e16e00de91 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -239,6 +239,7 @@ void tst_QProcess::simpleStart()
process = new QProcess;
QSignalSpy spy(process, SIGNAL(stateChanged(QProcess::ProcessState)));
+ QVERIFY(spy.isValid());
connect(process, SIGNAL(readyRead()), this, SLOT(readFromProcess()));
/* valgrind dislike SUID binaries(those that have the `s'-flag set), which
@@ -303,6 +304,7 @@ void tst_QProcess::crashTest()
#endif
process = new QProcess;
QSignalSpy stateSpy(process, SIGNAL(stateChanged(QProcess::ProcessState)));
+ QVERIFY(stateSpy.isValid());
process->start("testProcessCrash/testProcessCrash");
QVERIFY(process->waitForStarted(5000));
@@ -312,6 +314,9 @@ void tst_QProcess::crashTest()
QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError)));
QSignalSpy spy2(process, SIGNAL(finished(int, QProcess::ExitStatus)));
+ QVERIFY(spy.isValid());
+ QVERIFY(spy2.isValid());
+
QVERIFY(process->waitForFinished(30000));
QCOMPARE(spy.count(), 1);
@@ -347,6 +352,9 @@ void tst_QProcess::crashTest2()
QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError)));
QSignalSpy spy2(process, SIGNAL(finished(int, QProcess::ExitStatus)));
+ QVERIFY(spy.isValid());
+ QVERIFY(spy2.isValid());
+
QObject::connect(process, SIGNAL(finished(int)), this, SLOT(exitLoopSlot()));
QTestEventLoop::instance().enterLoop(30);
@@ -392,11 +400,7 @@ void tst_QProcess::echoTest()
process = new QProcess;
connect(process, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY(process->waitForStarted(5000));
process->write(input);
@@ -448,11 +452,7 @@ void tst_QProcess::echoTest2()
process = new QProcess;
connect(process, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
-#ifdef Q_OS_MAC
- process->start("testProcessEcho2/testProcessEcho2.app");
-#else
process->start("testProcessEcho2/testProcessEcho2");
-#endif
QVERIFY(process->waitForStarted(5000));
QVERIFY(!process->waitForReadyRead(250));
QCOMPARE(process->error(), QProcess::Timedout);
@@ -461,6 +461,9 @@ void tst_QProcess::echoTest2()
QSignalSpy spy1(process, SIGNAL(readyReadStandardOutput()));
QSignalSpy spy2(process, SIGNAL(readyReadStandardError()));
+ QVERIFY(spy1.isValid());
+ QVERIFY(spy2.isValid());
+
QTime stopWatch;
stopWatch.start();
forever {
@@ -497,11 +500,7 @@ void tst_QProcess::echoTest_performance()
#endif
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessLoopback/testProcessLoopback.app");
-#else
process.start("testProcessLoopback/testProcessLoopback");
-#endif
QByteArray array;
array.resize(1024 * 1024);
@@ -516,6 +515,7 @@ void tst_QProcess::echoTest_performance()
qint64 totalBytes = 0;
QByteArray dump;
QSignalSpy readyReadSpy(&process, SIGNAL(readyRead()));
+ QVERIFY(readyReadSpy.isValid());
while (stopWatch.elapsed() < 2000) {
process.write(array);
while (process.bytesToWrite() > 0) {
@@ -651,11 +651,7 @@ void tst_QProcess::loopBackTest()
#endif
process = new QProcess;
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY(process->waitForStarted(5000));
for (int i = 0; i < 100; ++i) {
@@ -681,11 +677,7 @@ void tst_QProcess::readTimeoutAndThenCrash()
#endif
process = new QProcess;
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
if (process->state() != QProcess::Starting)
QCOMPARE(process->state(), QProcess::Running);
@@ -697,6 +689,7 @@ void tst_QProcess::readTimeoutAndThenCrash()
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError)));
+ QVERIFY(spy.isValid());
process->kill();
@@ -714,11 +707,7 @@ void tst_QProcess::waitForFinished()
{
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessOutput/testProcessOutput.app");
-#else
process.start("testProcessOutput/testProcessOutput");
-#endif
#if !defined(Q_OS_WINCE)
QVERIFY(process.waitForFinished(5000));
@@ -746,11 +735,7 @@ void tst_QProcess::deadWhileReading()
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessDeadWhileReading/testProcessDeadWhileReading.app");
-#else
process.start("testProcessDeadWhileReading/testProcessDeadWhileReading");
-#endif
QString output;
@@ -776,11 +761,7 @@ void tst_QProcess::restartProcessDeadlock()
process = &proc;
connect(process, SIGNAL(finished(int)), this, SLOT(restartProcess()));
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
QCOMPARE(process->write("", 1), qlonglong(1));
QVERIFY(process->waitForFinished(5000));
@@ -793,11 +774,7 @@ void tst_QProcess::restartProcessDeadlock()
void tst_QProcess::restartProcess()
{
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
}
//-----------------------------------------------------------------------------
@@ -841,11 +818,7 @@ void tst_QProcess::closeReadChannel()
QProcess::ProcessChannel channel2 = QProcess::StandardError;
QProcess proc;
-#ifdef Q_OS_MAC
- proc.start("testProcessEcho2/testProcessEcho2.app");
-#else
proc.start("testProcessEcho2/testProcessEcho2");
-#endif
QVERIFY(proc.waitForStarted(5000));
proc.closeReadChannel(i&1 ? channel2 : channel1);
proc.setReadChannel(i&1 ? channel2 : channel1);
@@ -876,11 +849,7 @@ void tst_QProcess::openModes()
QProcess proc;
QVERIFY(!proc.isOpen());
QVERIFY(proc.openMode() == QProcess::NotOpen);
-#ifdef Q_OS_MAC
- proc.start("testProcessEcho3/testProcessEcho3.app");
-#else
proc.start("testProcessEcho3/testProcessEcho3");
-#endif
QVERIFY(proc.waitForStarted(5000));
QVERIFY(proc.isOpen());
QVERIFY(proc.openMode() == QProcess::ReadWrite);
@@ -926,12 +895,9 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
QProcess proc;
connect(&proc, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
QSignalSpy spy(&proc, SIGNAL(readyRead()));
+ QVERIFY(spy.isValid());
-#ifdef Q_OS_MAC
- proc.start("testProcessEcho/testProcessEcho.app");
-#else
proc.start("testProcessEcho/testProcessEcho");
-#endif
QCOMPARE(spy.count(), 0);
@@ -960,9 +926,7 @@ void tst_QProcess::hardExit()
{
QProcess proc;
-#if defined(Q_OS_MAC)
- proc.start("testProcessEcho/testProcessEcho.app");
-#elif defined(Q_OS_WINCE)
+#if defined(Q_OS_WINCE)
proc.start("testSoftExit/testSoftExit");
#else
proc.start("testProcessEcho/testProcessEcho");
@@ -1070,16 +1034,8 @@ void tst_QProcess::softExitInSlots_data()
{
QTest::addColumn<QString>("appName");
-#ifdef Q_OS_MAC
- QTest::newRow("gui app") << "testGuiProcess/testGuiProcess.app";
-#else
QTest::newRow("gui app") << "testGuiProcess/testGuiProcess";
-#endif
-#ifdef Q_OS_MAC
- QTest::newRow("console app") << "testProcessEcho2/testProcessEcho2.app";
-#else
QTest::newRow("console app") << "testProcessEcho2/testProcessEcho2";
-#endif
}
//-----------------------------------------------------------------------------
@@ -1112,11 +1068,7 @@ void tst_QProcess::mergedChannels()
process.setReadChannelMode(QProcess::MergedChannels);
QCOMPARE(process.readChannelMode(), QProcess::MergedChannels);
-#ifdef Q_OS_MAC
- process.start("testProcessEcho2/testProcessEcho2.app");
-#else
process.start("testProcessEcho2/testProcessEcho2");
-#endif
QVERIFY(process.waitForStarted(5000));
@@ -1142,11 +1094,7 @@ void tst_QProcess::forwardedChannels()
process.setReadChannelMode(QProcess::ForwardedChannels);
QCOMPARE(process.readChannelMode(), QProcess::ForwardedChannels);
-#ifdef Q_OS_MAC
- process.start("testProcessEcho2/testProcessEcho2.app");
-#else
process.start("testProcessEcho2/testProcessEcho2");
-#endif
QVERIFY(process.waitForStarted(5000));
QCOMPARE(process.write("forwarded\n"), qlonglong(10));
@@ -1167,11 +1115,7 @@ void tst_QProcess::atEnd()
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessEcho/testProcessEcho.app");
-#else
process.start("testProcessEcho/testProcessEcho");
-#endif
process.write("abcdefgh\n");
while (process.bytesAvailable() < 8)
@@ -1205,11 +1149,7 @@ protected:
connect(&process, SIGNAL(finished(int)), this, SLOT(catchExitCode(int)),
Qt::DirectConnection);
-#ifdef Q_OS_MAC
- process.start("testProcessEcho/testProcessEcho.app");
-#else
process.start("testProcessEcho/testProcessEcho");
-#endif
#if !defined(Q_OS_WINCE)
QCOMPARE(process.write("abc\0", 4), qint64(4));
@@ -1270,11 +1210,7 @@ void tst_QProcess::waitForFinishedWithTimeout()
process = new QProcess(this);
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY(process->waitForStarted(5000));
QVERIFY(!process->waitForFinished(1));
@@ -1299,14 +1235,11 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
connect(process, SIGNAL(finished(int)), this, SLOT(exitLoopSlot()));
bytesAvailable = 0;
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY(process->waitForStarted(5000));
QSignalSpy spy(process, SIGNAL(readyRead()));
+ QVERIFY(spy.isValid());
process->write("foo");
QTestEventLoop::instance().enterLoop(30);
QVERIFY(!QTestEventLoop::instance().timeout());
@@ -1344,15 +1277,12 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
connect(process, SIGNAL(bytesWritten(qint64)), this, SLOT(waitForBytesWrittenInABytesWrittenSlotSlot()));
bytesAvailable = 0;
-#ifdef Q_OS_MAC
- process->start("testProcessEcho/testProcessEcho.app");
-#else
process->start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY(process->waitForStarted(5000));
qRegisterMetaType<qint64>("qint64");
QSignalSpy spy(process, SIGNAL(bytesWritten(qint64)));
+ QVERIFY(spy.isValid());
process->write("f");
QTestEventLoop::instance().enterLoop(30);
QVERIFY(!QTestEventLoop::instance().timeout());
@@ -1572,6 +1502,11 @@ void tst_QProcess::failToStart()
QSignalSpy finishedSpy(&process, SIGNAL(finished(int)));
QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus)));
+ QVERIFY(stateSpy.isValid());
+ QVERIFY(errorSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(finishedSpy2.isValid());
+
// Mac OS X and HP-UX have a really low default process limit (~100), so spawning
// to many processes here will cause test failures later on.
#if defined Q_OS_HPUX
@@ -1633,6 +1568,10 @@ void tst_QProcess::failToStartWithWait()
QSignalSpy finishedSpy(&process, SIGNAL(finished(int)));
QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus)));
+ QVERIFY(errorSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(finishedSpy2.isValid());
+
for (int i = 0; i < 50; ++i) {
process.start("/blurp", QStringList() << "-v" << "-debug");
process.waitForStarted();
@@ -1656,6 +1595,10 @@ void tst_QProcess::failToStartWithEventLoop()
QSignalSpy finishedSpy(&process, SIGNAL(finished(int)));
QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus)));
+ QVERIFY(errorSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(finishedSpy2.isValid());
+
// The error signal may be emitted before start() returns
connect(&process, SIGNAL(error(QProcess::ProcessError)), &loop, SLOT(quit()), Qt::QueuedConnection);
@@ -1683,11 +1626,7 @@ void tst_QProcess::removeFileWhileProcessIsRunning()
QVERIFY(file.open(QFile::WriteOnly));
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessEcho/testProcessEcho.app");
-#else
process.start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY(process.waitForStarted(5000));
@@ -1856,7 +1795,8 @@ void tst_QProcess::lockupsInStartDetached()
// doesn't exist. Before Qt 4.2, this used to lock up on Unix due
// to calling ::exit instead of ::_exit if execve failed.
- QHostInfo::lookupHost(QString("something.invalid"), 0, 0);
+ QObject *dummy = new QObject(this);
+ QHostInfo::lookupHost(QString("something.invalid"), dummy, SLOT(deleteLater()));
QProcess::execute("yjhbrty");
QProcess::startDetached("yjhbrty");
}
@@ -1870,11 +1810,7 @@ void tst_QProcess::atEnd2()
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessEcho/testProcessEcho.app");
-#else
process.start("testProcessEcho/testProcessEcho");
-#endif
process.write("Foo\nBar\nBaz\nBodukon\nHadukan\nTorwukan\nend\n");
process.putChar('\0');
QVERIFY(process.waitForFinished());
@@ -1896,6 +1832,11 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QSignalSpy errorSpy(&process, SIGNAL(error(QProcess::ProcessError)));
QSignalSpy finishedSpy1(&process, SIGNAL(finished(int)));
QSignalSpy finishedSpy2(&process, SIGNAL(finished(int, QProcess::ExitStatus)));
+
+ QVERIFY(errorSpy.isValid());
+ QVERIFY(finishedSpy1.isValid());
+ QVERIFY(finishedSpy2.isValid());
+
QVERIFY(!process.waitForReadyRead()); // used to crash
process.start("doesntexist");
QVERIFY(!process.waitForReadyRead());
@@ -1921,11 +1862,7 @@ void tst_QProcess::setStandardInputFile()
file.close();
process.setStandardInputFile("data");
-#ifdef Q_OS_MAC
- process.start("testProcessEcho/testProcessEcho.app");
-#else
process.start("testProcessEcho/testProcessEcho");
-#endif
QPROCESS_VERIFY(process, waitForFinished());
QByteArray all = process.readAll();
@@ -1992,11 +1929,7 @@ void tst_QProcess::setStandardOutputFile()
else
process.setStandardErrorFile("data", mode);
-#ifdef Q_OS_MAC
- process.start("testProcessEcho2/testProcessEcho2.app");
-#else
process.start("testProcessEcho2/testProcessEcho2");
-#endif
process.write(testdata, sizeof testdata);
QPROCESS_VERIFY(process,waitForFinished());
@@ -2040,13 +1973,8 @@ void tst_QProcess::setStandardOutputProcess()
source.setReadChannelMode(merged ? QProcess::MergedChannels : QProcess::SeparateChannels);
source.setStandardOutputProcess(&sink);
-#ifdef Q_OS_MAC
- source.start("testProcessEcho2/testProcessEcho2.app");
- sink.start("testProcessEcho2/testProcessEcho2.app");
-#else
source.start("testProcessEcho2/testProcessEcho2");
sink.start("testProcessEcho2/testProcessEcho2");
-#endif
QByteArray data("Hello, World");
source.write(data);
@@ -2144,11 +2072,7 @@ void tst_QProcess::switchReadChannels()
QProcess process;
-#ifdef Q_OS_MAC
- process.start("testProcessEcho2/testProcessEcho2.app");
-#else
process.start("testProcessEcho2/testProcessEcho2");
-#endif
process.write(data);
process.closeWriteChannel();
QVERIFY(process.waitForFinished(5000));
@@ -2177,11 +2101,7 @@ void tst_QProcess::setWorkingDirectory()
#endif
process = new QProcess;
process->setWorkingDirectory("test");
-#ifdef Q_OS_MAC
- process->start("testSetWorkingDirectory/testSetWorkingDirectory.app");
-#else
process->start("testSetWorkingDirectory/testSetWorkingDirectory");
-#endif
#ifndef Q_OS_WIN
QSKIP("setWorkingDirectory will chdir before starting the process on unices");
#endif
@@ -2202,11 +2122,7 @@ void tst_QProcess::startFinishStartFinish()
for (int i = 0; i < 3; ++i) {
QCOMPARE(process.state(), QProcess::NotRunning);
-#ifdef Q_OS_MAC
- process.start("testProcessOutput/testProcessOutput.app");
-#else
process.start("testProcessOutput/testProcessOutput");
-#endif
#if !defined(Q_OS_WINCE)
QVERIFY(process.waitForReadyRead(10000));
QCOMPARE(QString::fromLatin1(process.readLine().trimmed()),
@@ -2233,6 +2149,7 @@ void tst_QProcess::invalidProgramString()
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
QSignalSpy spy(&process, SIGNAL(error(QProcess::ProcessError)));
+ QVERIFY(spy.isValid());
process.start(programString);
QCOMPARE(process.error(), QProcess::FailedToStart);
@@ -2249,6 +2166,9 @@ void tst_QProcess::onlyOneStartedSignal()
QSignalSpy spyStarted(&process, SIGNAL(started()));
QSignalSpy spyFinished(&process, SIGNAL(finished(int, QProcess::ExitStatus)));
+ QVERIFY(spyStarted.isValid());
+ QVERIFY(spyFinished.isValid());
+
process.start("testProcessNormal/testProcessNormal");
QVERIFY(process.waitForStarted(5000));
QVERIFY(process.waitForFinished(5000));
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index addce54136..50579f0712 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qresourceengine/.gitignore b/tests/auto/corelib/io/qresourceengine/.gitignore
index eb48d60239..c93206ff3b 100644
--- a/tests/auto/corelib/io/qresourceengine/.gitignore
+++ b/tests/auto/corelib/io/qresourceengine/.gitignore
@@ -1 +1,2 @@
tst_qresourceengine
+runtime_resource.rcc
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 2a40a64580..539f49fa97 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,7 +41,7 @@
#include <QtTest/QtTest>
-#include <QtCore>
+#include <QtCore/QCoreApplication>
class tst_QResourceEngine: public QObject
{
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 2c96339737..87f5b37e14 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,10 +73,8 @@ class tst_QSettings : public QObject
{
Q_OBJECT
-public:
- tst_QSettings();
-
public slots:
+ void initTestCase();
void init();
void cleanup();
private slots:
@@ -270,7 +268,7 @@ static void populateWithFormats()
QTest::newRow("custom2") << QSettings::CustomFormat2;
}
-tst_QSettings::tst_QSettings()
+void tst_QSettings::initTestCase()
{
QSettings::Format custom1 = QSettings::registerFormat("custom1", readCustom1File, writeCustom1File);
QSettings::Format custom2 = QSettings::registerFormat("custom2", readCustom2File, writeCustom2File
@@ -1696,6 +1694,7 @@ void tst_QSettings::testUpdateRequestEvent()
const int NumIterations = 5;
const int NumThreads = 4;
+int numThreadSafetyFailures;
class SettingsThread : public QThread
{
@@ -1713,7 +1712,10 @@ void SettingsThread::run()
QSettings settings("software.org", "KillerAPP");
settings.setValue(QString::number((param * NumIterations) + i), param);
settings.sync();
- QCOMPARE((int)settings.status(), (int)QSettings::NoError);
+ if (settings.status() != QSettings::NoError) {
+ QWARN(qPrintable(QString("Unexpected QSettings status %1").arg((int)settings.status())));
+ ++numThreadSafetyFailures;
+ }
}
}
@@ -1722,6 +1724,8 @@ void tst_QSettings::testThreadSafety()
SettingsThread threads[NumThreads];
int i, j;
+ numThreadSafetyFailures = 0;
+
for (i = 0; i < NumThreads; ++i)
threads[i].start(i + 1);
for (i = 0; i < NumThreads; ++i)
@@ -1734,6 +1738,8 @@ void tst_QSettings::testThreadSafety()
QCOMPARE(settings.value(QString::number((param * NumIterations) + j)).toInt(), param);
}
}
+
+ QCOMPARE(numThreadSafetyFailures, 0);
}
void tst_QSettings::testNormalizedKey_data()
@@ -3160,7 +3166,7 @@ void tst_QSettings::consistentRegistryStorage()
// Not tested at the moment.
void tst_QSettings::oldSubkeyList()
{
- QVERIFY( TRUE );
+ QVERIFY( true );
}
*/
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 66fb8bbbf9..1820d66496 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 60c7174f3a..86aa071410 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index a1e9d98461..4c2e3f211b 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
index ca541d053a..a33b6759b4 100644
--- a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,9 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTextStream>
+#include <QtCore/QDebug>
int main(int argc, char **argv)
{
diff --git a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
index d8d2eed000..e561fc886f 100644
--- a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,10 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTextStream>
+#include <QtCore/QString>
+
int main(int argc, char **argv)
{
diff --git a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
index 6d51f84fa1..7fcfd6d53b 100644
--- a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,8 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTextStream>
int main(int argc, char **argv)
{
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index a1b3724417..6b6ac013bd 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qurl/idna-test.c b/tests/auto/corelib/io/qurl/idna-test.c
index 7effd03168..40538dfb65 100644
--- a/tests/auto/corelib/io/qurl/idna-test.c
+++ b/tests/auto/corelib/io/qurl/idna-test.c
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index d86f96fba3..f0b6429089 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/itemmodels/itemmodels.pro b/tests/auto/corelib/itemmodels/itemmodels.pro
new file mode 100644
index 0000000000..851035e949
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/itemmodels.pro
@@ -0,0 +1,11 @@
+TEMPLATE=subdirs
+
+SUBDIRS = qabstractitemmodel \
+ qabstractproxymodel \
+ qidentityproxymodel \
+ qitemmodel \
+ qitemselectionmodel \
+ qsortfilterproxymodel \
+ qstringlistmodel
+
+mac: qabstractitemmodel.CONFIG = no_check_target # QTBUG-22748
diff --git a/tests/auto/corelib/kernel/qabstractitemmodel/.gitignore b/tests/auto/corelib/itemmodels/qabstractitemmodel/.gitignore
index f6f93f4b89..f6f93f4b89 100644
--- a/tests/auto/corelib/kernel/qabstractitemmodel/.gitignore
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/.gitignore
diff --git a/tests/auto/corelib/kernel/qabstractitemmodel/qabstractitemmodel.pro b/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
index acf74737a8..acf74737a8 100644
--- a/tests/auto/corelib/kernel/qabstractitemmodel/qabstractitemmodel.pro
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
diff --git a/tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
index 2340c86207..af1e492a8b 100644
--- a/tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,10 +40,10 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
-#include <QtWidgets/QSortFilterProxyModel>
-#include <QtWidgets/QStringListModel>
+#include <QtCore/QSortFilterProxyModel>
+#include <QtCore/QStringListModel>
#include "dynamictreemodel.h"
@@ -59,6 +59,7 @@ class tst_QAbstractItemModel : public QObject
public slots:
void initTestCase();
void init();
+ void cleanup();
private slots:
void index();
@@ -111,6 +112,9 @@ private slots:
void testChildrenLayoutsChanged();
+ void testRoleNames();
+ void testDragActions();
+
private:
DynamicTreeModel *m_model;
};
@@ -275,6 +279,11 @@ void tst_QAbstractItemModel::init()
insertCommand->doCommand();
}
+void tst_QAbstractItemModel::cleanup()
+{
+ delete m_model;
+}
+
/*
tests
*/
@@ -682,7 +691,6 @@ void tst_QAbstractItemModel::dropMimeData()
}
}
-
void tst_QAbstractItemModel::changePersistentIndex()
{
QtTestModel model(3, 3);
@@ -720,6 +728,9 @@ void tst_QAbstractItemModel::removeRows()
QSignalSpy rowsAboutToBeRemovedSpy(&model, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )));
QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved( const QModelIndex &, int, int )));
+ QVERIFY(rowsAboutToBeRemovedSpy.isValid());
+ QVERIFY(rowsRemovedSpy.isValid());
+
QCOMPARE(model.removeRows(6, 4), true);
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 1);
QCOMPARE(rowsRemovedSpy.count(), 1);
@@ -732,6 +743,9 @@ void tst_QAbstractItemModel::removeColumns()
QSignalSpy columnsAboutToBeRemovedSpy(&model, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )));
QSignalSpy columnsRemovedSpy(&model, SIGNAL(columnsRemoved( const QModelIndex &, int, int )));
+ QVERIFY(columnsAboutToBeRemovedSpy.isValid());
+ QVERIFY(columnsRemovedSpy.isValid());
+
QCOMPARE(model.removeColumns(6, 4), true);
QCOMPARE(columnsAboutToBeRemovedSpy.count(), 1);
QCOMPARE(columnsRemovedSpy.count(), 1);
@@ -744,6 +758,9 @@ void tst_QAbstractItemModel::insertRows()
QSignalSpy rowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )));
QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted( const QModelIndex &, int, int )));
+ QVERIFY(rowsAboutToBeInsertedSpy.isValid());
+ QVERIFY(rowsInsertedSpy.isValid());
+
QCOMPARE(model.insertRows(6, 4), true);
QCOMPARE(rowsAboutToBeInsertedSpy.count(), 1);
QCOMPARE(rowsInsertedSpy.count(), 1);
@@ -756,6 +773,9 @@ void tst_QAbstractItemModel::insertColumns()
QSignalSpy columnsAboutToBeInsertedSpy(&model, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )));
QSignalSpy columnsInsertedSpy(&model, SIGNAL(columnsInserted( const QModelIndex &, int, int )));
+ QVERIFY(columnsAboutToBeInsertedSpy.isValid());
+ QVERIFY(columnsInsertedSpy.isValid());
+
QCOMPARE(model.insertColumns(6, 4), true);
QCOMPARE(columnsAboutToBeInsertedSpy.count(), 1);
QCOMPARE(columnsInsertedSpy.count(), 1);
@@ -766,6 +786,7 @@ void tst_QAbstractItemModel::reset()
QtTestModel model(10, 10);
QSignalSpy resetSpy(&model, SIGNAL(modelReset()));
+ QVERIFY(resetSpy.isValid());
model.reset();
QCOMPARE(resetSpy.count(), 1);
}
@@ -830,7 +851,6 @@ void tst_QAbstractItemModel::complexChangesWithPersistent()
QVERIFY(!e[i].isValid());
for (int i=6; i <10 ; i++)
QVERIFY(e[i] == model.index(2, i-2 , QModelIndex()));
-
}
void tst_QAbstractItemModel::testMoveSameParentDown_data()
@@ -858,20 +878,18 @@ void tst_QAbstractItemModel::testMoveSameParentDown_data()
void tst_QAbstractItemModel::testMoveSameParentDown()
{
- QFETCH( int, startRow);
- QFETCH( int, endRow);
- QFETCH( int, destRow);
- QFETCH( bool, topLevel);
+ QFETCH(int, startRow);
+ QFETCH(int, endRow);
+ QFETCH(int, destRow);
+ QFETCH(bool, topLevel);
QModelIndex moveParent = topLevel ? QModelIndex() : m_model->index(5, 0);
QList<QPersistentModelIndex> persistentList;
QModelIndexList indexList;
- for (int column = 0; column < m_model->columnCount(); ++column)
- {
- for (int row= 0; row < m_model->rowCount(); ++row)
- {
+ for (int column = 0; column < m_model->columnCount(); ++column) {
+ for (int row = 0; row < m_model->rowCount(); ++row) {
QModelIndex idx = m_model->index(row, column);
QVERIFY(idx.isValid());
indexList << idx;
@@ -880,10 +898,8 @@ void tst_QAbstractItemModel::testMoveSameParentDown()
}
QModelIndex parent = m_model->index(5, 0);
- for (int column = 0; column < m_model->columnCount(); ++column)
- {
- for (int row= 0; row < m_model->rowCount(parent); ++row)
- {
+ for (int column = 0; column < m_model->columnCount(); ++column) {
+ for (int row = 0; row < m_model->rowCount(parent); ++row) {
QModelIndex idx = m_model->index(row, column, parent);
QVERIFY(idx.isValid());
indexList << idx;
@@ -894,6 +910,9 @@ void tst_QAbstractItemModel::testMoveSameParentDown()
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
moveCommand->setNumCols(4);
if (!topLevel)
@@ -922,37 +941,29 @@ void tst_QAbstractItemModel::testMoveSameParentDown()
QCOMPARE(afterSignal.at(3).value<QModelIndex>(), moveParent);
QCOMPARE(afterSignal.at(4).toInt(), destRow);
- for (int i = 0; i < indexList.size(); i++)
- {
+ for (int i = 0; i < indexList.size(); i++) {
QModelIndex idx = indexList.at(i);
QModelIndex persistentIndex = persistentList.at(i);
- if (idx.parent() == moveParent)
- {
+ if (idx.parent() == moveParent) {
int row = idx.row();
- if ( row >= startRow)
- {
- if (row <= endRow)
- {
- QCOMPARE(row + destRow - endRow - 1, persistentIndex.row() );
+ if ( row >= startRow) {
+ if (row <= endRow) {
+ QCOMPARE(row + destRow - endRow - 1, persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(idx.parent(), persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
- } else if ( row < destRow)
- {
- QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ } else if (row < destRow) {
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(idx.parent(), persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
- } else
- {
- QCOMPARE(idx, persistentIndex);
+ } else {
+ QCOMPARE(idx, persistentIndex);
}
- } else
- {
+ } else {
QCOMPARE(idx, persistentIndex);
}
- } else
- {
+ } else {
QCOMPARE(idx, persistentIndex);
}
}
@@ -982,21 +993,18 @@ void tst_QAbstractItemModel::testMoveSameParentUp_data()
void tst_QAbstractItemModel::testMoveSameParentUp()
{
-
- QFETCH( int, startRow);
- QFETCH( int, endRow);
- QFETCH( int, destRow);
- QFETCH( bool, topLevel);
+ QFETCH(int, startRow);
+ QFETCH(int, endRow);
+ QFETCH(int, destRow);
+ QFETCH(bool, topLevel);
QModelIndex moveParent = topLevel ? QModelIndex() : m_model->index(5, 0);
QList<QPersistentModelIndex> persistentList;
QModelIndexList indexList;
- for (int column = 0; column < m_model->columnCount(); ++column)
- {
- for (int row= 0; row < m_model->rowCount(); ++row)
- {
+ for (int column = 0; column < m_model->columnCount(); ++column) {
+ for (int row = 0; row < m_model->rowCount(); ++row) {
QModelIndex idx = m_model->index(row, column);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1005,10 +1013,8 @@ void tst_QAbstractItemModel::testMoveSameParentUp()
}
QModelIndex parent = m_model->index(2, 0);
- for (int column = 0; column < m_model->columnCount(); ++column)
- {
- for (int row= 0; row < m_model->rowCount(parent); ++row)
- {
+ for (int column = 0; column < m_model->columnCount(); ++column) {
+ for (int row = 0; row < m_model->rowCount(parent); ++row) {
QModelIndex idx = m_model->index(row, column, parent);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1019,6 +1025,8 @@ void tst_QAbstractItemModel::testMoveSameParentUp()
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
moveCommand->setNumCols(4);
@@ -1048,38 +1056,29 @@ void tst_QAbstractItemModel::testMoveSameParentUp()
QCOMPARE(afterSignal.at(3).value<QModelIndex>(), moveParent);
QCOMPARE(afterSignal.at(4).toInt(), destRow);
-
- for (int i = 0; i < indexList.size(); i++)
- {
+ for (int i = 0; i < indexList.size(); i++) {
QModelIndex idx = indexList.at(i);
QModelIndex persistentIndex = persistentList.at(i);
- if (idx.parent() == moveParent)
- {
+ if (idx.parent() == moveParent) {
int row = idx.row();
- if ( row >= destRow)
- {
- if (row < startRow)
- {
- QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
+ if ( row >= destRow) {
+ if (row < startRow) {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(idx.parent(), persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
- } else if ( row <= endRow)
- {
- QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ } else if (row <= endRow) {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(idx.parent(), persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
- } else
- {
+ } else {
QCOMPARE(idx, persistentIndex);
}
- } else
- {
+ } else {
QCOMPARE(idx, persistentIndex);
}
- } else
- {
+ } else {
QCOMPARE(idx, persistentIndex);
}
}
@@ -1143,19 +1142,16 @@ void tst_QAbstractItemModel::testMoveToGrandParent_data()
void tst_QAbstractItemModel::testMoveToGrandParent()
{
-
- QFETCH( int, startRow);
- QFETCH( int, endRow);
- QFETCH( int, destRow);
+ QFETCH(int, startRow);
+ QFETCH(int, endRow);
+ QFETCH(int, destRow);
QList<QPersistentModelIndex> persistentList;
QModelIndexList indexList;
QModelIndexList parentsList;
- for (int column = 0; column < m_model->columnCount(); ++column)
- {
- for (int row= 0; row < m_model->rowCount(); ++row)
- {
+ for (int column = 0; column < m_model->columnCount(); ++column) {
+ for (int row = 0; row < m_model->rowCount(); ++row) {
QModelIndex idx = m_model->index(row, column);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1165,10 +1161,8 @@ void tst_QAbstractItemModel::testMoveToGrandParent()
}
QModelIndex sourceIndex = m_model->index(5, 0);
- for (int column = 0; column < m_model->columnCount(); ++column)
- {
- for (int row= 0; row < m_model->rowCount(sourceIndex); ++row)
- {
+ for (int column = 0; column < m_model->columnCount(); ++column) {
+ for (int row = 0; row < m_model->rowCount(sourceIndex); ++row) {
QModelIndex idx = m_model->index(row, column, sourceIndex);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1180,6 +1174,9 @@ void tst_QAbstractItemModel::testMoveToGrandParent()
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
QPersistentModelIndex persistentSource = sourceIndex;
ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
@@ -1207,46 +1204,37 @@ void tst_QAbstractItemModel::testMoveToGrandParent()
QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex());
QCOMPARE(afterSignal.at(4).toInt(), destRow);
- for (int i = 0; i < indexList.size(); i++)
- {
+ for (int i = 0; i < indexList.size(); i++) {
QModelIndex idx = indexList.at(i);
QModelIndex idxParent = parentsList.at(i);
QModelIndex persistentIndex = persistentList.at(i);
int row = idx.row();
- if (idxParent == QModelIndex())
- {
- if ( row >= destRow)
- {
- QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
- QCOMPARE(idx.column(), persistentIndex.column());
- QCOMPARE(idxParent, persistentIndex.parent());
- QCOMPARE(idx.model(), persistentIndex.model());
- } else
- {
+ if (idxParent == QModelIndex()) {
+ if (row >= destRow) {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row());
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idxParent, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else {
QCOMPARE(idx, persistentIndex);
}
- } else
- {
- if (row < startRow)
- {
+ } else {
+ if (row < startRow) {
QCOMPARE(idx, persistentIndex);
- } else if (row <= endRow)
- {
- QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ } else if (row <= endRow) {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(QModelIndex(), persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
} else {
- QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
- if (idxParent.row() >= destRow)
- {
+ if (idxParent.row() >= destRow) {
QModelIndex adjustedParent;
- adjustedParent = idxParent.sibling( idxParent.row() + endRow - startRow + 1, idxParent.column());
+ adjustedParent = idxParent.sibling(idxParent.row() + endRow - startRow + 1, idxParent.column());
QCOMPARE(adjustedParent, persistentIndex.parent());
- } else
- {
+ } else {
QCOMPARE(idxParent, persistentIndex.parent());
}
QCOMPARE(idx.model(), persistentIndex.model());
@@ -1295,10 +1283,9 @@ void tst_QAbstractItemModel::testMoveToSibling_data()
void tst_QAbstractItemModel::testMoveToSibling()
{
-
- QFETCH( int, startRow);
- QFETCH( int, endRow);
- QFETCH( int, destRow);
+ QFETCH(int, startRow);
+ QFETCH(int, endRow);
+ QFETCH(int, destRow);
QList<QPersistentModelIndex> persistentList;
QModelIndexList indexList;
@@ -1306,8 +1293,7 @@ void tst_QAbstractItemModel::testMoveToSibling()
const int column = 0;
- for (int i= 0; i < m_model->rowCount(); ++i)
- {
+ for (int i = 0; i < m_model->rowCount(); ++i) {
QModelIndex idx = m_model->index(i, column);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1317,8 +1303,7 @@ void tst_QAbstractItemModel::testMoveToSibling()
QModelIndex destIndex = m_model->index(5, 0);
QModelIndex sourceIndex;
- for (int i= 0; i < m_model->rowCount(destIndex); ++i)
- {
+ for (int i = 0; i < m_model->rowCount(destIndex); ++i) {
QModelIndex idx = m_model->index(i, column, destIndex);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1329,6 +1314,9 @@ void tst_QAbstractItemModel::testMoveToSibling()
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
QPersistentModelIndex persistentDest = destIndex;
ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
@@ -1356,51 +1344,41 @@ void tst_QAbstractItemModel::testMoveToSibling()
QCOMPARE(afterSignal.at(3).value<QModelIndex>(), static_cast<QModelIndex>(persistentDest));
QCOMPARE(afterSignal.at(4).toInt(), destRow);
- for (int i = 0; i < indexList.size(); i++)
- {
+ for (int i = 0; i < indexList.size(); i++) {
QModelIndex idx = indexList.at(i);
QModelIndex idxParent = parentsList.at(i);
QModelIndex persistentIndex = persistentList.at(i);
QModelIndex adjustedDestination = destIndex.sibling(destIndex.row() - (endRow - startRow + 1), destIndex.column());
int row = idx.row();
- if (idxParent == destIndex)
- {
- if ( row >= destRow)
- {
- QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
- QCOMPARE(idx.column(), persistentIndex.column());
- if (idxParent.row() > startRow)
- {
- QCOMPARE(adjustedDestination, persistentIndex.parent());
- } else {
- QCOMPARE(destIndex, persistentIndex.parent());
- }
- QCOMPARE(idx.model(), persistentIndex.model());
- } else
- {
+ if (idxParent == destIndex) {
+ if (row >= destRow) {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row());
+ QCOMPARE(idx.column(), persistentIndex.column());
+ if (idxParent.row() > startRow) {
+ QCOMPARE(adjustedDestination, persistentIndex.parent());
+ } else {
+ QCOMPARE(destIndex, persistentIndex.parent());
+ }
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else {
QCOMPARE(idx, persistentIndex);
}
- } else
- {
- if (row < startRow)
- {
+ } else {
+ if (row < startRow) {
QCOMPARE(idx, persistentIndex);
- } else if (row <= endRow)
- {
- QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ } else if (row <= endRow) {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
- if (destIndex.row() > startRow)
- {
+ if (destIndex.row() > startRow) {
QCOMPARE(adjustedDestination, persistentIndex.parent());
} else {
QCOMPARE(destIndex, persistentIndex.parent());
}
QCOMPARE(idx.model(), persistentIndex.model());
-
} else {
- QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(idxParent, persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
@@ -1411,7 +1389,6 @@ void tst_QAbstractItemModel::testMoveToSibling()
void tst_QAbstractItemModel::testMoveToUncle_data()
{
-
QTest::addColumn<int>("startRow");
QTest::addColumn<int>("endRow");
QTest::addColumn<int>("destRow");
@@ -1456,9 +1433,9 @@ void tst_QAbstractItemModel::testMoveToUncle()
insertCommand->setEndRow(9);
insertCommand->doCommand();
- QFETCH( int, startRow);
- QFETCH( int, endRow);
- QFETCH( int, destRow);
+ QFETCH(int, startRow);
+ QFETCH(int, endRow);
+ QFETCH(int, destRow);
QList<QPersistentModelIndex> persistentList;
QModelIndexList indexList;
@@ -1467,8 +1444,7 @@ void tst_QAbstractItemModel::testMoveToUncle()
const int column = 0;
QModelIndex sourceIndex = m_model->index(9, 0);
- for (int i= 0; i < m_model->rowCount(sourceIndex); ++i)
- {
+ for (int i = 0; i < m_model->rowCount(sourceIndex); ++i) {
QModelIndex idx = m_model->index(i, column, sourceIndex);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1477,8 +1453,7 @@ void tst_QAbstractItemModel::testMoveToUncle()
}
QModelIndex destIndex = m_model->index(5, 0);
- for (int i= 0; i < m_model->rowCount(destIndex); ++i)
- {
+ for (int i = 0; i < m_model->rowCount(destIndex); ++i) {
QModelIndex idx = m_model->index(i, column, destIndex);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1489,6 +1464,9 @@ void tst_QAbstractItemModel::testMoveToUncle()
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
moveCommand->setAncestorRowNumbers(QList<int>() << 9);
moveCommand->setNumCols(4);
@@ -1515,39 +1493,31 @@ void tst_QAbstractItemModel::testMoveToUncle()
QCOMPARE(afterSignal.at(3).value<QModelIndex>(), destIndex);
QCOMPARE(afterSignal.at(4).toInt(), destRow);
- for (int i = 0; i < indexList.size(); i++)
- {
+ for (int i = 0; i < indexList.size(); i++) {
QModelIndex idx = indexList.at(i);
QModelIndex idxParent = parentsList.at(i);
QModelIndex persistentIndex = persistentList.at(i);
int row = idx.row();
- if (idxParent == destIndex)
- {
- if ( row >= destRow)
- {
- QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
- QCOMPARE(idx.column(), persistentIndex.column());
- QCOMPARE(destIndex, persistentIndex.parent());
- QCOMPARE(idx.model(), persistentIndex.model());
- } else
- {
+ if (idxParent == destIndex) {
+ if (row >= destRow) {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row());
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(destIndex, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else {
QCOMPARE(idx, persistentIndex);
}
- } else
- {
- if (row < startRow)
- {
+ } else {
+ if (row < startRow) {
QCOMPARE(idx, persistentIndex);
- } else if (row <= endRow)
- {
- QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ } else if (row <= endRow) {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(destIndex, persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
-
} else {
- QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row());
QCOMPARE(idx.column(), persistentIndex.column());
QCOMPARE(idxParent, persistentIndex.parent());
QCOMPARE(idx.model(), persistentIndex.model());
@@ -1564,8 +1534,7 @@ void tst_QAbstractItemModel::testMoveToDescendants()
// Need to have some extra rows available in a tree.
QList<int> rows;
ModelInsertCommand *insertCommand;
- for (int i = 0; i < depth; i++)
- {
+ for (int i = 0; i < depth; i++) {
insertCommand = new ModelInsertCommand(m_model, this);
insertCommand->setAncestorRowNumbers(rows);
insertCommand->setNumCols(4);
@@ -1582,8 +1551,7 @@ void tst_QAbstractItemModel::testMoveToDescendants()
const int column = 0;
QModelIndex sourceIndex = m_model->index(9, 0);
- for (int i= 0; i < m_model->rowCount(sourceIndex); ++i)
- {
+ for (int i = 0; i < m_model->rowCount(sourceIndex); ++i) {
QModelIndex idx = m_model->index(i, column, sourceIndex);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1592,8 +1560,7 @@ void tst_QAbstractItemModel::testMoveToDescendants()
}
QModelIndex destIndex = m_model->index(5, 0);
- for (int i= 0; i < m_model->rowCount(destIndex); ++i)
- {
+ for (int i = 0; i < m_model->rowCount(destIndex); ++i) {
QModelIndex idx = m_model->index(i, column, destIndex);
QVERIFY(idx.isValid());
indexList << idx;
@@ -1604,13 +1571,14 @@ void tst_QAbstractItemModel::testMoveToDescendants()
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
ModelMoveCommand *moveCommand;
QList<int> ancestors;
- while (ancestors.size() < depth)
- {
+ while (ancestors.size() < depth) {
ancestors << 9;
- for (int row = 0; row <= 9; row++)
- {
+ for (int row = 0; row <= 9; row++) {
moveCommand = new ModelMoveCommand(m_model, this);
moveCommand->setNumCols(4);
moveCommand->setStartRow(9);
@@ -1656,20 +1624,20 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange_data()
QTest::newRow("move20") << 8 << 9 << 10;
QTest::newRow("move21") << 9 << 9 << 9;
QTest::newRow("move22") << 0 << 9 << 10;
-
}
void tst_QAbstractItemModel::testMoveWithinOwnRange()
{
-
- QFETCH( int, startRow);
- QFETCH( int, endRow);
- QFETCH( int, destRow);
-
+ QFETCH(int, startRow);
+ QFETCH(int, endRow);
+ QFETCH(int, destRow);
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
moveCommand->setNumCols(4);
moveCommand->setStartRow(startRow);
@@ -1679,13 +1647,11 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange()
QVERIFY(beforeSpy.size() == 0);
QVERIFY(afterSpy.size() == 0);
-
-
}
class ListenerObject : public QObject
{
- Q_OBJECT
+ Q_OBJECT
public:
ListenerObject(QAbstractProxyModel *parent);
@@ -1717,14 +1683,11 @@ void ListenerObject::fillIndexStores(const QModelIndex &parent)
const int column = 0;
int row = 0;
QModelIndex idx = m_model->index(row, column, parent);
- while (idx.isValid())
- {
+ while (idx.isValid()) {
m_persistentIndexes << QPersistentModelIndex(idx);
m_nonPersistentIndexes << idx;
if (m_model->hasChildren(idx))
- {
fillIndexStores(idx);
- }
++row;
idx = m_model->index(row, column, parent);
}
@@ -1733,8 +1696,7 @@ void ListenerObject::fillIndexStores(const QModelIndex &parent)
void ListenerObject::slotAboutToBeReset()
{
// Nothing has been changed yet. All indexes should be the same.
- for (int i = 0; i < m_persistentIndexes.size(); ++i)
- {
+ for (int i = 0; i < m_persistentIndexes.size(); ++i) {
QModelIndex idx = m_persistentIndexes.at(i);
QVERIFY(idx == m_nonPersistentIndexes.at(i));
QVERIFY(m_model->mapToSource(idx).isValid());
@@ -1743,18 +1705,18 @@ void ListenerObject::slotAboutToBeReset()
void ListenerObject::slotReset()
{
- foreach(const QModelIndex &idx, m_persistentIndexes)
- {
+ foreach (const QModelIndex &idx, m_persistentIndexes) {
QVERIFY(!idx.isValid());
}
}
-
void tst_QAbstractItemModel::testReset()
{
QSignalSpy beforeResetSpy(m_model, SIGNAL(modelAboutToBeReset()));
QSignalSpy afterResetSpy(m_model, SIGNAL(modelReset()));
+ QVERIFY(beforeResetSpy.isValid());
+ QVERIFY(afterResetSpy.isValid());
QSortFilterProxyModel *nullProxy = new QSortFilterProxyModel(this);
nullProxy->setSourceModel(m_model);
@@ -1779,7 +1741,6 @@ void tst_QAbstractItemModel::testReset()
QVERIFY(m_model->rowCount() == 9);
QModelIndex destIndex = m_model->index(4, 0);
QVERIFY(m_model->rowCount(destIndex) == 11);
-
}
class CustomRoleModel : public QStringListModel
@@ -1796,7 +1757,6 @@ public:
CustomRoleModel(QObject *parent = 0)
: QStringListModel(QStringList() << "a" << "b" << "c", parent)
{
-
}
void emitSignals()
@@ -1821,6 +1781,9 @@ void tst_QAbstractItemModel::testDataChanged()
QSignalSpy withRoles(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)));
QSignalSpy withoutRoles(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
+ QVERIFY(withRoles.isValid());
+ QVERIFY(withoutRoles.isValid());
+
model.emitSignals();
QCOMPARE(withRoles.size(), withoutRoles.size());
@@ -1920,6 +1883,9 @@ void tst_QAbstractItemModel::testChildrenLayoutsChanged()
QSignalSpy beforeSpy(&model, SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>)));
QSignalSpy afterSpy(&model, SIGNAL(layoutChanged(QList<QPersistentModelIndex>)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
ModelChangeChildrenLayoutsCommand *changeCommand = new ModelChangeChildrenLayoutsCommand(&model, this);
changeCommand->setAncestorRowNumbers(QList<int>() << 2);
changeCommand->setSecondAncestorRowNumbers(QList<int>() << 5);
@@ -1950,7 +1916,6 @@ void tst_QAbstractItemModel::testChildrenLayoutsChanged()
QVERIFY(p1LastPersistent.row() == 0);
QVERIFY(p2FirstPersistent.row() == 9);
QVERIFY(p2LastPersistent.row() == 8);
-
}
insertCommand = new ModelInsertCommand(&model, this);
@@ -1984,6 +1949,9 @@ void tst_QAbstractItemModel::testChildrenLayoutsChanged()
QSignalSpy beforeSpy(&model, SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>)));
QSignalSpy afterSpy(&model, SIGNAL(layoutChanged(QList<QPersistentModelIndex>)));
+ QVERIFY(beforeSpy.isValid());
+ QVERIFY(afterSpy.isValid());
+
// Because the arguments in the signal are persistent, we need to check them for the aboutToBe
// case at emission time - before they get updated.
SignalArgumentChecker checker(p1, p2);
@@ -2011,5 +1979,44 @@ void tst_QAbstractItemModel::testChildrenLayoutsChanged()
}
}
+class OverrideRoleNamesAndDragActions : public QStringListModel
+{
+ Q_OBJECT
+public:
+ OverrideRoleNamesAndDragActions(QObject *parent = 0)
+ : QStringListModel(parent)
+ {
+
+ }
+
+ QHash<int, QByteArray> roleNames() const
+ {
+ QHash<int, QByteArray> roles = QStringListModel::roleNames();
+ roles.insert(Qt::UserRole + 2, "custom");
+ return roles;
+ }
+
+ Qt::DropActions supportedDragActions() const
+ {
+ return QStringListModel::supportedDragActions() | Qt::MoveAction;
+ }
+};
+
+void tst_QAbstractItemModel::testRoleNames()
+{
+ QAbstractItemModel *model = new OverrideRoleNamesAndDragActions(this);
+ QHash<int, QByteArray> roles = model->roleNames();
+ QVERIFY(roles.contains(Qt::UserRole + 2));
+ QVERIFY(roles.value(Qt::UserRole + 2) == "custom");
+}
+
+void tst_QAbstractItemModel::testDragActions()
+{
+ QAbstractItemModel *model = new OverrideRoleNamesAndDragActions(this);
+ const Qt::DropActions actions = model->supportedDragActions();
+ QVERIFY(actions & Qt::CopyAction); // Present by default
+ QVERIFY(actions & Qt::MoveAction);
+}
+
QTEST_MAIN(tst_QAbstractItemModel)
#include "tst_qabstractitemmodel.moc"
diff --git a/tests/auto/widgets/itemviews/qabstractproxymodel/.gitignore b/tests/auto/corelib/itemmodels/qabstractproxymodel/.gitignore
index bffc04d632..bffc04d632 100644
--- a/tests/auto/widgets/itemviews/qabstractproxymodel/.gitignore
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/.gitignore
diff --git a/tests/auto/widgets/itemviews/qabstractproxymodel/qabstractproxymodel.pro b/tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro
index 5ded15ad5c..5ded15ad5c 100644
--- a/tests/auto/widgets/itemviews/qabstractproxymodel/qabstractproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro
diff --git a/tests/auto/widgets/itemviews/qabstractproxymodel/tst_qabstractproxymodel.cpp b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
index b6557c45ec..088ad0afdc 100644
--- a/tests/auto/widgets/itemviews/qabstractproxymodel/tst_qabstractproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include <qabstractproxymodel.h>
#include <QItemSelection>
@@ -49,14 +48,7 @@ class tst_QAbstractProxyModel : public QObject
{
Q_OBJECT
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
-
private slots:
- void qabstractproxymodel_data();
void qabstractproxymodel();
void data_data();
void data();
@@ -74,9 +66,7 @@ private slots:
void mapSelectionToSource();
void mapToSource_data();
void mapToSource();
- void revert_data();
void revert();
- void setSourceModel_data();
void setSourceModel();
void submit_data();
void submit();
@@ -116,32 +106,6 @@ public:
}
};
-// This will be called before the first test function is executed.
-// It is only called once.
-void tst_QAbstractProxyModel::initTestCase()
-{
-}
-
-// This will be called after the last test function is executed.
-// It is only called once.
-void tst_QAbstractProxyModel::cleanupTestCase()
-{
-}
-
-// This will be called before each test function is executed.
-void tst_QAbstractProxyModel::init()
-{
-}
-
-// This will be called after every test function.
-void tst_QAbstractProxyModel::cleanup()
-{
-}
-
-void tst_QAbstractProxyModel::qabstractproxymodel_data()
-{
-}
-
void tst_QAbstractProxyModel::qabstractproxymodel()
{
SubQAbstractProxyModel model;
@@ -309,32 +273,16 @@ void tst_QAbstractProxyModel::mapToSource()
QCOMPARE(model.mapToSource(proxyIndex), mapToSource);
}
-void tst_QAbstractProxyModel::revert_data()
-{
- //QTest::addColumn<int>("foo");
- //QTest::newRow("null") << 0;
-}
-
// public void revert()
void tst_QAbstractProxyModel::revert()
{
- //QFETCH(int, foo);
-
SubQAbstractProxyModel model;
model.revert();
}
-void tst_QAbstractProxyModel::setSourceModel_data()
-{
- //QTest::addColumn<int>("sourceModelCount");
- //QTest::newRow("null") << 0;
-}
-
// public void setSourceModel(QAbstractItemModel* sourceModel)
void tst_QAbstractProxyModel::setSourceModel()
{
- //QFETCH(int, sourceModelCount);
-
SubQAbstractProxyModel model;
QStandardItemModel *sourceModel = new QStandardItemModel(&model);
model.setSourceModel(sourceModel);
@@ -381,18 +329,18 @@ public:
class AnotherStandardItemModelWithCustomRoleNames : public QStandardItemModel
{
- public:
- enum CustomRole {
- AnotherCustomRole1 = Qt::UserRole + 10, // Different to StandardItemModelWithCustomRoleNames::CustomRole1
- AnotherCustomRole2
- };
-
- AnotherStandardItemModelWithCustomRoleNames() {
- QHash<int, QByteArray> _roleNames = roleNames();
- _roleNames.insert(AnotherCustomRole1, "another_custom1");
- _roleNames.insert(AnotherCustomRole2, "another_custom2");
- setRoleNames(_roleNames);
- }
+public:
+ enum CustomRole {
+ AnotherCustomRole1 = Qt::UserRole + 10, // Different to StandardItemModelWithCustomRoleNames::CustomRole1
+ AnotherCustomRole2
+ };
+
+ AnotherStandardItemModelWithCustomRoleNames() {
+ QHash<int, QByteArray> _roleNames = roleNames();
+ _roleNames.insert(AnotherCustomRole1, "another_custom1");
+ _roleNames.insert(AnotherCustomRole2, "another_custom2");
+ setRoleNames(_roleNames);
+ }
};
/**
@@ -441,7 +389,6 @@ void tst_QAbstractProxyModel::testRoleNames()
QVERIFY( proxy2RoleNames.contains(StandardItemModelWithCustomRoleNames::CustomRole2));
QVERIFY( proxy2RoleNames.value(StandardItemModelWithCustomRoleNames::CustomRole1) == "custom1" );
QVERIFY( proxy2RoleNames.value(StandardItemModelWithCustomRoleNames::CustomRole2) == "custom2" );
-
}
QTEST_MAIN(tst_QAbstractProxyModel)
diff --git a/tests/auto/widgets/itemviews/qidentityproxymodel/qidentityproxymodel.pro b/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
index 4fb8c98fe7..4fb8c98fe7 100644
--- a/tests/auto/widgets/itemviews/qidentityproxymodel/qidentityproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
diff --git a/tests/auto/widgets/itemviews/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
index 86ff00f9d4..fc11fbf763 100644
--- a/tests/auto/widgets/itemviews/qidentityproxymodel/tst_qidentityproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
@@ -39,11 +39,9 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
-#include <QtCore>
-#include <QtGui>
-#include <QtWidgets>
+#include <QtCore/QCoreApplication>
+#include <QtWidgets/QStandardItemModel>
#include "dynamictreemodel.h"
#include "qidentityproxymodel.h"
@@ -55,14 +53,11 @@ class tst_QIdentityProxyModel : public QObject
Q_OBJECT
public:
-
tst_QIdentityProxyModel();
- virtual ~tst_QIdentityProxyModel();
public slots:
void initTestCase();
void cleanupTestCase();
- void init();
void cleanup();
private slots:
@@ -82,12 +77,6 @@ private:
tst_QIdentityProxyModel::tst_QIdentityProxyModel()
: m_model(0), m_proxy(0)
{
-
-}
-
-tst_QIdentityProxyModel::~tst_QIdentityProxyModel()
-{
-
}
void tst_QIdentityProxyModel::initTestCase()
@@ -104,10 +93,6 @@ void tst_QIdentityProxyModel::cleanupTestCase()
delete m_model;
}
-void tst_QIdentityProxyModel::init()
-{
-}
-
void tst_QIdentityProxyModel::cleanup()
{
m_model->clear();
@@ -169,6 +154,11 @@ void tst_QIdentityProxyModel::insertRows()
QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(rowsInserted(QModelIndex,int,int)));
+ QVERIFY(modelBeforeSpy.isValid());
+ QVERIFY(modelAfterSpy.isValid());
+ QVERIFY(proxyBeforeSpy.isValid());
+ QVERIFY(proxyAfterSpy.isValid());
+
QStandardItem *item = new QStandardItem(QString("new item"));
parentItem->appendRow(item);
@@ -184,7 +174,6 @@ void tst_QIdentityProxyModel::insertRows()
QVERIFY(modelAfterSpy.first().at(2) == proxyAfterSpy.first().at(2));
verifyIdentity(m_model);
-
}
void tst_QIdentityProxyModel::removeRows()
@@ -205,6 +194,11 @@ void tst_QIdentityProxyModel::removeRows()
QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+ QVERIFY(modelBeforeSpy.isValid());
+ QVERIFY(modelAfterSpy.isValid());
+ QVERIFY(proxyBeforeSpy.isValid());
+ QVERIFY(proxyAfterSpy.isValid());
+
const QModelIndex topLevel = m_model->index(0, 0, QModelIndex());
const QModelIndex secondLevel = m_model->index(0, 0, topLevel);
const QModelIndex thirdLevel = m_model->index(0, 0, secondLevel);
@@ -254,6 +248,11 @@ void tst_QIdentityProxyModel::moveRows()
QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
+ QVERIFY(modelBeforeSpy.isValid());
+ QVERIFY(modelAfterSpy.isValid());
+ QVERIFY(proxyBeforeSpy.isValid());
+ QVERIFY(proxyAfterSpy.isValid());
+
{
ModelMoveCommand moveCommand(&model, 0);
moveCommand.setAncestorRowNumbers(QList<int>() << 5);
@@ -310,6 +309,11 @@ void tst_QIdentityProxyModel::reset()
QSignalSpy proxyBeforeSpy(m_proxy, SIGNAL(modelAboutToBeReset()));
QSignalSpy proxyAfterSpy(m_proxy, SIGNAL(modelReset()));
+ QVERIFY(modelBeforeSpy.isValid());
+ QVERIFY(modelAfterSpy.isValid());
+ QVERIFY(proxyBeforeSpy.isValid());
+ QVERIFY(proxyAfterSpy.isValid());
+
{
ModelResetCommandFixed resetCommand(&model, 0);
resetCommand.setAncestorRowNumbers(QList<int>() << 5);
diff --git a/tests/auto/corelib/kernel/qitemmodel/.gitignore b/tests/auto/corelib/itemmodels/qitemmodel/.gitignore
index 017be17fa8..017be17fa8 100644
--- a/tests/auto/corelib/kernel/qitemmodel/.gitignore
+++ b/tests/auto/corelib/itemmodels/qitemmodel/.gitignore
diff --git a/tests/auto/corelib/kernel/qitemmodel/README b/tests/auto/corelib/itemmodels/qitemmodel/README
index bddec0cef2..bddec0cef2 100644
--- a/tests/auto/corelib/kernel/qitemmodel/README
+++ b/tests/auto/corelib/itemmodels/qitemmodel/README
diff --git a/tests/auto/corelib/kernel/qitemmodel/modelstotest.cpp b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
index 496789d408..20985b69a6 100644
--- a/tests/auto/corelib/kernel/qitemmodel/modelstotest.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,10 +41,10 @@
#include <QtTest/QtTest>
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
#include <QtSql/QtSql>
#include <QtWidgets/QtWidgets>
-#include <QSortFilterProxyModel>
+#include <QtCore/QSortFilterProxyModel>
/*
To add a model to be tested add the header file to the includes
@@ -163,7 +163,7 @@ QAbstractItemModel *ModelsToTest::createModel(const QString &modelType)
QStandardItemModel *standardItemModel = new QStandardItemModel;
model->setSourceModel(standardItemModel);
populateTestArea(model);
- model->setFilterRegExp(QRegExp("(^$|0.*)"));
+ model->setFilterRegExp(QRegExp("(^$|I.*)"));
return model;
}
diff --git a/tests/auto/corelib/kernel/qitemmodel/qitemmodel.pro b/tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro
index ff21d6afa5..ff21d6afa5 100644
--- a/tests/auto/corelib/kernel/qitemmodel/qitemmodel.pro
+++ b/tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro
diff --git a/tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
index a4b1044cab..6d673ae00f 100644
--- a/tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <qdebug.h>
#include "modelstotest.cpp"
#include <QMetaType>
@@ -601,6 +601,7 @@ void tst_QItemModel::setData()
QVERIFY(currentModel);
qRegisterMetaType<QModelIndex>("QModelIndex");
QSignalSpy spy(currentModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
+ QVERIFY(spy.isValid());
QCOMPARE(currentModel->setData(QModelIndex(), QVariant()), false);
QCOMPARE(spy.count(), 0);
@@ -662,6 +663,7 @@ void tst_QItemModel::setHeaderData()
qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
QSignalSpy spy(currentModel, SIGNAL(headerDataChanged( Qt::Orientation, int , int )));
+ QVERIFY(spy.isValid());
QString text = "Index private pointers should always be the same";
int signalCount = 0;
@@ -702,6 +704,7 @@ void tst_QItemModel::sort()
QModelIndex index = currentModel->index(0, 0, topIndex);
QVERIFY(index.isValid());
QSignalSpy spy(currentModel, SIGNAL(layoutChanged()));
+ QVERIFY(spy.isValid());
for (int i=-1; i < 10; ++i){
currentModel->sort(i);
if (index != currentModel->index(0, 0, topIndex)){
@@ -846,6 +849,13 @@ void tst_QItemModel::remove()
QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset()));
QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged()));
+ QVERIFY(columnsAboutToBeRemovedSpy.isValid());
+ QVERIFY(rowsAboutToBeRemovedSpy.isValid());
+ QVERIFY(columnsRemovedSpy.isValid());
+ QVERIFY(rowsRemovedSpy.isValid());
+ QVERIFY(modelResetSpy.isValid());
+ QVERIFY(modelLayoutChangedSpy.isValid());
+
QFETCH(int, numberOfRowsAboutToBeRemovedSignals);
QFETCH(int, numberOfColumnsAboutToBeRemovedSignals);
QFETCH(int, numberOfRowsRemovedSignals);
@@ -1182,6 +1192,13 @@ void tst_QItemModel::insert()
QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset()));
QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged()));
+ QVERIFY(columnsAboutToBeInsertedSpy.isValid());
+ QVERIFY(rowsAboutToBeInsertedSpy.isValid());
+ QVERIFY(columnsInsertedSpy.isValid());
+ QVERIFY(rowsInsertedSpy.isValid());
+ QVERIFY(modelResetSpy.isValid());
+ QVERIFY(modelLayoutChangedSpy.isValid());
+
QFETCH(int, numberOfRowsAboutToBeInsertedSignals);
QFETCH(int, numberOfColumnsAboutToBeInsertedSignals);
QFETCH(int, numberOfRowsInsertedSignals);
diff --git a/tests/auto/widgets/itemviews/qitemselectionmodel/.gitignore b/tests/auto/corelib/itemmodels/qitemselectionmodel/.gitignore
index aa543a200a..aa543a200a 100644
--- a/tests/auto/widgets/itemviews/qitemselectionmodel/.gitignore
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/.gitignore
diff --git a/tests/auto/widgets/itemviews/qitemselectionmodel/qitemselectionmodel.pro b/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
index a4c7ba3786..aff9b3102d 100644
--- a/tests/auto/widgets/itemviews/qitemselectionmodel/qitemselectionmodel.pro
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_qitemselectionmodel
QT += widgets testlib
SOURCES += tst_qitemselectionmodel.cpp
-
-
diff --git a/tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
index 2097cb31ee..552b3d6eab 100644
--- a/tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include <QtGui/QtGui>
@@ -51,8 +50,6 @@ class tst_QItemSelectionModel : public QObject
public:
tst_QItemSelectionModel();
- virtual ~tst_QItemSelectionModel();
-
public slots:
void initTestCase();
@@ -80,18 +77,18 @@ private slots:
void selectedColumns();
void setCurrentIndex();
void splitOnInsert();
- void task196285_rowIntersectsSelection();
+ void rowIntersectsSelection1();
+ void rowIntersectsSelection2();
void unselectable();
- void task220420_selectedIndexes();
- void task240734_layoutChanged();
+ void selectedIndexes();
+ void layoutChanged();
void merge_data();
void merge();
- void task119433_isRowSelected();
- void task252069_rowIntersectsSelection();
- void task232634_childrenDeselectionSignal();
- void task260134_layoutChangedWithAllSelected();
- void QTBUG5671_layoutChangedWithAllSelected();
- void QTBUG2804_layoutChangedTreeSelection();
+ void isRowSelected();
+ void childrenDeselectionSignal();
+ void layoutChangedWithAllSelected1();
+ void layoutChangedWithAllSelected2();
+ void layoutChangedTreeSelection();
void deselectRemovedMiddleRange();
void rangeOperatorLessThan_data();
void rangeOperatorLessThan();
@@ -116,7 +113,6 @@ typedef QList<int> IntList;
typedef QPair<int, int> IntPair;
typedef QList<IntPair> PairList;
-
Q_DECLARE_METATYPE(PairList)
Q_DECLARE_METATYPE(QModelIndex)
Q_DECLARE_METATYPE(QModelIndexList)
@@ -186,11 +182,8 @@ QDataStream &operator>>(QDataStream &s, QModelIndexList &output)
return s;
}
-tst_QItemSelectionModel::tst_QItemSelectionModel() : model(0), selection(0)
-{
-}
-
-tst_QItemSelectionModel::~tst_QItemSelectionModel()
+tst_QItemSelectionModel::tst_QItemSelectionModel()
+ : model(0), selection(0)
{
}
@@ -321,7 +314,7 @@ void tst_QItemSelectionModel::clearAndSelect()
// populate selectionmodel
selection->select(model->index(1, 1, QModelIndex()), QItemSelectionModel::Select);
QCOMPARE(selection->selectedIndexes().count(), 1);
- QVERIFY(selection->hasSelection());
+ QVERIFY(selection->hasSelection());
// ClearAndSelect with empty selection
QItemSelection emptySelection;
@@ -329,40 +322,38 @@ void tst_QItemSelectionModel::clearAndSelect()
// verify the selectionmodel is empty
QVERIFY(selection->selectedIndexes().isEmpty());
- QVERIFY(selection->hasSelection()==false);
+ QVERIFY(selection->hasSelection()==false);
}
void tst_QItemSelectionModel::toggleSelection()
{
- //test the toggle selection and checks whether selectedIndex
- //and hasSelection returns the correct value
+ //test the toggle selection and checks whether selectedIndex
+ //and hasSelection returns the correct value
- selection->clearSelection();
+ selection->clearSelection();
QCOMPARE(selection->selectedIndexes().count(), 0);
- QVERIFY(selection->hasSelection()==false);
+ QVERIFY(selection->hasSelection()==false);
- QModelIndex index=model->index(1, 1, QModelIndex());
+ QModelIndex index=model->index(1, 1, QModelIndex());
// populate selectionmodel
selection->select(index, QItemSelectionModel::Toggle);
QCOMPARE(selection->selectedIndexes().count(), 1);
- QVERIFY(selection->hasSelection()==true);
+ QVERIFY(selection->hasSelection()==true);
selection->select(index, QItemSelectionModel::Toggle);
QCOMPARE(selection->selectedIndexes().count(), 0);
- QVERIFY(selection->hasSelection()==false);
+ QVERIFY(selection->hasSelection()==false);
// populate selectionmodel with rows
selection->select(index, QItemSelectionModel::Toggle | QItemSelectionModel::Rows);
QCOMPARE(selection->selectedIndexes().count(), model->columnCount());
- QVERIFY(selection->hasSelection()==true);
+ QVERIFY(selection->hasSelection()==true);
selection->select(index, QItemSelectionModel::Toggle | QItemSelectionModel::Rows);
QCOMPARE(selection->selectedIndexes().count(), 0);
- QVERIFY(selection->hasSelection()==false);
-
+ QVERIFY(selection->hasSelection()==false);
}
-
void tst_QItemSelectionModel::select_data()
{
QTest::addColumn<QModelIndexList>("indexList");
@@ -628,7 +619,6 @@ void tst_QItemSelectionModel::select_data()
<< command
<< expected;
}
- /* ### FAILS
{
QModelIndexList index;
QModelIndexList expected;
@@ -642,7 +632,6 @@ void tst_QItemSelectionModel::select_data()
<< command
<< expected;
}
- */
{
QModelIndexList index;
QModelIndexList expected;
@@ -1187,54 +1176,54 @@ void tst_QItemSelectionModel::select_data()
}
{
QModelIndexList indexes;
- IntList commands;
- QModelIndexList expected;
-
- indexes << model->index(0, 0, QModelIndex()) << model->index(0, 0, QModelIndex()) // press 0
- << model->index(0, 0, QModelIndex()) << model->index(0, 0, QModelIndex()) // release 0
- << model->index(1, 0, QModelIndex()) << model->index(1, 0, QModelIndex()) // press 1
- << model->index(1, 0, QModelIndex()) << model->index(1, 0, QModelIndex()) // release 1
- << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex()) // press 2
- << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex()) // release 2
- << model->index(3, 0, QModelIndex()) << model->index(3, 0, QModelIndex()) // press 3
- << model->index(3, 0, QModelIndex()) << model->index(3, 0, QModelIndex()) // release 3
- << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex()) // press 2 again
- << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex());// move 2
-
- commands << (QItemSelectionModel::NoUpdate) // press 0
- << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 0
- << (QItemSelectionModel::NoUpdate) // press 1
- << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 1
- << (QItemSelectionModel::NoUpdate) // press 2
- << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 2
- << (QItemSelectionModel::NoUpdate) // press 3
- << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 3
- << (QItemSelectionModel::NoUpdate) // press 2 again
- << (QItemSelectionModel::Toggle/*Current*/|QItemSelectionModel::Rows);// move 2
-
- expected << model->index(0, 0, QModelIndex())
- << model->index(0, 1, QModelIndex())
- << model->index(0, 2, QModelIndex())
- << model->index(0, 3, QModelIndex())
- << model->index(0, 4, QModelIndex())
-
- << model->index(1, 0, QModelIndex())
- << model->index(1, 1, QModelIndex())
- << model->index(1, 2, QModelIndex())
- << model->index(1, 3, QModelIndex())
- << model->index(1, 4, QModelIndex())
- /*
- << model->index(2, 0, QModelIndex())
- << model->index(2, 1, QModelIndex())
- << model->index(2, 2, QModelIndex())
- << model->index(2, 3, QModelIndex())
- << model->index(2, 4, QModelIndex())
- */
- << model->index(3, 0, QModelIndex())
- << model->index(3, 1, QModelIndex())
- << model->index(3, 2, QModelIndex())
- << model->index(3, 3, QModelIndex())
- << model->index(3, 4, QModelIndex());
+ IntList commands;
+ QModelIndexList expected;
+
+ indexes << model->index(0, 0, QModelIndex()) << model->index(0, 0, QModelIndex()) // press 0
+ << model->index(0, 0, QModelIndex()) << model->index(0, 0, QModelIndex()) // release 0
+ << model->index(1, 0, QModelIndex()) << model->index(1, 0, QModelIndex()) // press 1
+ << model->index(1, 0, QModelIndex()) << model->index(1, 0, QModelIndex()) // release 1
+ << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex()) // press 2
+ << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex()) // release 2
+ << model->index(3, 0, QModelIndex()) << model->index(3, 0, QModelIndex()) // press 3
+ << model->index(3, 0, QModelIndex()) << model->index(3, 0, QModelIndex()) // release 3
+ << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex()) // press 2 again
+ << model->index(2, 0, QModelIndex()) << model->index(2, 0, QModelIndex());// move 2
+
+ commands << (QItemSelectionModel::NoUpdate) // press 0
+ << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 0
+ << (QItemSelectionModel::NoUpdate) // press 1
+ << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 1
+ << (QItemSelectionModel::NoUpdate) // press 2
+ << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 2
+ << (QItemSelectionModel::NoUpdate) // press 3
+ << (QItemSelectionModel::Toggle|QItemSelectionModel::Rows) // release 3
+ << (QItemSelectionModel::NoUpdate) // press 2 again
+ << (QItemSelectionModel::Toggle/*Current*/|QItemSelectionModel::Rows);// move 2
+
+ expected << model->index(0, 0, QModelIndex())
+ << model->index(0, 1, QModelIndex())
+ << model->index(0, 2, QModelIndex())
+ << model->index(0, 3, QModelIndex())
+ << model->index(0, 4, QModelIndex())
+
+ << model->index(1, 0, QModelIndex())
+ << model->index(1, 1, QModelIndex())
+ << model->index(1, 2, QModelIndex())
+ << model->index(1, 3, QModelIndex())
+ << model->index(1, 4, QModelIndex())
+ /*
+ << model->index(2, 0, QModelIndex())
+ << model->index(2, 1, QModelIndex())
+ << model->index(2, 2, QModelIndex())
+ << model->index(2, 3, QModelIndex())
+ << model->index(2, 4, QModelIndex())
+ */
+ << model->index(3, 0, QModelIndex())
+ << model->index(3, 1, QModelIndex())
+ << model->index(3, 2, QModelIndex())
+ << model->index(3, 3, QModelIndex())
+ << model->index(3, 4, QModelIndex());
QTest::newRow("simulated treeview multiselection behavior")
<< indexes
@@ -1269,12 +1258,6 @@ void tst_QItemSelectionModel::select()
QVERIFY(selection->hasSelection()!=selectedList.isEmpty());
- // debug output
-// for (int i=0; i<selectedList.count(); ++i)
-// qDebug(QString("selected (%1, %2)")
-// .arg(selectedList.at(i).row())
-// .arg(selectedList.at(i).column()));
-
// test that the number of indices are as expected
QVERIFY2(selectedList.count() == expectedList.count(),
QString("expected indices: %1 actual indices: %2")
@@ -1343,140 +1326,140 @@ void tst_QItemSelectionModel::persistentselections_data()
<< insertRows << insertColumns << deleteRows << deleteColumns
<< expected;
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0);
- command << QItemSelectionModel::ClearAndSelect;
- deleteRows << 0 << 1;
- QTest::newRow("ClearAndSelect (0, 0). Delete first row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(1, 0);
- command << QItemSelectionModel::ClearAndSelect;
- deleteRows << 0 << 1;
- expected << IntPair(0, 0);
- QTest::newRow("ClearAndSelect (1, 0). Delete first row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0);
- command << QItemSelectionModel::ClearAndSelect;
- insertRows << 5 << 1;
- expected << IntPair(0, 0);
- QTest::newRow("ClearAndSelect (0, 0). Append row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0);
- command << QItemSelectionModel::ClearAndSelect;
- insertRows << 0 << 1;
- expected << IntPair(1, 0);
- QTest::newRow("ClearAndSelect (0, 0). Insert before first row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0)
- << IntPair(4, 0);
- command << QItemSelectionModel::ClearAndSelect;
- insertRows << 5 << 1;
- expected << IntPair(0, 0)
- << IntPair(1, 0)
- << IntPair(2, 0)
- << IntPair(3, 0)
- << IntPair(4, 0);
- QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Append row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0)
- << IntPair(4, 0);
- command << QItemSelectionModel::ClearAndSelect;
- insertRows << 0 << 1;
- expected << IntPair(1, 0)
- << IntPair(2, 0)
- << IntPair(3, 0)
- << IntPair(4, 0)
- << IntPair(5, 0);
- QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Insert before first row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0)
- << IntPair(4, 0);
- command << QItemSelectionModel::ClearAndSelect;
- deleteRows << 0 << 1;
- expected << IntPair(0, 0)
- << IntPair(1, 0)
- << IntPair(2, 0)
- << IntPair(3, 0);
- QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Delete first row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0)
- << IntPair(4, 0);
- command << QItemSelectionModel::ClearAndSelect;
- deleteRows << 4 << 1;
- expected << IntPair(0, 0)
- << IntPair(1, 0)
- << IntPair(2, 0)
- << IntPair(3, 0);
- QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Delete last row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0)
- << IntPair(4, 0);
- command << QItemSelectionModel::ClearAndSelect;
- deleteRows << 1 << 3;
- expected << IntPair(0, 0)
- << IntPair(1, 0);
- QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Deleting all but first and last row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
-
- index.clear(); expected.clear(); command.clear();
- insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
- index << IntPair(0, 0)
- << IntPair(4, 0);
- command << QItemSelectionModel::ClearAndSelect;
- insertRows << 1 << 1;
- expected << IntPair(0, 0)
- // the inserted row should not be selected
- << IntPair(2, 0)
- << IntPair(3, 0)
- << IntPair(4, 0)
- << IntPair(5, 0);
- QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Insert after first row.")
- << index << command
- << insertRows << insertColumns << deleteRows << deleteColumns
- << expected;
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ deleteRows << 0 << 1;
+ QTest::newRow("ClearAndSelect (0, 0). Delete first row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(1, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ deleteRows << 0 << 1;
+ expected << IntPair(0, 0);
+ QTest::newRow("ClearAndSelect (1, 0). Delete first row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ insertRows << 5 << 1;
+ expected << IntPair(0, 0);
+ QTest::newRow("ClearAndSelect (0, 0). Append row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ insertRows << 0 << 1;
+ expected << IntPair(1, 0);
+ QTest::newRow("ClearAndSelect (0, 0). Insert before first row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0)
+ << IntPair(4, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ insertRows << 5 << 1;
+ expected << IntPair(0, 0)
+ << IntPair(1, 0)
+ << IntPair(2, 0)
+ << IntPair(3, 0)
+ << IntPair(4, 0);
+ QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Append row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0)
+ << IntPair(4, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ insertRows << 0 << 1;
+ expected << IntPair(1, 0)
+ << IntPair(2, 0)
+ << IntPair(3, 0)
+ << IntPair(4, 0)
+ << IntPair(5, 0);
+ QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Insert before first row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0)
+ << IntPair(4, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ deleteRows << 0 << 1;
+ expected << IntPair(0, 0)
+ << IntPair(1, 0)
+ << IntPair(2, 0)
+ << IntPair(3, 0);
+ QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Delete first row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0)
+ << IntPair(4, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ deleteRows << 4 << 1;
+ expected << IntPair(0, 0)
+ << IntPair(1, 0)
+ << IntPair(2, 0)
+ << IntPair(3, 0);
+ QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Delete last row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0)
+ << IntPair(4, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ deleteRows << 1 << 3;
+ expected << IntPair(0, 0)
+ << IntPair(1, 0);
+ QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Deleting all but first and last row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
+
+ index.clear(); expected.clear(); command.clear();
+ insertRows.clear(); insertColumns.clear(); deleteRows.clear(); deleteColumns.clear();
+ index << IntPair(0, 0)
+ << IntPair(4, 0);
+ command << QItemSelectionModel::ClearAndSelect;
+ insertRows << 1 << 1;
+ expected << IntPair(0, 0)
+ // the inserted row should not be selected
+ << IntPair(2, 0)
+ << IntPair(3, 0)
+ << IntPair(4, 0)
+ << IntPair(5, 0);
+ QTest::newRow("ClearAndSelect (0, 0) to (4, 0). Insert after first row.")
+ << index << command
+ << insertRows << insertColumns << deleteRows << deleteColumns
+ << expected;
}
void tst_QItemSelectionModel::persistentselections()
@@ -1550,6 +1533,7 @@ void tst_QItemSelectionModel::resetModel()
view.setModel(&model);
QSignalSpy spy(view.selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)));
+ QVERIFY(spy.isValid());
view.selectionModel()->select(QItemSelection(model.index(0, 0), model.index(5, 5)), QItemSelectionModel::Select);
@@ -1612,6 +1596,7 @@ void tst_QItemSelectionModel::removeRows()
MyStandardItemModel model(rowCount, columnCount);
QItemSelectionModel selections(&model);
QSignalSpy spy(&selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)));
+ QVERIFY(spy.isValid());
QModelIndex tl = model.index(selectTop, selectLeft);
QModelIndex br = model.index(selectBottom, selectRight);
@@ -1674,6 +1659,7 @@ void tst_QItemSelectionModel::removeColumns()
MyStandardItemModel model(rowCount, columnCount);
QItemSelectionModel selections(&model);
QSignalSpy spy(&selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)));
+ QVERIFY(spy.isValid());
QModelIndex tl = model.index(selectTop, selectLeft);
QModelIndex br = model.index(selectBottom, selectRight);
@@ -1786,7 +1772,7 @@ void tst_QItemSelectionModel::modelLayoutChanged()
// verify that selection is as expected
QItemSelection selection = selectionModel.selection();
QCOMPARE(selection.count(), expectedSelectedRanges.count());
- QVERIFY(selectionModel.hasSelection() == !expectedSelectedRanges.isEmpty());
+ QVERIFY(selectionModel.hasSelection() == !expectedSelectedRanges.isEmpty());
for (int i = 0; i < expectedSelectedRanges.count(); ++i) {
IntPairPair expectedRange = expectedSelectedRanges.at(i);
@@ -1943,6 +1929,10 @@ void tst_QItemSelectionModel::setCurrentIndex()
QSignalSpy columnSpy(selectionModel,
SIGNAL(currentColumnChanged(QModelIndex,QModelIndex)));
+ QVERIFY(currentSpy.isValid());
+ QVERIFY(rowSpy.isValid());
+ QVERIFY(columnSpy.isValid());
+
// Select the same row and column indexes, but with a different parent
selectionModel->setCurrentIndex(
treemodel->index(0, 0, treemodel->index(1, 0)),
@@ -1974,7 +1964,7 @@ void tst_QItemSelectionModel::splitOnInsert()
QVERIFY(!selectionModel.isSelected(model.index(1, 0)));
}
-void tst_QItemSelectionModel::task196285_rowIntersectsSelection()
+void tst_QItemSelectionModel::rowIntersectsSelection1()
{
QTableWidget table;
table.setColumnCount(1);
@@ -2001,6 +1991,52 @@ void tst_QItemSelectionModel::task196285_rowIntersectsSelection()
QVERIFY(!selectionModel->columnIntersectsSelection(0, QModelIndex()));
}
+void tst_QItemSelectionModel::rowIntersectsSelection2()
+{
+ QStandardItemModel m;
+ for (int i=0; i<8; ++i) {
+ for (int j=0; j<8; ++j) {
+ QStandardItem *item = new QStandardItem(QString("Item number %1").arg(i));
+ if ((i % 2 == 0 && j == 0) ||
+ (j % 2 == 0 && i == 0) ||
+ j == 5 || i == 5 ) {
+ item->setEnabled(false);
+ //item->setSelectable(false);
+ }
+ m.setItem(i, j, item);
+ }
+ }
+
+ QItemSelectionModel selected(&m);
+ //nothing is selected
+ QVERIFY(!selected.rowIntersectsSelection(0, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(2, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(3, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(5, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(0, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(2, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(3, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(5, QModelIndex()));
+ selected.select(m.index(2, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows);
+ QVERIFY(!selected.rowIntersectsSelection(0, QModelIndex()));
+ QVERIFY( selected.rowIntersectsSelection(2, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(3, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(5, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(0, QModelIndex()));
+ QVERIFY( selected.columnIntersectsSelection(2, QModelIndex()));
+ QVERIFY( selected.columnIntersectsSelection(3, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(5, QModelIndex()));
+ selected.select(m.index(0, 5), QItemSelectionModel::Select | QItemSelectionModel::Columns);
+ QVERIFY(!selected.rowIntersectsSelection(0, QModelIndex()));
+ QVERIFY( selected.rowIntersectsSelection(2, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(3, QModelIndex()));
+ QVERIFY(!selected.rowIntersectsSelection(5, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(0, QModelIndex()));
+ QVERIFY( selected.columnIntersectsSelection(2, QModelIndex()));
+ QVERIFY( selected.columnIntersectsSelection(3, QModelIndex()));
+ QVERIFY(!selected.columnIntersectsSelection(5, QModelIndex()));
+}
+
void tst_QItemSelectionModel::unselectable()
{
QTreeWidget w;
@@ -2015,7 +2051,7 @@ void tst_QItemSelectionModel::unselectable()
QCOMPARE(w.selectionModel()->selectedRows().count(), 0);
}
-void tst_QItemSelectionModel::task220420_selectedIndexes()
+void tst_QItemSelectionModel::selectedIndexes()
{
QStandardItemModel model(2, 2);
QItemSelectionModel selectionModel(&model);
@@ -2034,31 +2070,32 @@ void tst_QItemSelectionModel::task220420_selectedIndexes()
class QtTestTableModel: public QAbstractTableModel
{
Q_OBJECT
+public:
+ QtTestTableModel(int rows = 0, int columns = 0, QObject *parent = 0)
+ : QAbstractTableModel(parent)
+ , row_count(rows)
+ , column_count(columns)
+ {
+ }
- public:
- QtTestTableModel(int rows = 0, int columns = 0, QObject *parent = 0)
- : QAbstractTableModel(parent),
- row_count(rows),
- column_count(columns) {}
-
- int rowCount(const QModelIndex& = QModelIndex()) const { return row_count; }
- int columnCount(const QModelIndex& = QModelIndex()) const { return column_count; }
- bool isEditable(const QModelIndex &) const { return true; }
+ int rowCount(const QModelIndex& = QModelIndex()) const { return row_count; }
+ int columnCount(const QModelIndex& = QModelIndex()) const { return column_count; }
+ bool isEditable(const QModelIndex &) const { return true; }
- QVariant data(const QModelIndex &idx, int role) const
- {
- if (role == Qt::DisplayRole || role == Qt::EditRole)
- return QString("[%1,%2]").arg(idx.row()).arg(idx.column());
- return QVariant();
- }
+ QVariant data(const QModelIndex &idx, int role) const
+ {
+ if (role == Qt::DisplayRole || role == Qt::EditRole)
+ return QString("[%1,%2]").arg(idx.row()).arg(idx.column());
+ return QVariant();
+ }
- int row_count;
- int column_count;
- friend class tst_QItemSelectionModel;
+ int row_count;
+ int column_count;
+ friend class tst_QItemSelectionModel;
};
-void tst_QItemSelectionModel::task240734_layoutChanged()
+void tst_QItemSelectionModel::layoutChanged()
{
QtTestTableModel model(1,1);
QItemSelectionModel selectionModel(&model);
@@ -2126,7 +2163,6 @@ void tst_QItemSelectionModel::merge_data()
<< r1;
}
-
void tst_QItemSelectionModel::merge()
{
QFETCH(QItemSelection, init);
@@ -2142,7 +2178,7 @@ void tst_QItemSelectionModel::merge()
QVERIFY(init.contains(idx));
}
-void tst_QItemSelectionModel::task119433_isRowSelected()
+void tst_QItemSelectionModel::isRowSelected()
{
QStandardItemModel model(2,2);
model.setData(model.index(0,0), 0, Qt::UserRole - 1);
@@ -2152,53 +2188,7 @@ void tst_QItemSelectionModel::task119433_isRowSelected()
QVERIFY(sel.isRowSelected(0, QModelIndex()));
}
-void tst_QItemSelectionModel::task252069_rowIntersectsSelection()
-{
- QStandardItemModel m;
- for (int i=0; i<8; ++i) {
- for (int j=0; j<8; ++j) {
- QStandardItem *item = new QStandardItem(QString("Item number %1").arg(i));
- if ((i % 2 == 0 && j == 0) ||
- (j % 2 == 0 && i == 0) ||
- j == 5 || i == 5 ) {
- item->setEnabled(false);
- //item->setSelectable(false);
- }
- m.setItem(i, j, item);
- }
- }
-
- QItemSelectionModel selected(&m);
- //nothing is selected
- QVERIFY(!selected.rowIntersectsSelection(0, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(2, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(3, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(5, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(0, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(2, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(3, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(5, QModelIndex()));
- selected.select(m.index(2, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows);
- QVERIFY(!selected.rowIntersectsSelection(0, QModelIndex()));
- QVERIFY( selected.rowIntersectsSelection(2, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(3, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(5, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(0, QModelIndex()));
- QVERIFY( selected.columnIntersectsSelection(2, QModelIndex()));
- QVERIFY( selected.columnIntersectsSelection(3, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(5, QModelIndex()));
- selected.select(m.index(0, 5), QItemSelectionModel::Select | QItemSelectionModel::Columns);
- QVERIFY(!selected.rowIntersectsSelection(0, QModelIndex()));
- QVERIFY( selected.rowIntersectsSelection(2, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(3, QModelIndex()));
- QVERIFY(!selected.rowIntersectsSelection(5, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(0, QModelIndex()));
- QVERIFY( selected.columnIntersectsSelection(2, QModelIndex()));
- QVERIFY( selected.columnIntersectsSelection(3, QModelIndex()));
- QVERIFY(!selected.columnIntersectsSelection(5, QModelIndex()));
-}
-
-void tst_QItemSelectionModel::task232634_childrenDeselectionSignal()
+void tst_QItemSelectionModel::childrenDeselectionSignal()
{
QStandardItemModel model;
@@ -2217,6 +2207,7 @@ void tst_QItemSelectionModel::task232634_childrenDeselectionSignal()
selectionModel.select(sel, QItemSelectionModel::SelectCurrent);
QSignalSpy deselectSpy(&selectionModel, SIGNAL(selectionChanged(const QItemSelection& , const QItemSelection&)));
+ QVERIFY(deselectSpy.isValid());
model.removeRows(0, 1, root);
QVERIFY(deselectSpy.count() == 1);
@@ -2251,7 +2242,7 @@ void tst_QItemSelectionModel::task232634_childrenDeselectionSignal()
QVERIFY(selectionModel.selection().contains(sel2));
}
-void tst_QItemSelectionModel::task260134_layoutChangedWithAllSelected()
+void tst_QItemSelectionModel::layoutChangedWithAllSelected1()
{
QStringListModel model( QStringList() << "foo" << "bar" << "foo2");
QSortFilterProxyModel proxy;
@@ -2282,8 +2273,9 @@ void tst_QItemSelectionModel::task260134_layoutChangedWithAllSelected()
QVERIFY(selection.isSelected(index));
}
-
-void tst_QItemSelectionModel::QTBUG5671_layoutChangedWithAllSelected()
+// Same as layoutChangedWithAllSelected1, but with a slightly bigger model.
+// This test is a regression test for QTBUG-5671.
+void tst_QItemSelectionModel::layoutChangedWithAllSelected2()
{
struct MyFilterModel : public QSortFilterProxyModel
{ // Override sort filter proxy to remove even numbered rows.
@@ -2294,8 +2286,6 @@ void tst_QItemSelectionModel::QTBUG5671_layoutChangedWithAllSelected()
}
};
- //same as task260134_layoutChangedWithAllSelected but with a sightly bigger model
-
enum { cNumRows=30, cNumCols=20 };
QStandardItemModel model(cNumRows, cNumCols);
@@ -2315,7 +2305,6 @@ void tst_QItemSelectionModel::QTBUG5671_layoutChangedWithAllSelected()
}
}
-
QCOMPARE(model.rowCount(), int(cNumRows));
QCOMPARE(proxy.rowCount(), int(cNumRows/2));
@@ -2335,7 +2324,8 @@ void tst_QItemSelectionModel::QTBUG5671_layoutChangedWithAllSelected()
QVERIFY(selection.isSelected(index));
}
-void tst_QItemSelectionModel::QTBUG2804_layoutChangedTreeSelection()
+// This test is a regression test for QTBUG-2804.
+void tst_QItemSelectionModel::layoutChangedTreeSelection()
{
QStandardItemModel model;
QStandardItem top1("Child1"), top2("Child2"), top3("Child3");
@@ -2379,7 +2369,6 @@ public slots:
}
QVERIFY(m_itemSelectionModel->selection().size() == 2);
}
-
};
void tst_QItemSelectionModel::deselectRemovedMiddleRange()
@@ -2401,6 +2390,7 @@ void tst_QItemSelectionModel::deselectRemovedMiddleRange()
RemovalObserver ro(&selModel);
QSignalSpy spy(&selModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)));
+ QVERIFY(spy.isValid());
bool ok = model.removeRows(4, 2);
QVERIFY(ok);
@@ -2431,9 +2421,9 @@ static QStandardItemModel* getModel(QObject *parent)
}
enum Result {
- LessThan,
- NotLessThan,
- NotEqual
+ LessThan,
+ NotLessThan,
+ NotEqual
};
Q_DECLARE_METATYPE(Result);
@@ -2499,70 +2489,70 @@ void tst_QItemSelectionModel::rangeOperatorLessThan_data()
void tst_QItemSelectionModel::rangeOperatorLessThan()
{
- QStandardItemModel *model1 = getModel(this);
- QStandardItemModel *model2 = getModel(this);
+ QStandardItemModel *model1 = getModel(this);
+ QStandardItemModel *model2 = getModel(this);
- QFETCH(int, parent1);
- QFETCH(int, top1);
- QFETCH(int, left1);
- QFETCH(int, bottom1);
- QFETCH(int, right1);
- QFETCH(int, parent2);
- QFETCH(int, top2);
- QFETCH(int, left2);
- QFETCH(int, bottom2);
- QFETCH(int, right2);
- QFETCH(Result, result);
+ QFETCH(int, parent1);
+ QFETCH(int, top1);
+ QFETCH(int, left1);
+ QFETCH(int, bottom1);
+ QFETCH(int, right1);
+ QFETCH(int, parent2);
+ QFETCH(int, top2);
+ QFETCH(int, left2);
+ QFETCH(int, bottom2);
+ QFETCH(int, right2);
+ QFETCH(Result, result);
- QModelIndex p1 = model1->index(parent1, 0);
+ QModelIndex p1 = model1->index(parent1, 0);
- QModelIndex tl1 = model1->index(top1, left1, p1);
- QModelIndex br1 = model1->index(bottom1, right1, p1);
+ QModelIndex tl1 = model1->index(top1, left1, p1);
+ QModelIndex br1 = model1->index(bottom1, right1, p1);
- QItemSelectionRange r1(tl1, br1);
+ QItemSelectionRange r1(tl1, br1);
- QModelIndex p2 = model1->index(parent2, 0);
+ QModelIndex p2 = model1->index(parent2, 0);
- QModelIndex tl2 = model1->index(top2, left2, p2);
- QModelIndex br2 = model1->index(bottom2, right2, p2);
+ QModelIndex tl2 = model1->index(top2, left2, p2);
+ QModelIndex br2 = model1->index(bottom2, right2, p2);
- QItemSelectionRange r2(tl2, br2);
+ QItemSelectionRange r2(tl2, br2);
- if (result == LessThan)
- QVERIFY(r1 < r2);
- else if (result == NotLessThan)
- QVERIFY(!(r1 < r2));
- else if (result == NotEqual)
- if (!(r1 < r2))
- QVERIFY(r2 < r1);
+ if (result == LessThan)
+ QVERIFY(r1 < r2);
+ else if (result == NotLessThan)
+ QVERIFY(!(r1 < r2));
+ else if (result == NotEqual)
+ if (!(r1 < r2))
+ QVERIFY(r2 < r1);
- // Ranges in different models are always non-equal
+ // Ranges in different models are always non-equal
- QModelIndex p3 = model2->index(parent1, 0);
+ QModelIndex p3 = model2->index(parent1, 0);
- QModelIndex tl3 = model2->index(top1, left1, p3);
- QModelIndex br3 = model2->index(bottom1, right1, p3);
+ QModelIndex tl3 = model2->index(top1, left1, p3);
+ QModelIndex br3 = model2->index(bottom1, right1, p3);
- QItemSelectionRange r3(tl3, br3);
+ QItemSelectionRange r3(tl3, br3);
- if (!(r1 < r3))
- QVERIFY(r3 < r1);
+ if (!(r1 < r3))
+ QVERIFY(r3 < r1);
- if (!(r2 < r3))
- QVERIFY(r3 < r2);
+ if (!(r2 < r3))
+ QVERIFY(r3 < r2);
- QModelIndex p4 = model2->index(parent2, 0);
+ QModelIndex p4 = model2->index(parent2, 0);
- QModelIndex tl4 = model2->index(top2, left2, p4);
- QModelIndex br4 = model2->index(bottom2, right2, p4);
+ QModelIndex tl4 = model2->index(top2, left2, p4);
+ QModelIndex br4 = model2->index(bottom2, right2, p4);
- QItemSelectionRange r4(tl4, br4);
+ QItemSelectionRange r4(tl4, br4);
- if (!(r1 < r4))
- QVERIFY(r4 < r1);
+ if (!(r1 < r4))
+ QVERIFY(r4 < r1);
- if (!(r2 < r4))
- QVERIFY(r4 < r2);
+ if (!(r2 < r4))
+ QVERIFY(r4 < r2);
}
void tst_QItemSelectionModel::testDifferentModels()
@@ -2575,7 +2565,6 @@ void tst_QItemSelectionModel::testDifferentModels()
model1.appendColumn(QList<QStandardItem*>() << &top11 << &top12 << &top13);
model2.appendColumn(QList<QStandardItem*>() << &top21 << &top22 << &top23);
-
QModelIndex topIndex1 = model1.index(0, 0);
QModelIndex bottomIndex1 = model1.index(2, 0);
QModelIndex topIndex2 = model2.index(0, 0);
@@ -2593,10 +2582,10 @@ void tst_QItemSelectionModel::testDifferentModels()
class SelectionObserver : public QObject
{
- Q_OBJECT
+ Q_OBJECT
public:
SelectionObserver(QAbstractItemModel *model, QObject *parent = 0)
- : QObject(parent), m_model(model), m_selectionModel(0)
+ : QObject(parent), m_model(model), m_selectionModel(0)
{
connect(model, SIGNAL(modelReset()), SLOT(modelReset()));
}
@@ -2607,7 +2596,7 @@ public:
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged(QItemSelection,QItemSelection)));
}
- private slots:
+private slots:
void modelReset()
{
const QModelIndex idx = m_model->index(2, 0);
@@ -2657,37 +2646,35 @@ void tst_QItemSelectionModel::testValidRangesInSelectionsAfterReset()
class DuplicateItemSelectionModel : public QItemSelectionModel
{
- Q_OBJECT
+ Q_OBJECT
public:
- DuplicateItemSelectionModel(QItemSelectionModel *target, QAbstractItemModel *model, QObject *parent = 0)
- : QItemSelectionModel(model, parent), m_target(target)
- {
-
- }
+ DuplicateItemSelectionModel(QItemSelectionModel *target, QAbstractItemModel *model, QObject *parent = 0)
+ : QItemSelectionModel(model, parent), m_target(target)
+ {
+ }
- void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
- {
- QItemSelectionModel::select(selection, command);
- m_target->select(selection, command);
- }
+ void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
+ {
+ QItemSelectionModel::select(selection, command);
+ m_target->select(selection, command);
+ }
- using QItemSelectionModel::select;
+ using QItemSelectionModel::select;
- void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
- {
- QItemSelectionModel::setCurrentIndex(index, command);
- m_target->setCurrentIndex(index, command);
- }
+ void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
+ {
+ QItemSelectionModel::setCurrentIndex(index, command);
+ m_target->setCurrentIndex(index, command);
+ }
- void clearCurrentIndex()
- {
- QItemSelectionModel::clearCurrentIndex();
- m_target->clearCurrentIndex();
- }
+ void clearCurrentIndex()
+ {
+ QItemSelectionModel::clearCurrentIndex();
+ m_target->clearCurrentIndex();
+ }
private:
- QItemSelectionModel *m_target;
-
+ QItemSelectionModel *m_target;
};
void tst_QItemSelectionModel::testChainedSelectionClear()
@@ -2735,6 +2722,7 @@ void tst_QItemSelectionModel::testClearCurrentIndex()
QItemSelectionModel selectionModel(&model, 0);
QSignalSpy currentIndexSpy(&selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)));
+ QVERIFY(currentIndexSpy.isValid());
QModelIndex firstIndex = model.index(0, 0);
QVERIFY(firstIndex.isValid());
diff --git a/tests/auto/widgets/itemviews/qsortfilterproxymodel/.gitignore b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/.gitignore
index d3672fe4ae..d3672fe4ae 100644
--- a/tests/auto/widgets/itemviews/qsortfilterproxymodel/.gitignore
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/.gitignore
diff --git a/tests/auto/widgets/itemviews/qsortfilterproxymodel/qsortfilterproxymodel.pro b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
index d6e949f73d..d6e949f73d 100644
--- a/tests/auto/widgets/itemviews/qsortfilterproxymodel/qsortfilterproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
diff --git a/tests/auto/widgets/itemviews/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index cc8299e28f..559a806ef3 100644
--- a/tests/auto/widgets/itemviews/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,14 +39,14 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include "dynamictreemodel.h"
#include "modeltest.h"
-#include <QtCore>
-#include <QtGui>
-#include <QtWidgets>
+#include <QtCore/QCoreApplication>
+#include <QtWidgets/QStandardItem>
+#include <QtWidgets/QTreeView>
+#include <QtWidgets/QTableView>
#include <qdebug.h>
@@ -62,16 +62,12 @@ Q_DECLARE_METATYPE(QModelIndex)
class tst_QSortFilterProxyModel : public QObject
{
Q_OBJECT
-
public:
-
tst_QSortFilterProxyModel();
- virtual ~tst_QSortFilterProxyModel();
public slots:
void initTestCase();
void cleanupTestCase();
- void init();
void cleanup();
private slots:
@@ -84,8 +80,6 @@ private slots:
void insertRows_data();
void insertRows();
void prependRow();
-// void insertColumns_data();
-// void insertColumns();
void removeRows_data();
void removeRows();
void removeColumns_data();
@@ -128,20 +122,20 @@ private slots:
void sortStable();
- void task236755_hiddenColumns();
- void task247867_insertRowsSort();
- void task248868_staticSorting();
- void task248868_dynamicSorting();
- void task250023_fetchMore();
- void task251296_hiddenChildren();
- void task252507_mapFromToSource();
- void task255652_removeRowsRecursive();
- void taskQTBUG_6205_doubleProxySelectionSetSourceModel();
- void taskQTBUG_7537_appearsAndSort();
- void taskQTBUG_7716_unnecessaryDynamicSorting();
- void taskQTBUG_10287_unnecessaryMapCreation();
- void taskQTBUG_17812_resetInvalidate_data();
- void taskQTBUG_17812_resetInvalidate();
+ void hiddenColumns();
+ void insertRowsSort();
+ void staticSorting();
+ void dynamicSorting();
+ void fetchMore();
+ void hiddenChildren();
+ void mapFromToSource();
+ void removeRowsRecursive();
+ void doubleProxySelectionSetSourceModel();
+ void appearsAndSort();
+ void unnecessaryDynamicSorting();
+ void unnecessaryMapCreation();
+ void resetInvalidate_data();
+ void resetInvalidate();
void testMultipleProxiesWithSelection();
void mapSelectionFromSource();
@@ -177,12 +171,6 @@ void tst_QSortFilterProxyModel::getSetCheck()
tst_QSortFilterProxyModel::tst_QSortFilterProxyModel()
: m_model(0), m_proxy(0)
{
-
-}
-
-tst_QSortFilterProxyModel::~tst_QSortFilterProxyModel()
-{
-
}
void tst_QSortFilterProxyModel::initTestCase()
@@ -202,10 +190,6 @@ void tst_QSortFilterProxyModel::cleanupTestCase()
delete m_model;
}
-void tst_QSortFilterProxyModel::init()
-{
-}
-
void tst_QSortFilterProxyModel::cleanup()
{
m_proxy->setFilterRegExp(QRegExp());
@@ -350,7 +334,6 @@ void tst_QSortFilterProxyModel::sort_data()
<< (QStringList()
<< "BETA" << "Gamma" << "alpha" << "delta");
-
QStringList list;
for (int i = 10000; i < 20000; ++i)
list.append(QString("Number: %1").arg(i));
@@ -405,7 +388,6 @@ void tst_QSortFilterProxyModel::sort()
QModelIndex index = m_proxy->index(row, 0, QModelIndex());
QCOMPARE(m_proxy->data(index, Qt::DisplayRole).toString(), initial.at(row));
}
-
}
void tst_QSortFilterProxyModel::sortHierarchy_data()
@@ -593,7 +575,7 @@ void tst_QSortFilterProxyModel::insertRows()
for (int i = 0; i < insert.count(); ++i) {
QModelIndex index = m_proxy->index(position + i, 0, QModelIndex());
m_proxy->setData(index, insert.at(i), Qt::DisplayRole);
- }
+ }
// make sure the model correct after insert
for (int row = 0; row < m_model->rowCount(QModelIndex()); ++row) {
@@ -612,7 +594,7 @@ void tst_QSortFilterProxyModel::prependRow()
{
//this tests that data is correctly handled by the sort filter when prepending a row
QStandardItemModel model;
- QSortFilterProxyModel proxy;
+ QSortFilterProxyModel proxy;
proxy.setSourceModel(&model);
QStandardItem item("root");
@@ -634,19 +616,6 @@ void tst_QSortFilterProxyModel::prependRow()
QCOMPARE(proxy.rowCount(QModelIndex()), 1); //only the "root" item is there
}
-
-/*
-void tst_QSortFilterProxyModel::insertColumns_data()
-{
-
-}
-
-void tst_QSortFilterProxyModel::insertColumns()
-{
-
-}
-*/
-
void tst_QSortFilterProxyModel::removeRows_data()
{
QTest::addColumn<QStringList>("initial");
@@ -1197,7 +1166,6 @@ void tst_QSortFilterProxyModel::removeColumns()
}
}
-
void tst_QSortFilterProxyModel::filterColumns_data()
{
QTest::addColumn<QString>("pattern");
@@ -1424,8 +1392,6 @@ void tst_QSortFilterProxyModel::checkHierarchy(const QStringList &l, const QAbst
}
}
-
-
class TestModel: public QAbstractTableModel
{
public:
@@ -1504,6 +1470,7 @@ void tst_QSortFilterProxyModel::filterCurrent()
view.show();
view.setModel(&proxy);
QSignalSpy spy(view.selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)));
+ QVERIFY(spy.isValid());
view.setCurrentIndex(proxy.index(0, 0));
QCOMPARE(spy.count(), 1);
@@ -1628,6 +1595,11 @@ void tst_QSortFilterProxyModel::removeSourceRows()
QSignalSpy aboutToRemoveSpy(&proxy, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)));
QSignalSpy aboutToInsertSpy(&proxy, SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int)));
+ QVERIFY(removeSpy.isValid());
+ QVERIFY(insertSpy.isValid());
+ QVERIFY(aboutToRemoveSpy.isValid());
+ QVERIFY(aboutToInsertSpy.isValid());
+
model.removeRows(start, count, QModelIndex());
QCOMPARE(aboutToRemoveSpy.count(), expectedRemovedProxyIntervals.count());
@@ -1802,6 +1774,9 @@ void tst_QSortFilterProxyModel::changeFilter()
QSignalSpy initialRemoveSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int)));
QSignalSpy initialInsertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int)));
+ QVERIFY(initialRemoveSpy.isValid());
+ QVERIFY(initialInsertSpy.isValid());
+
proxy.setFilterRegExp(initialFilter);
QCOMPARE(initialRemoveSpy.count(), initialRemoveIntervals.count());
@@ -1823,6 +1798,9 @@ void tst_QSortFilterProxyModel::changeFilter()
QSignalSpy finalRemoveSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int)));
QSignalSpy finalInsertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int)));
+ QVERIFY(finalRemoveSpy.isValid());
+ QVERIFY(finalInsertSpy.isValid());
+
proxy.setFilterRegExp(finalFilter);
QCOMPARE(finalRemoveSpy.count(), finalRemoveIntervals.count());
@@ -1971,6 +1949,9 @@ void tst_QSortFilterProxyModel::changeSourceData()
QSignalSpy removeSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex, int, int)));
QSignalSpy insertSpy(&proxy, SIGNAL(rowsInserted(QModelIndex, int, int)));
+ QVERIFY(removeSpy.isValid());
+ QVERIFY(insertSpy.isValid());
+
{
QModelIndex index = model.index(row, 0, QModelIndex());
model.setData(index, newValue, Qt::DisplayRole);
@@ -2065,6 +2046,7 @@ void tst_QSortFilterProxyModel::selectionFilteredOut()
view.show();
view.setModel(&proxy);
QSignalSpy spy(view.selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)));
+ QVERIFY(spy.isValid());
view.setCurrentIndex(proxy.index(0, 0));
QCOMPARE(spy.count(), 1);
@@ -2181,6 +2163,9 @@ void tst_QSortFilterProxyModel::insertIntoChildrenlessItem()
QSignalSpy colsInsertedSpy(&proxy, SIGNAL(columnsInserted(const QModelIndex&, int, int)));
QSignalSpy rowsInsertedSpy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int)));
+ QVERIFY(colsInsertedSpy.isValid());
+ QVERIFY(rowsInsertedSpy.isValid());
+
(void)proxy.rowCount(QModelIndex()); // force mapping of "a", "b", "c"
QCOMPARE(colsInsertedSpy.count(), 0);
QCOMPARE(rowsInsertedSpy.count(), 0);
@@ -2256,6 +2241,7 @@ void tst_QSortFilterProxyModel::insertRowIntoFilteredParent()
proxy.setSourceModel(&model);
QSignalSpy spy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int)));
+ QVERIFY(spy.isValid());
QStandardItem *itemA = new QStandardItem();
model.appendRow(itemA); // A will be filtered
@@ -2286,6 +2272,9 @@ void tst_QSortFilterProxyModel::filterOutParentAndFilterInChild()
QSignalSpy removedSpy(&proxy, SIGNAL(rowsRemoved(const QModelIndex&, int, int)));
QSignalSpy insertedSpy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int)));
+ QVERIFY(removedSpy.isValid());
+ QVERIFY(insertedSpy.isValid());
+
proxy.setFilterRegExp("C"); // A and B will be filtered out, C filtered in
// we should now have been notified that the subtree represented by itemA has been removed
@@ -2323,7 +2312,6 @@ void tst_QSortFilterProxyModel::sourceInsertRows()
void tst_QSortFilterProxyModel::sourceModelDeletion()
{
-
QSortFilterProxyModel proxyModel;
{
QStandardItemModel model;
@@ -2331,7 +2319,6 @@ void tst_QSortFilterProxyModel::sourceModelDeletion()
QCOMPARE(proxyModel.sourceModel(), static_cast<QAbstractItemModel*>(&model));
}
QCOMPARE(proxyModel.sourceModel(), static_cast<QAbstractItemModel*>(0));
-
}
void tst_QSortFilterProxyModel::sortColumnTracking1()
@@ -2393,11 +2380,11 @@ void tst_QSortFilterProxyModel::sortColumnTracking2()
void tst_QSortFilterProxyModel::sortStable()
{
QStandardItemModel* model = new QStandardItemModel(5, 2);
- for (int r=0; r<5; r++) {
- for (int c=0; c<2; c++) {
+ for (int r = 0; r < 5; r++) {
+ for (int c = 0; c < 2; c++) {
QStandardItem* item = new QStandardItem(
QString("Row:%0, Column:%1").arg(r).arg(c) );
- for( int i=0; i<3; i++ ) {
+ for (int i = 0; i < 3; i++) {
QStandardItem* child = new QStandardItem(
QString("Item %0").arg(i) );
item->appendRow( child );
@@ -2406,8 +2393,7 @@ void tst_QSortFilterProxyModel::sortStable()
}
}
model->setHorizontalHeaderItem( 0, new QStandardItem( "Name" ));
- model->setHorizontalHeaderItem( 1, new QStandardItem( "Value" ) );
-
+ model->setHorizontalHeaderItem( 1, new QStandardItem( "Value" ));
QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(model);
filterModel->setSourceModel(model);
@@ -2424,7 +2410,7 @@ void tst_QSortFilterProxyModel::sortStable()
QCOMPARE(lastItemData, filterModel->index(2,0, firstRoot).data());
}
-void tst_QSortFilterProxyModel::task236755_hiddenColumns()
+void tst_QSortFilterProxyModel::hiddenColumns()
{
class MyStandardItemModel : public QStandardItemModel
{
@@ -2448,12 +2434,12 @@ void tst_QSortFilterProxyModel::task236755_hiddenColumns()
model.blockSignals(false);
model.reset();
- //in the initial task this would be false because resetting
- //model would also reset the hidden columns
+ // In the initial bug report that spawned this test, this would be false
+ // because resetting model would also reset the hidden columns.
QVERIFY(view.isColumnHidden(0));
}
-void tst_QSortFilterProxyModel::task247867_insertRowsSort()
+void tst_QSortFilterProxyModel::insertRowsSort()
{
QStandardItemModel model(2,2);
QSortFilterProxyModel proxyModel;
@@ -2469,7 +2455,7 @@ void tst_QSortFilterProxyModel::task247867_insertRowsSort()
QCOMPARE(proxyModel.sortColumn(), 0);
}
-void tst_QSortFilterProxyModel::task248868_staticSorting()
+void tst_QSortFilterProxyModel::staticSorting()
{
QStandardItemModel model(0, 1);
QSortFilterProxyModel proxy;
@@ -2525,15 +2511,15 @@ void tst_QSortFilterProxyModel::task248868_staticSorting()
QModelIndex index = proxy.index(row, 0, QModelIndex());
QCOMPARE(proxy.data(index, Qt::DisplayRole).toString(), expected.at(row));
}
-
}
-void tst_QSortFilterProxyModel::task248868_dynamicSorting()
+void tst_QSortFilterProxyModel::dynamicSorting()
{
QStringListModel model1;
const QStringList initial = QString("bateau avion dragon hirondelle flamme camion elephant").split(" ");
model1.setStringList(initial);
QSortFilterProxyModel proxy1;
+ proxy1.setDynamicSortFilter(false);
proxy1.sort(0);
proxy1.setSourceModel(&model1);
@@ -2579,7 +2565,6 @@ void tst_QSortFilterProxyModel::task248868_dynamicSorting()
//set up the sorting before seting the model up
QSortFilterProxyModel proxy2;
- proxy2.setDynamicSortFilter(true);
proxy2.sort(0);
proxy2.setSourceModel(&model2);
for (int row = 0; row < proxy2.rowCount(QModelIndex()); ++row) {
@@ -2590,74 +2575,85 @@ void tst_QSortFilterProxyModel::task248868_dynamicSorting()
class QtTestModel: public QAbstractItemModel
{
- public:
- QtTestModel(int _rows, int _cols, QObject *parent = 0): QAbstractItemModel(parent),
- rows(_rows), cols(_cols), wrongIndex(false) { }
+public:
+ QtTestModel(int _rows, int _cols, QObject *parent = 0)
+ : QAbstractItemModel(parent)
+ , rows(_rows)
+ , cols(_cols)
+ , wrongIndex(false)
+ {
+ }
- bool canFetchMore(const QModelIndex &idx) const {
- return !fetched.contains(idx);
- }
+ bool canFetchMore(const QModelIndex &idx) const
+ {
+ return !fetched.contains(idx);
+ }
- void fetchMore(const QModelIndex &idx) {
- if (fetched.contains(idx))
- return;
- beginInsertRows(idx, 0, rows-1);
- fetched.insert(idx);
- endInsertRows();
- }
+ void fetchMore(const QModelIndex &idx)
+ {
+ if (fetched.contains(idx))
+ return;
+ beginInsertRows(idx, 0, rows-1);
+ fetched.insert(idx);
+ endInsertRows();
+ }
- bool hasChildren(const QModelIndex & = QModelIndex()) const {
- return true;
- }
+ bool hasChildren(const QModelIndex & = QModelIndex()) const
+ {
+ return true;
+ }
- int rowCount(const QModelIndex& parent = QModelIndex()) const {
- return fetched.contains(parent) ? rows : 0;
- }
- int columnCount(const QModelIndex& parent = QModelIndex()) const {
- Q_UNUSED(parent);
- return cols;
- }
+ int rowCount(const QModelIndex& parent = QModelIndex()) const
+ {
+ return fetched.contains(parent) ? rows : 0;
+ }
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const
- {
- if (row < 0 || column < 0 || column >= cols || row >= rows) {
- return QModelIndex();
- }
- QModelIndex i = createIndex(row, column, int(parent.internalId() + 1));
- parentHash[i] = parent;
- return i;
- }
+ int columnCount(const QModelIndex& parent = QModelIndex()) const
+ {
+ Q_UNUSED(parent);
+ return cols;
+ }
- QModelIndex parent(const QModelIndex &index) const
- {
- if (!parentHash.contains(index))
- return QModelIndex();
- return parentHash[index];
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const
+ {
+ if (row < 0 || column < 0 || column >= cols || row >= rows) {
+ return QModelIndex();
}
+ QModelIndex i = createIndex(row, column, int(parent.internalId() + 1));
+ parentHash[i] = parent;
+ return i;
+ }
- QVariant data(const QModelIndex &idx, int role) const
- {
- if (!idx.isValid())
- return QVariant();
-
- if (role == Qt::DisplayRole) {
- if (idx.row() < 0 || idx.column() < 0 || idx.column() >= cols || idx.row() >= rows) {
- wrongIndex = true;
- qWarning("Invalid modelIndex [%d,%d,%p]", idx.row(), idx.column(),
- idx.internalPointer());
- }
- return QString("[%1,%2]").arg(idx.row()).arg(idx.column());
- }
+ QModelIndex parent(const QModelIndex &index) const
+ {
+ if (!parentHash.contains(index))
+ return QModelIndex();
+ return parentHash[index];
+ }
+
+ QVariant data(const QModelIndex &idx, int role) const
+ {
+ if (!idx.isValid())
return QVariant();
+
+ if (role == Qt::DisplayRole) {
+ if (idx.row() < 0 || idx.column() < 0 || idx.column() >= cols || idx.row() >= rows) {
+ wrongIndex = true;
+ qWarning("Invalid modelIndex [%d,%d,%p]", idx.row(), idx.column(),
+ idx.internalPointer());
+ }
+ return QString("[%1,%2]").arg(idx.row()).arg(idx.column());
}
+ return QVariant();
+ }
- QSet<QModelIndex> fetched;
- int rows, cols;
- mutable bool wrongIndex;
- mutable QMap<QModelIndex,QModelIndex> parentHash;
+ QSet<QModelIndex> fetched;
+ int rows, cols;
+ mutable bool wrongIndex;
+ mutable QMap<QModelIndex,QModelIndex> parentHash;
};
-void tst_QSortFilterProxyModel::task250023_fetchMore()
+void tst_QSortFilterProxyModel::fetchMore()
{
QtTestModel model(10,10);
QSortFilterProxyModel proxy;
@@ -2679,7 +2675,7 @@ void tst_QSortFilterProxyModel::task250023_fetchMore()
QCOMPARE(proxy.columnCount(idx), 10);
}
-void tst_QSortFilterProxyModel::task251296_hiddenChildren()
+void tst_QSortFilterProxyModel::hiddenChildren()
{
QStandardItemModel model;
QSortFilterProxyModel proxy;
@@ -2730,7 +2726,7 @@ void tst_QSortFilterProxyModel::task251296_hiddenChildren()
QCOMPARE(proxy.rowCount(indexA) , 0);
}
-void tst_QSortFilterProxyModel::task252507_mapFromToSource()
+void tst_QSortFilterProxyModel::mapFromToSource()
{
QtTestModel source(10,10);
source.fetchMore(QModelIndex());
@@ -2756,8 +2752,7 @@ static QStandardItem *addEntry(QStandardItem* pParent, const QString &descriptio
return pItem;
}
-
-void tst_QSortFilterProxyModel::task255652_removeRowsRecursive()
+void tst_QSortFilterProxyModel::removeRowsRecursive()
{
QStandardItemModel pModel;
QStandardItem *pItem1 = new QStandardItem("root");
@@ -2807,7 +2802,7 @@ void tst_QSortFilterProxyModel::task255652_removeRowsRecursive()
delete pItem11;
}
-void tst_QSortFilterProxyModel::taskQTBUG_6205_doubleProxySelectionSetSourceModel()
+void tst_QSortFilterProxyModel::doubleProxySelectionSetSourceModel()
{
QStandardItemModel *model1 = new QStandardItemModel;
QStandardItem *parentItem = model1->invisibleRootItem();
@@ -2843,29 +2838,28 @@ void tst_QSortFilterProxyModel::taskQTBUG_6205_doubleProxySelectionSetSourceMode
QVERIFY(ism.selection().isEmpty());
}
-void tst_QSortFilterProxyModel::taskQTBUG_7537_appearsAndSort()
+void tst_QSortFilterProxyModel::appearsAndSort()
{
class PModel : public QSortFilterProxyModel
{
- public:
- PModel() : mVisible(false) {};
- protected:
- bool filterAcceptsRow(int, const QModelIndex &) const
- {
- return mVisible;
- }
+ public:
+ PModel() : mVisible(false) {};
+ protected:
+ bool filterAcceptsRow(int, const QModelIndex &) const
+ {
+ return mVisible;
+ }
- public:
- void updateXX()
- {
- mVisible = true;
- invalidate();
- }
- private:
- bool mVisible;
+ public:
+ void updateXX()
+ {
+ mVisible = true;
+ invalidate();
+ }
+ private:
+ bool mVisible;
} proxyModel;
-
QStringListModel sourceModel;
QStringList list;
list << "b" << "a" << "c";
@@ -2882,6 +2876,9 @@ void tst_QSortFilterProxyModel::taskQTBUG_7537_appearsAndSort()
QSignalSpy spyAbout1(&proxyModel, SIGNAL(layoutAboutToBeChanged()));
QSignalSpy spyChanged1(&proxyModel, SIGNAL(layoutChanged()));
+ QVERIFY(spyAbout1.isValid());
+ QVERIFY(spyChanged1.isValid());
+
//introducing secondProxyModel to test the layoutChange when many items appears at once
QSortFilterProxyModel secondProxyModel;
secondProxyModel.setSourceModel(&proxyModel);
@@ -2891,6 +2888,9 @@ void tst_QSortFilterProxyModel::taskQTBUG_7537_appearsAndSort()
QSignalSpy spyAbout2(&secondProxyModel, SIGNAL(layoutAboutToBeChanged()));
QSignalSpy spyChanged2(&secondProxyModel, SIGNAL(layoutChanged()));
+ QVERIFY(spyAbout2.isValid());
+ QVERIFY(spyChanged2.isValid());
+
proxyModel.updateXX();
QApplication::processEvents();
//now rows should be visible, and sorted
@@ -2911,7 +2911,7 @@ void tst_QSortFilterProxyModel::taskQTBUG_7537_appearsAndSort()
QCOMPARE(spyChanged2.count(), 1);
}
-void tst_QSortFilterProxyModel::taskQTBUG_7716_unnecessaryDynamicSorting()
+void tst_QSortFilterProxyModel::unnecessaryDynamicSorting()
{
QStringListModel model;
const QStringList initial = QString("bravo charlie delta echo").split(" ");
@@ -2993,7 +2993,6 @@ private slots:
private:
QItemSelectionModel *selectionModel;
-
};
void tst_QSortFilterProxyModel::testMultipleProxiesWithSelection()
@@ -3020,13 +3019,13 @@ void tst_QSortFilterProxyModel::testMultipleProxiesWithSelection()
// trick the proxy into emitting begin/end reset signals.
proxy.setSourceModel(0);
-
}
-static bool isValid(const QItemSelection &selection) {
- foreach(const QItemSelectionRange &range, selection)
- if (!range.isValid())
- return false;
+static bool isValid(const QItemSelection &selection)
+{
+ foreach (const QItemSelectionRange &range, selection)
+ if (!range.isValid())
+ return false;
return true;
}
@@ -3113,7 +3112,7 @@ protected:
}
};
-void tst_QSortFilterProxyModel::taskQTBUG_10287_unnecessaryMapCreation()
+void tst_QSortFilterProxyModel::unnecessaryMapCreation()
{
Model10287 m;
Proxy10287 p(&m);
@@ -3123,19 +3122,18 @@ void tst_QSortFilterProxyModel::taskQTBUG_10287_unnecessaryMapCreation()
class FilteredColumnProxyModel : public QSortFilterProxyModel
{
- Q_OBJECT
+ Q_OBJECT
public:
- FilteredColumnProxyModel(QObject *parent = 0)
- : QSortFilterProxyModel(parent)
- {
-
- }
+ FilteredColumnProxyModel(QObject *parent = 0)
+ : QSortFilterProxyModel(parent)
+ {
+ }
protected:
- bool filterAcceptsColumn(int column, const QModelIndex & /* source_parent */) const
- {
- return column % 2 != 0;
- }
+ bool filterAcceptsColumn(int column, const QModelIndex & /* source_parent */) const
+ {
+ return column % 2 != 0;
+ }
};
void tst_QSortFilterProxyModel::filteredColumns()
@@ -3155,7 +3153,7 @@ void tst_QSortFilterProxyModel::filteredColumns()
insertCommand->doCommand();
}
-void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate_data()
+void tst_QSortFilterProxyModel::resetInvalidate_data()
{
QTest::addColumn<int>("test");
QTest::addColumn<bool>("works");
@@ -3166,17 +3164,19 @@ void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate_data()
QTest::newRow("invalidate_filter") << 3 << true;
}
-void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate()
+void tst_QSortFilterProxyModel::resetInvalidate()
{
QFETCH(int, test);
QFETCH(bool, works);
struct Proxy : QSortFilterProxyModel {
QString pattern;
- virtual bool filterAcceptsRow(int source_row, const QModelIndex&) const {
+ virtual bool filterAcceptsRow(int source_row, const QModelIndex&) const
+ {
return sourceModel()->data(sourceModel()->index(source_row, 0)).toString().contains(pattern);
}
- void notifyChange(int test) {
+ void notifyChange(int test)
+ {
switch (test) {
case 0: break;
case 1: reset(); break;
@@ -3248,16 +3248,27 @@ void tst_QSortFilterProxyModel::testParentLayoutChanged()
QSignalSpy dataChangedSpy(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
+ QVERIFY(dataChangedSpy.isValid());
+
// Verify that the no-arg signal is still emitted.
QSignalSpy layoutAboutToBeChangedSpy(&proxy, SIGNAL(layoutAboutToBeChanged()));
QSignalSpy layoutChangedSpy(&proxy, SIGNAL(layoutChanged()));
+ QVERIFY(layoutAboutToBeChangedSpy.isValid());
+ QVERIFY(layoutChangedSpy.isValid());
+
QSignalSpy parentsAboutToBeChangedSpy(&proxy, SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>)));
QSignalSpy parentsChangedSpy(&proxy, SIGNAL(layoutChanged(QList<QPersistentModelIndex>)));
+ QVERIFY(parentsAboutToBeChangedSpy.isValid());
+ QVERIFY(parentsChangedSpy.isValid());
+
QSignalSpy proxy2ParentsAboutToBeChangedSpy(&proxy2, SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>)));
QSignalSpy proxy2ParentsChangedSpy(&proxy2, SIGNAL(layoutChanged(QList<QPersistentModelIndex>)));
+ QVERIFY(proxy2ParentsAboutToBeChangedSpy.isValid());
+ QVERIFY(proxy2ParentsChangedSpy.isValid());
+
QStandardItem *item = model.invisibleRootItem()->child(1)->child(1);
// Ensure mapped:
@@ -3299,7 +3310,6 @@ void tst_QSortFilterProxyModel::testParentLayoutChanged()
QVERIFY(beforeParents.contains(proxy2.mapToSource(idx)));
foreach (const QPersistentModelIndex &idx, proxy2AfterList)
QVERIFY(afterParents.contains(proxy2.mapToSource(idx)));
-
}
class SignalArgumentChecker : public QObject
@@ -3426,6 +3436,17 @@ void tst_QSortFilterProxyModel::moveSourceRows()
QSignalSpy filterBothBeforeParentLayoutSpy(&filterBothProxy, SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>)));
QSignalSpy filterBothAfterParentLayoutSpy(&filterBothProxy, SIGNAL(layoutChanged(QList<QPersistentModelIndex>)));
+ QVERIFY(modelBeforeSpy.isValid());
+ QVERIFY(modelAfterSpy.isValid());
+ QVERIFY(proxyBeforeMoveSpy.isValid());
+ QVERIFY(proxyAfterMoveSpy.isValid());
+ QVERIFY(proxyBeforeParentLayoutSpy.isValid());
+ QVERIFY(proxyAfterParentLayoutSpy.isValid());
+ QVERIFY(filterBeforeParentLayoutSpy.isValid());
+ QVERIFY(filterAfterParentLayoutSpy.isValid());
+ QVERIFY(filterBothBeforeParentLayoutSpy.isValid());
+ QVERIFY(filterBothAfterParentLayoutSpy.isValid());
+
{
ModelMoveCommand moveCommand(&model, 0);
moveCommand.setAncestorRowNumbers(QList<int>() << 2);
diff --git a/tests/auto/widgets/itemviews/qstringlistmodel/.gitignore b/tests/auto/corelib/itemmodels/qstringlistmodel/.gitignore
index 9c14561e3c..9c14561e3c 100644
--- a/tests/auto/widgets/itemviews/qstringlistmodel/.gitignore
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/.gitignore
diff --git a/tests/auto/widgets/itemviews/qstringlistmodel/qmodellistener.h b/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
index f3ed3c1793..1de3018228 100644
--- a/tests/auto/widgets/itemviews/qstringlistmodel/qmodellistener.h
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -38,11 +38,11 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#include <QObject>
#include <QModelIndex>
#include <qdebug.h>
-
QT_FORWARD_DECLARE_CLASS(QStringListModel)
class QModelListener : public QObject
@@ -56,7 +56,7 @@ public:
virtual ~QModelListener() { }
void setTestData(QStringList *pAboutToStringlist, QStringList *pExpectedStringlist, QStringListModel *pModel)
- {
+ {
m_pAboutToStringlist = pAboutToStringlist;
m_pExpectedStringlist = pExpectedStringlist;
m_pModel = pModel;
@@ -70,6 +70,5 @@ private:
public slots:
void rowsAboutToBeRemovedOrInserted(const QModelIndex & parent, int start, int end );
void rowsRemovedOrInserted(const QModelIndex & parent, int start, int end );
-
};
diff --git a/tests/auto/widgets/itemviews/qstringlistmodel/qstringlistmodel.pro b/tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro
index ecdd30cae2..821a48038b 100644
--- a/tests/auto/widgets/itemviews/qstringlistmodel/qstringlistmodel.pro
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro
@@ -2,8 +2,4 @@ CONFIG += testcase
TARGET = tst_qstringlistmodel
QT += widgets testlib
HEADERS += qmodellistener.h
-
-SOURCES += tst_qstringlistmodel.cpp
-
-
-
+SOURCES += tst_qstringlistmodel.cpp
diff --git a/tests/auto/widgets/itemviews/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
index c8afe5dd75..6c7c87c940 100644
--- a/tests/auto/widgets/itemviews/qstringlistmodel/tst_qstringlistmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include <qabstractitemmodel.h>
#include <qapplication.h>
@@ -52,20 +51,17 @@
void QModelListener::rowsAboutToBeRemovedOrInserted(const QModelIndex & parent, int start, int end )
{
- int i;
- for (i = 0; start + i <= end; i++)
- {
+ for (int i = 0; start + i <= end; i++) {
QModelIndex mIndex = m_pModel->index(start + i, 0, parent);
QVariant var = m_pModel->data(mIndex, Qt::DisplayRole);
QString str = var.toString();
-
+
QCOMPARE(str, m_pAboutToStringlist->at(i));
}
}
void QModelListener::rowsRemovedOrInserted(const QModelIndex & parent, int , int)
{
- int i;
// Can the rows that *are* removed be iterated now ?
// What about rowsAboutToBeInserted - what will the indices be?
@@ -74,35 +70,20 @@ void QModelListener::rowsRemovedOrInserted(const QModelIndex & parent, int , int
// RemoveColumn. Does that also fire the rowsRemoved-family signals?
- for (i = 0; i < m_pExpectedStringlist->size(); i++)
- {
+ for (int i = 0; i < m_pExpectedStringlist->size(); i++) {
QModelIndex mIndex = m_pModel->index(i, 0, parent);
QVariant var = m_pModel->data(mIndex, Qt::DisplayRole);
QString str = var.toString();
-
- //qDebug() << "index: " << i << " start: " << start << "end: " << end;
+
QCOMPARE(str, m_pExpectedStringlist->at(i));
}
}
-
class tst_QStringListModel : public QObject
{
Q_OBJECT
-public:
-
- tst_QStringListModel();
- virtual ~tst_QStringListModel();
-
-
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
private slots:
-
void rowsAboutToBeRemoved_rowsRemoved();
void rowsAboutToBeRemoved_rowsRemoved_data();
@@ -110,37 +91,6 @@ private slots:
void rowsAboutToBeInserted_rowsInserted_data();
};
-
-tst_QStringListModel::tst_QStringListModel()
-
-{
-}
-
-tst_QStringListModel::~tst_QStringListModel()
-{
-}
-
-void tst_QStringListModel::initTestCase()
-{
-}
-
-void tst_QStringListModel::cleanupTestCase()
-{
-}
-
-void tst_QStringListModel::init()
-{
-}
-
-void tst_QStringListModel::cleanup()
-{
-}
-
-/*
- tests
-*/
-
-
void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved_data()
{
QTest::addColumn<QStringList>("input");
@@ -195,21 +145,20 @@ void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved()
QStringListModel *model = new QStringListModel(input);
QModelListener *pListener = new QModelListener(&aboutto, &res, model);
- pListener->connect(model, SIGNAL( rowsAboutToBeRemoved(const QModelIndex & , int , int )),
+ pListener->connect(model, SIGNAL( rowsAboutToBeRemoved(const QModelIndex & , int , int )),
pListener, SLOT( rowsAboutToBeRemovedOrInserted(const QModelIndex & , int , int )) );
- pListener->connect(model, SIGNAL( rowsRemoved(const QModelIndex & , int , int )),
+ pListener->connect(model, SIGNAL( rowsRemoved(const QModelIndex & , int , int )),
pListener, SLOT( rowsRemovedOrInserted(const QModelIndex & , int , int )) );
model->removeRows(row,count);
- // At this point, control goes to our connected slots inn this order:
+ // At this point, control goes to our connected slots inn this order:
// 1. rowsAboutToBeRemovedOrInserted
// 2. rowsRemovedOrInserted
// Control returns here
delete pListener;
delete model;
-
}
void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted_data()
@@ -260,24 +209,21 @@ void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted()
QStringListModel *model = new QStringListModel(input);
QModelListener *pListener = new QModelListener(&aboutto, &res, model);
- connect(model, SIGNAL( rowsAboutToBeInserted(const QModelIndex & , int , int )),
+ connect(model, SIGNAL( rowsAboutToBeInserted(const QModelIndex & , int , int )),
pListener, SLOT( rowsAboutToBeRemovedOrInserted(const QModelIndex & , int , int )) );
- connect(model, SIGNAL( rowsInserted(const QModelIndex & , int , int )),
+ connect(model, SIGNAL( rowsInserted(const QModelIndex & , int , int )),
pListener, SLOT( rowsRemovedOrInserted(const QModelIndex & , int , int )) );
model->insertRows(row,count);
- // At this point, control goes to our connected slots inn this order:
+ // At this point, control goes to our connected slots inn this order:
// 1. rowsAboutToBeRemovedOrInserted
// 2. rowsRemovedOrInserted
// Control returns here
delete pListener;
delete model;
-
}
-
QTEST_MAIN(tst_QStringListModel)
#include "tst_qstringlistmodel.moc"
-
diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro
index 90a5c24506..3c697f4149 100644
--- a/tests/auto/corelib/kernel/kernel.pro
+++ b/tests/auto/corelib/kernel/kernel.pro
@@ -1,12 +1,11 @@
TEMPLATE=subdirs
SUBDIRS=\
- qabstractitemmodel \
qcoreapplication \
qeventloop \
- qitemmodel \
qmath \
qmetaobject \
qmetaobjectbuilder \
+ qmetaproperty \
qmetatype \
qmimedata \
qobject \
@@ -24,4 +23,3 @@ SUBDIRS=\
# This test is only applicable on Windows
!win32*:SUBDIRS -= qwineventnotifier
-mac: qabstractitemmodel.CONFIG = no_check_target # QTBUG-22748
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index 6a2d04d46d..5c2ebc8948 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -601,7 +601,7 @@ public:
}
void registerSocketNotifier(QSocketNotifier *) {}
void unregisterSocketNotifier(QSocketNotifier *) {}
- void registerTimer(int , int , QObject *) {}
+ void registerTimer(int , int , Qt::TimerType, QObject *) {}
bool unregisterTimer(int ) { return false; }
bool unregisterTimers(QObject *) { return false; }
QList<TimerInfo> registeredTimers(QObject *) const { return QList<TimerInfo>(); }
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index aab405fa97..49e3fec33e 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -203,6 +203,9 @@ void tst_QEventLoop::processEvents()
QSignalSpy spy1(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()));
QSignalSpy spy2(QAbstractEventDispatcher::instance(), SIGNAL(awake()));
+ QVERIFY(spy1.isValid());
+ QVERIFY(spy2.isValid());
+
QEventLoop eventLoop;
QCoreApplication::postEvent(&eventLoop, new QEvent(QEvent::User));
@@ -285,6 +288,7 @@ void tst_QEventLoop::exec()
// make sure the eventloop runs
QSignalSpy spy(QAbstractEventDispatcher::instance(&thread), SIGNAL(awake()));
+ QVERIFY(spy.isValid());
thread.cond.wakeOne();
thread.cond.wait(&thread.mutex);
QVERIFY(spy.count() > 0);
@@ -322,7 +326,9 @@ void tst_QEventLoop::throwInExec()
// qobject.cpp will try to rethrow the exception after handling
// which causes gwes.exe to crash
QSKIP("This platform doesn't support propagating exceptions through the event loop");
-#elif defined(Q_OS_LINUX)
+#else
+ // exceptions compiled in, runtime tests follow.
+#if defined(Q_OS_LINUX)
// C++ exceptions can't be passed through glib callbacks. Skip the test if
// we're using the glib event loop.
QByteArray dispatcher = QAbstractEventDispatcher::instance()->metaObject()->className();
@@ -357,6 +363,7 @@ void tst_QEventLoop::throwInExec()
}
QCOMPARE(caughtExceptions, 2);
}
+#endif
}
void tst_QEventLoop::reexec()
@@ -393,6 +400,7 @@ void tst_QEventLoop::wakeUp()
(void) eventLoop.exec();
QSignalSpy spy(QAbstractEventDispatcher::instance(&thread), SIGNAL(awake()));
+ QVERIFY(spy.isValid());
thread.eventLoop->wakeUp();
// give the thread time to wake up
diff --git a/tests/auto/corelib/kernel/qmath/tst_qmath.cpp b/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
index f908bd6e3e..fab95564d2 100644
--- a/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
+++ b/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 32d0ccfaac..0fe82f6277 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -796,6 +796,7 @@ void tst_QMetaObject::invokeTypedefTypes()
qRegisterMetaType<CustomString>("CustomString");
QtTestCustomObject obj;
QSignalSpy spy(&obj, SIGNAL(sig_custom(CustomString)));
+ QVERIFY(spy.isValid());
QCOMPARE(spy.count(), 0);
CustomString arg("hello");
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 7ad020c356..fb7122aec4 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -957,17 +957,17 @@ void tst_QMetaObjectBuilder::copyMetaObject()
QMetaObjectBuilder builder(&QObject::staticMetaObject);
QMetaObject *meta = builder.toMetaObject();
QVERIFY(sameMetaObject(meta, &QObject::staticMetaObject));
- qFree(meta);
+ free(meta);
QMetaObjectBuilder builder2(&staticMetaObject);
meta = builder2.toMetaObject();
QVERIFY(sameMetaObject(meta, &staticMetaObject));
- qFree(meta);
+ free(meta);
QMetaObjectBuilder builder3(&SomethingOfEverything::staticMetaObject);
meta = builder3.toMetaObject();
QVERIFY(sameMetaObject(meta, &SomethingOfEverything::staticMetaObject));
- qFree(meta);
+ free(meta);
}
// Serialize and deserialize a meta object and check that
@@ -992,8 +992,8 @@ void tst_QMetaObjectBuilder::serialize()
QMetaObject *meta2 = builder2.toMetaObject();
QVERIFY(sameMetaObject(meta, meta2));
- qFree(meta);
- qFree(meta2);
+ free(meta);
+ free(meta2);
}
// Partial QMetaObjectBuilder
diff --git a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
index 7a457b05fa..e225371a7f 100644
--- a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
+++ b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index e0433ea4b0..d5aa369a92 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -78,6 +78,8 @@ private slots:
void createCopy();
void sizeOf_data();
void sizeOf();
+ void flags_data();
+ void flags();
void construct_data();
void construct();
void constructCopy_data();
@@ -129,6 +131,10 @@ protected:
#ifdef Q_OS_LINUX
pthread_yield();
#endif
+ if (QMetaType::typeFlags(tp) != (QMetaType::NeedsConstruction | QMetaType::NeedsDestruction)) {
+ ++failureCount;
+ qWarning() << "Wrong typeInfo returned for" << tp;
+ }
if (!QMetaType::isRegistered(tp)) {
++failureCount;
qWarning() << name << "is not a registered metatype";
@@ -440,6 +446,12 @@ template<> struct TestValueFactory<QMetaType::QPointF> {
template<> struct TestValueFactory<QMetaType::QEasingCurve> {
static QEasingCurve *create() { return new QEasingCurve(QEasingCurve::InOutElastic); }
};
+template<> struct TestValueFactory<QMetaType::QUuid> {
+ static QUuid *create() { return new QUuid(); }
+};
+template<> struct TestValueFactory<QMetaType::QModelIndex> {
+ static QModelIndex *create() { return new QModelIndex(); }
+};
template<> struct TestValueFactory<QMetaType::QRegExp> {
static QRegExp *create()
{
@@ -578,6 +590,40 @@ void tst_QMetaType::sizeOf()
QCOMPARE(QMetaType::sizeOf(type), size);
}
+struct CustomMovable {};
+QT_BEGIN_NAMESPACE
+Q_DECLARE_TYPEINFO(CustomMovable, Q_MOVABLE_TYPE);
+QT_END_NAMESPACE
+Q_DECLARE_METATYPE(CustomMovable);
+
+void tst_QMetaType::flags_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::addColumn<bool>("isMovable");
+ QTest::addColumn<bool>("isComplex");
+
+#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
+ QTest::newRow(#RealType) << MetaTypeId << bool(!QTypeInfo<RealType>::isStatic) << bool(QTypeInfo<RealType>::isComplex);
+QT_FOR_EACH_STATIC_CORE_CLASS(ADD_METATYPE_TEST_ROW)
+QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(ADD_METATYPE_TEST_ROW)
+QT_FOR_EACH_STATIC_CORE_POINTER(ADD_METATYPE_TEST_ROW)
+#undef ADD_METATYPE_TEST_ROW
+ QTest::newRow("TestSpace::Foo") << ::qMetaTypeId<TestSpace::Foo>() << false << true;
+ QTest::newRow("Whity<double>") << ::qMetaTypeId<Whity<double> >() << false << true;
+ QTest::newRow("CustomMovable") << ::qMetaTypeId<CustomMovable>() << true << true;
+}
+
+void tst_QMetaType::flags()
+{
+ QFETCH(int, type);
+ QFETCH(bool, isMovable);
+ QFETCH(bool, isComplex);
+
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsConstruction), isComplex);
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsDestruction), isComplex);
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::MovableType), isMovable);
+}
+
void tst_QMetaType::construct_data()
{
create_data();
diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
index 6e8e9940ab..f55701b3ec 100644
--- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
+++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qobject/.gitignore b/tests/auto/corelib/kernel/qobject/.gitignore
index ea4d6d7f06..7970e32c8f 100644
--- a/tests/auto/corelib/kernel/qobject/.gitignore
+++ b/tests/auto/corelib/kernel/qobject/.gitignore
@@ -1,3 +1,3 @@
tst_qobject
-signalbug
-signalbug.exe
+signalbug/signalbug
+signalbug/signalbug.exe
diff --git a/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp b/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp
index b275ff30fa..b4069eba6c 100644
--- a/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h b/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h
index 4dfb7d97d2..efd1df2f5a 100644
--- a/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h
+++ b/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qobject/qobject.pro b/tests/auto/corelib/kernel/qobject/qobject.pro
index 113e14a61d..ee48f56b1d 100644
--- a/tests/auto/corelib/kernel/qobject/qobject.pro
+++ b/tests/auto/corelib/kernel/qobject/qobject.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = tst_qobject.pro signalbug.pro
+SUBDIRS = signalbug tst_qobject.pro
CONFIG += parallel_test
diff --git a/tests/auto/corelib/kernel/qobject/signalbug.cpp b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
index 0465373e40..86e8869a33 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug.cpp
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qobject/signalbug.h b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
index 4292d70063..bba612c998 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug.h
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qobject/signalbug.pro b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
index ed3adf0242..19d36a63a1 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug.pro
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
@@ -1,9 +1,9 @@
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG -= app_bundle debug_and_release
-DESTDIR=.
+CONFIG += console
+DESTDIR = ./
QT -= gui
wince*: {
LIBS += coredll.lib
@@ -13,5 +13,5 @@ HEADERS += signalbug.h
SOURCES += signalbug.cpp
# This app is testdata for tst_qobject
-target.path = $$[QT_INSTALL_TESTS]/tst_qobject
+target.path = $$[QT_INSTALL_TESTS]/tst_qobject/$$TARGET
INSTALLS += target
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 8f938a79fe..f3bba08544 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -65,6 +65,7 @@ class tst_QObject : public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
void disconnect();
void connectByName();
void connectSignalsToSignalsWithDefaultArguments();
@@ -96,7 +97,7 @@ private slots:
void recursiveSignalEmission();
#endif
void blockingQueuedConnection();
- void compatibilityChildInsertedEvents();
+ void childEvents();
void installEventFilter();
void deleteSelfInSlot();
void disconnectSelfInSlotAndDeleteAfterEmit();
@@ -236,6 +237,12 @@ public slots:
int ReceiverObject::sequence = 0;
+void tst_QObject::initTestCase()
+{
+ const QString testDataDir = QFileInfo(QFINDTESTDATA("signalbug")).absolutePath();
+ QVERIFY2(QDir::setCurrent(testDataDir), qPrintable("Could not chdir to " + testDataDir));
+}
+
void tst_QObject::disconnect()
{
SenderObject *s = new SenderObject;
@@ -253,10 +260,10 @@ void tst_QObject::disconnect()
s->emitSignal3();
s->emitSignal4();
- QCOMPARE( r1->called(1), TRUE );
- QCOMPARE( r1->called(2), TRUE );
- QCOMPARE( r1->called(3), TRUE );
- QCOMPARE( r1->called(4), TRUE );
+ QVERIFY(r1->called(1));
+ QVERIFY(r1->called(2));
+ QVERIFY(r1->called(3));
+ QVERIFY(r1->called(4));
r1->reset();
// usual disconnect with all parameters given
@@ -264,12 +271,12 @@ void tst_QObject::disconnect()
s->emitSignal1();
- QCOMPARE( r1->called(1), FALSE );
+ QVERIFY(!r1->called(1));
r1->reset();
- QCOMPARE( ret, TRUE );
+ QVERIFY(ret);
ret = QObject::disconnect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) );
- QCOMPARE( ret, FALSE );
+ QVERIFY(!ret);
// disconnect all signals from s from all slots from r1
QObject::disconnect( s, 0, r1, 0 );
@@ -278,9 +285,9 @@ void tst_QObject::disconnect()
s->emitSignal3();
s->emitSignal4();
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r1->called(3), FALSE );
- QCOMPARE( r1->called(4), FALSE );
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r1->called(3));
+ QVERIFY(!r1->called(4));
r1->reset();
connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) );
@@ -294,10 +301,10 @@ void tst_QObject::disconnect()
s->emitSignal1();
s->emitSignal2();
- QCOMPARE( r1->called(1), FALSE );
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r1->called(3), FALSE );
- QCOMPARE( r1->called(4), TRUE );
+ QVERIFY(!r1->called(1));
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r1->called(3));
+ QVERIFY(r1->called(4));
r1->reset();
// make sure all is disconnected again
QObject::disconnect( s, 0, r1, 0 );
@@ -315,12 +322,12 @@ void tst_QObject::disconnect()
s->emitSignal2();
s->emitSignal3();
- QCOMPARE( r1->called(1), FALSE );
- QCOMPARE( r2->called(1), FALSE );
- QCOMPARE( r1->called(2), TRUE );
- QCOMPARE( r2->called(2), TRUE );
- QCOMPARE( r1->called(2), TRUE );
- QCOMPARE( r2->called(2), TRUE );
+ QVERIFY(!r1->called(1));
+ QVERIFY(!r2->called(1));
+ QVERIFY(r1->called(2));
+ QVERIFY(r2->called(2));
+ QVERIFY(r1->called(2));
+ QVERIFY(r2->called(2));
r1->reset();
r2->reset();
@@ -328,10 +335,10 @@ void tst_QObject::disconnect()
// disconnect all signals of s from all receivers
QObject::disconnect( s, 0, 0, 0 );
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r2->called(2), FALSE );
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r2->called(2), FALSE );
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r2->called(2));
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r2->called(2));
delete r2;
delete r1;
@@ -972,14 +979,14 @@ void tst_QObject::emitInDefinedOrder()
SequenceObject::sequence = sequence = 0;
sender2->emitSignal1();
- QCOMPARE(seq1.called(1), TRUE);
- QCOMPARE(seq2.called(1), TRUE);
- QCOMPARE(seq3->called(1), FALSE);
- QCOMPARE(seq4.called(1), TRUE);
- QCOMPARE(seq1.called(2), TRUE);
- QCOMPARE(seq2.called(2), TRUE);
- QCOMPARE(seq3->called(2), FALSE);
- QCOMPARE(seq4.called(2), TRUE);
+ QVERIFY(seq1.called(1));
+ QVERIFY(seq2.called(1));
+ QVERIFY(!seq3->called(1));
+ QVERIFY(seq4.called(1));
+ QVERIFY(seq1.called(2));
+ QVERIFY(seq2.called(2));
+ QVERIFY(!seq3->called(2));
+ QVERIFY(seq4.called(2));
QCOMPARE(seq1.sequence_slot1, ++sequence);
QCOMPARE(seq2.sequence_slot1, ++sequence);
QCOMPARE(seq4.sequence_slot1, ++sequence);
@@ -1008,14 +1015,14 @@ void tst_QObject::emitInDefinedOrder()
SequenceObject::sequence = sequence = 0;
sender2->emitSignal1();
- QCOMPARE(seq1.called(2), TRUE);
- QCOMPARE(seq2.called(2), TRUE);
- QCOMPARE(seq3->called(2), FALSE);
- QCOMPARE(seq4.called(2), TRUE);
- QCOMPARE(seq1.called(1), TRUE);
- QCOMPARE(seq2.called(1), TRUE);
- QCOMPARE(seq3->called(1), FALSE);
- QCOMPARE(seq4.called(1), TRUE);
+ QVERIFY(seq1.called(2));
+ QVERIFY(seq2.called(2));
+ QVERIFY(!seq3->called(2));
+ QVERIFY(seq4.called(2));
+ QVERIFY(seq1.called(1));
+ QVERIFY(seq2.called(1));
+ QVERIFY(!seq3->called(1));
+ QVERIFY(seq4.called(1));
QCOMPARE(seq1.sequence_slot2, ++sequence);
QCOMPARE(seq2.sequence_slot2, ++sequence);
QCOMPARE(seq4.sequence_slot2, ++sequence);
@@ -1044,14 +1051,14 @@ void tst_QObject::emitInDefinedOrder()
SequenceObject::sequence = sequence = 0;
sender2->emitSignal1();
- QCOMPARE(seq1.called(1), TRUE);
- QCOMPARE(seq2.called(1), TRUE);
- QCOMPARE(seq3->called(1), FALSE);
- QCOMPARE(seq4.called(1), TRUE);
- QCOMPARE(seq1.called(2), TRUE);
- QCOMPARE(seq2.called(2), TRUE);
- QCOMPARE(seq3->called(2), FALSE);
- QCOMPARE(seq4.called(2), TRUE);
+ QVERIFY(seq1.called(1));
+ QVERIFY(seq2.called(1));
+ QVERIFY(!seq3->called(1));
+ QVERIFY(seq4.called(1));
+ QVERIFY(seq1.called(2));
+ QVERIFY(seq2.called(2));
+ QVERIFY(!seq3->called(2));
+ QVERIFY(seq4.called(2));
QCOMPARE(seq1.sequence_slot1, ++sequence);
QCOMPARE(seq2.sequence_slot1, ++sequence);
QCOMPARE(seq4.sequence_slot1, ++sequence);
@@ -1085,12 +1092,12 @@ void tst_QObject::emitInDefinedOrder()
sender2->emitSignal1();
QCOMPARE(static_cast<QObject *>(psender), static_cast<QObject *>(0));
QCOMPARE(static_cast<QObject *>(pseq3), static_cast<QObject *>(0));
- QCOMPARE(seq1.called(1), TRUE);
- QCOMPARE(seq2.called(1), TRUE);
- QCOMPARE(seq4.called(1), TRUE);
- QCOMPARE(seq1.called(2), TRUE);
- QCOMPARE(seq2.called(2), TRUE);
- QCOMPARE(seq4.called(2), FALSE);
+ QVERIFY(seq1.called(1));
+ QVERIFY(seq2.called(1));
+ QVERIFY(seq4.called(1));
+ QVERIFY(seq1.called(2));
+ QVERIFY(seq2.called(2));
+ QVERIFY(!seq4.called(2));
QCOMPARE(seq1.sequence_slot1, ++sequence);
QCOMPARE(seq2.sequence_slot1, ++sequence);
QCOMPARE(seq4.sequence_slot1, ++sequence);
@@ -2794,7 +2801,9 @@ void tst_QObject::recursiveSignalEmission()
{
QProcess proc;
// signalbug helper app should always be next to this test binary
- proc.start(QCoreApplication::applicationDirPath() + "/signalbug");
+ const QString path = QStringLiteral("signalbug/signalbug");
+ proc.start(path);
+ QVERIFY2(proc.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, proc.errorString())));
QVERIFY(proc.waitForFinished());
QVERIFY(proc.exitStatus() == QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);
@@ -2859,7 +2868,7 @@ private:
EventList events;
};
-void tst_QObject::compatibilityChildInsertedEvents()
+void tst_QObject::childEvents()
{
EventSpy::EventList expected;
@@ -2880,7 +2889,7 @@ void tst_QObject::compatibilityChildInsertedEvents()
}
{
- // 2 children, so we expect 2 ChildAdded and 2 ChildInserted events
+ // 2 children, so we expect 2 ChildAdded events
QObject object;
EventSpy spy;
object.installEventFilter(&spy);
@@ -2911,7 +2920,7 @@ void tst_QObject::compatibilityChildInsertedEvents()
{
// 2 children, but one is reparented away, so we expect:
- // 2 ChildAdded, 1 ChildRemoved, and 1 ChildInserted
+ // 2 ChildAdded, 1 ChildRemoved
QObject object;
EventSpy spy;
object.installEventFilter(&spy);
@@ -3484,7 +3493,6 @@ void tst_QObject::isSignalConnected()
QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig15()")));
QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig29()")));
QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig60()")));
- QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig61()")));
#endif
QObject::connect(&o, SIGNAL(sig00()), &o, SIGNAL(sig69()));
@@ -3539,7 +3547,6 @@ void tst_QObject::isSignalConnected()
QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig21()")));
QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig25()")));
QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig55()")));
- QVERIFY(!priv->isSignalConnected(priv->signalIndex("sig61()")));
#endif
emit o.sig00();
@@ -3990,7 +3997,7 @@ void tst_QObject::disconnectNotSignalMetaMethod()
QMetaMethod slot = s.metaObject()->method(
s.metaObject()->indexOfMethod("aPublicSlot()"));
- QTest::ignoreMessage(QtWarningMsg,"Object::disconnect: Attempt to unbind non-signal SenderObject::aPublicSlot()");
+ QTest::ignoreMessage(QtWarningMsg,"QObject::disconnect: Attempt to unbind non-signal SenderObject::aPublicSlot()");
QVERIFY(!QObject::disconnect(&s, slot, &r, QMetaMethod()));
}
@@ -4092,12 +4099,25 @@ public slots:
}
};
+static void processEvents()
+{
+ qApp->processEvents();
+}
+
void tst_QObject::baseDestroyed()
{
- BaseDestroyed d;
- connect(&d, SIGNAL(destroyed()), &d, SLOT(slotUseList()));
- //When d goes out of scope, slotUseList should not be called as the BaseDestroyed has
- // already been destroyed while ~QObject emit destroyed
+ {
+ BaseDestroyed d;
+ connect(&d, SIGNAL(destroyed()), &d, SLOT(slotUseList()));
+ //When d goes out of scope, slotUseList should not be called as the BaseDestroyed has
+ // already been destroyed while ~QObject emit destroyed
+ }
+ {
+ BaseDestroyed d;
+ connect(&d, &QObject::destroyed, processEvents);
+ QMetaObject::invokeMethod(&d, "slotUseList", Qt::QueuedConnection);
+ //the destructor will call processEvents, that should not call the slotUseList
+ }
}
void tst_QObject::pointerConnect()
@@ -4189,10 +4209,10 @@ void tst_QObject::pointerDisconnect()
s->emitSignal3();
s->emitSignal4();
- QCOMPARE( r1->called(1), TRUE );
- QCOMPARE( r1->called(2), TRUE );
- QCOMPARE( r1->called(3), TRUE );
- QCOMPARE( r1->called(4), TRUE );
+ QVERIFY(r1->called(1));
+ QVERIFY(r1->called(2));
+ QVERIFY(r1->called(3));
+ QVERIFY(r1->called(4));
r1->reset();
// usual disconnect with all parameters given
@@ -4200,12 +4220,12 @@ void tst_QObject::pointerDisconnect()
s->emitSignal1();
- QCOMPARE( r1->called(1), FALSE );
+ QVERIFY(!r1->called(1));
r1->reset();
- QCOMPARE( ret, TRUE );
+ QVERIFY(ret);
ret = QObject::disconnect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
- QCOMPARE( ret, FALSE );
+ QVERIFY(!ret);
// disconnect all signals from s from all slots from r1
QObject::disconnect( s, 0, r1, 0 );
@@ -4214,9 +4234,9 @@ void tst_QObject::pointerDisconnect()
s->emitSignal3();
s->emitSignal4();
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r1->called(3), FALSE );
- QCOMPARE( r1->called(4), FALSE );
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r1->called(3));
+ QVERIFY(!r1->called(4));
r1->reset();
connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
@@ -4230,10 +4250,10 @@ void tst_QObject::pointerDisconnect()
s->emitSignal1();
s->emitSignal2();
- QCOMPARE( r1->called(1), FALSE );
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r1->called(3), FALSE );
- QCOMPARE( r1->called(4), TRUE );
+ QVERIFY(!r1->called(1));
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r1->called(3));
+ QVERIFY(r1->called(4));
r1->reset();
// make sure all is disconnected again
QObject::disconnect( s, 0, r1, 0 );
@@ -4251,12 +4271,12 @@ void tst_QObject::pointerDisconnect()
s->emitSignal2();
s->emitSignal3();
- QCOMPARE( r1->called(1), FALSE );
- QCOMPARE( r2->called(1), FALSE );
- QCOMPARE( r1->called(2), TRUE );
- QCOMPARE( r2->called(2), TRUE );
- QCOMPARE( r1->called(2), TRUE );
- QCOMPARE( r2->called(2), TRUE );
+ QVERIFY(!r1->called(1));
+ QVERIFY(!r2->called(1));
+ QVERIFY(r1->called(2));
+ QVERIFY(r2->called(2));
+ QVERIFY(r1->called(2));
+ QVERIFY(r2->called(2));
r1->reset();
r2->reset();
@@ -4264,10 +4284,10 @@ void tst_QObject::pointerDisconnect()
// disconnect all signals of s from all receivers
QObject::disconnect( s, 0, 0, 0 );
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r2->called(2), FALSE );
- QCOMPARE( r1->called(2), FALSE );
- QCOMPARE( r2->called(2), FALSE );
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r2->called(2));
+ QVERIFY(!r1->called(2));
+ QVERIFY(!r2->called(2));
delete r2;
delete r1;
diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
index fed98ec86a..df4c5f99cb 100644
--- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
+++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -241,8 +241,8 @@ public:
ChildWidget::~ChildWidget()
{
- QCOMPARE(static_cast<QWidget *>(guardedPointer), static_cast<QWidget *>(0));
- QCOMPARE(qobject_cast<QWidget *>(guardedPointer), static_cast<QWidget *>(0));
+ QCOMPARE(static_cast<QWidget *>(guardedPointer), parentWidget());
+ QCOMPARE(qobject_cast<QWidget *>(guardedPointer), parentWidget());
}
class DerivedChild;
diff --git a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
index 58a545ca75..4b9c37a5e0 100644
--- a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
+++ b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
index 90c537b9fc..180e7d532b 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
+++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -263,12 +263,15 @@ void tst_QSocketNotifier::posixSockets()
QSocketNotifier rn(posixSocket, QSocketNotifier::Read);
connect(&rn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
QSignalSpy readSpy(&rn, SIGNAL(activated(int)));
+ QVERIFY(readSpy.isValid());
QSocketNotifier wn(posixSocket, QSocketNotifier::Write);
connect(&wn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
QSignalSpy writeSpy(&wn, SIGNAL(activated(int)));
+ QVERIFY(writeSpy.isValid());
QSocketNotifier en(posixSocket, QSocketNotifier::Exception);
connect(&en, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
QSignalSpy errorSpy(&en, SIGNAL(activated(int)));
+ QVERIFY(errorSpy.isValid());
passive->write("hello",6);
passive->waitForBytesWritten(5000);
diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
index bfaeff7f26..098d8a8825 100644
--- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
+++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
index 941d3a9be4..a7ccc45642 100644
--- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
+++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index e540474b3e..c2d4f0a240 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -63,6 +63,7 @@
#include <qvector3d.h>
#include <qvector4d.h>
#include <qquaternion.h>
+#include <qdebug.h>
#include <limits.h>
@@ -253,11 +254,14 @@ private slots:
void numericalConvert();
void moreCustomTypes();
+ void movabilityTest();
void variantInVariant();
void colorInteger();
void forwardDeclare();
+ void debugStream_data();
+ void debugStream();
};
Q_DECLARE_METATYPE(QDate)
@@ -1375,8 +1379,29 @@ void tst_QVariant::quaternion()
QMetaType::destroy(QVariant::Quaternion, pquaternion);
}
+struct CustomStreamableClass
+{
+ int i;
+ bool operator==(const CustomStreamableClass& other) const
+ {
+ return i == other.i;
+ }
+};
+Q_DECLARE_METATYPE(CustomStreamableClass);
+
+QDataStream &operator<<(QDataStream &out, const CustomStreamableClass &myObj)
+{
+ return out << myObj.i;
+}
+
+QDataStream &operator>>(QDataStream &in, CustomStreamableClass &myObj)
+{
+ return in >> myObj.i;
+}
+
void tst_QVariant::writeToReadFromDataStream_data()
{
+ qRegisterMetaTypeStreamOperators<CustomStreamableClass>();
QTest::addColumn<QVariant>("writeVariant");
QTest::addColumn<bool>("isNull");
@@ -1483,6 +1508,8 @@ void tst_QVariant::writeToReadFromDataStream_data()
QTest::newRow("QMetaType::Float invalid") << QVariant(QMetaType::Float, (void *) 0) << false;
float f = 1.234f;
QTest::newRow("QMetaType::Float") << QVariant(QMetaType::Float, &f) << false;
+ CustomStreamableClass custom = {123};
+ QTest::newRow("Custom type") << QVariant::fromValue(custom) << false;
}
void tst_QVariant::writeToReadFromDataStream()
@@ -1501,8 +1528,10 @@ void tst_QVariant::writeToReadFromDataStream()
// Best way to confirm the readVariant contains the same data?
// Since only a few won't match since the serial numbers are different
// I won't bother adding another bool in the data test.
- QVariant::Type writeType = writeVariant.type();
- if ( writeType != QVariant::Invalid && writeType != QVariant::Bitmap && writeType != QVariant::Pixmap
+ const int writeType = writeVariant.userType();
+ if (writeType == qMetaTypeId<CustomStreamableClass>())
+ QCOMPARE(qvariant_cast<CustomStreamableClass>(readVariant), qvariant_cast<CustomStreamableClass>(writeVariant));
+ else if ( writeType != QVariant::Invalid && writeType != QVariant::Bitmap && writeType != QVariant::Pixmap
&& writeType != QVariant::Image) {
switch (writeType) {
default:
@@ -1562,6 +1591,7 @@ void tst_QVariant::writeToReadFromOldDataStream()
void tst_QVariant::checkDataStream()
{
+ QTest::ignoreMessage(QtWarningMsg, "Trying to construct an instance of an invalid type, type id: 46");
const QByteArray settingsHex("0000002effffffffff");
const QByteArray settings = QByteArray::fromHex(settingsHex);
QDataStream in(settings);
@@ -2006,7 +2036,7 @@ void tst_QVariant::userType()
QVariant userVar3;
qVariantSetValue(userVar3, data2);
- QVERIFY(userVar2 == userVar3);
+
userVar3 = userVar2;
QVERIFY(userVar2 == userVar3);
}
@@ -2049,7 +2079,7 @@ void tst_QVariant::userType()
QCOMPARE(instanceCount, 3);
{
QVariant second = myCarrier;
- QCOMPARE(instanceCount, 4);
+ QCOMPARE(instanceCount, 3);
second.detach();
QCOMPARE(instanceCount, 4);
}
@@ -3220,6 +3250,27 @@ void tst_QVariant::moreCustomTypes()
QCOMPARE(MyMovable::count, 0);
}
+void tst_QVariant::movabilityTest()
+{
+ // This test checks if QVariant is movable even if an internal data is not movable.
+ QVERIFY(!MyNotMovable::count);
+ {
+ QVariant variant = QVariant::fromValue(MyNotMovable());
+ QVERIFY(MyNotMovable::count);
+
+ // prepare destination memory space to which variant will be moved
+ QVariant buffer[1];
+ QCOMPARE(buffer[0].type(), QVariant::Invalid);
+ buffer[0].~QVariant();
+
+ memcpy(buffer, &variant, sizeof(QVariant));
+ QCOMPARE(buffer[0].type(), QVariant::UserType);
+ MyNotMovable tmp(buffer[0].value<MyNotMovable>());
+
+ new (&variant) QVariant();
+ }
+ QVERIFY(!MyNotMovable::count);
+}
void tst_QVariant::variantInVariant()
{
@@ -3283,5 +3334,64 @@ void tst_QVariant::forwardDeclare()
}
+class MessageHandler {
+public:
+ MessageHandler(const int typeId)
+ : oldMsgHandler(qInstallMsgHandler(handler))
+ {
+ currentId = typeId;
+ }
+
+ ~MessageHandler()
+ {
+ qInstallMsgHandler(oldMsgHandler);
+ }
+
+ bool testPassed() const
+ {
+ return ok;
+ }
+private:
+ static void handler(QtMsgType, const char *txt)
+ {
+ QString msg = QString::fromLatin1(txt);
+ // Format itself is not important, but basic data as a type name should be included in the output
+ ok = msg.startsWith("QVariant(") + QMetaType::typeName(currentId);
+ QVERIFY2(ok, (QString::fromLatin1("Message is not valid: '") + msg + '\'').toLatin1().constData());
+ }
+
+ QtMsgHandler oldMsgHandler;
+ static int currentId;
+ static bool ok;
+};
+bool MessageHandler::ok;
+int MessageHandler::currentId;
+
+void tst_QVariant::debugStream_data()
+{
+ QTest::addColumn<QVariant>("variant");
+ QTest::addColumn<int>("typeId");
+ for (int id = QMetaType::Void; id < QMetaType::User; ++id) {
+ const char *tagName = QMetaType::typeName(id);
+ if (!tagName)
+ continue;
+ QTest::newRow(tagName) << QVariant(static_cast<QVariant::Type>(id)) << id;
+ }
+ QTest::newRow("QBitArray(111)") << QVariant(QBitArray(3, true)) << qMetaTypeId<QBitArray>();
+ QTest::newRow("CustomStreamableClass") << QVariant(qMetaTypeId<CustomStreamableClass>(), 0) << qMetaTypeId<CustomStreamableClass>();
+ QTest::newRow("MyClass") << QVariant(qMetaTypeId<MyClass>(), 0) << qMetaTypeId<MyClass>();
+}
+
+void tst_QVariant::debugStream()
+{
+ QFETCH(QVariant, variant);
+ QFETCH(int, typeId);
+
+ MessageHandler msgHandler(typeId);
+ qDebug() << variant;
+ QVERIFY(msgHandler.testPassed());
+}
+
+
QTEST_MAIN(tst_QVariant)
#include "tst_qvariant.moc"
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
index 38df9d77c8..cd87bed601 100644
--- a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
+++ b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qlibrary/.gitignore b/tests/auto/corelib/plugin/qlibrary/.gitignore
index 38963f2235..3841c7a33c 100644
--- a/tests/auto/corelib/plugin/qlibrary/.gitignore
+++ b/tests/auto/corelib/plugin/qlibrary/.gitignore
@@ -7,4 +7,4 @@ mylib2.dll
mylib2.exp
mylib2.lib
mylib_noextension
-system.trolltech.test.mylib.dll
+system.qt.test.mylib.dll
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/mylib.c b/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
index b9d3c1b219..04a59f210c 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
index 7d319d644e..a15393b214 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
@@ -21,10 +21,10 @@ win32 {
} else {
src = $(DESTDIR_TARGET)
}
- files = mylib.dl2 system.trolltech.test.mylib.dll
+ files = mylib.dl2 system.qt.test.mylib.dll
} else {
src = $(DESTDIR)$(TARGET)
- files = libmylib.so2 system.trolltech.test.mylib.so
+ files = libmylib.so2 system.qt.test.mylib.so
}
# This project is testdata for tst_qlibrary
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c b/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
index 950102abcc..525f3e3aab 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
index 5156070a32..75f854667e 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -203,11 +203,11 @@ void tst_QLibrary::load_data()
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
QTest::newRow( "ok01 (with suffix)" ) << currDir + "/mylib.dll" << true;
QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/mylib.dl2" << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.trolltech.test.mylib.dll" << true;
+ QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.dll" << true;
# elif defined Q_OS_UNIX
QTest::newRow( "ok01 (with suffix)" ) << currDir + "/libmylib" SUFFIX << true;
QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/libmylib.so2" << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.trolltech.test.mylib.so" << true;
+ QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.so" << true;
# endif // Q_OS_UNIX
}
@@ -334,7 +334,7 @@ void tst_QLibrary::isLibrary_data()
QTest::newRow("bad (libmylib.1.0.0.foo)") << QString("libmylib.1.0.0.foo") << false;
#elif defined(Q_OS_WIN)
- QTest::newRow("good (with many dots)" ) << "/system.trolltech.test.mylib.dll" << true;
+ QTest::newRow("good (with many dots)" ) << "/system.qt.test.mylib.dll" << true;
#endif
}
@@ -437,11 +437,11 @@ void tst_QLibrary::loadHints_data()
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
QTest::newRow( "ok01 (with suffix)" ) << currDir + "/mylib.dll" << int(lh) << true;
QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/mylib.dl2" << int(lh) << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.trolltech.test.mylib.dll" << int(lh) << true;
+ QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.dll" << int(lh) << true;
# elif defined Q_OS_UNIX
QTest::newRow( "ok01 (with suffix)" ) << currDir + "/libmylib" SUFFIX << int(lh) << true;
QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/libmylib.so2" << int(lh) << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.trolltech.test.mylib.so" << int(lh) << true;
+ QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.so" << int(lh) << true;
# endif // Q_OS_UNIX
}
diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp b/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
index b1538963d8..3dc5ec377c 100644
--- a/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
+++ b/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp b/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
index 3be9a7415d..99f3c8f452 100644
--- a/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
+++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
index c7ea963225..63c1100c5c 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
index 70596c0113..353b5e0158 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
index 0021180b36..e4a9b376b2 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
index dc43c35815..c87ec5b66d 100644
--- a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
index 48d8443ba1..92b7a1b4dc 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
index fdf599c875..660dbd2b90 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
index 5b738696e0..e1ded8f07b 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index c143977a48..bf046524d7 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -229,6 +229,8 @@ void tst_QPluginLoader::deleteinstanceOnUnload()
QSignalSpy spy1(loader1.instance(), SIGNAL(destroyed()));
QSignalSpy spy2(loader2.instance(), SIGNAL(destroyed()));
+ QVERIFY(spy1.isValid());
+ QVERIFY(spy2.isValid());
if (pass == 0) {
QCOMPARE(loader2.unload(), false); // refcount not reached 0, not really unloaded
QCOMPARE(spy1.count(), 0);
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
index 085f56539d..072d722cff 100644
--- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
index 90a391039f..789659cd04 100644
--- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,6 +59,7 @@ private slots:
void fromByteArray();
void toRfc4122();
void fromRfc4122();
+ void createUuidV3OrV5();
void check_QDataStream();
void isNull();
void equal();
@@ -76,23 +77,39 @@ private slots:
void hash();
+ void qvariant();
+ void qvariant_conversion();
+
public:
// Variables
+ QUuid uuidNS;
QUuid uuidA;
QUuid uuidB;
+ QUuid uuidC;
+ QUuid uuidD;
};
void tst_QUuid::initTestCase()
{
+ //It's NameSpace_DNS in RFC4122
+ //"{6ba7b810-9dad-11d1-80b4-00c04fd430c8}";
+ uuidNS = QUuid(0x6ba7b810, 0x9dad, 0x11d1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8);
+
//"{fc69b59e-cc34-4436-a43c-ee95d128b8c5}";
- uuidA = QUuid(0xfc69b59e, 0xcc34 ,0x4436 ,0xa4 ,0x3c ,0xee ,0x95 ,0xd1 ,0x28 ,0xb8 ,0xc5);
+ uuidA = QUuid(0xfc69b59e, 0xcc34, 0x4436, 0xa4, 0x3c, 0xee, 0x95, 0xd1, 0x28, 0xb8, 0xc5);
//"{1ab6e93a-b1cb-4a87-ba47-ec7e99039a7b}";
- uuidB = QUuid(0x1ab6e93a ,0xb1cb ,0x4a87 ,0xba ,0x47 ,0xec ,0x7e ,0x99 ,0x03 ,0x9a ,0x7b);
+ uuidB = QUuid(0x1ab6e93a, 0xb1cb, 0x4a87, 0xba, 0x47, 0xec, 0x7e, 0x99, 0x03, 0x9a, 0x7b);
// chdir to the directory containing our testdata, then refer to it with relative paths
QString testdata_dir = QFileInfo(QFINDTESTDATA("testProcessUniqueness")).absolutePath();
QVERIFY2(QDir::setCurrent(testdata_dir), qPrintable("Could not chdir to " + testdata_dir));
+
+ //"{3d813cbb-47fb-32ba-91df-831e1593ac29}"; http://www.rfc-editor.org/errata_search.php?rfc=4122&eid=1352
+ uuidC = QUuid(0x3d813cbb, 0x47fb, 0x32ba, 0x91, 0xdf, 0x83, 0x1e, 0x15, 0x93, 0xac, 0x29);
+
+ //"{21f7f8de-8051-5b89-8680-0195ef798b6a}";
+ uuidD = QUuid(0x21f7f8de, 0x8051, 0x5b89, 0x86, 0x80, 0x01, 0x95, 0xef, 0x79, 0x8b, 0x6a);
}
void tst_QUuid::fromChar()
@@ -161,6 +178,16 @@ void tst_QUuid::fromRfc4122()
QCOMPARE(uuidB, QUuid::fromRfc4122(QByteArray::fromHex("1ab6e93ab1cb4a87ba47ec7e99039a7b")));
}
+void tst_QUuid::createUuidV3OrV5()
+{
+ //"www.widgets.com" is also from RFC4122
+ QCOMPARE(uuidC, QUuid::createUuidV3(uuidNS, QByteArray("www.widgets.com")));
+ QCOMPARE(uuidC, QUuid::createUuidV3(uuidNS, QString("www.widgets.com")));
+
+ QCOMPARE(uuidD, QUuid::createUuidV5(uuidNS, QByteArray("www.widgets.com")));
+ QCOMPARE(uuidD, QUuid::createUuidV5(uuidNS, QString("www.widgets.com")));
+}
+
void tst_QUuid::check_QDataStream()
{
QUuid tmp;
@@ -327,7 +354,35 @@ void tst_QUuid::hash()
QCOMPARE(qHash(QUuid(uuidA.toString())), h);
}
+void tst_QUuid::qvariant()
+{
+ QUuid uuid = QUuid::createUuid();
+ QVariant v = QVariant::fromValue(uuid);
+ QVERIFY(!v.isNull());
+ QCOMPARE(v.type(), QVariant::Uuid);
+
+ QUuid uuid2 = v.value<QUuid>();
+ QVERIFY(!uuid2.isNull());
+ QCOMPARE(uuid, uuid2);
+}
+void tst_QUuid::qvariant_conversion()
+{
+ QUuid uuid = QUuid::createUuid();
+ QVariant v = QVariant::fromValue(uuid);
+
+ QVERIFY(v.canConvert<QString>());
+ QCOMPARE(v.toString(), uuid.toString());
+ QCOMPARE(v.value<QString>(), uuid.toString());
+ QVERIFY(!v.canConvert<int>());
+ QVERIFY(!v.canConvert<QStringList>());
+
+ // try reverse conversion QString -> QUuid
+ QVariant sv = QVariant::fromValue(uuid.toString());
+ QCOMPARE(sv.type(), QVariant::String);
+ QVERIFY(sv.canConvert<QUuid>());
+ QCOMPARE(sv.value<QUuid>(), uuid);
+}
QTEST_MAIN(tst_QUuid)
#include "tst_quuid.moc"
diff --git a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
index af587632b3..7ca7fc5120 100644
--- a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
+++ b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
index bdb261eefc..2183016c32 100644
--- a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -873,6 +873,7 @@ void tst_QStateMachine::historyStateAfterRestart()
for (int x = 0; x < 2; ++x) {
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QCOMPARE(machine.configuration().count(), 1);
@@ -908,6 +909,7 @@ void tst_QStateMachine::historyStateAfterRestart()
QVERIFY(machine.configuration().contains(s22));
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
+ QVERIFY(stoppedSpy.isValid());
machine.stop();
QTRY_COMPARE(stoppedSpy.count(), 1);
}
@@ -1189,6 +1191,11 @@ void tst_QStateMachine::stateEntryAndExit()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(stoppedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+
machine.setInitialState(s1);
QCOMPARE(machine.initialState(), (QAbstractState*)s1);
{
@@ -1206,6 +1213,13 @@ void tst_QStateMachine::stateEntryAndExit()
QSignalSpy tTriggeredSpy(t, SIGNAL(triggered()));
QSignalSpy s2EnteredSpy(s2, SIGNAL(entered()));
QSignalSpy s2ExitedSpy(s2, SIGNAL(exited()));
+
+ QVERIFY(s1EnteredSpy.isValid());
+ QVERIFY(s1ExitedSpy.isValid());
+ QVERIFY(tTriggeredSpy.isValid());
+ QVERIFY(s2EnteredSpy.isValid());
+ QVERIFY(s2ExitedSpy.isValid());
+
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
@@ -1256,6 +1270,8 @@ void tst_QStateMachine::stateEntryAndExit()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s1);
globalTick = 0;
machine.start();
@@ -1329,6 +1345,7 @@ void tst_QStateMachine::assignProperty()
{
QSignalSpy propertiesAssignedSpy(s1, SIGNAL(propertiesAssigned()));
+ QVERIFY(propertiesAssignedSpy.isValid());
machine.start();
QTRY_COMPARE(propertiesAssignedSpy.count(), 1);
}
@@ -1384,6 +1401,7 @@ void tst_QStateMachine::assignPropertyWithAnimation()
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(obj.property("foo").toInt(), 456);
@@ -1412,6 +1430,7 @@ void tst_QStateMachine::assignPropertyWithAnimation()
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(obj.property("foo").toInt(), 456);
@@ -1440,6 +1459,7 @@ void tst_QStateMachine::assignPropertyWithAnimation()
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(obj.property("foo").toInt(), 456);
@@ -1489,6 +1509,7 @@ void tst_QStateMachine::assignPropertyWithAnimation()
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(obj.property("foo").toInt(), 321);
@@ -1523,6 +1544,7 @@ void tst_QStateMachine::assignPropertyWithAnimation()
machine.start();
QTRY_COMPARE(machine.configuration().contains(s1), true);
QSignalSpy propertiesAssignedSpy(s2, SIGNAL(propertiesAssigned()));
+ QVERIFY(propertiesAssignedSpy.isValid());
emitter.emitSignalWithNoArg();
QTRY_COMPARE(machine.configuration().contains(s2), true);
QVERIFY(propertiesAssignedSpy.isEmpty());
@@ -1610,6 +1632,7 @@ void tst_QStateMachine::postEvent()
machine.addState(s2);
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -1639,6 +1662,7 @@ void tst_QStateMachine::cancelDelayedEvent()
machine.setInitialState(s1);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -1658,6 +1682,7 @@ void tst_QStateMachine::cancelDelayedEvent()
QVERIFY(!machine.cancelDelayedEvent(id2));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
QVERIFY(machine.configuration().contains(s2));
@@ -1672,6 +1697,7 @@ void tst_QStateMachine::postDelayedEventAndStop()
machine.setInitialState(s1);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -1680,6 +1706,7 @@ void tst_QStateMachine::postDelayedEventAndStop()
int id1 = machine.postDelayedEvent(new StringEvent("a"), 0);
QVERIFY(id1 != -1);
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
+ QVERIFY(stoppedSpy.isValid());
machine.stop();
QTRY_COMPARE(stoppedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -1707,9 +1734,11 @@ void tst_QStateMachine::stopAndPostEvent()
QState *s1 = new QState(&machine);
machine.setInitialState(s1);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
+ QVERIFY(stoppedSpy.isValid());
machine.stop();
QCOMPARE(stoppedSpy.count(), 0);
machine.postEvent(new QEvent(QEvent::User));
@@ -1729,6 +1758,7 @@ void tst_QStateMachine::stateFinished()
s1->addTransition(s1, SIGNAL(finished()), s2);
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -1766,6 +1796,7 @@ void tst_QStateMachine::parallelStates()
machine.setInitialState(s1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -1788,6 +1819,7 @@ void tst_QStateMachine::parallelRootState()
s2->setInitialState(s2_f);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
QTest::ignoreMessage(QtWarningMsg, "QStateMachine::start: No initial state set for machine. Refusing to start.");
machine.start();
QCoreApplication::processEvents();
@@ -1833,6 +1865,7 @@ void tst_QStateMachine::allSourceToTargetConfigurations()
s0->addTransition(new StringTransition("e", s211));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -1919,6 +1952,7 @@ void tst_QStateMachine::signalTransitions()
QCOMPARE(trans->signal(), QByteArray(SIGNAL(signalWithNoArg())));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -1969,6 +2003,7 @@ void tst_QStateMachine::signalTransitions()
QCOMPARE(trans->signal(), QByteArray("signalWithNoArg()"));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -1993,6 +2028,7 @@ void tst_QStateMachine::signalTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2014,6 +2050,7 @@ void tst_QStateMachine::signalTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2045,6 +2082,7 @@ void tst_QStateMachine::signalTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2063,6 +2101,7 @@ void tst_QStateMachine::signalTransitions()
QSignalTransition *t1 = s1->addTransition(&emitter, SIGNAL(signalWithNoArg()), s0);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2112,6 +2151,8 @@ void tst_QStateMachine::signalTransitions()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
@@ -2151,6 +2192,8 @@ void tst_QStateMachine::signalTransitions()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
@@ -2212,6 +2255,7 @@ void tst_QStateMachine::eventTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2264,6 +2308,7 @@ void tst_QStateMachine::eventTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2289,6 +2334,7 @@ void tst_QStateMachine::eventTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2311,6 +2357,7 @@ void tst_QStateMachine::eventTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2336,6 +2383,7 @@ void tst_QStateMachine::eventTransitions()
s0->addTransition(trans);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2358,6 +2406,7 @@ void tst_QStateMachine::eventTransitions()
s1->addTransition(t1);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2408,6 +2457,8 @@ void tst_QStateMachine::eventTransitions()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
@@ -2435,6 +2486,7 @@ void tst_QStateMachine::eventTransitions()
s0->addTransition(trans);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QTest::ignoreMessage(QtWarningMsg, "QObject event transitions are not supported for custom types");
@@ -2452,6 +2504,7 @@ void tst_QStateMachine::eventTransitions()
QCOMPARE(trans->eventTypeReceived(), QEvent::None);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.setInitialState(s0);
machine.start();
QCoreApplication::processEvents();
@@ -2481,6 +2534,8 @@ void tst_QStateMachine::graphicsSceneEventTransitions()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QVERIFY(finishedSpy.count() == 0);
@@ -2527,6 +2582,7 @@ void tst_QStateMachine::historyStates()
s0->setInitialState(s00);
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QCoreApplication::processEvents();
QCOMPARE(machine.configuration().size(), 2);
@@ -2565,6 +2621,11 @@ void tst_QStateMachine::startAndStop()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(stoppedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+
QVERIFY(!machine.isRunning());
QTest::ignoreMessage(QtWarningMsg, "QStateMachine::start: No initial state set for machine. Refusing to start.");
machine.start();
@@ -2616,6 +2677,11 @@ void tst_QStateMachine::targetStateWithNoParent()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(stoppedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+
machine.start();
QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: No common ancestor for targets and source of transition from state 's1'");
QTRY_COMPARE(startedSpy.count(), 1);
@@ -3045,12 +3111,14 @@ void tst_QStateMachine::propertiesAssignedSignalTransitionsReuseAnimationGroup()
QParallelAnimationGroup animationGroup;
animationGroup.addAnimation(new QPropertyAnimation(object, "foo"));
QSignalSpy animationFinishedSpy(&animationGroup, SIGNAL(finished()));
+ QVERIFY(animationFinishedSpy.isValid());
s1->addTransition(s1, SIGNAL(propertiesAssigned()), s2)->addAnimation(&animationGroup);
s2->addTransition(s2, SIGNAL(propertiesAssigned()), s3)->addAnimation(&animationGroup);
s3->addTransition(s3, SIGNAL(propertiesAssigned()), s4);
machine.setInitialState(s1);
QSignalSpy machineFinishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(machineFinishedSpy.isValid());
machine.start();
QTRY_COMPARE(machineFinishedSpy.count(), 1);
QCOMPARE(machine.configuration().size(), 1);
@@ -3551,6 +3619,8 @@ void tst_QStateMachine::nestedStateMachines()
QSignalSpy startedSpy(&machine, SIGNAL(started()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(startedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QTRY_COMPARE(machine.configuration().count(), 1+2*3);
@@ -3573,6 +3643,7 @@ void tst_QStateMachine::goToState()
QState *s2 = new QState(&machine);
machine.setInitialState(s1);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
@@ -3615,6 +3686,7 @@ void tst_QStateMachine::goToStateFromSourceWithTransition()
QState *s2 = new QState(&machine);
machine.setInitialState(s1);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
@@ -3704,6 +3776,7 @@ void tst_QStateMachine::postEventFromOtherThread()
poster.start();
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(finishedSpy.isValid());
machine.start();
QTRY_COMPARE(finishedSpy.count(), 1);
}
@@ -3759,6 +3832,9 @@ void tst_QStateMachine::stopInTransitionToFinalState()
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
QSignalSpy s2EnteredSpy(s2, SIGNAL(entered()));
+ QVERIFY(stoppedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(s2EnteredSpy.isValid());
machine.start();
// Stopping should take precedence over finished.
@@ -3799,11 +3875,14 @@ void tst_QStateMachine::stopInEventTest()
machine.setInitialState(s1);
QSignalSpy startedSpy(&machine, SIGNAL(started()));
+ QVERIFY(startedSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ QVERIFY(stoppedSpy.isValid());
+ QVERIFY(finishedSpy.isValid());
machine.postEvent(new QEvent(QEvent::User), QStateMachine::EventPriority(eventPriority));
QTRY_COMPARE(stoppedSpy.count(), 1);
diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
index 1d79206b3a..f7969eb55e 100644
--- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
+++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
index 9c73eb3d61..ac83601414 100644
--- a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
+++ b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
index 67d6998bb1..6669a5c4b4 100644
--- a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
index a6646215a0..e92dddca95 100644
--- a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
+++ b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
index 7da7282ae4..4ba28f60ef 100644
--- a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
+++ b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
index 4acbf411c1..418ae02add 100644
--- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
+++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index d3537a459a..2901e8f6c9 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index a8e04db2a0..1afd913fe9 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1074,17 +1074,14 @@ void tst_QThread::wait2()
thread.start();
timer.start();
QVERIFY(!thread.wait(Waiting_Thread::WaitTime));
- qint64 elapsed = timer.elapsed();
-
- QVERIFY(elapsed >= Waiting_Thread::WaitTime);
- //QVERIFY(elapsed < Waiting_Thread::WaitTime * 1.4);
+ qint64 elapsed = timer.elapsed(); // On Windows, we sometimes get (WaitTime - 1).
+ QVERIFY2(elapsed >= Waiting_Thread::WaitTime - 1, qPrintable(QString::fromLatin1("elapsed: %1").arg(elapsed)));
timer.start();
thread.cond1.wakeOne();
QVERIFY(thread.wait(/*Waiting_Thread::WaitTime * 1.4*/));
elapsed = timer.elapsed();
- QVERIFY(elapsed >= Waiting_Thread::WaitTime);
- //QVERIFY(elapsed < Waiting_Thread::WaitTime * 1.4);
+ QVERIFY2(elapsed - Waiting_Thread::WaitTime >= -1, qPrintable(QString::fromLatin1("elapsed: %1").arg(elapsed)));
}
@@ -1116,9 +1113,7 @@ void tst_QThread::wait3_slowDestructor()
timer.start();
QVERIFY(!thread.wait(Waiting_Thread::WaitTime));
qint64 elapsed = timer.elapsed();
-
- QVERIFY(elapsed >= Waiting_Thread::WaitTime);
- //QVERIFY(elapsed < Waiting_Thread::WaitTime * 1.4);
+ QVERIFY2(elapsed >= Waiting_Thread::WaitTime - 1, qPrintable(QString::fromLatin1("elapsed: %1").arg(elapsed)));
slow.cond.wakeOne();
//now the thread should finish quickly
@@ -1233,7 +1228,7 @@ public:
}
void registerSocketNotifier(QSocketNotifier *) {}
void unregisterSocketNotifier(QSocketNotifier *) {}
- void registerTimer(int , int , QObject *) {}
+ void registerTimer(int, int, Qt::TimerType, QObject *) {}
bool unregisterTimer(int ) { return false; }
bool unregisterTimers(QObject *) { return false; }
QList<TimerInfo> registeredTimers(QObject *) const { return QList<TimerInfo>(); }
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
index abd3d6bbef..c37823436a 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
index c33625cbde..3c5a42e814 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
index 21c716448b..81f57215cc 100644
--- a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp b/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp
index 92efcf3b3d..4c5fcf916a 100644
--- a/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,7 +39,8 @@
**
****************************************************************************/
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QThreadStorage>
class Class
{
diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index c343d1d8d4..c74b85154f 100644
--- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -290,7 +290,11 @@ void tst_QThreadStorage::crashOnExit()
QProcess process;
// crashOnExit is always expected to be in the same directory
// as this test binary
+#ifdef Q_OS_MAC
+ process.start(QCoreApplication::applicationDirPath() + "/../../../crashOnExit");
+#else
process.start(QCoreApplication::applicationDirPath() + "/crashOnExit");
+#endif
QVERIFY(process.waitForFinished());
QVERIFY(process.exitStatus() != QProcess::CrashExit);
}
@@ -465,7 +469,7 @@ void tst_QThreadStorage::valueBased()
t2.someNumber = -128;
t3.someNumber = 78;
t1.someString = "hello";
- t2.someString = "trolltech";
+ t2.someString = "australia";
t3.someString = "nokia";
t1.start();
diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index 4ffde9fcb8..6bb562e146 100644
--- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -443,7 +443,7 @@ void tst_QWaitCondition::wakeOne()
for (x = 0; x < ThreadCount; ++x) {
thread[x].mutex = &mutex;
thread[x].cond = &cond;
- thread_exited[x] = FALSE;
+ thread_exited[x] = false;
thread[x].start();
// wait for thread to start
QVERIFY(thread[x].started.wait(&mutex, 1000));
@@ -468,7 +468,7 @@ void tst_QWaitCondition::wakeOne()
if (thread_exited[y])
continue;
if (thread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = TRUE;
+ thread_exited[y] = true;
++exited;
}
}
@@ -487,7 +487,7 @@ void tst_QWaitCondition::wakeOne()
for (x = 0; x < ThreadCount; ++x) {
rwthread[x].readWriteLock = &readWriteLock;
rwthread[x].cond = &cond;
- thread_exited[x] = FALSE;
+ thread_exited[x] = false;
rwthread[x].start();
// wait for thread to start
QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
@@ -512,7 +512,7 @@ void tst_QWaitCondition::wakeOne()
if (thread_exited[y])
continue;
if (rwthread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = TRUE;
+ thread_exited[y] = true;
++exited;
}
}
@@ -537,7 +537,7 @@ void tst_QWaitCondition::wakeOne()
for (x = 0; x < ThreadCount; ++x) {
thread[x].mutex = &mutex;
thread[x].cond = &cond;
- thread_exited[x] = FALSE;
+ thread_exited[x] = false;
thread[x].start();
// wait for thread to start
QVERIFY(thread[x].started.wait(&mutex, 1000));
@@ -564,7 +564,7 @@ void tst_QWaitCondition::wakeOne()
if (thread_exited[y])
continue;
if (thread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = TRUE;
+ thread_exited[y] = true;
++exited;
}
}
@@ -583,7 +583,7 @@ void tst_QWaitCondition::wakeOne()
for (x = 0; x < ThreadCount; ++x) {
rwthread[x].readWriteLock = &readWriteLock;
rwthread[x].cond = &cond;
- thread_exited[x] = FALSE;
+ thread_exited[x] = false;
rwthread[x].start();
// wait for thread to start
QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
@@ -610,7 +610,7 @@ void tst_QWaitCondition::wakeOne()
if (thread_exited[y])
continue;
if (rwthread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = TRUE;
+ thread_exited[y] = true;
++exited;
}
}
diff --git a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
index 6fb34bec86..f975351e32 100644
--- a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
+++ b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
index 4702c6e7de..5735c4043b 100644
--- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
+++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -174,7 +174,7 @@ bool isSorted(ContainerType &container, LessThan lessThan)
template <typename ContainerType>
bool isSorted(ContainerType &container)
{
- return isSorted(container, qLess<Q_TYPENAME ContainerType::value_type>());
+ return isSorted(container, qLess<typename ContainerType::value_type>());
}
diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
index 2babc178a5..9ee006827f 100644
--- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 6d85b5a1f0..8767571f6c 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
index cb153b4f8b..8bc827ef7f 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
+++ b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qcache/tst_qcache.cpp b/tests/auto/corelib/tools/qcache/tst_qcache.cpp
index dfc59eed9a..88b56612af 100644
--- a/tests/auto/corelib/tools/qcache/tst_qcache.cpp
+++ b/tests/auto/corelib/tools/qcache/tst_qcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index b7acbe63c5..c5fdeeb54a 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
index c96b26bdfb..ad464dc40a 100644
--- a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
+++ b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qcryptographichash/data/2c1517dad3678f03917f15849b052fd5.md5 b/tests/auto/corelib/tools/qcryptographichash/data/2c1517dad3678f03917f15849b052fd5.md5
new file mode 100644
index 0000000000..dd5c63cce1
--- /dev/null
+++ b/tests/auto/corelib/tools/qcryptographichash/data/2c1517dad3678f03917f15849b052fd5.md5
Binary files differ
diff --git a/tests/auto/corelib/tools/qcryptographichash/data/d41d8cd98f00b204e9800998ecf8427e.md5 b/tests/auto/corelib/tools/qcryptographichash/data/d41d8cd98f00b204e9800998ecf8427e.md5
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/corelib/tools/qcryptographichash/data/d41d8cd98f00b204e9800998ecf8427e.md5
diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
index 39987bac35..fddd67fbd6 100644
--- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -2,3 +2,15 @@ CONFIG += testcase parallel_test
TARGET = tst_qcryptographichash
QT = core testlib
SOURCES = tst_qcryptographichash.cpp
+
+
+wince* {
+ addFiles.files = data/*
+ addFiles.path = data/
+ DEPLOYMENT += addFiles
+
+ DEFINES += SRCDIR=\\\".\\\"
+}
+else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+} \ No newline at end of file
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index b8592e1850..14b41e178d 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,6 +40,7 @@
****************************************************************************/
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_QCryptographicHash : public QObject
@@ -51,8 +52,9 @@ private slots:
void intermediary_result_data();
void intermediary_result();
void sha1();
+ void files_data();
+ void files();
};
-#include <QtCore>
void tst_QCryptographicHash::repeated_result_data()
{
@@ -150,5 +152,35 @@ void tst_QCryptographicHash::sha1()
}
+Q_DECLARE_METATYPE(QCryptographicHash::Algorithm);
+
+void tst_QCryptographicHash::files_data() {
+ QTest::addColumn<QString>("filename");
+ QTest::addColumn<QCryptographicHash::Algorithm>("algorithm");
+ QTest::addColumn<QByteArray>("md5sum");
+ QTest::newRow("Line") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5");
+ QTest::newRow("Line") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e");
+}
+
+
+void tst_QCryptographicHash::files()
+{
+ QFETCH(QString, filename);
+ QFETCH(QCryptographicHash::Algorithm, algorithm);
+ QFETCH(QByteArray, md5sum);
+ {
+ QFile f(QString::fromLocal8Bit(SRCDIR) + filename);
+ QCryptographicHash hash(algorithm);
+ QVERIFY(! hash.addData(&f)); // file is not open for reading;
+ if (f.open(QIODevice::ReadOnly)) {
+ QVERIFY(hash.addData(&f));
+ QCOMPARE(hash.result().toHex(),md5sum);
+ } else {
+ QFAIL("Failed to open file for testing. should not happen");
+ }
+ }
+}
+
+
QTEST_MAIN(tst_QCryptographicHash)
#include "tst_qcryptographichash.moc"
diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
index 936f82861f..7bb6de8c9f 100644
--- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp
+++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 8e385dfbdb..4ef508e92b 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
index 3044b4180d..a4a96c6df7 100644
--- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
index 40b2d30c02..0e2f61ab98 100644
--- a/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
+++ b/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
index a6c2f50e6d..a031bf811d 100644
--- a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
+++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
index 0c1bb655b4..a713fd4ca7 100644
--- a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
+++ b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 6d82831214..6c941179d6 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp
index 94fd279842..0c4df63884 100644
--- a/tests/auto/corelib/tools/qline/tst_qline.cpp
+++ b/tests/auto/corelib/tools/qline/tst_qline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
index 24fa94ac6f..c1b71de2b7 100644
--- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp
+++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
index 030fc4a728..2b6280fd2b 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
+++ b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 8d4c15b5f9..a670cac03c 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index f24311adef..c48bcfb4b3 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
index e8cb23b9b6..bdaf98cbf2 100644
--- a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
+++ b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
index 1e32c3afea..acdfd20488 100644
--- a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
+++ b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
index 483cf93918..5282d2964b 100644
--- a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
+++ b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
index c1375c38f6..c2a9d05af6 100644
--- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp
+++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index d66e6b35da..836c02dfca 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -348,7 +348,7 @@ void tst_QRegExp::indexIn_addMoreRows(const QByteArray &stri)
// miscellaneous
QTest::newRow( stri + "misc00" ) << QString(email)
- << QString("troll1@trolltech.com") << 0 << 20
+ << QString("email123@example.com") << 0 << 20
<< QStringList();
QTest::newRow( stri + "misc01" ) << QString("[0-9]*\\.[0-9]+") << QString("pi = 3.14") << 5 << 4
<< QStringList();
@@ -791,7 +791,7 @@ void tst_QRegExp::wildcard_data()
QTest::newRow( "data0" ) << QString("*.html") << QString("test.html") << 0;
QTest::newRow( "data1" ) << QString("*.html") << QString("test.htm") << -1;
QTest::newRow( "data2" ) << QString("bar*") << QString("foobarbaz") << 3;
- QTest::newRow( "data3" ) << QString("*") << QString("Trolltech") << 0;
+ QTest::newRow( "data3" ) << QString("*") << QString("Qt Rocks!") << 0;
QTest::newRow( "data4" ) << QString(".html") << QString("test.html") << 4;
QTest::newRow( "data5" ) << QString(".h") << QString("test.cpp") << -1;
QTest::newRow( "data6" ) << QString(".???l") << QString("test.html") << 4;
diff --git a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
index ea90b2236d..67de98b867 100644
--- a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
+++ b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
index 186a6c2d5d..22f6cb7d32 100644
--- a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
+++ b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp b/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
index 457733b7a8..c0e036e232 100644
--- a/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
+++ b/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index f03d769e13..4c0ecce5ec 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -57,10 +57,6 @@ class tst_QSet : public QObject
{
Q_OBJECT
-public:
- tst_QSet() {}
- virtual ~tst_QSet() {}
-
private slots:
void operator_eq();
void swap();
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index e94b6d3fb9..c7ffe8cb7b 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.h b/tests/auto/corelib/tools/qsharedpointer/externaltests.h
index e07ba31928..6903433b70 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.h
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp b/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp
index f6ee9ad02a..b5d59de037 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
index 5ff8893b81..17812216c0 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
index 6afc293dde..cebbe94ef1 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index 7eb1bd2dee..35b63deb4c 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -102,10 +102,10 @@ private slots:
void invalidConstructs();
public slots:
- void cleanup() { check(); }
+ void cleanup() { safetyCheck(); }
public:
- inline void check()
+ inline void safetyCheck()
{
#ifdef QT_BUILD_INTERNAL
QtSharedPointer::internalSafetyCheckCleanCheck();
@@ -607,7 +607,7 @@ void tst_QSharedPointer::qobjectWeakManagement()
delete obj;
QVERIFY(weak.isNull());
}
- check();
+ safetyCheck();
{
// same, bit with operator=
@@ -621,7 +621,7 @@ void tst_QSharedPointer::qobjectWeakManagement()
delete obj;
QVERIFY(weak.isNull());
}
- check();
+ safetyCheck();
{
// delete triggered by parent
@@ -634,7 +634,7 @@ void tst_QSharedPointer::qobjectWeakManagement()
delete parent;
QVERIFY(weak.isNull());
}
- check();
+ safetyCheck();
{
// same as above, but set the parent after QWeakPointer is created
@@ -649,7 +649,7 @@ void tst_QSharedPointer::qobjectWeakManagement()
delete parent;
QVERIFY(weak.isNull());
}
- check();
+ safetyCheck();
{
// with two QWeakPointers
@@ -666,7 +666,7 @@ void tst_QSharedPointer::qobjectWeakManagement()
delete obj;
QVERIFY(weak.isNull());
}
- check();
+ safetyCheck();
{
// same, but delete the pointer while two QWeakPointers exist
@@ -683,7 +683,7 @@ void tst_QSharedPointer::qobjectWeakManagement()
}
QVERIFY(weak.isNull());
}
- check();
+ safetyCheck();
}
void tst_QSharedPointer::noSharedPointerFromWeakQObject()
@@ -737,7 +737,7 @@ void tst_QSharedPointer::objectCast()
ptr = qobject_cast<QSharedPointer<OtherObject> >(baseptr);
QVERIFY(ptr == data);
}
- check();
+ safetyCheck();
{
const OtherObject *data = new OtherObject;
@@ -763,11 +763,10 @@ void tst_QSharedPointer::objectCast()
ptr = qobject_cast<QSharedPointer<const OtherObject> >(baseptr);
QVERIFY(ptr == data);
}
- check();
+ safetyCheck();
{
OtherObject *data = new OtherObject;
- QPointer<OtherObject> qptr = data;
QSharedPointer<OtherObject> ptr = QSharedPointer<OtherObject>(data);
QWeakPointer<QObject> weakptr = ptr;
@@ -788,7 +787,6 @@ void tst_QSharedPointer::objectCast()
// drop the reference:
ptr.clear();
QVERIFY(ptr.isNull());
- QVERIFY(qptr.isNull());
QVERIFY(weakptr.toStrongRef().isNull());
// verify that the object casts fail without crash
@@ -803,7 +801,7 @@ void tst_QSharedPointer::objectCast()
otherptr = qobject_cast<QSharedPointer<OtherObject> >(weakptr);
QVERIFY(otherptr.isNull());
}
- check();
+ safetyCheck();
}
void tst_QSharedPointer::differentPointers()
@@ -850,7 +848,7 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr == aData);
QVERIFY(aData == baseptr);
}
- check();
+ safetyCheck();
{
DiffPtrDerivedData *aData = new DiffPtrDerivedData;
@@ -865,7 +863,7 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr == aBase);
QVERIFY(baseptr == aData);
}
- check();
+ safetyCheck();
{
DiffPtrDerivedData *aData = new DiffPtrDerivedData;
@@ -882,7 +880,7 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
- check();
+ safetyCheck();
}
void tst_QSharedPointer::virtualBaseDifferentPointers()
@@ -902,7 +900,7 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
- check();
+ safetyCheck();
{
VirtualDerived *aData = new VirtualDerived;
@@ -919,7 +917,7 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
- check();
+ safetyCheck();
}
#ifndef QTEST_NO_RTTI
@@ -1086,7 +1084,7 @@ void tst_QSharedPointer::constCorrectness()
ptr = cvptr.constCast<Data>();
#endif
}
- check();
+ safetyCheck();
{
Data *aData = new Data;
@@ -1103,7 +1101,7 @@ void tst_QSharedPointer::constCorrectness()
QCOMPARE(cptr.data(), aData);
QCOMPARE(cptr.operator->(), aData);
}
- check();
+ safetyCheck();
}
static int customDeleterFnCallCount;
@@ -1137,13 +1135,13 @@ void tst_QSharedPointer::customDeleter()
QSharedPointer<Data> ptr2(new Data, &Data::alsoDelete);
QSharedPointer<Data> ptr3(new Data, &Data::virtualDelete);
}
- check();
+ safetyCheck();
{
QSharedPointer<DerivedData> ptr(new DerivedData, &Data::doDelete);
QSharedPointer<DerivedData> ptr2(new DerivedData, &Data::alsoDelete);
QSharedPointer<DerivedData> ptr3(new DerivedData, &Data::virtualDelete);
}
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1152,7 +1150,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 0);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1162,7 +1160,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 1);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1172,7 +1170,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 1);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1181,7 +1179,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 0);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1190,7 +1188,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 0);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1203,7 +1201,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 0);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
customDeleterFnCallCount = 0;
{
@@ -1216,7 +1214,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(customDeleterFnCallCount, 0);
}
QCOMPARE(customDeleterFnCallCount, 1);
- check();
+ safetyCheck();
refcount = 0;
CustomDeleter<Data> dataDeleter;
@@ -1228,7 +1226,7 @@ void tst_QSharedPointer::customDeleter()
}
QCOMPARE(dataDeleter.callCount, 1);
QCOMPARE(refcount, 1);
- check();
+ safetyCheck();
dataDeleter.callCount = 0;
{
@@ -1239,7 +1237,7 @@ void tst_QSharedPointer::customDeleter()
}
QCOMPARE(dataDeleter.callCount, 1);
QCOMPARE(refcount, 1);
- check();
+ safetyCheck();
dataDeleter.callCount = 0;
{
@@ -1253,7 +1251,7 @@ void tst_QSharedPointer::customDeleter()
}
QCOMPARE(dataDeleter.callCount, 1);
QCOMPARE(refcount, 1);
- check();
+ safetyCheck();
dataDeleter.callCount = 0;
{
@@ -1263,7 +1261,7 @@ void tst_QSharedPointer::customDeleter()
}
QCOMPARE(dataDeleter.callCount, 1);
QCOMPARE(refcount, 1);
- check();
+ safetyCheck();
CustomDeleter<DerivedData> derivedDataDeleter;
derivedDataDeleter.callCount = 0;
@@ -1277,7 +1275,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(dataDeleter.callCount, 0);
QCOMPARE(derivedDataDeleter.callCount, 1);
QCOMPARE(refcount, 2);
- check();
+ safetyCheck();
derivedDataDeleter.callCount = 0;
dataDeleter.callCount = 0;
@@ -1295,7 +1293,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(dataDeleter.callCount, 1);
QCOMPARE(derivedDataDeleter.callCount, 0);
QCOMPARE(refcount, 2);
- check();
+ safetyCheck();
derivedDataDeleter.callCount = 0;
dataDeleter.callCount = 0;
@@ -1313,7 +1311,7 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(dataDeleter.callCount, 0);
QCOMPARE(derivedDataDeleter.callCount, 1);
QCOMPARE(refcount, 2);
- check();
+ safetyCheck();
}
void customQObjectDeleterFn(QObject *obj)
@@ -1337,7 +1335,7 @@ void tst_QSharedPointer::creating()
ptr.clear();
QCOMPARE(Data::destructorCounter, 1);
}
- check();
+ safetyCheck();
Data::generationCounter = Data::destructorCounter = 0;
{
@@ -1353,7 +1351,7 @@ void tst_QSharedPointer::creating()
QVERIFY(d->weakref.load() == 1);
QVERIFY(d->strongref.load() == 0);
}
- check();
+ safetyCheck();
Data::generationCounter = Data::destructorCounter = 0;
DerivedData::derivedDestructorCounter = 0;
@@ -1366,7 +1364,7 @@ void tst_QSharedPointer::creating()
QCOMPARE(Data::destructorCounter, 1);
QCOMPARE(DerivedData::derivedDestructorCounter, 1);
}
- check();
+ safetyCheck();
{
QSharedPointer<Data> ptr = QSharedPointer<DiffPtrDerivedData>::create();
@@ -1375,7 +1373,7 @@ void tst_QSharedPointer::creating()
QCOMPARE(ptr.staticCast<DiffPtrDerivedData>()->buffer[3]+0, 16-3);
QCOMPARE(ptr.staticCast<DiffPtrDerivedData>()->buffer[0]+0, 16);
}
- check();
+ safetyCheck();
{
QSharedPointer<VirtualDerived> ptr = QSharedPointer<VirtualDerived>::create();
@@ -1385,7 +1383,7 @@ void tst_QSharedPointer::creating()
QSharedPointer<Data> baseptr = ptr;
QCOMPARE(baseptr->classLevel(), 4);
}
- check();
+ safetyCheck();
}
void tst_QSharedPointer::creatingQObject()
@@ -1399,13 +1397,13 @@ void tst_QSharedPointer::creatingQObject()
QVERIFY(qptr.isNull());
}
- check();
+ safetyCheck();
{
QSharedPointer<QObject> ptr = QSharedPointer<OtherObject>::create();
QCOMPARE(ptr->metaObject(), &OtherObject::staticMetaObject);
}
- check();
+ safetyCheck();
}
void tst_QSharedPointer::mixTrackingPointerCode()
@@ -1417,7 +1415,7 @@ void tst_QSharedPointer::mixTrackingPointerCode()
Wrapper w(ptr);
ptr.clear();
}
- check();
+ safetyCheck();
{
// pointer created without tracking
diff --git a/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp b/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
index 018fc1c97b..889493ddb4 100644
--- a/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/wrapper.h b/tests/auto/corelib/tools/qsharedpointer/wrapper.h
index b25510f76d..66202a5a31 100644
--- a/tests/auto/corelib/tools/qsharedpointer/wrapper.h
+++ b/tests/auto/corelib/tools/qsharedpointer/wrapper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsize/tst_qsize.cpp b/tests/auto/corelib/tools/qsize/tst_qsize.cpp
index 5b6e4f85b1..bc40e2aa64 100644
--- a/tests/auto/corelib/tools/qsize/tst_qsize.cpp
+++ b/tests/auto/corelib/tools/qsize/tst_qsize.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
index d2879612be..c74f4c3754 100644
--- a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
+++ b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstl/tst_qstl.cpp b/tests/auto/corelib/tools/qstl/tst_qstl.cpp
index 43c318737f..f9e3549a4d 100644
--- a/tests/auto/corelib/tools/qstl/tst_qstl.cpp
+++ b/tests/auto/corelib/tools/qstl/tst_qstl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstring/double_data.h b/tests/auto/corelib/tools/qstring/double_data.h
index e7e654c442..8ffb981675 100644
--- a/tests/auto/corelib/tools/qstring/double_data.h
+++ b/tests/auto/corelib/tools/qstring/double_data.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 80cbabeaf6..ed525e3429 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -121,8 +121,9 @@ private slots:
void simplified_data();
void simplified();
void trimmed();
- void toLower();
void toUpper();
+ void toLower();
+ void toCaseFolded();
void rightJustified();
void leftJustified();
void mid();
@@ -811,9 +812,6 @@ void tst_QString::constructorQByteArray()
void tst_QString::STL()
{
-#ifdef Q_CC_HPACC
- QSKIP("This test crashes on HP-UX with aCC");
-#endif
#ifndef QT_NO_STL
#ifndef QT_NO_CAST_TO_ASCII
QString qt( "QString" );
@@ -851,16 +849,13 @@ void tst_QString::STL()
QVERIFY( !stdstr3.length() );
#endif
-// Skip the rest of the test if glibc is not compiled with wide character support
-#if !(defined Q_CC_GNU && !defined _GLIBCPP_USE_WCHAR_T) && !defined QT_NO_STL_WCHAR
const wchar_t arr[] = {'h', 'e', 'l', 'l', 'o', 0};
- QStdWString stlStr = arr;
+ std::wstring stlStr = arr;
QString s = QString::fromStdWString(stlStr);
QCOMPARE(s, QString::fromLatin1("hello"));
QCOMPARE(stlStr, s.toStdWString());
-#endif
#else
QSKIP( "Not tested without STL support");
#endif
@@ -1571,14 +1566,28 @@ void tst_QString::toUpper()
QCOMPARE( QString(1, QChar(0xdf)).toUpper(), QString("SS"));
- QString lower;
+ QString lower, upper;
lower += QChar(QChar::highSurrogate(0x10428));
lower += QChar(QChar::lowSurrogate(0x10428));
- QString upper;
upper += QChar(QChar::highSurrogate(0x10400));
upper += QChar(QChar::lowSurrogate(0x10400));
QCOMPARE( lower.toUpper(), upper);
+ lower += lower;
+ upper += upper;
+ QCOMPARE( lower.toUpper(), upper);
+ // test for broken surrogate pair handling (low low hi low hi low)
+ lower.prepend(QChar(QChar::lowSurrogate(0x10428)));
+ lower.prepend(QChar(QChar::lowSurrogate(0x10428)));
+ upper.prepend(QChar(QChar::lowSurrogate(0x10428)));
+ upper.prepend(QChar(QChar::lowSurrogate(0x10428)));
+ QCOMPARE(lower.toUpper(), upper);
+ // test for broken surrogate pair handling (low low hi low hi low hi hi)
+ lower += QChar(QChar::highSurrogate(0x10428));
+ lower += QChar(QChar::highSurrogate(0x10428));
+ upper += QChar(QChar::highSurrogate(0x10428));
+ upper += QChar(QChar::highSurrogate(0x10428));
+ QCOMPARE(lower.toUpper(), upper);
#ifdef QT_USE_ICU
// test doesn't work with ICU support, since QChar is unaware of any locale
@@ -1616,13 +1625,28 @@ void tst_QString::toLower()
QCOMPARE( QString(1, QChar(0x130)).toLower(), QString(QString(1, QChar(0x69)) + QChar(0x307)));
- QString lower;
+ QString lower, upper;
lower += QChar(QChar::highSurrogate(0x10428));
lower += QChar(QChar::lowSurrogate(0x10428));
- QString upper;
upper += QChar(QChar::highSurrogate(0x10400));
upper += QChar(QChar::lowSurrogate(0x10400));
QCOMPARE( upper.toLower(), lower);
+ lower += lower;
+ upper += upper;
+ QCOMPARE( upper.toLower(), lower);
+
+ // test for broken surrogate pair handling (low low hi low hi low)
+ lower.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ lower.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ upper.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ upper.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ QCOMPARE( upper.toLower(), lower);
+ // test for broken surrogate pair handling (low low hi low hi low hi hi)
+ lower += QChar(QChar::highSurrogate(0x10400));
+ lower += QChar(QChar::highSurrogate(0x10400));
+ upper += QChar(QChar::highSurrogate(0x10400));
+ upper += QChar(QChar::highSurrogate(0x10400));
+ QCOMPARE( upper.toLower(), lower);
#ifdef QT_USE_ICU
// test doesn't work with ICU support, since QChar is unaware of any locale
@@ -1639,6 +1663,58 @@ void tst_QString::toLower()
#endif
}
+void tst_QString::toCaseFolded()
+{
+ QCOMPARE( QString().toCaseFolded(), QString() );
+ QCOMPARE( QString("").toCaseFolded(), QString("") );
+ QCOMPARE( QString("text").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("Text").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("tExt").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("teXt").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("texT").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("TExt").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("teXT").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("tEXt").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("tExT").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("TEXT").toCaseFolded(), QString("text") );
+ QCOMPARE( QString("@ABYZ[").toCaseFolded(), QString("@abyz["));
+ QCOMPARE( QString("@abyz[").toCaseFolded(), QString("@abyz["));
+ QCOMPARE( QString("`ABYZ{").toCaseFolded(), QString("`abyz{"));
+ QCOMPARE( QString("`abyz{").toCaseFolded(), QString("`abyz{"));
+
+ QString lower, upper;
+ upper += QChar(QChar::highSurrogate(0x10400));
+ upper += QChar(QChar::lowSurrogate(0x10400));
+ lower += QChar(QChar::highSurrogate(0x10428));
+ lower += QChar(QChar::lowSurrogate(0x10428));
+ QCOMPARE( upper.toCaseFolded(), lower);
+ lower += lower;
+ upper += upper;
+ QCOMPARE( upper.toCaseFolded(), lower);
+
+ // test for broken surrogate pair handling (low low hi low hi low)
+ lower.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ lower.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ upper.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ upper.prepend(QChar(QChar::lowSurrogate(0x10400)));
+ QCOMPARE(upper.toCaseFolded(), lower);
+ // test for broken surrogate pair handling (low low hi low hi low hi hi)
+ lower += QChar(QChar::highSurrogate(0x10400));
+ lower += QChar(QChar::highSurrogate(0x10400));
+ upper += QChar(QChar::highSurrogate(0x10400));
+ upper += QChar(QChar::highSurrogate(0x10400));
+ QCOMPARE(upper.toCaseFolded(), lower);
+
+ //### we currently don't support full case foldings
+ for (int i = 0; i < 65536; ++i) {
+ QString str(1, QChar(i));
+ QString lower = str.toCaseFolded();
+ QVERIFY(lower.length() >= 1);
+ if (lower.length() == 1)
+ QVERIFY(str.toCaseFolded() == QString(1, QChar(i).toCaseFolded()));
+ }
+}
+
void tst_QString::trimmed()
{
QString a;
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index 4d453b0585..283e707c1b 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
index 9a71955d62..fd92aafadd 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
index 4979672647..6bdb607431 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
index 2c6466ffe2..915c0d23ad 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
index 7f709d1590..c9837a0489 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index b74e88753e..54ca9dd3a7 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
index e8f36c4840..10906902ff 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,15 +56,9 @@ private slots:
void assignOperator();
};
-// Subclass that exposes the protected functions.
-class SubQStringMatcher : public QStringMatcher
-{
-public:
-};
-
void tst_QStringMatcher::qstringmatcher()
{
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
QCOMPARE(matcher.indexIn("foo", 1), 1);
QCOMPARE(matcher.pattern(), QString());
@@ -73,7 +67,7 @@ void tst_QStringMatcher::qstringmatcher()
// public Qt::CaseSensitivity caseSensitivity() const
void tst_QStringMatcher::caseSensitivity()
{
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setCaseSensitivity(Qt::CaseSensitive);
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
@@ -106,7 +100,7 @@ void tst_QStringMatcher::indexIn()
QFETCH(int, from);
QFETCH(int, indexIn);
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setPattern(needle);
QCOMPARE(matcher.indexIn(haystack, from), indexIn);
@@ -133,7 +127,7 @@ void tst_QStringMatcher::setCaseSensitivity()
QFETCH(int, indexIn);
QFETCH(int, cs);
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setPattern(needle);
matcher.setCaseSensitivity(static_cast<Qt::CaseSensitivity> (cs));
diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
index 0b3d1bbea1..c0dc253167 100644
--- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
+++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index a7abf6f589..100ddfcb12 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
index 33513df9ac..bc03e74b41 100644
--- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp
+++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
index 0bc1352681..db08bc5724 100644
--- a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -102,6 +102,7 @@ void tst_QTimeLine::range()
// Verify that you can change the range in the timeLine
timeLine.setFrameRange(10, 20);
QSignalSpy spy(&timeLine, SIGNAL(frameChanged(int)));
+ QVERIFY(spy.isValid());
timeLine.start();
#ifdef Q_OS_WINCE
QTest::qWait(1000);
@@ -131,6 +132,7 @@ void tst_QTimeLine::currentTime()
timeLine.setUpdateInterval((timeLine.duration()/2) / 33);
qRegisterMetaType<qreal>("qreal");
QSignalSpy spy(&timeLine, SIGNAL(valueChanged(qreal)));
+ QVERIFY(spy.isValid());
timeLine.setFrameRange(10, 20);
QCOMPARE(timeLine.currentTime(), 0);
timeLine.start();
@@ -200,6 +202,7 @@ void tst_QTimeLine::frameRate()
// Default speed
timeLine.setUpdateInterval(1000 / 33);
QSignalSpy spy(&timeLine, SIGNAL(frameChanged(int)));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration()*2);
QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
@@ -223,6 +226,7 @@ void tst_QTimeLine::value()
// Default speed
qRegisterMetaType<qreal>("qreal");
QSignalSpy spy(&timeLine, SIGNAL(valueChanged(qreal)));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration()/3);
QVERIFY(timeLine.currentValue() > 0);
@@ -253,6 +257,7 @@ void tst_QTimeLine::currentFrame()
// Default speed
QSignalSpy spy(&timeLine, SIGNAL(frameChanged(int)));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration()/3);
QVERIFY(timeLine.currentFrame() > 10);
@@ -284,6 +289,7 @@ void tst_QTimeLine::loopCount()
// Default speed infiniti looping
QSignalSpy spy(&timeLine, SIGNAL(frameChanged(int)));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration());
QCOMPARE(timeLine.state(), QTimeLine::Running);
@@ -302,6 +308,8 @@ void tst_QTimeLine::loopCount()
QSignalSpy finishedSpy(&timeLine, SIGNAL(finished()));
QSignalSpy frameChangedSpy(&timeLine, SIGNAL(frameChanged(int)));
+ QVERIFY(finishedSpy.isValid());
+ QVERIFY(frameChangedSpy.isValid());
QEventLoop loop;
connect(&timeLine, SIGNAL(finished()), &loop, SLOT(quit()));
@@ -451,6 +459,7 @@ void tst_QTimeLine::frameChanged()
timeLine.setFrameRange(0,9);
timeLine.setUpdateInterval(1000);
QSignalSpy spy(&timeLine, SIGNAL(frameChanged(int)));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration()*2);
QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
@@ -473,6 +482,7 @@ void tst_QTimeLine::stopped()
timeLine.setFrameRange(0, 9);
qRegisterMetaType<QTimeLine::State>("QTimeLine::State");
QSignalSpy spy(&timeLine, SIGNAL(stateChanged(QTimeLine::State)));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration()*2);
QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
@@ -490,6 +500,7 @@ void tst_QTimeLine::finished()
QTimeLine timeLine;
timeLine.setFrameRange(0,9);
QSignalSpy spy(&timeLine, SIGNAL(finished()));
+ QVERIFY(spy.isValid());
timeLine.start();
QTest::qWait(timeLine.duration()*2);
QCOMPARE(timeLine.state(), QTimeLine::NotRunning);
@@ -522,6 +533,7 @@ void tst_QTimeLine::multipleTimeLines()
QTimeLine timeLine(200);
timeLine.setFrameRange(0,99);
QSignalSpy spy(&timeLine, SIGNAL(finished()));
+ QVERIFY(spy.isValid());
QTimeLine timeLineKiller;
timeLineKiller.setFrameRange(0,99);
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index 0bdc49a15a..cc2bbe2f1f 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -55,6 +55,9 @@ private slots:
void appendCausingRealloc();
void resize();
void realloc();
+ void count();
+ void first();
+ void last();
};
int fooCtor = 0;
@@ -593,5 +596,110 @@ void tst_QVarLengthArray::realloc()
QVERIFY(reallocTestProceed);
}
+void tst_QVarLengthArray::count()
+{
+ // tests size(), count() and length(), since they're the same thing
+ {
+ const QVarLengthArray<int> list;
+ QCOMPARE(list.length(), 0);
+ QCOMPARE(list.count(), 0);
+ QCOMPARE(list.size(), 0);
+ }
+
+ {
+ QVarLengthArray<int> list;
+ list.append(0);
+ QCOMPARE(list.length(), 1);
+ QCOMPARE(list.count(), 1);
+ QCOMPARE(list.size(), 1);
+ }
+
+ {
+ QVarLengthArray<int> list;
+ list.append(0);
+ list.append(1);
+ QCOMPARE(list.length(), 2);
+ QCOMPARE(list.count(), 2);
+ QCOMPARE(list.size(), 2);
+ }
+
+ {
+ QVarLengthArray<int> list;
+ list.append(0);
+ list.append(0);
+ list.append(0);
+ QCOMPARE(list.length(), 3);
+ QCOMPARE(list.count(), 3);
+ QCOMPARE(list.size(), 3);
+ }
+
+ // test removals too
+ {
+ QVarLengthArray<int> list;
+ list.append(0);
+ list.append(0);
+ list.append(0);
+ QCOMPARE(list.length(), 3);
+ QCOMPARE(list.count(), 3);
+ QCOMPARE(list.size(), 3);
+ list.removeLast();
+ QCOMPARE(list.length(), 2);
+ QCOMPARE(list.count(), 2);
+ QCOMPARE(list.size(), 2);
+ list.removeLast();
+ QCOMPARE(list.length(), 1);
+ QCOMPARE(list.count(), 1);
+ QCOMPARE(list.size(), 1);
+ list.removeLast();
+ QCOMPARE(list.length(), 0);
+ QCOMPARE(list.count(), 0);
+ QCOMPARE(list.size(), 0);
+ }
+}
+
+void tst_QVarLengthArray::first()
+{
+ // append some items, make sure it stays sane
+ QVarLengthArray<int> list;
+ list.append(27);
+ QCOMPARE(list.first(), 27);
+ list.append(4);
+ QCOMPARE(list.first(), 27);
+ list.append(1987);
+ QCOMPARE(list.first(), 27);
+ QCOMPARE(list.length(), 3);
+
+ // remove some, make sure it stays sane
+ list.removeLast();
+ QCOMPARE(list.first(), 27);
+ QCOMPARE(list.length(), 2);
+
+ list.removeLast();
+ QCOMPARE(list.first(), 27);
+ QCOMPARE(list.length(), 1);
+}
+
+void tst_QVarLengthArray::last()
+{
+ // append some items, make sure it stays sane
+ QVarLengthArray<int> list;
+ list.append(27);
+ QCOMPARE(list.last(), 27);
+ list.append(4);
+ QCOMPARE(list.last(), 4);
+ list.append(1987);
+ QCOMPARE(list.last(), 1987);
+ QCOMPARE(list.length(), 3);
+
+ // remove some, make sure it stays sane
+ list.removeLast();
+ QCOMPARE(list.last(), 4);
+ QCOMPARE(list.length(), 2);
+
+ list.removeLast();
+ QCOMPARE(list.last(), 27);
+ QCOMPARE(list.length(), 1);
+}
+
QTEST_APPLESS_MAIN(tst_QVarLengthArray)
#include "tst_qvarlengtharray.moc"
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index 704d75b709..bed2e25d31 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/xml/qxmlstream/qc14n.h b/tests/auto/corelib/xml/qxmlstream/qc14n.h
index f7c17b5a7a..ed7bd3b323 100644
--- a/tests/auto/corelib/xml/qxmlstream/qc14n.h
+++ b/tests/auto/corelib/xml/qxmlstream/qc14n.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/corelib/xml/qxmlstream/setupSuite.sh b/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
index 5d4947e5ae..ca85fa2884 100755
--- a/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
+++ b/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
index 12ebbb72a6..8d3ddfa096 100644
--- a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractadaptor/myobject.h b/tests/auto/dbus/qdbusabstractadaptor/myobject.h
index 2aaaa7ecc5..a5dc47376d 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/myobject.h
+++ b/tests/auto/dbus/qdbusabstractadaptor/myobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
index a06232c4bd..ed027ae70c 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
index ff684ff522..cc55a942c5 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
+++ b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractinterface/interface.cpp b/tests/auto/dbus/qdbusabstractinterface/interface.cpp
index 849db93084..14a9db543c 100644
--- a/tests/auto/dbus/qdbusabstractinterface/interface.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/interface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractinterface/interface.h b/tests/auto/dbus/qdbusabstractinterface/interface.h
index 0fb15fe6c5..1c1b1bdcb1 100644
--- a/tests/auto/dbus/qdbusabstractinterface/interface.h
+++ b/tests/auto/dbus/qdbusabstractinterface/interface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractinterface/pinger.cpp b/tests/auto/dbus/qdbusabstractinterface/pinger.cpp
index 24113fbb1b..1bd767c8fc 100644
--- a/tests/auto/dbus/qdbusabstractinterface/pinger.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/pinger.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,7 +43,7 @@
* This file was generated by qdbusxml2cpp version 0.7
* Command line was: qdbusxml2cpp -i interface.h -p pinger com.trolltech.QtDBus.Pinger.xml
*
- * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/tests/auto/dbus/qdbusabstractinterface/pinger.h b/tests/auto/dbus/qdbusabstractinterface/pinger.h
index 739a14229f..e1acd41021 100644
--- a/tests/auto/dbus/qdbusabstractinterface/pinger.h
+++ b/tests/auto/dbus/qdbusabstractinterface/pinger.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,7 +43,7 @@
* This file was generated by qdbusxml2cpp version 0.7
* Command line was: qdbusxml2cpp -i interface.h -p pinger com.trolltech.QtDBus.Pinger.xml
*
- * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
index 393d6470c8..489bd4afdb 100644
--- a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
index 994df058fa..84d2051f29 100644
--- a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index f8f632d667..f6b9edcff1 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp b/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
index acd27386f5..a678ddd269 100644
--- a/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
+++ b/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp b/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
index 8041708151..de29f08ef8 100644
--- a/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
+++ b/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusinterface/myobject.h b/tests/auto/dbus/qdbusinterface/myobject.h
index 3959823a77..68f5137a4b 100644
--- a/tests/auto/dbus/qdbusinterface/myobject.h
+++ b/tests/auto/dbus/qdbusinterface/myobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
index dd15012222..cfd183c91e 100644
--- a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
index 9156818158..dc8363db42 100644
--- a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
+++ b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp b/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp
index 56431b8716..3d33e92f1f 100644
--- a/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp
+++ b/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h
index 9a102f0f75..f41cacc953 100644
--- a/tests/auto/dbus/qdbusmarshall/common.h
+++ b/tests/auto/dbus/qdbusmarshall/common.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
index fce6f59344..1d64e45be5 100644
--- a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
+++ b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
index 2843e15758..b302be85ad 100644
--- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
+++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -96,6 +96,15 @@ private slots:
void demarshallPrimitives_data();
void demarshallPrimitives();
+ void demarshallStrings_data();
+ void demarshallStrings();
+
+ void demarshallInvalidStringList_data();
+ void demarshallInvalidStringList();
+
+ void demarshallInvalidByteArray_data();
+ void demarshallInvalidByteArray();
+
private:
int fileDescriptorForTest();
@@ -1260,5 +1269,216 @@ void tst_QDBusMarshall::demarshallPrimitives()
}
}
+void tst_QDBusMarshall::demarshallStrings_data()
+{
+ QTest::addColumn<QVariant>("value");
+ QTest::addColumn<char>("targetSig");
+ QTest::addColumn<QVariant>("expectedValue");
+
+ // All primitive types demarshall to null string types
+ typedef QPair<QVariant, char> ValSigPair;
+ const QList<ValSigPair> nullStringTypes
+ = QList<ValSigPair>()
+ << ValSigPair(qVariantFromValue(QString()), 's')
+ << ValSigPair(qVariantFromValue(QDBusObjectPath()), 'o')
+ << ValSigPair(qVariantFromValue(QDBusSignature()), 'g');
+ foreach (ValSigPair valSigPair, nullStringTypes) {
+ QTest::newRow("bool(false)") << QVariant(false) << valSigPair.second << valSigPair.first;
+ QTest::newRow("bool(true)") << QVariant(true) << valSigPair.second << valSigPair.first;
+ QTest::newRow("byte") << qVariantFromValue(uchar(1)) << valSigPair.second << valSigPair.first;
+ QTest::newRow("int16") << qVariantFromValue(short(2)) << valSigPair.second << valSigPair.first;
+ QTest::newRow("uint16") << qVariantFromValue(ushort(3)) << valSigPair.second << valSigPair.first;
+ QTest::newRow("int") << QVariant(1) << valSigPair.second << valSigPair.first;
+ QTest::newRow("uint") << QVariant(2U) << valSigPair.second << valSigPair.first;
+ QTest::newRow("int64") << QVariant(Q_INT64_C(3)) << valSigPair.second << valSigPair.first;
+ QTest::newRow("uint64") << QVariant(Q_UINT64_C(4)) << valSigPair.second << valSigPair.first;
+ QTest::newRow("double") << QVariant(42.5) << valSigPair.second << valSigPair.first;
+ }
+
+ // String types should demarshall to each other. This is a regression test
+ // to check released functionality is maintained even after checks have
+ // been added to string demarshalling
+ QTest::newRow("empty string->invalid objectpath") << QVariant("")
+ << 'o' << qVariantFromValue(QDBusObjectPath());
+ QTest::newRow("null string->invalid objectpath") << QVariant(QString())
+ << 'o' << qVariantFromValue(QDBusObjectPath());
+ QTest::newRow("string->invalid objectpath") << QVariant("invalid objectpath")
+ << 'o' << qVariantFromValue(QDBusObjectPath());
+ QTest::newRow("string->valid objectpath") << QVariant("/org/kde")
+ << 'o' << qVariantFromValue(QDBusObjectPath("/org/kde"));
+
+ QTest::newRow("empty string->invalid signature") << QVariant("")
+ << 'g' << qVariantFromValue(QDBusSignature());
+ QTest::newRow("null string->invalid signature") << QVariant(QString())
+ << 'g' << qVariantFromValue(QDBusSignature());
+ QTest::newRow("string->invalid signature") << QVariant("_invalid signature")
+ << 'g' << qVariantFromValue(QDBusSignature());
+ QTest::newRow("string->valid signature") << QVariant("s")
+ << 'g' << qVariantFromValue(QDBusSignature("s"));
+
+ QTest::newRow("objectpath->string") << qVariantFromValue(QDBusObjectPath("/org/kde"))
+ << 's' << qVariantFromValue(QString("/org/kde"));
+ QTest::newRow("objectpath->invalid signature") << qVariantFromValue(QDBusObjectPath("/org/kde"))
+ << 'g' << qVariantFromValue(QDBusSignature());
+
+ QTest::newRow("signature->string") << qVariantFromValue(QDBusSignature("s"))
+ << 's' << qVariantFromValue(QString("s"));
+ QTest::newRow("signature->invalid objectpath") << qVariantFromValue(QDBusSignature("s"))
+ << 'o' << qVariantFromValue(QDBusObjectPath());
+}
+
+QVariant demarshallAsString(const QDBusArgument& dbusArg, char targetSig)
+{
+ switch (targetSig) {
+ case 's': {
+ QString s;
+ dbusArg >> s;
+ return s;
+ }
+ case 'o': {
+ QDBusObjectPath op;
+ dbusArg >> op;
+ return qVariantFromValue(op);
+ }
+ case 'g' : {
+ QDBusSignature sig;
+ dbusArg >> sig;
+ return qVariantFromValue(sig);
+ }
+ default: {
+ return QVariant();
+ }
+ }
+}
+
+void tst_QDBusMarshall::demarshallStrings()
+{
+ QFETCH(QVariant, value);
+ QFETCH(char, targetSig);
+ QFETCH(QVariant, expectedValue);
+
+ QDBusConnection con = QDBusConnection::sessionBus();
+
+ QVERIFY(con.isConnected());
+
+ QDBusMessage msg = QDBusMessage::createMethodCall(serviceName, objectPath,
+ interfaceName, "ping");
+ QDBusArgument sendArg;
+ sendArg.beginStructure();
+ sendArg.appendVariant(value);
+ sendArg.endStructure();
+ msg.setArguments(QVariantList() << qVariantFromValue(sendArg));
+ QDBusMessage reply = con.call(msg);
+
+ const QDBusArgument receiveArg = qvariant_cast<QDBusArgument>(reply.arguments().at(0));
+ receiveArg.beginStructure();
+
+ QVariant receiveValue = demarshallAsString(receiveArg, targetSig);
+ QVERIFY2(receiveValue.isValid(), "Invalid targetSig in demarshallStrings_data()");
+ QVERIFY(compare(receiveValue, expectedValue));
+
+ receiveArg.endStructure();
+ QVERIFY(receiveArg.atEnd());
+}
+
+void tst_QDBusMarshall::demarshallInvalidStringList_data()
+{
+ addBasicTypesColumns();
+
+ // None of the basic types should demarshall to a string list
+ basicNumericTypes_data();
+ basicStringTypes_data();
+
+ // Arrays of non-string type should not demarshall to a string list
+ QList<bool> bools;
+ QTest::newRow("emptyboollist") << qVariantFromValue(bools);
+ bools << false << true << false;
+ QTest::newRow("boollist") << qVariantFromValue(bools);
+
+ // Structures should not demarshall to a QByteArray
+ QTest::newRow("struct of strings")
+ << qVariantFromValue(QVariantList() << QString("foo") << QString("bar"));
+ QTest::newRow("struct of mixed types")
+ << qVariantFromValue(QVariantList() << QString("foo") << int(42) << double(3.14));
+}
+
+void tst_QDBusMarshall::demarshallInvalidStringList()
+{
+ QFETCH(QVariant, value);
+
+ QDBusConnection con = QDBusConnection::sessionBus();
+
+ QVERIFY(con.isConnected());
+
+ QDBusMessage msg = QDBusMessage::createMethodCall(serviceName, objectPath,
+ interfaceName, "ping");
+ QDBusArgument sendArg;
+ sendArg.beginStructure();
+ sendArg.appendVariant(value);
+ sendArg.endStructure();
+ msg.setArguments(QVariantList() << qVariantFromValue(sendArg));
+ QDBusMessage reply = con.call(msg);
+
+ const QDBusArgument receiveArg = qvariant_cast<QDBusArgument>(reply.arguments().at(0));
+ receiveArg.beginStructure();
+
+ QStringList receiveValue;
+ receiveArg >> receiveValue;
+ QCOMPARE(receiveValue, QStringList());
+
+ receiveArg.endStructure();
+ QVERIFY(receiveArg.atEnd());
+}
+
+void tst_QDBusMarshall::demarshallInvalidByteArray_data()
+{
+ addBasicTypesColumns();
+
+ // None of the basic types should demarshall to a QByteArray
+ basicNumericTypes_data();
+ basicStringTypes_data();
+
+ // Arrays of other types than byte should not demarshall to a QByteArray
+ QList<bool> bools;
+ QTest::newRow("empty array of bool") << qVariantFromValue(bools);
+ bools << true << false << true;
+ QTest::newRow("non-empty array of bool") << qVariantFromValue(bools);
+
+ // Structures should not demarshall to a QByteArray
+ QTest::newRow("struct of bytes")
+ << qVariantFromValue(QVariantList() << uchar(1) << uchar(2));
+
+ QTest::newRow("struct of mixed types")
+ << qVariantFromValue(QVariantList() << int(42) << QString("foo") << double(3.14));
+}
+
+void tst_QDBusMarshall::demarshallInvalidByteArray()
+{
+ QFETCH(QVariant, value);
+
+ QDBusConnection con = QDBusConnection::sessionBus();
+
+ QVERIFY(con.isConnected());
+
+ QDBusMessage msg = QDBusMessage::createMethodCall(serviceName, objectPath,
+ interfaceName, "ping");
+ QDBusArgument sendArg;
+ sendArg.beginStructure();
+ sendArg.appendVariant(value);
+ sendArg.endStructure();
+ msg.setArguments(QVariantList() << qVariantFromValue(sendArg));
+ QDBusMessage reply = con.call(msg);
+
+ const QDBusArgument receiveArg = qvariant_cast<QDBusArgument>(reply.arguments().at(0));
+ receiveArg.beginStructure();
+
+ QByteArray receiveValue;
+ receiveArg >> receiveValue;
+ QCOMPARE(receiveValue, QByteArray());
+
+ receiveArg.endStructure();
+ QVERIFY(receiveArg.atEnd());
+}
+
QTEST_MAIN(tst_QDBusMarshall)
#include "tst_qdbusmarshall.moc"
diff --git a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
index 7711e819a0..8de6ad1ce5 100644
--- a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
+++ b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
index 7e1f651a1b..9055fdeaac 100644
--- a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
+++ b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
index face4742b1..447532b427 100644
--- a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
+++ b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp b/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
index 9eb69392c4..347c164eda 100644
--- a/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
+++ b/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp b/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp
index 8d18657c56..ffa7275c6a 100644
--- a/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp
+++ b/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp b/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
index 99aeefa8ee..a07d21c4c6 100644
--- a/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
+++ b/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp b/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
index 32ede6c97f..4f88f223d3 100644
--- a/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
+++ b/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbustype/tst_qdbustype.cpp b/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
index 5c46b4684a..453ff629b8 100644
--- a/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
+++ b/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
index e0f03307f3..42a3fd19cc 100644
--- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
index a6fc7a8212..40cd9b848a 100644
--- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
+++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 39a68943df..55b0c81529 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index be34cf51cf..479acea3fd 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
index 1b2e4fab0e..acf4e4f4ea 100644
--- a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
+++ b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qimagereader/images/txts.png b/tests/auto/gui/image/qimagereader/images/txts.png
index 99be1eb4f9..99be1eb4f9 100755..100644
--- a/tests/auto/gui/image/qimagereader/images/txts.png
+++ b/tests/auto/gui/image/qimagereader/images/txts.png
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro
index fc2b97267c..14d23f05ba 100644
--- a/tests/auto/gui/image/qimagereader/qimagereader.pro
+++ b/tests/auto/gui/image/qimagereader/qimagereader.pro
@@ -4,20 +4,10 @@ SOURCES += tst_qimagereader.cpp
MOC_DIR=tmp
QT += widgets widgets-private core-private gui-private network testlib
RESOURCES += qimagereader.qrc
-DEFINES += SRCDIR=\\\"$$PWD\\\"
win32-msvc:QMAKE_CXXFLAGS -= -Zm200
win32-msvc:QMAKE_CXXFLAGS += -Zm800
win32-msvc.net:QMAKE_CXXFLAGS -= -Zm300
win32-msvc.net:QMAKE_CXXFLAGS += -Zm1100
-wince*: {
- images.files = images
- images.path = .
-
- imagePlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*.dll
- imagePlugins.path = imageformats
-
- DEPLOYMENT += images imagePlugins
- DEFINES += SRCDIR=\\\".\\\"
-}
+TESTDATA += images/* baseline/*
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index d0bbc57632..7504ab3466 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,6 +54,7 @@
#include <QTcpSocket>
#include <QTcpServer>
#include <QTimer>
+#include <QTemporaryDir>
typedef QMap<QString, QString> QStringMap;
typedef QList<int> QIntList;
@@ -176,9 +177,11 @@ private slots:
void preserveTexts_data();
void preserveTexts();
-};
-static const QLatin1String prefix(SRCDIR "/images/");
+private:
+ QString prefix;
+ QTemporaryDir m_temporaryDir;
+};
// helper to skip an autotest when the given image format is not supported
#define SKIP_IF_UNSUPPORTED(format) do { \
@@ -203,8 +206,10 @@ void tst_QImageReader::getSetCheck()
delete var1;
}
-tst_QImageReader::tst_QImageReader()
+tst_QImageReader::tst_QImageReader() :
+ m_temporaryDir(QStringLiteral("tst_qimagereaderXXXXXX"))
{
+ m_temporaryDir.setAutoRemove(true);
}
tst_QImageReader::~tst_QImageReader()
@@ -214,6 +219,8 @@ tst_QImageReader::~tst_QImageReader()
void tst_QImageReader::init()
{
+ prefix = QFINDTESTDATA("images/");
+ QVERIFY(m_temporaryDir.isValid());
}
void tst_QImageReader::cleanup()
@@ -1041,6 +1048,20 @@ void tst_QImageReader::readFromDevice_data()
QTest::newRow("svg") << QString("rect.svg") << QByteArray("svg");
QTest::newRow("svgz") << QString("rect.svgz") << QByteArray("svgz");
+#if defined QTEST_HAVE_TGA
+ QTest::newRow("tga") << QString("test-flag.tga") << QByteArray("tga");
+#endif
+}
+
+static QByteArray msgReadFromDeviceFail(const QString &sourceFileName,
+ const QByteArray &detectedFormat)
+{
+ QByteArray result = "Failure for '";
+ result += sourceFileName.toLocal8Bit();
+ result += "', detected as: '";
+ result += detectedFormat;
+ result += '\'';
+ return result;
}
void tst_QImageReader::readFromDevice()
@@ -1050,9 +1071,9 @@ void tst_QImageReader::readFromDevice()
SKIP_IF_UNSUPPORTED(format);
- QImage expectedImage(prefix + fileName, format);
-
- QFile file(prefix + fileName);
+ const QString imageFileName = prefix + fileName;
+ QImage expectedImage(imageFileName, format);
+ QFile file(imageFileName);
QVERIFY(file.open(QFile::ReadOnly));
QByteArray imageData = file.readAll();
QVERIFY(!imageData.isEmpty());
@@ -1065,6 +1086,7 @@ void tst_QImageReader::readFromDevice()
QVERIFY(reader.canRead());
QImage imageReaderImage = reader.read();
+ QVERIFY2(!imageReaderImage.isNull(), msgReadFromDeviceFail(imageFileName, reader.format()).constData());
QCOMPARE(imageReaderImage, expectedImage);
buffer.seek(0);
@@ -1846,6 +1868,19 @@ void tst_QImageReader::testIgnoresFormatAndExtension_data()
QTest::newRow("rect.svgz") << "rect" << "svgz" << "svgz";
}
+static QByteArray msgIgnoreFormatAndExtensionFail(const QString &sourceFileName,
+ const QString &targetFileName,
+ const QString &detectedFormat)
+{
+ QByteArray result = "Failure for '";
+ result += sourceFileName.toLocal8Bit();
+ result += "' as '";
+ result += targetFileName;
+ result += "', detected as: '";
+ result += detectedFormat.toLocal8Bit();
+ result += '\'';
+ return result;
+}
void tst_QImageReader::testIgnoresFormatAndExtension()
{
@@ -1856,21 +1891,26 @@ void tst_QImageReader::testIgnoresFormatAndExtension()
SKIP_IF_UNSUPPORTED(expected.toLatin1());
QList<QByteArray> formats = QImageReader::supportedImageFormats();
- QString fileNameBase = prefix + name + ".";
+ QString fileNameBase = prefix + name + QLatin1Char('.');
+ QString tempPath = m_temporaryDir.path();
+ if (!tempPath.endsWith(QLatin1Char('/')))
+ tempPath += QLatin1Char('/');
foreach (const QByteArray &f, formats) {
if (f == extension)
continue;
- QFile tmp(QDir::tempPath() + "/" + name + "_" + expected + "." + f);
- QVERIFY(QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath()));
+ QFile tmp(tempPath + name + QLatin1Char('_') + expected + QLatin1Char('.') + f);
+ const QString sourceFileName = fileNameBase + extension;
+ const QString tempFileName = QFileInfo(tmp).absoluteFilePath();
+ QVERIFY(QFile::copy(sourceFileName, tempFileName));
QString format;
QImage image;
{
// image reader needs to be scoped for the remove() to work..
QImageReader r;
- r.setFileName(QFileInfo(tmp).absoluteFilePath());
+ r.setFileName(tempFileName);
r.setDecideFormatFromContent(true);
format = r.format();
r.read(&image);
@@ -1878,7 +1918,7 @@ void tst_QImageReader::testIgnoresFormatAndExtension()
tmp.remove();
- QVERIFY(!image.isNull());
+ QVERIFY2(!image.isNull(), msgIgnoreFormatAndExtensionFail(sourceFileName, tempFileName, format).constData());
QCOMPARE(format, expected);
}
}
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index 8a1f79e91a..9acf210eeb 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro
index d565418d6d..5da0b80670 100644
--- a/tests/auto/gui/image/qmovie/qmovie.pro
+++ b/tests/auto/gui/image/qmovie/qmovie.pro
@@ -8,11 +8,5 @@ MOC_DIR=tmp
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
!contains(QT_CONFIG, no-mng):DEFINES += QTEST_HAVE_MNG
-wince*: {
- addFiles.files = animations\\*
- addFiles.path = animations
- DEPLOYMENT += addFiles
-}
-
RESOURCES += resources.qrc
-
+TESTDATA += animations/*
diff --git a/tests/auto/gui/image/qmovie/tst_qmovie.cpp b/tests/auto/gui/image/qmovie/tst_qmovie.cpp
index b2d0360e33..d0c5e91f57 100644
--- a/tests/auto/gui/image/qmovie/tst_qmovie.cpp
+++ b/tests/auto/gui/image/qmovie/tst_qmovie.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -152,7 +152,7 @@ void tst_QMovie::playMovie()
QFETCH(QString, fileName);
QFETCH(int, frameCount);
- QMovie movie(fileName);
+ QMovie movie(QFINDTESTDATA(fileName));
QCOMPARE(movie.state(), QMovie::NotRunning);
movie.setSpeed(1000);
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index ea7e7c3e49..d4dc254dcb 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index c15d1e6976..7ae680dbdb 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -329,7 +329,7 @@ void tst_QPixmap::convertFromImage()
pix = QPixmap::fromImage(img2);
QPixmap res = QPixmap::fromImage(img2);
- QVERIFY( pixmapsAreEqual(&pix, &res) );
+ QCOMPARE(pix, res);
}
void tst_QPixmap::scroll_data()
@@ -1149,7 +1149,7 @@ void tst_QPixmap::copy()
trans.fill(Qt::transparent);
QPixmap transCopy = trans.copy();
- QVERIFY(pixmapsAreEqual(&trans, &transCopy));
+ QCOMPARE(trans, transCopy);
}
void tst_QPixmap::depthOfNullObjects()
@@ -1317,7 +1317,7 @@ void tst_QPixmap::loadFromDataImage()
QPixmap directLoadingPixmap;
directLoadingPixmap.loadFromData(rawData);
- QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap));
+ QCOMPARE(pixmapWithCopy, directLoadingPixmap);
}
void tst_QPixmap::fromImageReader_data()
@@ -1348,7 +1348,7 @@ void tst_QPixmap::fromImageReader()
QPixmap directLoadingPixmap = QPixmap::fromImageReader(&imageReader);
- QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap));
+ QCOMPARE(pixmapWithCopy, directLoadingPixmap);
}
void tst_QPixmap::fromImageReaderAnimatedGif_data()
@@ -1376,7 +1376,7 @@ void tst_QPixmap::fromImageReaderAnimatedGif()
QPixmap refPixmap = QPixmap::fromImage(refImage);
QPixmap directLoadingPixmap = QPixmap::fromImageReader(&pixmapReader);
- QVERIFY(pixmapsAreEqual(&refPixmap, &directLoadingPixmap));
+ QCOMPARE(refPixmap, directLoadingPixmap);
}
}
diff --git a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index cd3c357d79..c79e42f908 100644
--- a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
index c89e09ea97..91ba2332d1 100644
--- a/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp b/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp
index 053160fc7e..158ccc5770 100644
--- a/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp
+++ b/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qclipboard/copier/copier.pro b/tests/auto/gui/kernel/qclipboard/copier/copier.pro
index d345d33eb5..1c188ca7de 100644
--- a/tests/auto/gui/kernel/qclipboard/copier/copier.pro
+++ b/tests/auto/gui/kernel/qclipboard/copier/copier.pro
@@ -3,7 +3,6 @@ TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG -= app_bundle
-QT += widgets
win32: DESTDIR = ../copier
# Input
SOURCES += main.cpp
diff --git a/tests/auto/gui/kernel/qclipboard/copier/main.cpp b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
index e4417352ff..7e3efa03ba 100644
--- a/tests/auto/gui/kernel/qclipboard/copier/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -38,17 +38,19 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QApplication>
-#include <QClipboard>
-#include <QStringList>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QClipboard>
+#include <QtCore/QStringList>
+
int main(int argc, char **argv)
{
- QApplication app(argc, argv);
- QClipboard *board = QApplication::clipboard();
-#ifdef Q_OS_WINCE
- board->setText(QLatin1String("testString.!"));
-#else
- board->setText(app.arguments().at(1));
+ QGuiApplication app(argc, argv);
+ QString paste = QStringLiteral("testString.!");
+#ifndef Q_OS_WINCE
+ const QStringList arguments = app.arguments();
+ if (arguments.size() > 1)
+ paste = arguments.at(1);
#endif
+ QGuiApplication::clipboard()->setText(paste);
return 0;
}
diff --git a/tests/auto/gui/kernel/qclipboard/paster/main.cpp b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
index 4df4d7fb45..3ca4886f0b 100644
--- a/tests/auto/gui/kernel/qclipboard/paster/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -38,17 +38,18 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QApplication>
-#include <QClipboard>
-#include <QStringList>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QClipboard>
+#include <QtCore/QStringList>
int main(int argc, char **argv)
{
- QApplication app(argc, argv);
- QClipboard *board = QApplication::clipboard();
-#ifdef Q_OS_WINCE
- return (board->text() == QLatin1String("testString.!")) ? 0 : 1;
-#else
- return (board->text() == app.arguments().at(1)) ? 0 : 1;
+ QGuiApplication app(argc, argv);
+ QString expected = QStringLiteral("testString.!");
+#ifndef Q_OS_WINCE
+ const QStringList arguments = app.arguments();
+ if (arguments.size() > 1)
+ expected = arguments.at(1);
#endif
+ return QGuiApplication::clipboard()->text() == expected ? 0 : 1;
}
diff --git a/tests/auto/gui/kernel/qclipboard/paster/paster.pro b/tests/auto/gui/kernel/qclipboard/paster/paster.pro
index d214c9e90a..2f50eefb1e 100644
--- a/tests/auto/gui/kernel/qclipboard/paster/paster.pro
+++ b/tests/auto/gui/kernel/qclipboard/paster/paster.pro
@@ -4,7 +4,6 @@ DEPENDPATH += .
INCLUDEPATH += .
win32: DESTDIR = ../paster
CONFIG -= app_bundle
-QT += widgets
# Input
SOURCES += main.cpp
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index 29fabefc72..fcba0958e7 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,9 @@
#include <QtTest/QtTest>
#include <QtCore/QDebug>
-#include <QtWidgets/QApplication>
+#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
+#include <QtGui/QGuiApplication>
#include <QtGui/QClipboard>
#ifdef Q_WS_MAC
#include <Carbon/Carbon.h>
@@ -52,8 +54,9 @@ class tst_QClipboard : public QObject
{
Q_OBJECT
private slots:
+ void init();
void copy_exit_paste();
- void capabiliyFunctions();
+ void capabilityFunctions();
void modes();
void testSignals();
void setMimeData();
@@ -63,6 +66,11 @@ private:
bool nativeClipboardWorking();
};
+void tst_QClipboard::init()
+{
+ const QString testdataDir = QFileInfo(QFINDTESTDATA("copier")).absolutePath();
+ QVERIFY2(QDir::setCurrent(testdataDir), qPrintable("Could not chdir to " + testdataDir));
+}
bool tst_QClipboard::nativeClipboardWorking()
{
@@ -82,9 +90,9 @@ Q_DECLARE_METATYPE(QClipboard::Mode)
Tests that the capability functions are implemented on all
platforms.
*/
-void tst_QClipboard::capabiliyFunctions()
+void tst_QClipboard::capabilityFunctions()
{
- QClipboard * const clipboard = QApplication::clipboard();
+ QClipboard * const clipboard = QGuiApplication::clipboard();
clipboard->supportsSelection();
clipboard->supportsFindBuffer();
@@ -99,7 +107,7 @@ void tst_QClipboard::capabiliyFunctions()
*/
void tst_QClipboard::modes()
{
- QClipboard * const clipboard = QApplication::clipboard();
+ QClipboard * const clipboard = QGuiApplication::clipboard();
if (!nativeClipboardWorking())
QSKIP("Native clipboard not working in this setup");
@@ -124,7 +132,7 @@ void tst_QClipboard::modes()
}
/*
- Test that the appropriate signals are emitted when the cliboard
+ Test that the appropriate signals are emitted when the clipboard
contents is changed by calling the qt functions.
*/
void tst_QClipboard::testSignals()
@@ -134,7 +142,7 @@ void tst_QClipboard::testSignals()
if (!nativeClipboardWorking())
QSKIP("Native clipboard not working in this setup");
- QClipboard * const clipboard = QApplication::clipboard();
+ QClipboard * const clipboard = QGuiApplication::clipboard();
QSignalSpy changedSpy(clipboard, SIGNAL(changed(QClipboard::Mode)));
QSignalSpy dataChangedSpy(clipboard, SIGNAL(dataChanged()));
@@ -182,6 +190,44 @@ void tst_QClipboard::testSignals()
QCOMPARE(dataChangedSpy.count(), 1);
}
+static bool runHelper(const QString &program, const QStringList &arguments, QByteArray *errorMessage)
+{
+ QProcess process;
+ process.setReadChannelMode(QProcess::ForwardedChannels);
+ process.start(program, arguments);
+ if (!process.waitForStarted()) {
+ *errorMessage = "Unable to start '" + program.toLocal8Bit() + " ': "
+ + process.errorString().toLocal8Bit();
+ return false;
+ }
+
+ // Windows: Due to implementation changes, the event loop needs
+ // to be spun since we ourselves also need to answer the
+ // WM_DRAWCLIPBOARD message as we are in the chain of clipboard
+ // viewers.
+ bool running = true;
+ for (int i = 0; i < 60 && running; ++i) {
+ QGuiApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ if (process.waitForFinished(500))
+ running = false;
+ }
+ if (running) {
+ process.kill();
+ *errorMessage = "Timeout running '" + program.toLocal8Bit() + '\'';
+ return false;
+ }
+ if (process.exitStatus() != QProcess::NormalExit) {
+ *errorMessage = "Process '" + program.toLocal8Bit() + "' crashed.";
+ return false;
+ }
+ if (process.exitCode()) {
+ *errorMessage = "Process '" + program.toLocal8Bit() + "' returns "
+ + QByteArray::number(process.exitCode());
+ return false;
+ }
+ return true;
+}
+
// Test that pasted text remains on the clipboard after a Qt application exits.
void tst_QClipboard::copy_exit_paste()
{
@@ -192,13 +238,16 @@ void tst_QClipboard::copy_exit_paste()
#endif
if (!nativeClipboardWorking())
QSKIP("Native clipboard not working in this setup");
- const QStringList stringArgument = QStringList() << "Test string.";
- QCOMPARE(QProcess::execute("copier/copier", stringArgument), 0);
+ const QStringList stringArgument(QStringLiteral("Test string."));
+ QByteArray errorMessage;
+ QVERIFY2(runHelper(QStringLiteral("copier/copier"), stringArgument, &errorMessage),
+ errorMessage.constData());
#ifdef Q_OS_MAC
// The Pasteboard needs a moment to breathe (at least on older Macs).
QTest::qWait(100);
#endif
- QCOMPARE(QProcess::execute("paster/paster", stringArgument), 0);
+ QVERIFY2(runHelper(QStringLiteral("paster/paster"), stringArgument, &errorMessage),
+ errorMessage.constData());
#endif
}
@@ -214,33 +263,33 @@ void tst_QClipboard::setMimeData()
mimeData->setText(QLatin1String("Qt/CE foo"));
#endif
- QApplication::clipboard()->setMimeData(mimeData);
- QCOMPARE(QApplication::clipboard()->mimeData(), (const QMimeData *)mimeData);
- QCOMPARE(QApplication::clipboard()->mimeData()->objectName(), TestName);
+ QGuiApplication::clipboard()->setMimeData(mimeData);
+ QCOMPARE(QGuiApplication::clipboard()->mimeData(), (const QMimeData *)mimeData);
+ QCOMPARE(QGuiApplication::clipboard()->mimeData()->objectName(), TestName);
// set it to the same data again, it shouldn't delete mimeData (and crash as a result)
- QApplication::clipboard()->setMimeData(mimeData);
- QCOMPARE(QApplication::clipboard()->mimeData(), (const QMimeData *)mimeData);
- QCOMPARE(QApplication::clipboard()->mimeData()->objectName(), TestName);
- QApplication::clipboard()->clear();
- const QMimeData *appMimeData = QApplication::clipboard()->mimeData();
+ QGuiApplication::clipboard()->setMimeData(mimeData);
+ QCOMPARE(QGuiApplication::clipboard()->mimeData(), (const QMimeData *)mimeData);
+ QCOMPARE(QGuiApplication::clipboard()->mimeData()->objectName(), TestName);
+ QGuiApplication::clipboard()->clear();
+ const QMimeData *appMimeData = QGuiApplication::clipboard()->mimeData();
QVERIFY(appMimeData != mimeData || appMimeData->objectName() != TestName);
// check for crash when using the same mimedata object on several clipboards
QMimeData *data = new QMimeData;
data->setText("foo");
- QApplication::clipboard()->setMimeData(data, QClipboard::Clipboard);
- QApplication::clipboard()->setMimeData(data, QClipboard::Selection);
- QApplication::clipboard()->setMimeData(data, QClipboard::FindBuffer);
+ QGuiApplication::clipboard()->setMimeData(data, QClipboard::Clipboard);
+ QGuiApplication::clipboard()->setMimeData(data, QClipboard::Selection);
+ QGuiApplication::clipboard()->setMimeData(data, QClipboard::FindBuffer);
- QSignalSpy spySelection(QApplication::clipboard(), SIGNAL(selectionChanged()));
- QSignalSpy spyData(QApplication::clipboard(), SIGNAL(dataChanged()));
- QSignalSpy spyFindBuffer(QApplication::clipboard(), SIGNAL(findBufferChanged()));
+ QSignalSpy spySelection(QGuiApplication::clipboard(), SIGNAL(selectionChanged()));
+ QSignalSpy spyData(QGuiApplication::clipboard(), SIGNAL(dataChanged()));
+ QSignalSpy spyFindBuffer(QGuiApplication::clipboard(), SIGNAL(findBufferChanged()));
- QApplication::clipboard()->clear(QClipboard::Clipboard);
- QApplication::clipboard()->clear(QClipboard::Selection); // used to crash on X11
- QApplication::clipboard()->clear(QClipboard::FindBuffer);
+ QGuiApplication::clipboard()->clear(QClipboard::Clipboard);
+ QGuiApplication::clipboard()->clear(QClipboard::Selection); // used to crash on X11
+ QGuiApplication::clipboard()->clear(QClipboard::FindBuffer);
#if defined(Q_WS_X11)
QCOMPARE(spySelection.count(), 1);
@@ -260,9 +309,9 @@ void tst_QClipboard::setMimeData()
data = new QMimeData;
data->setText("foo");
- QApplication::clipboard()->setMimeData(data, QClipboard::Clipboard);
- QApplication::clipboard()->setMimeData(data, QClipboard::Selection);
- QApplication::clipboard()->setMimeData(data, QClipboard::FindBuffer);
+ QGuiApplication::clipboard()->setMimeData(data, QClipboard::Clipboard);
+ QGuiApplication::clipboard()->setMimeData(data, QClipboard::Selection);
+ QGuiApplication::clipboard()->setMimeData(data, QClipboard::FindBuffer);
QMimeData *newData = new QMimeData;
newData->setText("bar");
@@ -271,9 +320,9 @@ void tst_QClipboard::setMimeData()
spyData.clear();
spyFindBuffer.clear();
- QApplication::clipboard()->setMimeData(newData, QClipboard::Clipboard);
- QApplication::clipboard()->setMimeData(newData, QClipboard::Selection); // used to crash on X11
- QApplication::clipboard()->setMimeData(newData, QClipboard::FindBuffer);
+ QGuiApplication::clipboard()->setMimeData(newData, QClipboard::Clipboard);
+ QGuiApplication::clipboard()->setMimeData(newData, QClipboard::Selection); // used to crash on X11
+ QGuiApplication::clipboard()->setMimeData(newData, QClipboard::FindBuffer);
#if defined(Q_WS_X11)
QCOMPARE(spySelection.count(), 1);
@@ -292,7 +341,7 @@ void tst_QClipboard::setMimeData()
void tst_QClipboard::clearBeforeSetText()
{
- QApplication::processEvents();
+ QGuiApplication::processEvents();
if (!nativeClipboardWorking())
QSKIP("Native clipboard not working in this setup");
@@ -300,30 +349,30 @@ void tst_QClipboard::clearBeforeSetText()
const QString text = "tst_QClipboard::clearBeforeSetText()";
// setText() should work after processEvents()
- QApplication::clipboard()->setText(text);
- QCOMPARE(QApplication::clipboard()->text(), text);
- QApplication::processEvents();
- QCOMPARE(QApplication::clipboard()->text(), text);
+ QGuiApplication::clipboard()->setText(text);
+ QCOMPARE(QGuiApplication::clipboard()->text(), text);
+ QGuiApplication::processEvents();
+ QCOMPARE(QGuiApplication::clipboard()->text(), text);
// same with clear()
- QApplication::clipboard()->clear();
- QVERIFY(QApplication::clipboard()->text().isEmpty());
- QApplication::processEvents();
- QVERIFY(QApplication::clipboard()->text().isEmpty());
+ QGuiApplication::clipboard()->clear();
+ QVERIFY(QGuiApplication::clipboard()->text().isEmpty());
+ QGuiApplication::processEvents();
+ QVERIFY(QGuiApplication::clipboard()->text().isEmpty());
// setText() again
- QApplication::clipboard()->setText(text);
- QCOMPARE(QApplication::clipboard()->text(), text);
- QApplication::processEvents();
- QCOMPARE(QApplication::clipboard()->text(), text);
+ QGuiApplication::clipboard()->setText(text);
+ QCOMPARE(QGuiApplication::clipboard()->text(), text);
+ QGuiApplication::processEvents();
+ QCOMPARE(QGuiApplication::clipboard()->text(), text);
// clear() immediately followed by setText() should still return the text
- QApplication::clipboard()->clear();
- QVERIFY(QApplication::clipboard()->text().isEmpty());
- QApplication::clipboard()->setText(text);
- QCOMPARE(QApplication::clipboard()->text(), text);
- QApplication::processEvents();
- QCOMPARE(QApplication::clipboard()->text(), text);
+ QGuiApplication::clipboard()->clear();
+ QVERIFY(QGuiApplication::clipboard()->text().isEmpty());
+ QGuiApplication::clipboard()->setText(text);
+ QCOMPARE(QGuiApplication::clipboard()->text(), text);
+ QGuiApplication::processEvents();
+ QCOMPARE(QGuiApplication::clipboard()->text(), text);
}
QTEST_MAIN(tst_QClipboard)
diff --git a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
index 8723c6614b..47ff1b05f1 100644
--- a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
+++ b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
index 7e39c11e2c..f0771330f7 100644
--- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp
+++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
index 5d1a6a390f..0c0bff551b 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
index 00008a80f0..207356fe84 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -163,11 +163,11 @@ void tst_qfileopenevent::handleLifetime()
qFile.close();
// check the content
- QFile check("testHandleLifetime");
- check.open(QFile::ReadOnly);
- QString content(check.readAll());
+ QFile checkContent("testHandleLifetime");
+ checkContent.open(QFile::ReadOnly);
+ QString content(checkContent.readAll());
QCOMPARE(content, QLatin1String("test content+closed original handles"));
- check.close();
+ checkContent.close();
QFile::remove(QLatin1String("testHandleLifetime"));
}
@@ -214,11 +214,11 @@ void tst_qfileopenevent::sendAndReceive()
QCoreApplication::instance()->sendPostedEvents();
// check the content
- QFile check("testSendAndReceive");
- QCOMPARE(check.open(QFile::ReadOnly), true);
- QString content(check.readAll());
+ QFile checkContent("testSendAndReceive");
+ QCOMPARE(checkContent.open(QFile::ReadOnly), true);
+ QString content(checkContent.readAll());
QCOMPARE(content, QLatin1String("sending+received"));
- check.close();
+ checkContent.close();
QFile::remove(QLatin1String("testSendAndReceive"));
}
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 98314a9336..d0f12ea945 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -56,6 +56,8 @@ private slots:
void createCopy();
void sizeOf_data();
void sizeOf();
+ void flags_data();
+ void flags();
void construct_data();
void construct();
void constructCopy_data();
@@ -320,6 +322,30 @@ struct TypeAlignment
#endif
};
+void tst_QGuiMetaType::flags_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::addColumn<bool>("isMovable");
+ QTest::addColumn<bool>("isComplex");
+
+#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
+ QTest::newRow(#RealType) << MetaTypeId << bool(!QTypeInfo<RealType>::isStatic) << bool(QTypeInfo<RealType>::isComplex);
+QT_FOR_EACH_STATIC_GUI_CLASS(ADD_METATYPE_TEST_ROW)
+#undef ADD_METATYPE_TEST_ROW
+}
+
+void tst_QGuiMetaType::flags()
+{
+ QFETCH(int, type);
+ QFETCH(bool, isMovable);
+ QFETCH(bool, isComplex);
+
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsConstruction), isComplex);
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsDestruction), isComplex);
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::MovableType), isMovable);
+}
+
+
void tst_QGuiMetaType::construct_data()
{
create_data();
diff --git a/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp
index 988580b874..56a1fb0d8f 100644
--- a/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp b/tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp
index 26bde8aa19..b46899a84d 100644
--- a/tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp
+++ b/tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,6 +54,8 @@ public:
m_updateCallCount(0),
m_resetCallCount(0),
m_commitCallCount(0),
+ m_localeCallCount(0),
+ m_inputDirectionCallCount(0),
m_lastQueries(Qt::ImhNone),
m_action(QInputPanel::Click),
m_cursorPosition(0),
@@ -91,12 +93,24 @@ public:
{
return m_visible;
}
+ virtual QLocale locale() const
+ {
+ m_localeCallCount++;
+ return QLocale::c();
+ }
+ virtual Qt::LayoutDirection inputDirection() const
+ {
+ m_inputDirectionCallCount++;
+ return Qt::LeftToRight;
+ }
bool m_animating;
bool m_visible;
int m_updateCallCount;
int m_resetCallCount;
int m_commitCallCount;
+ mutable int m_localeCallCount;
+ mutable int m_inputDirectionCallCount;
Qt::InputMethodQueries m_lastQueries;
QInputPanel::Action m_action;
int m_cursorPosition;
@@ -144,6 +158,7 @@ private slots:
void commit();
void update();
void query();
+ void inputDirection();
private:
InputItem m_inputItem;
PlatformInputContext m_platformInputContext;
@@ -312,5 +327,16 @@ void tst_qinputpanel::query()
QCOMPARE(cursorRectangle, QRect(1,2,3,4));
}
+void tst_qinputpanel::inputDirection()
+{
+ QCOMPARE(m_platformInputContext.m_inputDirectionCallCount, 0);
+ qApp->inputPanel()->inputDirection();
+ QCOMPARE(m_platformInputContext.m_inputDirectionCallCount, 1);
+
+ QCOMPARE(m_platformInputContext.m_localeCallCount, 0);
+ qApp->inputPanel()->locale();
+ QCOMPARE(m_platformInputContext.m_localeCallCount, 1);
+}
+
QTEST_MAIN(tst_qinputpanel)
#include "tst_qinputpanel.moc"
diff --git a/tests/auto/gui/kernel/qkeysequence/qt_de.qm b/tests/auto/gui/kernel/qkeysequence/qt_de.qm
index 595e4d7e8f..c22b8f6c38 100644
--- a/tests/auto/gui/kernel/qkeysequence/qt_de.qm
+++ b/tests/auto/gui/kernel/qkeysequence/qt_de.qm
Binary files differ
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 6fbd77c54f..fcc30a7afe 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -122,8 +122,12 @@ private slots:
void mnemonic();
void toString_data();
void toString();
+ void toStringFromKeycode_data();
+ void toStringFromKeycode();
void streamOperators_data();
void streamOperators();
+ void parseString_data();
+ void parseString();
void fromString_data();
void fromString();
void ensureSorted();
@@ -474,6 +478,24 @@ void tst_QKeySequence::toString()
}
+void tst_QKeySequence::toStringFromKeycode_data()
+{
+ QTest::addColumn<QKeySequence>("keycode");
+ QTest::addColumn<QString>("expectedString");
+
+ QTest::newRow("A") << QKeySequence(Qt::Key_A) << "A";
+ QTest::newRow("-1") << QKeySequence(-1) << "";
+ QTest::newRow("Unknown") << QKeySequence(Qt::Key_unknown) << "";
+}
+
+void tst_QKeySequence::toStringFromKeycode()
+{
+ QFETCH(QKeySequence, keycode);
+ QFETCH(QString, expectedString);
+
+ QCOMPARE(QKeySequence(keycode).toString(), expectedString);
+}
+
void tst_QKeySequence::streamOperators_data()
{
operatorQString_data();
@@ -501,6 +523,34 @@ void tst_QKeySequence::streamOperators()
QVERIFY( orgK != copyOrgK );
}
+
+void tst_QKeySequence::parseString_data()
+{
+ QTest::addColumn<QString>("strSequence");
+ QTest::addColumn<QKeySequence>("keycode");
+
+ QTest::newRow("A") << "A" << QKeySequence(Qt::Key_A);
+ QTest::newRow("a") << "a" << QKeySequence(Qt::Key_A);
+ QTest::newRow("Ctrl+Left") << "Ctrl+Left" << QKeySequence(Qt::CTRL + Qt::Key_Left);
+ QTest::newRow("Ctrl++") << "Ctrl++" << QKeySequence(Qt::CTRL + Qt::Key_Plus);
+ QTest::newRow("Meta+A") << "Meta+a" << QKeySequence(Qt::META + Qt::Key_A);
+ QTest::newRow("Win+A") << "Win+a" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("4+3=2") << "4+3=2" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Super+Meta+A") << "Super+Meta+A" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Meta+Trolls") << "Meta+Trolls" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Alabama") << "Alabama" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Simon+G") << "Simon+G" << QKeySequence(Qt::Key_unknown);
+}
+
+void tst_QKeySequence::parseString()
+{
+ QFETCH( QString, strSequence );
+ QFETCH( QKeySequence, keycode );
+
+ QCOMPARE( QKeySequence(strSequence).toString(), keycode.toString() );
+ QVERIFY( QKeySequence(strSequence) == keycode );
+}
+
void tst_QKeySequence::fromString_data()
{
toString_data();
@@ -512,6 +562,9 @@ void tst_QKeySequence::fromString()
QFETCH(QString, neutralString);
QFETCH(QString, platformString);
+ if (strSequence == "Ctrly") // Key_Unknown gives empty string
+ return;
+
QKeySequence ks1(strSequence);
QKeySequence ks2 = QKeySequence::fromString(ks1.toString());
QKeySequence ks3 = QKeySequence::fromString(neutralString, QKeySequence::PortableText);
diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
index 370338d24a..aca3ffc9cb 100644
--- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
+++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -72,7 +72,7 @@ protected:
mousePressButton = e->button();
mousePressButtons = e->buttons();
mousePressModifiers = e->modifiers();
- mousePressEventRecieved = TRUE;
+ mousePressEventRecieved = true;
e->accept();
}
void mouseReleaseEvent(QMouseEvent *e)
@@ -81,7 +81,7 @@ protected:
mouseReleaseButton = e->button();
mouseReleaseButtons = e->buttons();
mouseReleaseModifiers = e->modifiers();
- mouseReleaseEventRecieved = TRUE;
+ mouseReleaseEventRecieved = true;
e->accept();
}
};
@@ -134,8 +134,8 @@ void tst_QMouseEvent::cleanupTestCase()
void tst_QMouseEvent::init()
{
- testMouseWidget->mousePressEventRecieved = FALSE;
- testMouseWidget->mouseReleaseEventRecieved = FALSE;
+ testMouseWidget->mousePressEventRecieved = false;
+ testMouseWidget->mouseReleaseEventRecieved = false;
testMouseWidget->mousePressButton = 0;
testMouseWidget->mousePressButtons = 0;
testMouseWidget->mousePressModifiers = 0;
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
index 4dc8b58366..ce006eaa99 100644
--- a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
+++ b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index 053e6d0a7e..5474c4097d 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
index 1d00032b56..ab798a7351 100644
--- a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
+++ b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,6 +52,7 @@ private slots:
void angleBetween();
void transformBetween_data();
void transformBetween();
+ void orientationChange();
};
void tst_QScreen::angleBetween_data()
@@ -163,5 +164,16 @@ void tst_QScreen::transformBetween()
QCOMPARE(QScreen::transformBetween(a, b, rect), expected);
}
+void tst_QScreen::orientationChange()
+{
+ QScreen *screen = QGuiApplication::primaryScreen();
+
+ QWindowSystemInterface::handleScreenOrientationChange(screen, Qt::LandscapeOrientation);
+ QTRY_COMPARE(screen->currentOrientation(), Qt::LandscapeOrientation);
+
+ QWindowSystemInterface::handleScreenOrientationChange(screen, Qt::PortraitOrientation);
+ QTRY_COMPARE(screen->currentOrientation(), Qt::PortraitOrientation);
+}
+
#include <tst_qscreen.moc>
QTEST_MAIN(tst_QScreen);
diff --git a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
index d3a087eefc..228b73414e 100644
--- a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -152,12 +152,12 @@ protected:
};
QT_BEGIN_NAMESPACE
-template<> struct QMetaTypeId<tst_QShortcut::Widget>
-{ enum { Defined = 1 }; static inline int qt_metatype_id() { return QMetaType::Int; } };
-template<> struct QMetaTypeId<tst_QShortcut::Result>
-{ enum { Defined = 1 }; static inline int qt_metatype_id() { return QMetaType::Int; } };
-template<> struct QMetaTypeId<tst_QShortcut::Action>
-{ enum { Defined = 1 }; static inline int qt_metatype_id() { return QMetaType::Int; } };
+template<> struct QMetaTypeId<tst_QShortcut::Widget> : public QMetaTypeId<int>
+{ static inline int qt_metatype_id() { return QMetaType::Int; } };
+template<> struct QMetaTypeId<tst_QShortcut::Result> : public QMetaTypeId<int>
+{ static inline int qt_metatype_id() { return QMetaType::Int; } };
+template<> struct QMetaTypeId<tst_QShortcut::Action> : public QMetaTypeId<int>
+{ static inline int qt_metatype_id() { return QMetaType::Int; } };
QT_END_NAMESPACE
class TestEdit : public QTextEdit
@@ -1254,10 +1254,8 @@ void tst_QShortcut::testElement()
if (action == ClearAll) {
clearAllShortcuts();
- QCOMPARE(TRUE, TRUE);
} else if (action == SetupAccel) {
setupShortcut(testWidget, txt, k1, k2, k3, k4);
- QCOMPARE(TRUE, TRUE);
} else {
sendKeyEvents(k1, c1, k2, c2, k3, c3, k4, c4);
QCOMPARE(int(currentResult), result);
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index 07afe4a89c..95e644987f 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -209,6 +209,8 @@ private slots:
void deleteInRawEventTranslation();
void crashInQGraphicsSceneAfterNotHandlingTouchBegin();
void touchBeginWithGraphicsWidget();
+ void testQGuiAppDelivery();
+ void testMultiDevice();
private:
QTouchDevice *touchScreenDevice;
@@ -597,10 +599,12 @@ void tst_QTouchEvent::basicRawEventTranslation()
rawPosList << QPointF(12, 34) << QPointF(56, 78);
rawTouchPoint.setRawScreenPositions(rawPosList);
const ulong timestamp = 1234;
- qt_translateRawTouchEvent(&touchWidget,
- touchScreenDevice,
- QList<QTouchEvent::TouchPoint>() << rawTouchPoint,
- timestamp);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ timestamp,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(
+ QList<QTouchEvent::TouchPoint>() << rawTouchPoint));
+ QCoreApplication::processEvents();
QVERIFY(touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -632,10 +636,11 @@ void tst_QTouchEvent::basicRawEventTranslation()
rawTouchPoint.setState(Qt::TouchPointMoved);
rawTouchPoint.setScreenPos(screenPos + delta);
rawTouchPoint.setNormalizedPos(normalized(rawTouchPoint.pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget,
- touchScreenDevice,
- QList<QTouchEvent::TouchPoint>() << rawTouchPoint,
- 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(QList<QTouchEvent::TouchPoint>() << rawTouchPoint));
+ QCoreApplication::processEvents();
QVERIFY(touchWidget.seenTouchBegin);
QVERIFY(touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -664,10 +669,11 @@ void tst_QTouchEvent::basicRawEventTranslation()
rawTouchPoint.setState(Qt::TouchPointReleased);
rawTouchPoint.setScreenPos(screenPos + delta + delta);
rawTouchPoint.setNormalizedPos(normalized(rawTouchPoint.pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget,
- touchScreenDevice,
- QList<QTouchEvent::TouchPoint>() << rawTouchPoint,
- 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(QList<QTouchEvent::TouchPoint>() << rawTouchPoint));
+ QCoreApplication::processEvents();
QVERIFY(touchWidget.seenTouchBegin);
QVERIFY(touchWidget.seenTouchUpdate);
QVERIFY(touchWidget.seenTouchEnd);
@@ -731,7 +737,11 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
rawTouchPoints[1].setState(Qt::TouchPointPressed);
rawTouchPoints[1].setScreenPos(rightScreenPos);
rawTouchPoints[1].setNormalizedPos(normalized(rawTouchPoints[1].pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget, touchScreenDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -792,7 +802,11 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
rawTouchPoints[1].setState(Qt::TouchPointMoved);
rawTouchPoints[1].setScreenPos(centerScreenPos);
rawTouchPoints[1].setNormalizedPos(normalized(rawTouchPoints[1].pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget, touchScreenDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -853,7 +867,11 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
rawTouchPoints[1].setState(Qt::TouchPointReleased);
rawTouchPoints[1].setScreenPos(centerScreenPos);
rawTouchPoints[1].setNormalizedPos(normalized(rawTouchPoints[1].pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget, touchScreenDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -946,7 +964,11 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
rawTouchPoints[1].setState(Qt::TouchPointPressed);
rawTouchPoints[1].setScreenPos(rightScreenPos);
rawTouchPoints[1].setNormalizedPos(normalized(rawTouchPoints[1].pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget, touchPadDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchPadDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -1007,7 +1029,11 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
rawTouchPoints[1].setState(Qt::TouchPointMoved);
rawTouchPoints[1].setScreenPos(centerScreenPos);
rawTouchPoints[1].setNormalizedPos(normalized(rawTouchPoints[1].pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget, touchPadDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchPadDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -1068,7 +1094,11 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
rawTouchPoints[1].setState(Qt::TouchPointReleased);
rawTouchPoints[1].setScreenPos(centerScreenPos);
rawTouchPoints[1].setNormalizedPos(normalized(rawTouchPoints[1].pos(), screenGeometry));
- qt_translateRawTouchEvent(&touchWidget, touchPadDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchPadDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!touchWidget.seenTouchBegin);
QVERIFY(!touchWidget.seenTouchUpdate);
QVERIFY(!touchWidget.seenTouchEnd);
@@ -1326,20 +1356,32 @@ void tst_QTouchEvent::deleteInRawEventTranslation()
rawTouchPoints[2].setNormalizedPos(normalized(rawTouchPoints[2].pos(), screenGeometry));
// generate begin events on all widgets, the left widget should die
- qt_translateRawTouchEvent(&touchWidget, touchScreenDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(pl.isNull() && !pc.isNull() && !pr.isNull());
// generate update events on all widget, the center widget should die
rawTouchPoints[0].setState(Qt::TouchPointMoved);
rawTouchPoints[1].setState(Qt::TouchPointMoved);
rawTouchPoints[2].setState(Qt::TouchPointMoved);
- qt_translateRawTouchEvent(&touchWidget, touchScreenDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
// generate end events on all widget, the right widget should die
rawTouchPoints[0].setState(Qt::TouchPointReleased);
rawTouchPoints[1].setState(Qt::TouchPointReleased);
rawTouchPoints[2].setState(Qt::TouchPointReleased);
- qt_translateRawTouchEvent(&touchWidget, touchScreenDevice, rawTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(touchWidget.windowHandle(),
+ 0,
+ touchScreenDevice,
+ QTest::QTouchEventSequence::touchPointList(rawTouchPoints));
+ QCoreApplication::processEvents();
}
void tst_QTouchEvent::crashInQGraphicsSceneAfterNotHandlingTouchBegin()
@@ -1390,12 +1432,12 @@ void tst_QTouchEvent::touchBeginWithGraphicsWidget()
QTest::qWaitForWindowShown(&view);
view.fitInView(scene.sceneRect());
- QTest::touchEvent(static_cast<QWindow *>(0), touchScreenDevice)
+ QTest::touchEvent(&view, touchScreenDevice)
.press(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport());
- QTest::touchEvent(static_cast<QWindow *>(0), touchScreenDevice)
+ QTest::touchEvent(&view, touchScreenDevice)
.stationary(0)
.press(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport());
- QTest::touchEvent(static_cast<QWindow *>(0), touchScreenDevice)
+ QTest::touchEvent(&view, touchScreenDevice)
.release(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport())
.release(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport());
@@ -1407,12 +1449,12 @@ void tst_QTouchEvent::touchBeginWithGraphicsWidget()
root->reset();
glassWidget->setWindowFlags(Qt::Window); // make the glassWidget a panel
- QTest::touchEvent(static_cast<QWindow *>(0), touchScreenDevice)
+ QTest::touchEvent(&view, touchScreenDevice)
.press(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport());
- QTest::touchEvent(static_cast<QWindow *>(0), touchScreenDevice)
+ QTest::touchEvent(&view, touchScreenDevice)
.stationary(0)
.press(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport());
- QTest::touchEvent(static_cast<QWindow *>(0), touchScreenDevice)
+ QTest::touchEvent(&view, touchScreenDevice)
.release(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport())
.release(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport());
@@ -1425,6 +1467,143 @@ void tst_QTouchEvent::touchBeginWithGraphicsWidget()
delete glassWidget;
}
+class WindowTouchEventFilter : public QObject
+{
+ Q_OBJECT
+public:
+ bool eventFilter(QObject *obj, QEvent *event);
+ struct TouchInfo {
+ QList<QTouchEvent::TouchPoint> points;
+ QEvent::Type lastSeenType;
+ };
+ QMap<QTouchDevice *, TouchInfo> d;
+};
+
+bool WindowTouchEventFilter::eventFilter(QObject *, QEvent *event)
+{
+ if (event->type() == QEvent::TouchBegin
+ || event->type() == QEvent::TouchUpdate
+ || event->type() == QEvent::TouchEnd) {
+ QTouchEvent *te = static_cast<QTouchEvent *>(event);
+ TouchInfo &td = d[te->device()];
+ if (event->type() == QEvent::TouchBegin)
+ td.points.clear();
+ td.points.append(te->touchPoints());
+ td.lastSeenType = event->type();
+ }
+ return false;
+}
+
+void tst_QTouchEvent::testQGuiAppDelivery()
+{
+ QTouchDevice *device = new QTouchDevice;
+ device->setType(QTouchDevice::TouchScreen);
+ QWindowSystemInterface::registerTouchDevice(device);
+
+ QWindow *w = new QWindow;
+ w->setGeometry(100, 100, 100, 100);
+ w->show();
+ QTest::qWaitForWindowShown(w);
+
+ WindowTouchEventFilter filter;
+ w->installEventFilter(&filter);
+
+ QList<QWindowSystemInterface::TouchPoint> points;
+
+ // Pass empty list, should be ignored.
+ QWindowSystemInterface::handleTouchEvent(w, 0, points);
+ QCoreApplication::processEvents();
+ QCOMPARE(filter.d.isEmpty(), true);
+
+ QWindowSystemInterface::TouchPoint tp;
+ tp.id = 0;
+ tp.state = Qt::TouchPointPressed;
+ tp.area = QRectF(120, 120, 20, 20);
+ points.append(tp);
+
+ // Pass 0 as device, should be ignored.
+ QWindowSystemInterface::handleTouchEvent(w, 0, points);
+ QCoreApplication::processEvents();
+ QCOMPARE(filter.d.isEmpty(), true);
+
+ // Now the real thing.
+ QWindowSystemInterface::handleTouchEvent(w, device, points); // TouchBegin
+ QCoreApplication::processEvents();
+ QCOMPARE(filter.d.count(), 1);
+ QCOMPARE(filter.d.contains(device), true);
+ QCOMPARE(filter.d.value(device).points.count(), 1);
+ QCOMPARE(filter.d.value(device).lastSeenType, QEvent::TouchBegin);
+
+ points[0].state = Qt::TouchPointMoved;
+ QWindowSystemInterface::handleTouchEvent(w, device, points); // TouchUpdate
+ QCoreApplication::processEvents();
+ QCOMPARE(filter.d.count(), 1);
+ QCOMPARE(filter.d.contains(device), true);
+ QCOMPARE(filter.d.value(device).points.count(), 2);
+ QCOMPARE(filter.d.value(device).lastSeenType, QEvent::TouchUpdate);
+
+ points[0].state = Qt::TouchPointReleased;
+ QWindowSystemInterface::handleTouchEvent(w, device, points); // TouchEnd
+ QCoreApplication::processEvents();
+ QCOMPARE(filter.d.count(), 1);
+ QCOMPARE(filter.d.contains(device), true);
+ QCOMPARE(filter.d.value(device).points.count(), 3);
+ QCOMPARE(filter.d.value(device).lastSeenType, QEvent::TouchEnd);
+}
+
+void tst_QTouchEvent::testMultiDevice()
+{
+ QTouchDevice *deviceOne = new QTouchDevice;
+ deviceOne->setType(QTouchDevice::TouchScreen);
+ QWindowSystemInterface::registerTouchDevice(deviceOne);
+ QTouchDevice *deviceTwo = new QTouchDevice;
+ deviceTwo->setType(QTouchDevice::TouchScreen);
+ QWindowSystemInterface::registerTouchDevice(deviceTwo);
+
+ QWindow *w = new QWindow;
+ w->setGeometry(100, 100, 100, 100);
+ w->show();
+ QTest::qWaitForWindowShown(w);
+
+ WindowTouchEventFilter filter;
+ w->installEventFilter(&filter);
+
+ QList<QWindowSystemInterface::TouchPoint> pointsOne, pointsTwo;
+
+ // deviceOne reports a single point, deviceTwo reports the beginning of a multi-point sequence.
+ // Even though there is a point with id 0 for both devices, they should be delivered cleanly, independently.
+ QWindowSystemInterface::TouchPoint tp;
+ tp.id = 0;
+ tp.state = Qt::TouchPointPressed;
+ tp.area = QRectF(120, 120, 20, 20);
+ pointsOne.append(tp);
+
+ pointsTwo.append(tp);
+ tp.id = 1;
+ tp.area = QRectF(140, 140, 20, 20);
+ pointsTwo.append(tp);
+
+ QWindowSystemInterface::handleTouchEvent(w, deviceOne, pointsOne);
+ QWindowSystemInterface::handleTouchEvent(w, deviceTwo, pointsTwo);
+ QCoreApplication::processEvents();
+
+ QCOMPARE(filter.d.contains(deviceOne), true);
+ QCOMPARE(filter.d.contains(deviceTwo), true);
+
+ QCOMPARE(filter.d.value(deviceOne).lastSeenType, QEvent::TouchBegin);
+ QCOMPARE(filter.d.value(deviceTwo).lastSeenType, QEvent::TouchBegin);
+ QCOMPARE(filter.d.value(deviceOne).points.count(), 1);
+ QCOMPARE(filter.d.value(deviceTwo).points.count(), 2);
+
+ QCOMPARE(filter.d.value(deviceOne).points.at(0).screenRect(), pointsOne[0].area);
+ QCOMPARE(filter.d.value(deviceOne).points.at(0).state(), pointsOne[0].state);
+
+ QCOMPARE(filter.d.value(deviceTwo).points.at(0).screenRect(), pointsTwo[0].area);
+ QCOMPARE(filter.d.value(deviceTwo).points.at(0).state(), pointsTwo[0].state);
+ QCOMPARE(filter.d.value(deviceTwo).points.at(1).screenRect(), pointsTwo[1].area);
+ QCOMPARE(filter.d.value(deviceTwo).points.at(1).state(), pointsTwo[1].state);
+}
+
QTEST_MAIN(tst_QTouchEvent)
#include "tst_qtouchevent.moc"
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 4171f0f797..77fffef13a 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,8 @@
#include <QtTest/QtTest>
+#include <QEvent>
+
class tst_QWindow: public QObject
{
Q_OBJECT
@@ -51,6 +53,19 @@ private slots:
void mapGlobal();
void positioning();
void isActive();
+ void testInputEvents();
+ void touchToMouseTranslation();
+ void mouseToTouchTranslation();
+ void mouseToTouchLoop();
+ void initTestCase()
+ {
+ touchDevice = new QTouchDevice;
+ touchDevice->setType(QTouchDevice::TouchScreen);
+ QWindowSystemInterface::registerTouchDevice(touchDevice);
+ }
+
+private:
+ QTouchDevice *touchDevice;
};
@@ -221,5 +236,224 @@ void tst_QWindow::isActive()
QVERIFY(child.isActive());
}
+class InputTestWindow : public QWindow
+{
+public:
+ void keyPressEvent(QKeyEvent *event) {
+ keyPressCode = event->key();
+ }
+ void keyReleaseEvent(QKeyEvent *event) {
+ keyReleaseCode = event->key();
+ }
+ void mousePressEvent(QMouseEvent *event) {
+ if (ignoreMouse)
+ event->ignore();
+ else
+ mousePressButton = event->button();
+ }
+ void mouseReleaseEvent(QMouseEvent *event) {
+ if (ignoreMouse)
+ event->ignore();
+ else
+ mouseReleaseButton = event->button();
+ }
+ void touchEvent(QTouchEvent *event) {
+ if (ignoreTouch) {
+ event->ignore();
+ return;
+ }
+ QList<QTouchEvent::TouchPoint> points = event->touchPoints();
+ for (int i = 0; i < points.count(); ++i) {
+ switch (points.at(i).state()) {
+ case Qt::TouchPointPressed:
+ ++touchPressedCount;
+ break;
+ case Qt::TouchPointReleased:
+ ++touchReleasedCount;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ InputTestWindow() {
+ keyPressCode = keyReleaseCode = 0;
+ mousePressButton = mouseReleaseButton = 0;
+ touchPressedCount = touchReleasedCount = 0;
+ ignoreMouse = ignoreTouch = 0;
+ }
+
+ int keyPressCode, keyReleaseCode;
+ int mousePressButton, mouseReleaseButton;
+ int touchPressedCount, touchReleasedCount;
+
+ bool ignoreMouse, ignoreTouch;
+};
+
+void tst_QWindow::testInputEvents()
+{
+ InputTestWindow window;
+ window.setGeometry(80, 80, 40, 40);
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+
+ QWindowSystemInterface::handleKeyEvent(&window, QEvent::KeyPress, Qt::Key_A, Qt::NoModifier);
+ QWindowSystemInterface::handleKeyEvent(&window, QEvent::KeyRelease, Qt::Key_A, Qt::NoModifier);
+ QCoreApplication::processEvents();
+ QCOMPARE(window.keyPressCode, int(Qt::Key_A));
+ QCOMPARE(window.keyReleaseCode, int(Qt::Key_A));
+
+ QPointF local(12, 34);
+ QWindowSystemInterface::handleMouseEvent(&window, local, local, Qt::LeftButton);
+ QWindowSystemInterface::handleMouseEvent(&window, local, local, Qt::NoButton);
+ QCoreApplication::processEvents();
+ QCOMPARE(window.mousePressButton, int(Qt::LeftButton));
+ QCOMPARE(window.mouseReleaseButton, int(Qt::LeftButton));
+
+ QList<QWindowSystemInterface::TouchPoint> points;
+ QWindowSystemInterface::TouchPoint tp1, tp2;
+ tp1.id = 1;
+ tp1.state = Qt::TouchPointPressed;
+ tp1.area = QRect(10, 10, 4, 4);
+ tp2.id = 2;
+ tp2.state = Qt::TouchPointPressed;
+ tp2.area = QRect(20, 20, 4, 4);
+ points << tp1 << tp2;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ points[0].state = Qt::TouchPointReleased;
+ points[1].state = Qt::TouchPointReleased;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ QCoreApplication::processEvents();
+ QTRY_COMPARE(window.touchPressedCount, 2);
+ QTRY_COMPARE(window.touchReleasedCount, 2);
+}
+
+void tst_QWindow::touchToMouseTranslation()
+{
+ InputTestWindow window;
+ window.ignoreTouch = true;
+ window.setGeometry(80, 80, 40, 40);
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+
+ QList<QWindowSystemInterface::TouchPoint> points;
+ QWindowSystemInterface::TouchPoint tp1, tp2;
+ tp1.id = 1;
+ tp1.state = Qt::TouchPointPressed;
+ tp2.id = 2;
+ tp2.state = Qt::TouchPointPressed;
+ points << tp1 << tp2;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ points[0].state = Qt::TouchPointReleased;
+ points[1].state = Qt::TouchPointReleased;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ QCoreApplication::processEvents();
+
+ QTRY_COMPARE(window.mousePressButton, int(Qt::LeftButton));
+ QTRY_COMPARE(window.mouseReleaseButton, int(Qt::LeftButton));
+
+ window.mousePressButton = 0;
+ window.mouseReleaseButton = 0;
+
+ window.ignoreTouch = false;
+
+ points[0].state = Qt::TouchPointPressed;
+ points[1].state = Qt::TouchPointPressed;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ points[0].state = Qt::TouchPointReleased;
+ points[1].state = Qt::TouchPointReleased;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ QCoreApplication::processEvents();
+
+ // no new mouse events should be generated since the input window handles the touch events
+ QTRY_COMPARE(window.mousePressButton, 0);
+ QTRY_COMPARE(window.mouseReleaseButton, 0);
+
+ qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false);
+
+ window.ignoreTouch = true;
+ points[0].state = Qt::TouchPointPressed;
+ points[1].state = Qt::TouchPointPressed;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ points[0].state = Qt::TouchPointReleased;
+ points[1].state = Qt::TouchPointReleased;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ QCoreApplication::processEvents();
+
+ qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, true);
+
+ // mouse event synthesizing disabled
+ QTRY_COMPARE(window.mousePressButton, 0);
+ QTRY_COMPARE(window.mouseReleaseButton, 0);
+}
+
+void tst_QWindow::mouseToTouchTranslation()
+{
+ qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, true);
+
+ InputTestWindow window;
+ window.ignoreMouse = true;
+ window.setGeometry(80, 80, 40, 40);
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QCoreApplication::processEvents();
+
+ qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false);
+
+ QTRY_COMPARE(window.touchPressedCount, 1);
+ QTRY_COMPARE(window.touchReleasedCount, 1);
+
+ qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, true);
+
+ window.ignoreMouse = false;
+
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QCoreApplication::processEvents();
+
+ qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false);
+
+ // no new touch events should be generated since the input window handles the mouse events
+ QTRY_COMPARE(window.touchPressedCount, 1);
+ QTRY_COMPARE(window.touchReleasedCount, 1);
+
+ window.ignoreMouse = true;
+
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QCoreApplication::processEvents();
+
+ // touch event synthesis disabled
+ QTRY_COMPARE(window.touchPressedCount, 1);
+ QTRY_COMPARE(window.touchReleasedCount, 1);
+
+
+}
+
+void tst_QWindow::mouseToTouchLoop()
+{
+ // make sure there's no infinite loop when synthesizing both ways
+ qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, true);
+ qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, true);
+
+ InputTestWindow window;
+ window.ignoreMouse = true;
+ window.ignoreTouch = true;
+ window.setGeometry(80, 80, 40, 40);
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
+ QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QCoreApplication::processEvents();
+
+ qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false);
+ qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false);
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow);
diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
index 98a559af85..2c006b224e 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
+++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
index 7bc50efeeb..77bd22a676 100644
--- a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp b/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
index 37c1949dc2..1ebad41466 100644
--- a/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
+++ b/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
index e559556e58..e84cbb5c19 100644
--- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
+++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
index 49b1bfe661..00a393562a 100644
--- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp b/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
index f2e6021818..07ec8458af 100644
--- a/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
+++ b/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index c868e9fa39..d6511d4475 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -256,6 +256,8 @@ private slots:
void drawTextOutsideGuiThread();
+ void drawTextWithComplexBrush();
+
private:
void fillData();
void setPenColor(QPainter& p);
@@ -347,7 +349,7 @@ Q_DECLARE_METATYPE(QRegion)
tst_QPainter::tst_QPainter()
{
// QtTestCase sets this to false, but this turns off alpha pixmaps on Unix.
- QApplication::setDesktopSettingsAware(TRUE);
+ QApplication::setDesktopSettingsAware(true);
}
tst_QPainter::~tst_QPainter()
@@ -4305,6 +4307,28 @@ void tst_QPainter::drawTextOutsideGuiThread()
QCOMPARE(referenceRendering, t.rendering);
}
+void tst_QPainter::drawTextWithComplexBrush()
+{
+ QImage texture(10, 10, QImage::Format_ARGB32_Premultiplied);
+ texture.fill(Qt::red);
+
+ QImage image(100, 100, QImage::Format_ARGB32_Premultiplied);
+ image.fill(Qt::white);
+ QPainter p(&image);
+ QFont f = p.font();
+ f.setPixelSize(70);
+ p.setFont(f);
+
+ QBrush brush(Qt::white);
+ brush.setTextureImage(texture);
+ p.setPen(QPen(brush, 2));
+
+ p.drawText(10, 10, "Hello World");
+
+ int paintedPixels = getPaintedPixels(image, Qt::white);
+ QVERIFY(paintedPixels > 0);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"
diff --git a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
index 418c385717..4603d9d613 100644
--- a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
+++ b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -127,7 +127,7 @@ static QBitmap createSrcBitmap( int size, int border )
painter.drawRect( border, border, size, size2 );
painter.end();
if ( border > 0 ) {
- QBitmap mask( totalSize, totalSize, TRUE );
+ QBitmap mask( totalSize, totalSize, true );
QPainter painter;
painter.begin( &mask );
painter.setPen( QPen( Qt::color1, 1 ) );
@@ -171,7 +171,7 @@ int main( int argc, char **argv )
QBitmap src_tmp = createSrcBitmap( 32, 0 ).xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) );
src_tmp.resize( 32, 48 );
QBitmap src2 = src_tmp.xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) );
- QBitmap mask( 32, 48, TRUE );
+ QBitmap mask( 32, 48, true );
{
QPainter painter;
painter.begin( &mask );
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
index c54ffb358e..5d48113aa8 100644
--- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp b/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
index b5d6c231bd..371a142cc3 100644
--- a/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
+++ b/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpathclipper/pathcompare.h b/tests/auto/gui/painting/qpathclipper/pathcompare.h
index d80c189665..bb4c00222a 100644
--- a/tests/auto/gui/painting/qpathclipper/pathcompare.h
+++ b/tests/auto/gui/painting/qpathclipper/pathcompare.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpathclipper/paths.cpp b/tests/auto/gui/painting/qpathclipper/paths.cpp
index 950c34614e..f4e63a200f 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.cpp
+++ b/tests/auto/gui/painting/qpathclipper/paths.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpathclipper/paths.h b/tests/auto/gui/painting/qpathclipper/paths.h
index 89ef785857..e270574304 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.h
+++ b/tests/auto/gui/painting/qpathclipper/paths.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
index 1fa279dbc7..1e6bb20614 100644
--- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qpen/tst_qpen.cpp b/tests/auto/gui/painting/qpen/tst_qpen.cpp
index eeb5aae96d..3da7294e9a 100644
--- a/tests/auto/gui/painting/qpen/tst_qpen.cpp
+++ b/tests/auto/gui/painting/qpen/tst_qpen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -117,22 +117,22 @@ void tst_QPen::operator_eq_eq_data()
QTest::newRow("differentColor") << QPen(Qt::red)
<< QPen(Qt::blue)
- << bool(FALSE);
+ << false;
QTest::newRow("differentWidth") << QPen(Qt::red, 2)
<< QPen(Qt::red, 3)
- << bool(FALSE);
+ << false;
QTest::newRow("differentPenStyle") << QPen(Qt::red, 2, Qt::DashLine)
<< QPen(Qt::red, 2, Qt::DotLine)
- << bool(FALSE);
+ << false;
QTest::newRow("differentCapStyle") << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin)
<< QPen(Qt::red, 2, Qt::DashLine, Qt::SquareCap, Qt::BevelJoin)
- << bool(FALSE);
+ << false;
QTest::newRow("differentJoinStyle") << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin)
<< QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::MiterJoin)
- << bool(FALSE);
+ << false;
QTest::newRow("same") << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin)
<< QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin)
- << bool(TRUE);
+ << true;
}
diff --git a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
index 8d0bed6128..46a8f80f23 100644
--- a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
+++ b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -76,7 +76,7 @@ void tst_QPolygon::makeEllipse()
int i;
// make sure that all points are R+-1 away from the center
- bool err = FALSE;
+ bool err = false;
for (i = 1; i < pa.size(); i++) {
QPoint p = pa.at( i );
double r = sqrt( pow( double(p.x() - R), 2.0 ) + pow( double(p.y() - R), 2.0 ) );
diff --git a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
index 88c2a3ee9b..dd33030d7e 100644
--- a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
+++ b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -191,7 +191,6 @@ void tst_QPrinter::getSetCheck()
obj1.setPageSize(QPrinter::PageSize(QPrinter::A4));
QCOMPARE(QPrinter::PageSize(QPrinter::A4), obj1.pageSize());
obj1.setPageSize(QPrinter::PageSize(QPrinter::Letter));
- QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort);
QCOMPARE(QPrinter::PageSize(QPrinter::Letter), obj1.pageSize());
obj1.setPageSize(QPrinter::PageSize(QPrinter::Legal));
QCOMPARE(QPrinter::PageSize(QPrinter::Legal), obj1.pageSize());
@@ -316,25 +315,25 @@ void tst_QPrinter::testSetOptions()
QPrintDialog dlg(&prn);
// Verify default values
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), TRUE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), FALSE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), TRUE);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), true);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), false);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), true);
dlg.setEnabledOptions(QAbstractPrintDialog::PrintPageRange);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), FALSE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), FALSE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), TRUE);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), false);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), false);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), true);
dlg.setEnabledOptions((QAbstractPrintDialog::PrintDialogOptions(QAbstractPrintDialog::PrintSelection
| QAbstractPrintDialog::PrintPageRange)));
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), FALSE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), TRUE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), TRUE);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), false);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), true);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), true);
dlg.setEnabledOptions(QAbstractPrintDialog::PrintSelection);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), FALSE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), TRUE);
- MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), FALSE);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintToFile), false);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintSelection), true);
+ MYCOMPARE(dlg.isOptionEnabled(QAbstractPrintDialog::PrintPageRange), false);
}
void tst_QPrinter::testMargins_data()
@@ -517,7 +516,6 @@ void tst_QPrinter::setGetPaperSize()
p.setOutputFormat(QPrinter::PdfFormat);
QSizeF size(500, 10);
p.setPaperSize(size, QPrinter::Millimeter);
- QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort);
QCOMPARE(p.paperSize(QPrinter::Millimeter), size);
QSizeF ptSize = p.paperSize(QPrinter::Point);
//qDebug() << ptSize;
@@ -760,7 +758,6 @@ void tst_QPrinter::valuePreservation()
printer.setPageSize(QPrinter::B5);
printer.setOutputFormat(newFormat);
- QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort);
QCOMPARE(printer.pageSize(), QPrinter::B5);
printer.setOutputFormat(oldFormat);
QCOMPARE(printer.pageSize(), QPrinter::B5);
@@ -881,7 +878,6 @@ void tst_QPrinter::testCustomPageSizes()
p.setPaperSize(customSize, QPrinter::Inch);
QSizeF paperSize = p.paperSize(QPrinter::Inch);
- QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort);
QCOMPARE(paperSize, customSize);
QPrinter p2(QPrinter::HighResolution);
@@ -975,7 +971,8 @@ void tst_QPrinter::testPdfTitle()
QPainter painter;
QPrinter printer;
// This string is just the UTF-8 encoding of the string: \()f &oslash; hiragana o
- const char title[]={0x5c, 0x28, 0x29, 0x66, 0xc3, 0xb8, 0xe3, 0x81, 0x8a, 0x00};
+ const unsigned char titleBuf[]={0x5c, 0x28, 0x29, 0x66, 0xc3, 0xb8, 0xe3, 0x81, 0x8a, 0x00};
+ const char *title = reinterpret_cast<const char*>(titleBuf);
printer.setOutputFileName("file.pdf");
printer.setDocName(QString::fromUtf8(title));
painter.begin(&printer);
@@ -986,10 +983,11 @@ void tst_QPrinter::testPdfTitle()
// The we expect the title to appear in the PDF as:
// ASCII('\title (') UTF16(\\\(\)f &oslash; hiragana o) ASCII(')').
// which has the following binary representation
- const char expected[] = {
+ const unsigned char expectedBuf[] = {
0x2f, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x28, 0xfe,
0xff, 0x00, 0x5c, 0x5c, 0x00, 0x5c, 0x28, 0x00, 0x5c,
0x29, 0x00, 0x66, 0x00, 0xf8, 0x30, 0x4a, 0x29};
+ const char *expected = reinterpret_cast<const char*>(expectedBuf);
QVERIFY(file.readAll().contains(QByteArray(expected, 26)));
}
diff --git a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
index 04d148cdc4..6ffdc63e6c 100644
--- a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
+++ b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp
index 299710f56a..c9ad8e00ab 100644
--- a/tests/auto/gui/painting/qregion/tst_qregion.cpp
+++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
index 6d0b88dcd7..b4e1b8ffb8 100644
--- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
index 7a5c96ab6b..725c374708 100644
--- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
+++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index aa3e70a047..357b7359e4 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,6 +50,8 @@
#include <QtTest/QtTest>
+#include <QSignalSpy>
+
class tst_QOpenGL : public QObject
{
Q_OBJECT
@@ -62,6 +64,7 @@ private slots:
void fboRendering();
void fboHandleNulledAfterContextDestroyed();
void openGLPaintDevice();
+ void aboutToBeDestroyed();
};
struct SharedResourceTracker
@@ -500,5 +503,24 @@ void tst_QOpenGL::openGLPaintDevice()
QCOMPARE(image, fbo.toImage().convertToFormat(QImage::Format_RGB32));
}
+void tst_QOpenGL::aboutToBeDestroyed()
+{
+ QWindow window;
+ window.setGeometry(0, 0, 128, 128);
+ window.create();
+
+ QOpenGLContext *context = new QOpenGLContext;
+ QSignalSpy spy(context, SIGNAL(aboutToBeDestroyed()));
+
+ context->create();
+ context->makeCurrent(&window);
+
+ QCOMPARE(spy.size(), 0);
+
+ delete context;
+
+ QCOMPARE(spy.size(), 1);
+}
+
QTEST_MAIN(tst_QOpenGL)
#include "tst_qopengl.moc"
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
index b296a56b38..d6fff734c0 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 29dcfcd542..4f1deec996 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 406bdf950e..c3d41a27bf 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index bf84b91024..e7bbfbceff 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index a4bc8458b3..bc858bf38a 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
index 256ea20a1c..a4e5c63e6d 100644
--- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro
index 3b5e2b1046..149ad6442e 100644
--- a/tests/auto/gui/text/qrawfont/qrawfont.pro
+++ b/tests/auto/gui/text/qrawfont/qrawfont.pro
@@ -8,8 +8,4 @@ SOURCES += \
INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
-wince* {
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA += testfont_bold_italic.ttf testfont.ttf
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index f922ba3572..a0cda39c27 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,6 +40,7 @@
****************************************************************************/
#include <QtTest/QtTest>
+#include <QtGui/QFontDatabase>
#include <qrawfont.h>
#include <private/qrawfont_p.h>
@@ -50,6 +51,7 @@ class tst_QRawFont: public QObject
#if !defined(QT_NO_RAWFONT)
private slots:
void init();
+ void initTestCase();
void invalidRawFont();
@@ -99,7 +101,9 @@ private slots:
#if defined(Q_WS_X11) || defined(Q_WS_MAC)
void multipleRawFontsFromData();
#endif
-
+private:
+ QString testFont;
+ QString testFontBoldItalic;
#endif // QT_NO_RAWFONT
};
@@ -113,6 +117,18 @@ void tst_QRawFont::init()
{
}
+void tst_QRawFont::initTestCase()
+{
+ testFont = QFINDTESTDATA("testfont.ttf");
+ testFontBoldItalic = QFINDTESTDATA("testfont_bold_italic.ttf");
+ if (testFont.isEmpty() || testFontBoldItalic.isEmpty())
+ QFAIL("qrawfont unittest font files not found!");
+
+ QFontDatabase database;
+ if (database.families().count() == 0)
+ QSKIP("No fonts available!!!");
+}
+
void tst_QRawFont::invalidRawFont()
{
QRawFont font;
@@ -140,7 +156,7 @@ void tst_QRawFont::explicitRawFontNotLoadedInDatabase()
{
QFETCH(QFont::HintingPreference, hintingPreference);
- QRawFont font(QLatin1String(SRCDIR "testfont.ttf"), 10, hintingPreference);
+ QRawFont font(testFont, 10, hintingPreference);
QVERIFY(font.isValid());
QVERIFY(!QFontDatabase().families().contains(font.familyName()));
@@ -160,7 +176,7 @@ void tst_QRawFont::explicitRawFontNotAvailableInSystem()
{
QFETCH(QFont::HintingPreference, hintingPreference);
- QRawFont rawfont(QLatin1String(SRCDIR "testfont.ttf"), 10, hintingPreference);
+ QRawFont rawfont(testFont, 10, hintingPreference);
{
QFont font(rawfont.familyName(), 10);
@@ -190,7 +206,7 @@ void tst_QRawFont::correctFontData_data()
int *hintingPreference = hintingPreferences;
while (*hintingPreference >= 0) {
- QString fileName = QLatin1String(SRCDIR "testfont.ttf");
+ QString fileName = testFont;
QString title = fileName
+ QLatin1String(": hintingPreference=")
+ QString::number(*hintingPreference);
@@ -204,7 +220,7 @@ void tst_QRawFont::correctFontData_data()
<< 1000.0
<< 10.0;
- fileName = QLatin1String(SRCDIR "testfont_bold_italic.ttf");
+ fileName = testFontBoldItalic;
title = fileName
+ QLatin1String(": hintingPreference=")
+ QString::number(*hintingPreference);
@@ -245,7 +261,7 @@ void tst_QRawFont::correctFontData()
void tst_QRawFont::glyphIndices()
{
- QRawFont font(QLatin1String(SRCDIR "testfont.ttf"), 10);
+ QRawFont font(testFont, 10);
QVERIFY(font.isValid());
QVector<quint32> glyphIndices = font.glyphIndexesForString(QLatin1String("Foobar"));
@@ -269,7 +285,7 @@ void tst_QRawFont::advances()
{
QFETCH(QFont::HintingPreference, hintingPreference);
- QRawFont font(QLatin1String(SRCDIR "testfont.ttf"), 10, hintingPreference);
+ QRawFont font(testFont, 10, hintingPreference);
QVERIFY(font.isValid());
QRawFontPrivate *font_d = QRawFontPrivate::get(font);
@@ -292,7 +308,7 @@ void tst_QRawFont::advances()
void tst_QRawFont::textLayout()
{
QFontDatabase fontDatabase;
- int id = fontDatabase.addApplicationFont(SRCDIR "testfont.ttf");
+ int id = fontDatabase.addApplicationFont(testFont);
QVERIFY(id >= 0);
QString familyName = QString::fromLatin1("QtBidiTestFont");
@@ -371,7 +387,7 @@ void tst_QRawFont::fontTable()
QFETCH(int, offset);
QFETCH(quint32, expectedValue);
- QRawFont font(QString::fromLatin1(SRCDIR "testfont.ttf"), 10, hintingPreference);
+ QRawFont font(testFont, 10, hintingPreference);
QVERIFY(font.isValid());
QByteArray table = font.fontTable(tagName);
@@ -396,7 +412,7 @@ void tst_QRawFont::supportedWritingSystems_data()
QTest::newRow(qPrintable(QString::fromLatin1("testfont.ttf, hintingPreference=%1")
.arg(hintingPreference)))
- << QString::fromLatin1(SRCDIR "testfont.ttf")
+ << testFont
<< (QList<QFontDatabase::WritingSystem>()
<< QFontDatabase::Latin
<< QFontDatabase::Hebrew
@@ -405,7 +421,7 @@ void tst_QRawFont::supportedWritingSystems_data()
QTest::newRow(qPrintable(QString::fromLatin1("testfont_bold_italic.ttf, hintingPreference=%1")
.arg(hintingPreference)))
- << QString::fromLatin1(SRCDIR "testfont_bold_italic.ttf")
+ << testFontBoldItalic
<< (QList<QFontDatabase::WritingSystem>()
<< QFontDatabase::Latin
<< QFontDatabase::Hebrew
@@ -439,8 +455,8 @@ void tst_QRawFont::supportsCharacter_data()
QTest::addColumn<bool>("shouldBeSupported");
const char *fileNames[2] = {
- SRCDIR "testfont.ttf",
- SRCDIR "testfont_bold_italic.ttf"
+ "testfont.ttf",
+ "testfont_bold_italic.ttf"
};
for (int hintingPreference=QFont::PreferDefaultHinting;
@@ -448,7 +464,7 @@ void tst_QRawFont::supportsCharacter_data()
++hintingPreference) {
for (int i=0; i<2; ++i) {
- QString fileName = QLatin1String(fileNames[i]);
+ QString fileName = QFINDTESTDATA(fileNames[i]);
// Latin text
for (char ch='!'; ch<='~'; ++ch) {
@@ -510,7 +526,7 @@ void tst_QRawFont::supportsUcs4Character_data()
++hintingPreference) {
for (quint32 ch=0x10330; ch<=0x1034A; ++ch) {
{
- QString fileName = QString::fromLatin1(SRCDIR "testfont.ttf");
+ QString fileName = testFont;
QString title = QString::fromLatin1("%1, character=0x%2, hintingPreference=%3")
.arg(fileName).arg(QString::number(ch, 16)).arg(hintingPreference);
@@ -522,7 +538,7 @@ void tst_QRawFont::supportsUcs4Character_data()
}
{
- QString fileName = QString::fromLatin1(SRCDIR "testfont_bold_italic.ttf");
+ QString fileName = testFontBoldItalic;
QString title = QString::fromLatin1("%1, character=0x%2, hintingPreference=%3")
.arg(fileName).arg(QString::number(ch, 16)).arg(hintingPreference);
@@ -560,7 +576,7 @@ void tst_QRawFont::fromFont_data()
QString titleBase = QString::fromLatin1("%2, hintingPreference=%1, writingSystem=%3")
.arg(i);
{
- QString fileName = QString::fromLatin1(SRCDIR "testfont.ttf");
+ QString fileName = testFont;
QFontDatabase::WritingSystem writingSystem = QFontDatabase::Any;
QString title = titleBase.arg(fileName).arg(writingSystem);
@@ -572,7 +588,7 @@ void tst_QRawFont::fromFont_data()
}
{
- QString fileName = QString::fromLatin1(SRCDIR "testfont.ttf");
+ QString fileName = testFont;
QFontDatabase::WritingSystem writingSystem = QFontDatabase::Hebrew;
QString title = titleBase.arg(fileName).arg(writingSystem);
@@ -584,7 +600,7 @@ void tst_QRawFont::fromFont_data()
}
{
- QString fileName = QString::fromLatin1(SRCDIR "testfont.ttf");
+ QString fileName = testFont;
QFontDatabase::WritingSystem writingSystem = QFontDatabase::Latin;
QString title = titleBase.arg(fileName).arg(writingSystem);
@@ -644,7 +660,7 @@ void tst_QRawFont::copyConstructor()
QRawFont outerRawFont;
{
- QRawFont rawFont(QString::fromLatin1(SRCDIR "testfont.ttf"), 11, hintingPreference);
+ QRawFont rawFont(testFont, 11, hintingPreference);
QVERIFY(rawFont.isValid());
rawFontFamilyName = rawFont.familyName();
@@ -712,7 +728,7 @@ void tst_QRawFont::detach()
QRawFont outerRawFont;
{
- QRawFont rawFont(QString::fromLatin1(SRCDIR "testfont.ttf"), 11, hintingPreference);
+ QRawFont rawFont(testFont, 11, hintingPreference);
QVERIFY(rawFont.isValid());
rawFontFamilyName = rawFont.familyName();
@@ -725,8 +741,7 @@ void tst_QRawFont::detach()
{
QRawFont otherRawFont(rawFont);
- otherRawFont.loadFromFile(QLatin1String(SRCDIR "testfont.ttf"),
- rawFontPixelSize, hintingPreference);
+ otherRawFont.loadFromFile(testFont, rawFontPixelSize, hintingPreference);
QVERIFY(otherRawFont.isValid());
QCOMPARE(otherRawFont.pixelSize(), rawFontPixelSize);
@@ -740,8 +755,7 @@ void tst_QRawFont::detach()
{
QRawFont otherRawFont = rawFont;
- otherRawFont.loadFromFile(QLatin1String(SRCDIR "testfont.ttf"),
- rawFontPixelSize, hintingPreference);
+ otherRawFont.loadFromFile(testFont, rawFontPixelSize, hintingPreference);
QVERIFY(otherRawFont.isValid());
QCOMPARE(otherRawFont.pixelSize(), rawFontPixelSize);
@@ -754,8 +768,7 @@ void tst_QRawFont::detach()
outerRawFont = rawFont;
- rawFont.loadFromFile(QLatin1String(SRCDIR "testfont.ttf"), rawFontPixelSize,
- hintingPreference);
+ rawFont.loadFromFile(testFont, rawFontPixelSize, hintingPreference);
}
QVERIFY(outerRawFont.isValid());
@@ -783,7 +796,7 @@ void tst_QRawFont::unsupportedWritingSystem()
QFETCH(QFont::HintingPreference, hintingPreference);
QFontDatabase fontDatabase;
- int id = fontDatabase.addApplicationFont(QLatin1String(SRCDIR "testfont.ttf"));
+ int id = fontDatabase.addApplicationFont(testFont);
QFont font("QtBidiTestFont");
font.setHintingPreference(hintingPreference);
@@ -857,13 +870,13 @@ void tst_QRawFont::rawFontSetPixelSize()
#if defined(Q_WS_X11) || defined(Q_WS_MAC)
void tst_QRawFont::multipleRawFontsFromData()
{
- QFile file(QString::fromLatin1(SRCDIR "testfont.ttf"));
+ QFile file(testFont);
QRawFont testFont;
if (file.open(QIODevice::ReadOnly)) {
testFont.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting);
file.close();
}
- file.setFileName(QLatin1String(SRCDIR "testfont_bold_italic.ttf"));
+ file.setFileName(testFontBoldItalic);
QRawFont testFontBoldItalic;
if (file.open(QIODevice::ReadOnly))
testFontBoldItalic.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting);
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index 05854440c6..b0a66eab07 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
index bbc60df9d4..0358b5d471 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
+++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
index 190262f4ef..9489a2e90e 100644
--- a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
+++ b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
index 9667df73bb..09b9a06a1d 100644
--- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -872,27 +872,147 @@ void tst_QTextCursor::tableMovement()
void tst_QTextCursor::selectionsInTable()
{
- QTextTable *table = cursor.insertTable(2, 2);
- table->cellAt(0, 0).firstCursorPosition().insertText("First");
- table->cellAt(0, 1).firstCursorPosition().insertText("Second");
- table->cellAt(1, 0).firstCursorPosition().insertText("Third");
- table->cellAt(1, 1).firstCursorPosition().insertText("Fourth");
+ QTextTable *table = cursor.insertTable(3, 3);
+ table->cellAt(0, 0).firstCursorPosition().insertText("A a"); // first = 1
+ table->cellAt(0, 1).firstCursorPosition().insertText("B b"); // first = 5
+ table->cellAt(0, 2).firstCursorPosition().insertText("C c"); // first = 9
+ table->cellAt(1, 0).firstCursorPosition().insertText("D d"); // first = 13
+ table->cellAt(1, 1).firstCursorPosition().insertText("E e"); // first = 17
+ table->cellAt(1, 2).firstCursorPosition().insertText("F f"); // first = 21
+ table->cellAt(2, 0).firstCursorPosition().insertText("G g"); // first = 25
+ table->cellAt(2, 1).firstCursorPosition().insertText("H h"); // first = 29
+ table->cellAt(2, 2).firstCursorPosition().insertText("I i"); // first = 33
cursor = table->cellAt(0, 0).lastCursorPosition();
+ QCOMPARE(cursor.position(), 4);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor) == false);
+ QCOMPARE(cursor.position(), 1);
cursor = table->cellAt(1, 0).lastCursorPosition();
+ QCOMPARE(cursor.position(), 16);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor) == false);
+ QCOMPARE(cursor.position(), 13);
- cursor = table->cellAt(0, 1).firstCursorPosition();
+ cursor = table->cellAt(0, 2).firstCursorPosition();
+ QVERIFY(cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor) == false);
- cursor = table->cellAt(1, 1).firstCursorPosition();
+ cursor = table->cellAt(1, 2).firstCursorPosition();
+ QVERIFY(cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor));
QVERIFY(cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor) == false);
+
+ // Next let's test selecting entire cells one at a time
+ cursor = table->cellAt(0, 0).firstCursorPosition();
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 9);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 13);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 17);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 21);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 25);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 29);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 33);
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor) == false);
+
+ // And now lets walk all the way back
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 29);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 25);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 21);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 17);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 13);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 9);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 1);
+ QVERIFY(cursor.movePosition(QTextCursor::PreviousCell, QTextCursor::KeepAnchor) == false);
+
+ QTextCursor::MoveOperation leftMovements[5] = {
+ QTextCursor::PreviousBlock
+ , QTextCursor::PreviousCharacter
+ , QTextCursor::PreviousWord
+ , QTextCursor::Left
+ , QTextCursor::WordLeft
+ };
+
+ QTextCursor::MoveOperation rightMovements[5] = {
+ QTextCursor::NextBlock
+ , QTextCursor::NextCharacter
+ , QTextCursor::NextWord
+ , QTextCursor::Right
+ , QTextCursor::WordRight
+ };
+
+ for (int i = 0; i < 5; ++i) {
+ QTextCursor::MoveOperation left = leftMovements[i];
+ QTextCursor::MoveOperation right = rightMovements[i];
+
+ // Lets walk circle around anchor placed at 1,1 using up, down, left and right
+ cursor = table->cellAt(1, 1).firstCursorPosition();
+ QCOMPARE(cursor.position(), 17);
+ QVERIFY(cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 18); // First right should not jump more than one char
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 21); // Lets jump to the next cell
+ QVERIFY(cursor.movePosition(QTextCursor::Down, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 33);
+ QVERIFY(cursor.movePosition(left, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 29);
+ QVERIFY(cursor.movePosition(left, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 25);
+ QVERIFY(cursor.movePosition(QTextCursor::Up, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 13);
+ QVERIFY(cursor.movePosition(QTextCursor::Up, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 1);
+ QVERIFY(cursor.movePosition(right, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5);
+ QVERIFY(cursor.movePosition(right, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 9);
+ QVERIFY(cursor.movePosition(QTextCursor::Down, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 21);
+
+ // Lets walk to the side 2 cells and back, first right
+ cursor = table->cellAt(0, 0).firstCursorPosition();
+ QVERIFY(cursor.movePosition(QTextCursor::NextCell, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5); // Lets jump to the next cell
+ QVERIFY(cursor.movePosition(right, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 9);
+ QVERIFY(cursor.movePosition(left, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5);
+ QVERIFY(cursor.movePosition(left, QTextCursor::KeepAnchor));
+ QVERIFY(cursor.position() < 5);
+
+ // Then left
+ cursor = table->cellAt(0, 2).firstCursorPosition();
+ QCOMPARE(cursor.position(), 9);
+ QVERIFY(cursor.movePosition(left, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5); // A single left should do
+ QVERIFY(cursor.movePosition(left, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 1);
+ QVERIFY(cursor.movePosition(right, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 5);
+ QVERIFY(cursor.movePosition(right, QTextCursor::KeepAnchor));
+ QCOMPARE(cursor.position(), 9);
+ }
}
void tst_QTextCursor::selectedText()
diff --git a/tests/auto/gui/text/qtextdocument/common.h b/tests/auto/gui/text/qtextdocument/common.h
index 1eaefdbfbe..081c71ea13 100644
--- a/tests/auto/gui/text/qtextdocument/common.h
+++ b/tests/auto/gui/text/qtextdocument/common.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index a9295ffbdb..a84024ceab 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 7b4c1f9804..63a67a0c10 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
index ae31936e63..91da86d3d1 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
index 1d69bc2c1d..166b5d7c82 100644
--- a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -63,6 +63,8 @@ private slots:
void testUnderlinePropertyPrecedence();
void toFormat();
void resolveFont();
+ void testLetterSpacing();
+ void testFontStretch();
void getSetTabs();
void testTabsUsed();
void testFontStyleSetters();
@@ -277,6 +279,41 @@ void tst_QTextFormat::resolveFont()
QVERIFY(fmt.font().strikeOut());
}
+
+void tst_QTextFormat::testLetterSpacing()
+{
+ QTextCharFormat format;
+
+ QCOMPARE(format.hasProperty(QTextFormat::FontLetterSpacing), false);
+ QCOMPARE(format.hasProperty(QTextFormat::FontAbsoluteLetterSpacing), false);
+
+ format.setFontAbsoluteLetterSpacing(10.0);
+
+ QCOMPARE(format.hasProperty(QTextFormat::FontLetterSpacing), false);
+ QCOMPARE(format.property(QTextFormat::FontAbsoluteLetterSpacing).toDouble(), 10.0);
+
+ format.setFontLetterSpacing(110.0);
+
+ QCOMPARE(format.property(QTextFormat::FontLetterSpacing).toDouble(), 110.0);
+ QCOMPARE(format.hasProperty(QTextFormat::FontAbsoluteLetterSpacing), false);
+
+ format.setFontAbsoluteLetterSpacing(10.0);
+
+ QCOMPARE(format.hasProperty(QTextFormat::FontLetterSpacing), false);
+ QCOMPARE(format.property(QTextFormat::FontAbsoluteLetterSpacing).toDouble(), 10.0);
+}
+
+void tst_QTextFormat::testFontStretch()
+{
+ QTextCharFormat format;
+
+ QCOMPARE(format.hasProperty(QTextFormat::FontStretch), false);
+
+ format.setFontStretch(130.0);
+
+ QCOMPARE(format.property(QTextFormat::FontStretch).toInt(), 130);
+}
+
void tst_QTextFormat::getSetTabs()
{
class Comparator {
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index 253211bbe9..e816b04153 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
index 8b4317f52b..810c416875 100644
--- a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
+++ b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
index 15e50a5a54..b621763cea 100644
--- a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
+++ b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
index 01abf636c9..49d86a2c4b 100644
--- a/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
+++ b/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp b/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
index 2f4ca7282a..b74bc3daf8 100644
--- a/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
+++ b/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
index 06caa34b4d..5bb13232ca 100644
--- a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 487ef96405..638f13aea2 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
index fcafa51c90..b4ecdf1f39 100644
--- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/text/qzip/tst_qzip.cpp b/tests/auto/gui/text/qzip/tst_qzip.cpp
index 7d7f412648..d68cb2e2dc 100644
--- a/tests/auto/gui/text/qzip/tst_qzip.cpp
+++ b/tests/auto/gui/text/qzip/tst_qzip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index d354e18fe4..cfaafb37f4 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 5cf32d32b1..bd3539c797 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/access.pro b/tests/auto/network/access/access.pro
index 53b16f07b8..1e98d3cf85 100644
--- a/tests/auto/network/access/access.pro
+++ b/tests/auto/network/access/access.pro
@@ -8,13 +8,11 @@ SUBDIRS=\
qhttpnetworkconnection \
qnetworkreply \
qnetworkcachemetadata \
- qftp \
qhttpnetworkreply \
- qhttp \
qabstractnetworkcache \
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
qhttpnetworkconnection \
qhttpnetworkreply \
-
+ qftp \
diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
index 59a9c559c0..94de4704fb 100644
--- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
+++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -85,7 +85,7 @@ private slots:
void deleteCache();
private:
- void check();
+ void runTest();
void checkSynchronous();
#ifndef QT_NO_BEARERMANAGEMENT
@@ -174,7 +174,7 @@ void tst_QAbstractNetworkCache::expires_data()
void tst_QAbstractNetworkCache::expires()
{
- check();
+ runTest();
}
void tst_QAbstractNetworkCache::expiresSynchronous_data()
@@ -206,7 +206,7 @@ void tst_QAbstractNetworkCache::lastModified_data()
void tst_QAbstractNetworkCache::lastModified()
{
- check();
+ runTest();
}
void tst_QAbstractNetworkCache::lastModifiedSynchronous_data()
@@ -238,7 +238,7 @@ void tst_QAbstractNetworkCache::etag_data()
void tst_QAbstractNetworkCache::etag()
{
- check();
+ runTest();
}
void tst_QAbstractNetworkCache::etagSynchronous_data()
@@ -279,7 +279,7 @@ void tst_QAbstractNetworkCache::cacheControl_data()
void tst_QAbstractNetworkCache::cacheControl()
{
- check();
+ runTest();
}
void tst_QAbstractNetworkCache::cacheControlSynchronous_data()
@@ -292,7 +292,7 @@ void tst_QAbstractNetworkCache::cacheControlSynchronous()
checkSynchronous();
}
-void tst_QAbstractNetworkCache::check()
+void tst_QAbstractNetworkCache::runTest()
{
QFETCH(QNetworkRequest::CacheLoadControl, cacheLoadControl);
QFETCH(QString, url);
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index 2e484d5bb5..35abd68415 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,7 @@
#include <qcoreapplication.h>
#include <qfile.h>
#include <qbuffer.h>
-#include "qftp.h"
+#include "private/qftp_p.h"
#include <qmap.h>
#include <time.h>
#include <stdlib.h>
@@ -278,7 +278,7 @@ void tst_QFtp::init()
bytesAvailable_finished = 1234567890;
bytesAvailable_done = 1234567890;
- inFileDirExistsFunction = FALSE;
+ inFileDirExistsFunction = false;
#if !defined(Q_OS_WINCE)
srand(time(0));
@@ -435,12 +435,12 @@ void tst_QFtp::close_data()
QTest::addColumn<QString>("password");
QTest::addColumn<bool>("login");
- QTest::newRow( "login01" ) << QtNetworkSettings::serverName() << (uint)21 << QString() << QString() << (bool)TRUE;
- QTest::newRow( "login02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString() << (bool)TRUE;
- QTest::newRow( "login03" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString("foo") << (bool)TRUE;
- QTest::newRow( "login04" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftptest") << QString("password") << (bool)TRUE;
+ QTest::newRow( "login01" ) << QtNetworkSettings::serverName() << (uint)21 << QString() << QString() << true;
+ QTest::newRow( "login02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString() << true;
+ QTest::newRow( "login03" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString("foo") << true;
+ QTest::newRow( "login04" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftptest") << QString("password") << true;
- QTest::newRow( "no-login01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("") << QString("") << (bool)FALSE;
+ QTest::newRow( "no-login01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("") << QString("") << false;
}
void tst_QFtp::close()
@@ -1963,12 +1963,12 @@ bool tst_QFtp::fileExists( const QString &host, quint16 port, const QString &use
// ### make these tests work
if (ftp->currentId() != 0) {
qWarning("ftp->currentId() != 0");
- return FALSE;
+ return false;
}
if (ftp->state() != QFtp::Unconnected) {
qWarning("ftp->state() != QFtp::Unconnected");
- return FALSE;
+ return false;
}
addCommand( QFtp::ConnectToHost, ftp->connectToHost( host, port ) );
@@ -1978,39 +1978,39 @@ bool tst_QFtp::fileExists( const QString &host, quint16 port, const QString &use
addCommand( QFtp::List, ftp->list( file ) );
addCommand( QFtp::Close, ftp->close() );
- inFileDirExistsFunction = TRUE;
+ inFileDirExistsFunction = true;
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
ftp = 0;
if ( QTestEventLoop::instance().timeout() ) {
// ### make this test work
qWarning("tst_QFtp::fileExists: Network operation timed out");
- return FALSE;
+ return false;
}
- inFileDirExistsFunction = FALSE;
+ inFileDirExistsFunction = false;
ResMapIt it = resultMap.find( QFtp::ConnectToHost );
// ### make these tests work
if (it == resultMap.end()) {
qWarning("it != resultMap.end()");
- return FALSE;
+ return false;
}
if (it.value().success == -1) {
qWarning("it.value().success != -1");
- return FALSE;
+ return false;
}
if ( it.value().success == 1 ) {
for ( uint i=0; i < (uint) listInfo_i.count(); i++ ) {
if ( QFileInfo(listInfo_i[i].name()).fileName() == QFileInfo(file).fileName() )
- return TRUE;
+ return true;
}
}
//this is not a good warning considering sometime this function is used to test that a file does not exist
//qWarning("file doesn't exist");
- return FALSE;
+ return false;
}
bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user, const QString &password, const QString &cdDir, const QString &dirToCreate )
@@ -2029,7 +2029,7 @@ bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user
addCommand( QFtp::Cd, ftp->cd( cdDir + "/" + dirToCreate ) );
addCommand( QFtp::Close, ftp->close() );
- inFileDirExistsFunction = TRUE;
+ inFileDirExistsFunction = true;
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
ftp = 0;
@@ -2037,9 +2037,9 @@ bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user
// ### make this test work
// QFAIL( "Network operation timed out" );
qWarning("tst_QFtp::dirExists: Network operation timed out");
- return FALSE;
+ return false;
}
- inFileDirExistsFunction = FALSE;
+ inFileDirExistsFunction = false;
ResMapIt it = resultMap.find( QFtp::Cd );
// ### make these tests work
diff --git a/tests/auto/network/access/qhttp/.gitattributes b/tests/auto/network/access/qhttp/.gitattributes
deleted file mode 100644
index e04709aa2e..0000000000
--- a/tests/auto/network/access/qhttp/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-rfc3252.txt -crlf
diff --git a/tests/auto/network/access/qhttp/.gitignore b/tests/auto/network/access/qhttp/.gitignore
deleted file mode 100644
index 00c1f492cd..0000000000
--- a/tests/auto/network/access/qhttp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-tst_qhttp
diff --git a/tests/auto/network/access/qhttp/dummyserver.h b/tests/auto/network/access/qhttp/dummyserver.h
deleted file mode 100644
index 7c14ae2f14..0000000000
--- a/tests/auto/network/access/qhttp/dummyserver.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-// Use if you need
-
-class DummyHttpServer : public QTcpServer
-{
- Q_OBJECT
-public:
- DummyHttpServer() : phase(Header)
- { listen(); }
-
-protected:
- enum {
- Header,
- Data1,
- Data2,
- Close
- } phase;
- void incomingConnection(int socketDescriptor)
- {
- QSslSocket *socket = new QSslSocket(this);
- socket->setSocketDescriptor(socketDescriptor, QAbstractSocket::ConnectedState);
- socket->ignoreSslErrors();
- socket->startServerEncryption();
- connect(socket, SIGNAL(readyRead()), SLOT(handleReadyRead()));
- }
-
-public slots:
- void handleReadyRead()
- {
- QTcpSocket *socket = static_cast<QTcpSocket *>(sender());
- socket->readAll();
- if (phase != Header)
- return;
-
- phase = Data1;
- static const char header[] =
- "HTTP/1.0 200 OK\r\n"
- "Date: Fri, 07 Sep 2007 12:33:18 GMT\r\n"
- "Server: Apache\r\n"
- "Expires:\r\n"
- "Cache-Control:\r\n"
- "Pragma:\r\n"
- "Last-Modified: Thu, 06 Sep 2007 08:52:06 +0000\r\n"
- "Etag: a700f59a6ccb1ad39af68d998aa36fb1\r\n"
- "Vary: Accept-Encoding\r\n"
- "Content-Length: 6560\r\n"
- "Connection: close\r\n"
- "Content-Type: text/html; charset=utf-8\r\n"
- "\r\n";
-
-
- socket->write(header, sizeof header - 1);
- connect(socket, SIGNAL(bytesWritten(qint64)), SLOT(handleBytesWritten()), Qt::QueuedConnection);
- }
-
- void handleBytesWritten()
- {
- QTcpSocket *socket = static_cast<QTcpSocket *>(sender());
- if (socket->bytesToWrite() != 0)
- return;
-
- if (phase == Data1) {
- QByteArray data(4096, 'a');
- socket->write(data);
- phase = Data2;
- } else if (phase == Data2) {
- QByteArray data(2464, 'a');
- socket->write(data);
- phase = Close;
- } else {
- //socket->disconnectFromHost();
- //socket->deleteLater();
- }
- }
-};
diff --git a/tests/auto/network/access/qhttp/qhttp.pro b/tests/auto/network/access/qhttp/qhttp.pro
deleted file mode 100644
index d25b321851..0000000000
--- a/tests/auto/network/access/qhttp/qhttp.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qhttp
-SOURCES += tst_qhttp.cpp
-
-
-QT = core network testlib
-
-wince*: {
- webFiles.files = webserver/*
- webFiles.path = webserver
- cgi.files = webserver/cgi-bin/*
- cgi.path = webserver/cgi-bin
- addFiles.files = rfc3252.txt trolltech
- addFiles.path = .
- DEPLOYMENT += addFiles webFiles cgi
- DEFINES += SRCDIR=\\\"\\\"
-} else:vxworks*: {
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
-CONFIG+=insignificant_test
diff --git a/tests/auto/network/access/qhttp/rfc3252.txt b/tests/auto/network/access/qhttp/rfc3252.txt
deleted file mode 100644
index b80c61bf0a..0000000000
--- a/tests/auto/network/access/qhttp/rfc3252.txt
+++ /dev/null
@@ -1,899 +0,0 @@
-
-
-
-
-
-
-Network Working Group H. Kennedy
-Request for Comments: 3252 Mimezine
-Category: Informational 1 April 2002
-
-
- Binary Lexical Octet Ad-hoc Transport
-
-Status of this Memo
-
- This memo provides information for the Internet community. It does
- not specify an Internet standard of any kind. Distribution of this
- memo is unlimited.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
-Abstract
-
- This document defines a reformulation of IP and two transport layer
- protocols (TCP and UDP) as XML applications.
-
-1. Introduction
-
-1.1. Overview
-
- This document describes the Binary Lexical Octet Ad-hoc Transport
- (BLOAT): a reformulation of a widely-deployed network-layer protocol
- (IP [RFC791]), and two associated transport layer protocols (TCP
- [RFC793] and UDP [RFC768]) as XML [XML] applications. It also
- describes methods for transporting BLOAT over Ethernet and IEEE 802
- networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
- across the public Internet.
-
-1.2. Motivation
-
- The wild popularity of XML as a basis for application-level protocols
- such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
- Object Access Protocol [SOAP], and Jabber [JABBER] prompted
- investigation into the possibility of extending the use of XML in the
- protocol stack. Using XML at both the transport and network layer in
- addition to the application layer would provide for an amazing amount
- of power and flexibility while removing dependencies on proprietary
- and hard-to-understand binary protocols. This protocol unification
- would also allow applications to use a single XML parser for all
- aspects of their operation, eliminating developer time spent figuring
- out the intricacies of each new protocol, and moving the hard work of
-
-
-
-
-Kennedy Informational [Page 1]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- parsing to the XML toolset. The use of XML also mitigates concerns
- over "network vs. host" byte ordering which is at the root of many
- network application bugs.
-
-1.3. Relation to Existing Protocols
-
- The reformulations specified in this RFC follow as closely as
- possible the spirit of the RFCs on which they are based, and so MAY
- contain elements or attributes that would not be needed in a pure
- reworking (e.g. length attributes, which are implicit in XML.)
-
- The layering of network and transport protocols are maintained in
- this RFC despite the optimizations that could be made if the line
- were somewhat blurred (i.e. merging TCP and IP into a single, larger
- element in the DTD) in order to foster future use of this protocol as
- a basis for reformulating other protocols (such as ICMP.)
-
- Other than the encoding, the behavioral aspects of each of the
- existing protocols remain unchanged. Routing, address spaces, TCP
- congestion control, etc. behave as specified in the extant standards.
- Adapting to new standards and experimental algorithm heuristics for
- improving performance will become much easier once the move to BLOAT
- has been completed.
-
-1.4. Requirement Levels
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
- "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
- document are to be interpreted as described in BCP 14, RFC 2119
- [RFC2119].
-
-2. IPoXML
-
- This protocol MUST be implemented to be compliant with this RFC.
- IPoXML is the root protocol REQUIRED for effective use of TCPoXML
- (section 3.) and higher-level application protocols.
-
- The DTD for this document type can be found in section 7.1.
-
- The routing of IPoXML can be easily implemented on hosts with an XML
- parser, as the regular structure lends itself handily to parsing and
- validation of the document/datagram and then processing the
- destination address, TTL, and checksum before sending it on to its
- next-hop.
-
- The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
- wider deployment of IPv4 and the fact that implementing IPv6 as XML
- would have exceeded the 1500 byte Ethernet MTU.
-
-
-
-Kennedy Informational [Page 2]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- All BLOAT implementations MUST use - and specify - the UTF-8 encoding
- of RFC 2279 [RFC2279]. All BLOAT document/datagrams MUST be well-
- formed and include the XMLDecl.
-
-2.1. IP Description
-
- A number of items have changed (for the better) from the original IP
- specification. Bit-masks, where present have been converted into
- human-readable values. IP addresses are listed in their dotted-
- decimal notation [RFC1123]. Length and checksum values are present
- as decimal integers.
-
- To calculate the length and checksum fields of the IP element, a
- canonicalized form of the element MUST be used. The canonical form
- SHALL have no whitespace (including newline characters) between
- elements and only one space character between attributes. There
- SHALL NOT be a space following the last attribute in an element.
-
- An iterative method SHOULD be used to calculate checksums, as the
- length field will vary based on the size of the checksum.
-
- The payload element bears special attention. Due to the character
- set restrictions of XML, the payload of IP datagrams (which MAY
- contain arbitrary data) MUST be encoded for transport. This RFC
- REQUIRES the contents of the payload to be encoded in the base-64
- encoding of RFC 2045 [RFC2045], but removes the requirement that the
- encoded output MUST be wrapped on 76-character lines.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 3]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-2.2. Example Datagram
-
- The following is an example IPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- <ip>
- <header length="474">
- <version value="4"/>
- <tos precedence="Routine" delay="Normal" throughput="Normal"
- relibility="Normal" reserved="0"/>
- <total.length value="461"/>
- <id value="1"/>
- <flags reserved="0" df="dont" mf="last"/>
- <offset value="0"/>
- <ttl value="255"/>
- <protocol value="6"/>
- <checksum value="8707"/>
- <source address="10.0.0.22"/>
- <destination address="10.0.0.1"/>
- <options>
- <end copied="0" class="0" number="0"/>
- </options>
- <padding pad="0"/>
- </header>
- <payload>
- </payload>
- </ip>
-
-3. TCPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.2.
-
-3.1. TCP Description
-
- A number of items have changed from the original TCP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
- To calculate the length and checksum fields of the TCP element, a
- canonicalized form of the element MUST be used as in section 2.1.
-
- An iterative method SHOULD be used to calculate checksums as in
- section 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
-
-
-Kennedy Informational [Page 4]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- The TCP offset element was expanded to a maximum of 255 from 16 to
- allow for the increased size of the header in XML.
-
- TCPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-3.2. Example Datagram
-
- The following is an example TCPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- <tcp>
- <tcp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <sequence number="322622954"/>
- <acknowledgement number="689715995"/>
- <offset number=""/>
- <reserved value="0"/>
- <control syn="1" ack="1"/>
- <window size="1"/>
- <urgent pointer="0"/>
- <checksum value="2988"/>
- <tcp.options>
- <tcp.end kind="0"/>
- </tcp.options>
- <padding pad="0"/>
- </tcp.header>
- <payload>
- </payload>
- </tcp>
-
-4. UDPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.3.
-
-4.1. UDP Description
-
- A number of items have changed from the original UDP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
-
-
-
-
-
-
-Kennedy Informational [Page 5]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- To calculate the length and checksum fields of the UDP element, a
- canonicalized form of the element MUST be used as in section 2.1. An
- iterative method SHOULD be used to calculate checksums as in section
- 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
- UDPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-4.2. Example Datagram
-
- The following is an example UDPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- <udp>
- <udp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <udp.length value="143"/>
- <checksum value="2988"/>
- </udp.header>
- <payload>
- </payload>
- </udp>
-
-5. Network Transport
-
- This document provides for the transmission of BLOAT datagrams over
- two common families of physical layer transport. Future RFCs will
- address additional transports as routing vendors catch up to the
- specification, and we begin to see BLOAT routed across the Internet
- backbone.
-
-5.1. Ethernet
-
- BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the
- exception that the type field of the Ethernet frame MUST contain the
- value 0xBEEF. The first 5 octets of the Ethernet frame payload will
- be 0x3c 3f 78 6d 6c ("<?xml".)
-
-5.2. IEEE 802
-
- BLOAT is encapsulated in IEEE 802 Networks as in [RFC1042] except
- that the protocol type code for IPoXML is 0xBEEF.
-
-
-
-
-
-Kennedy Informational [Page 6]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-6. Gatewaying over IP
-
- In order to facilitate the gradual introduction of BLOAT into the
- public Internet, BLOAT MAY be encapsulated in IP as in [RFC2003] to
- gateway between networks that run BLOAT natively on their LANs.
-
-7. DTDs
-
- The Transport DTDs (7.2. and 7.3.) build on the definitions in the
- Network DTD (7.1.)
-
- The DTDs are referenced by their PubidLiteral and SystemLiteral (from
- [XML]) although it is understood that most IPoXML implementations
- will not need to pull down the DTD, as it will normally be embedded
- in the implementation, and presents something of a catch-22 if you
- need to load part of your network protocol over the network.
-
-7.1. IPoXML DTD
-
- <!--
- DTD for IP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- -->
- <!--
- DTD data types:
-
- Digits [0..9]+
-
- Precedence "NetworkControl | InternetworkControl |
- CRITIC | FlashOverride | Flash | Immediate |
- Priority | Routine"
-
- IP4Addr "dotted-decimal" notation of [RFC1123]
-
- Class [0..3]
-
- Sec "Unclassified | Confidential | EFTO | MMMM | PROG |
- Restricted | Secret | Top Secret | Reserved"
-
- Compartments [0..65535]
-
- Handling [0..65535]
-
- TCC [0..16777216]
-
- -->
-
-
-
-Kennedy Informational [Page 7]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ENTITY % Digits "CDATA">
- <!ENTITY % Precedence "CDATA">
- <!ENTITY % IP4Addr "CDATA">
- <!ENTITY % Class "CDATA">
- <!ENTITY % Sec "CDATA">
- <!ENTITY % Compartments "CDATA">
- <!ENTITY % Handling "CDATA">
- <!ENTITY % TCC "CDATA">
-
- <!ELEMENT ip (header, payload)>
-
- <!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
- protocol, checksum, source, destination, options,
- padding)>
- <!-- length of header in 32-bit words -->
- <!ATTLIST header
- length %Digits; #REQUIRED>
-
- <!ELEMENT version EMPTY>
- <!-- ip version. SHOULD be "4" -->
- <!ATTLIST version
- value %Digits; #REQUIRED>
-
- <!ELEMENT tos EMPTY>
- <!ATTLIST tos
- precedence %Precedence; #REQUIRED
- delay (normal | low) #REQUIRED
- throughput (normal | high) #REQUIRED
- relibility (normal | high) #REQUIRED
- reserved CDATA #FIXED "0">
-
- <!ELEMENT total.length EMPTY>
- <!--
- total length of datagram (header and payload) in octets, MUST be
- less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
- ethernets).
- -->
- <!ATTLIST total.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT id EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST id
- value %Digits; #REQUIRED>
-
- <!ELEMENT flags EMPTY>
- <!-- df = don't fragment, mf = more fragments -->
- <!ATTLIST flags
-
-
-
-Kennedy Informational [Page 8]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- reserved CDATA #FIXED "0"
- df (may|dont) #REQUIRED
- mf (last|more) #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= offset <= 8192 measured in 8 octet (64-bit) chunks -->
- <!ATTLIST offset
- value %Digits; #REQUIRED>
-
- <!ELEMENT ttl EMPTY>
- <!-- 0 <= ttl <= 255 -->
- <!ATTLIST ttl
- value %Digits; #REQUIRED>
-
- <!ELEMENT protocol EMPTY>
- <!-- 0 <= protocol <= 255 (per IANA) -->
- <!ATTLIST protocol
- value %Digits; #REQUIRED>
-
- <!ELEMENT checksum EMPTY>
- <!-- 0 <= checksum <= 65535 (over header only) -->
- <!ATTLIST checksum
- value %Digits; #REQUIRED>
-
- <!ELEMENT source EMPTY>
- <!ATTLIST source
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT destination EMPTY>
- <!ATTLIST destination
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT options ( end | noop | security | loose | strict | record
- | stream | timestamp )*>
-
- <!ELEMENT end EMPTY>
- <!ATTLIST end
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "0">
-
- <!ELEMENT noop EMPTY>
- <!ATTLIST noop
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "1">
-
- <!ELEMENT security EMPTY>
-
-
-
-Kennedy Informational [Page 9]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST security
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "2"
- length CDATA #FIXED "11"
- security %Sec; #REQUIRED
- compartments %Compartments; #REQUIRED
- handling %Handling; #REQUIRED
- tcc %TCC; #REQUIRED>
- <!ELEMENT loose (hop)+>
- <!ATTLIST loose
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "3"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT hop EMPTY>
- <!ATTLIST hop
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT strict (hop)+>
- <!ATTLIST strict
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "9"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT record (hop)+>
- <!ATTLIST record
- copied CDATA #FIXED "0"
- class CDATA #FIXED "0"
- number CDATA #FIXED "7"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT stream EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST stream
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "8"
- length CDATA #FIXED "4"
- id %Digits; #REQUIRED>
-
- <!ELEMENT timestamp (tstamp)+>
- <!-- 0 <= oflw <=15 -->
-
-
-
-Kennedy Informational [Page 10]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST timestamp
- copied CDATA #FIXED "0"
- class CDATA #FIXED "2"
- number CDATA #FIXED "4"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED
- oflw %Digits; #REQUIRED
- flag (0 | 1 | 3) #REQUIRED>
-
- <!ELEMENT tstamp EMPTY>
- <!ATTLIST tstamp
- time %Digits; #REQUIRED
- address %IP4Addr; #IMPLIED>
- <!--
- padding to bring header to 32-bit boundary.
- pad MUST be "0"*
- -->
- <!ELEMENT padding EMPTY>
- <!ATTLIST padding
- pad CDATA #REQUIRED>
-
- <!-- payload MUST be encoded as base-64 [RFC2045], as modified
- by section 2.1 of this RFC -->
- <!ELEMENT payload (CDATA)>
-
-7.2. TCPoXML DTD
-
- <!--
- DTD for TCP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- -->
-
- <!-- the pseudoheader is only included for checksum calculations -->
- <!ELEMENT tcp (tcp.pseudoheader?, tcp.header, payload)>
-
- <!ELEMENT tcp.header (src, dest, sequence, acknowledgement, offset,
- reserved, control, window, checksum, urgent,
- tcp.options, padding)>
-
- <!ELEMENT src EMPTY>
- <!-- 0 <= port <= 65,535 -->
- <!ATTLIST src
- port %Digits; #REQUIRED>
-
- <!ELEMENT dest EMPTY>
- <!-- 0 <= port <= 65,535 -->
-
-
-
-Kennedy Informational [Page 11]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST dest
- port %Digits; #REQUIRED>
-
- <!ELEMENT sequence EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST sequence
- number %Digits; #REQUIRED>
-
- <!ELEMENT acknowledgement EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST acknowledgement
- number %Digits; #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= number <= 255 -->
- <!ATTLIST offset
- number %Digits; #REQUIRED>
-
- <!ELEMENT reserved EMPTY>
- <!ATTLIST reserved
- value CDATA #FIXED "0">
-
- <!ELEMENT control EMPTY>
- <!ATTLIST control
- urg (0|1) #IMPLIED
- ack (0|1) #IMPLIED
- psh (0|1) #IMPLIED
- rst (0|1) #IMPLIED
- syn (0|1) #IMPLIED
- fin (0|1) #IMPLIED>
-
- <!ELEMENT window EMPTY>
- <!-- 0 <= size <= 65,535 -->
- <!ATTLIST window
- size %Digits; #REQUIRED>
-
- <!--
- checksum as in ip, but with
- the following pseudo-header added into the tcp element:
- -->
- <!ELEMENT tcp.pseudoheader (source, destination, protocol,
- tcp.length)>
-
- <!--
- tcp header + data length in octets. does not include the size of
-
- the pseudoheader.
- -->
-
-
-
-Kennedy Informational [Page 12]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ELEMENT tcp.length EMPTY>
- <!ATTLIST tcp.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT urgent EMPTY>
- <!-- 0 <= pointer <= 65,535 -->
- <!ATTLIST urgent
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT tcp.options (tcp.end | tcp.noop | tcp.mss)+>
-
- <!ELEMENT tcp.end EMPTY>
- <!ATTLIST tcp.end
- kind CDATA #FIXED "0">
-
- <!ELEMENT tcp.noop EMPTY>
- <!ATTLIST tcp.noop
- kind CDATA #FIXED "1">
-
- <!ELEMENT tcp.mss EMPTY>
- <!ATTLIST tcp.mss
- kind CDATA #FIXED "2"
- length CDATA #FIXED "4"
- size %Digits; #REQUIRED>
-
-7.3. UDPoXML DTD
-
- <!--
- DTD for UDP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- -->
-
- <!ELEMENT udp (udp.pseudoheader?, udp.header, payload)>
-
- <!ELEMENT udp.header (src, dest, udp.length, checksum)>
-
- <!ELEMENT udp.pseudoheader (source, destination, protocol,
- udp.length)>
-
- <!--
- udp header + data length in octets. does not include the size of
- the pseudoheader.
- -->
- <!ELEMENT udp.length EMPTY>
- <!ATTLIST udp.length
- value %Digits; #REQUIRED>
-
-
-
-Kennedy Informational [Page 13]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-8. Security Considerations
-
- XML, as a subset of SGML, has the same security considerations as
- specified in SGML Media Types [RFC1874]. Security considerations
- that apply to IP, TCP and UDP also likely apply to BLOAT as it does
- not attempt to correct for issues not related to message format.
-
-9. References
-
- [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt,
- February 2002. (Work in Progress)
-
- [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
- August 1980.
-
- [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791,
- September 1981.
-
- [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC
- 793, September 1981.
-
- [RFC894] Hornig, C., "Standard for the Transmission of IP
- Datagrams over Ethernet Networks.", RFC 894, April 1984.
-
- [RFC1042] Postel, J. and J. Reynolds, "Standard for the
- Transmission of IP Datagrams Over IEEE 802 Networks", STD
- 43, RFC 1042, February 1988.
-
- [RFC1123] Braden, R., "Requirements for Internet Hosts -
- Application and Support", RFC 1123, October 1989.
-
- [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December
- 1995.
-
- [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
- October 1996.
-
- [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
- Extensions (MIME) Part One: Format of Internet Message
- Bodies", RFC 2045, November 1996.
-
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
- Requirement Levels", BCP 14, RFC 2119, March 1997.
-
- [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
- 10646", RFC 2279, January 1998.
-
-
-
-
-
-Kennedy Informational [Page 14]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
- (IPv6) Specification", RFC 2460, December 1998.
-
- [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core",
- RFC 3080, March 2001.
-
- [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A.,
- Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D.,
- "Simple Object Access Protocol (SOAP) 1.1" World Wide Web
- Consortium Note, May 2000 http://www.w3.org/TR/SOAP/
-
- [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible
- Markup Language (XML)" World Wide Web Consortium
- Recommendation REC- xml-19980210.
- http://www.w3.org/TR/1998/REC-xml-19980210
-
-10. Author's Address
-
- Hugh Kennedy
- Mimezine
- 1060 West Addison
- Chicago, IL 60613
- USA
-
- EMail: kennedyh@engin.umich.edu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 15]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-11. Full Copyright Statement
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published
- and distributed, in whole or in part, without restriction of any
- kind, provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be
- followed, or as required to translate it into languages other than
- English.
-
- The limited permissions granted above are perpetual and will not be
- revoked by the Internet Society or its successors or assigns.
-
- This document and the information contained herein is provided on an
- "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
- TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
- BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-Acknowledgement
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 16]
-
diff --git a/tests/auto/network/access/qhttp/trolltech b/tests/auto/network/access/qhttp/trolltech
deleted file mode 100644
index c155360e8d..0000000000
--- a/tests/auto/network/access/qhttp/trolltech
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
- <head>
- <title>Test</title>
- </head>
- <body>
- <h1>Test</h1>
- </body>
-</html>
diff --git a/tests/auto/network/access/qhttp/tst_qhttp.cpp b/tests/auto/network/access/qhttp/tst_qhttp.cpp
deleted file mode 100644
index f6514bade1..0000000000
--- a/tests/auto/network/access/qhttp/tst_qhttp.cpp
+++ /dev/null
@@ -1,1565 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-
-#include <qbuffer.h>
-#include <qcoreapplication.h>
-#include <qfile.h>
-#include <qhostinfo.h>
-#include <qhttp.h>
-#include <qlist.h>
-#include <qpointer.h>
-#include <qtcpsocket.h>
-#include <qtcpserver.h>
-#include <qauthenticator.h>
-#include <QNetworkProxy>
-#ifndef QT_NO_OPENSSL
-# include <qsslsocket.h>
-#endif
-
-#include "../../../network-settings.h"
-
-Q_DECLARE_METATYPE(QHttpResponseHeader)
-
-class tst_QHttp : public QObject
-{
- Q_OBJECT
-
-public:
- tst_QHttp();
- virtual ~tst_QHttp();
-
-
-public slots:
- void initTestCase_data();
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
-private slots:
- void constructing();
- void invalidRequests();
- void get_data();
- void get();
- void head_data();
- void head();
- void post_data();
- void post();
- void request_data();
- void request();
- void authorization_data();
- void authorization();
- void proxy_data();
- void proxy();
- void proxy2();
- void proxy3();
- void postAuthNtlm();
-#ifndef QT_NO_OPENSSL
- void proxyAndSsl();
- void cachingProxyAndSsl();
-#endif
- void reconnect();
- void setSocket();
- void unexpectedRemoteClose();
- void pctEncodedPath();
- void caseInsensitiveKeys();
- void emptyBodyInReply();
- void abortInReadyRead();
- void abortInResponseHeaderReceived();
- void nestedEventLoop();
- void connectionClose();
-
-protected slots:
- void stateChanged( int );
- void responseHeaderReceived( const QHttpResponseHeader & );
- void readyRead( const QHttpResponseHeader& );
- void dataSendProgress( int, int );
- void dataReadProgress( int , int );
-
- void requestStarted( int );
- void requestFinished( int, bool );
- void done( bool );
-
- void reconnect_state(int state);
- void proxy2_slot();
- void nestedEventLoop_slot(int id);
-
- void abortSender();
- void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
-
-private:
- QHttp *newHttp(bool withAuth = false);
- void addRequest( QHttpRequestHeader, int );
- bool headerAreEqual( const QHttpHeader&, const QHttpHeader& );
-
- QHttp *http;
-
- struct RequestResult
- {
- QHttpRequestHeader req;
- QHttpResponseHeader resp;
- int success;
- };
- QMap< int, RequestResult > resultMap;
- typedef QMap<int,RequestResult>::Iterator ResMapIt;
- QList<int> ids; // helper to make sure that all expected signals are emitted
-
- int current_id;
- int cur_state;
- int done_success;
-
- QByteArray readyRead_ba;
-
- int bytesTotalSend;
- int bytesDoneSend;
- int bytesTotalRead;
- int bytesDoneRead;
-
- int getId;
- int headId;
- int postId;
-
- int reconnect_state_connect_count;
-
- bool connectionWithAuth;
- bool proxyAuthCalled;
-};
-
-class ClosingServer: public QTcpServer
-{
- Q_OBJECT
-public:
- ClosingServer()
- {
- connect(this, SIGNAL(newConnection()), SLOT(handleConnection()));
- listen();
- }
-
-public slots:
- void handleConnection()
- {
- delete nextPendingConnection();
- }
-};
-
-//#define DUMP_SIGNALS
-
-const int bytesTotal_init = -10;
-const int bytesDone_init = -10;
-
-tst_QHttp::tst_QHttp()
-{
-}
-
-tst_QHttp::~tst_QHttp()
-{
-}
-
-void tst_QHttp::initTestCase_data()
-{
- QTest::addColumn<bool>("setProxy");
- QTest::addColumn<int>("proxyType");
-
- QTest::newRow("WithoutProxy") << false << 0;
- QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
-}
-
-void tst_QHttp::initTestCase()
-{
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
-}
-
-void tst_QHttp::cleanupTestCase()
-{
-}
-
-void tst_QHttp::init()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy) {
- QFETCH_GLOBAL(int, proxyType);
- if (proxyType == QNetworkProxy::Socks5Proxy) {
- QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
- }
- }
-
- http = 0;
-
- resultMap.clear();
- ids.clear();
-
- current_id = 0;
- cur_state = QHttp::Unconnected;
- done_success = -1;
-
- readyRead_ba = QByteArray();
-
- getId = -1;
- headId = -1;
- postId = -1;
-}
-
-void tst_QHttp::cleanup()
-{
- delete http;
- http = 0;
-
- QCoreApplication::processEvents();
-
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy) {
- QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
- }
-}
-
-void tst_QHttp::constructing()
-{
- //QHeader
- {
- QHttpRequestHeader header;
- header.addValue("key1", "val1");
- header.addValue("key2", "val2");
- header.addValue("key1", "val3");
- QCOMPARE(header.values().size(), 3);
- QCOMPARE(header.allValues("key1").size(), 2);
- QVERIFY(header.hasKey("key2"));
- QCOMPARE(header.keys().count(), 2);
-
- }
-
- {
- QHttpResponseHeader header(200);
- }
-}
-
-void tst_QHttp::invalidRequests()
-{
- QHttp http;
- http.setHost("localhost"); // we will not actually connect
-
- QTest::ignoreMessage(QtWarningMsg, "QHttp: empty path requested is invalid -- using '/'");
- http.get(QString());
-
- QTest::ignoreMessage(QtWarningMsg, "QHttp: empty path requested is invalid -- using '/'");
- http.head(QString());
-
- QTest::ignoreMessage(QtWarningMsg, "QHttp: empty path requested is invalid -- using '/'");
- http.post(QString(), QByteArray());
-
- QTest::ignoreMessage(QtWarningMsg, "QHttp: empty path requested is invalid -- using '/'");
- http.request(QHttpRequestHeader("PROPFIND", QString()));
-}
-
-void tst_QHttp::get_data()
-{
- QTest::addColumn<QString>("host");
- QTest::addColumn<uint>("port");
- QTest::addColumn<QString>("path");
- QTest::addColumn<int>("success");
- QTest::addColumn<int>("statusCode");
- QTest::addColumn<QByteArray>("res");
- QTest::addColumn<bool>("useIODevice");
-
- // ### move this into external testdata
- QFile file( SRCDIR "rfc3252.txt" );
- QVERIFY( file.open( QIODevice::ReadOnly ) );
- QByteArray rfc3252 = file.readAll();
- file.close();
-
- file.setFileName( SRCDIR "trolltech" );
- QVERIFY( file.open( QIODevice::ReadOnly ) );
- QByteArray trolltech = file.readAll();
- file.close();
-
- // test the two get() modes in one routine
- for ( int i=0; i<2; i++ ) {
- QTest::newRow(QString("path_01_%1").arg(i).toLatin1()) << QtNetworkSettings::serverName() << 80u
- << QString("/qtest/rfc3252.txt") << 1 << 200 << rfc3252 << (bool)(i==1);
- QTest::newRow( QString("path_02_%1").arg(i).toLatin1() ) << QString("www.ietf.org") << 80u
- << QString("/rfc/rfc3252.txt") << 1 << 200 << rfc3252 << (bool)(i==1);
-
- QTest::newRow( QString("uri_01_%1").arg(i).toLatin1() ) << QtNetworkSettings::serverName() << 80u
- << QString("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt") << 1 << 200 << rfc3252 << (bool)(i==1);
- QTest::newRow( QString("uri_02_%1").arg(i).toLatin1() ) << "www.ietf.org" << 80u
- << QString("http://www.ietf.org/rfc/rfc3252.txt") << 1 << 200 << rfc3252 << (bool)(i==1);
-
- QTest::newRow( QString("fail_01_%1").arg(i).toLatin1() ) << QString("this-host-will-not-exist.") << 80u
- << QString("/qtest/rfc3252.txt") << 0 << 0 << QByteArray() << (bool)(i==1);
-
- QTest::newRow( QString("failprot_01_%1").arg(i).toLatin1() ) << QtNetworkSettings::serverName() << 80u
- << QString("/t") << 1 << 404 << QByteArray() << (bool)(i==1);
- QTest::newRow( QString("failprot_02_%1").arg(i).toLatin1() ) << QtNetworkSettings::serverName() << 80u
- << QString("qtest/rfc3252.txt") << 1 << 400 << QByteArray() << (bool)(i==1);
-
- // qt.nokia.com/doc uses transfer-encoding=chunked
- /* qt.nokia.com/doc no longer seams to be using chuncked encodig.
- QTest::newRow( QString("chunked_01_%1").arg(i).toLatin1() ) << QString("test.troll.no") << 80u
- << QString("/") << 1 << 200 << trolltech << (bool)(i==1);
- */
- QTest::newRow( QString("chunked_02_%1").arg(i).toLatin1() ) << QtNetworkSettings::serverName() << 80u
- << QString("/qtest/cgi-bin/rfc.cgi") << 1 << 200 << rfc3252 << (bool)(i==1);
- }
-}
-
-void tst_QHttp::get()
-{
- // for the overload that takes a QIODevice
- QByteArray buf_ba;
- QBuffer buf( &buf_ba );
-
- QFETCH( QString, host );
- QFETCH( uint, port );
- QFETCH( QString, path );
- QFETCH( bool, useIODevice );
-
- http = newHttp();
- QCOMPARE( http->currentId(), 0 );
- QCOMPARE( (int)http->state(), (int)QHttp::Unconnected );
-
- addRequest( QHttpRequestHeader(), http->setHost( host, port ) );
- if ( useIODevice ) {
- buf.open( QIODevice::WriteOnly );
- getId = http->get( path, &buf );
- } else {
- getId = http->get( path );
- }
- addRequest( QHttpRequestHeader(), getId );
-
- QTestEventLoop::instance().enterLoop( 50 );
-
- if ( QTestEventLoop::instance().timeout() )
- QFAIL( "Network operation timed out" );
-
- ResMapIt res = resultMap.find( getId );
- QVERIFY( res != resultMap.end() );
- if ( res.value().success!=1 && host=="www.ietf.org" ) {
- // The nightly tests fail from time to time. In order to make them more
- // stable, add some debug output that might help locate the problem (I
- // can't reproduce the problem in the non-nightly builds).
- qDebug( "Error %d: %s", http->error(), http->errorString().toLatin1().constData() );
- }
- QTEST( res.value().success, "success" );
- if ( res.value().success ) {
- QTEST( res.value().resp.statusCode(), "statusCode" );
-
- QFETCH( QByteArray, res );
- if ( res.count() > 0 ) {
- if ( useIODevice ) {
- QCOMPARE(buf_ba, res);
- if ( bytesDoneRead != bytesDone_init )
- QVERIFY( (int)buf_ba.size() == bytesDoneRead );
- } else {
- QCOMPARE(readyRead_ba, res);
- if ( bytesDoneRead != bytesDone_init )
- QVERIFY( (int)readyRead_ba.size() == bytesDoneRead );
- }
- }
- QVERIFY( bytesTotalRead != bytesTotal_init );
- if ( bytesTotalRead > 0 )
- QVERIFY( bytesDoneRead == bytesTotalRead );
- } else {
- QVERIFY( !res.value().resp.isValid() );
- }
-}
-
-void tst_QHttp::head_data()
-{
- QTest::addColumn<QString>("host");
- QTest::addColumn<uint>("port");
- QTest::addColumn<QString>("path");
- QTest::addColumn<int>("success");
- QTest::addColumn<int>("statusCode");
- QTest::addColumn<uint>("contentLength");
-
- QTest::newRow( "path_01" ) << QtNetworkSettings::serverName() << 80u
- << QString("/qtest/rfc3252.txt") << 1 << 200 << 25962u;
-
- QTest::newRow( "path_02" ) << QString("www.ietf.org") << 80u
- << QString("/rfc/rfc3252.txt") << 1 << 200 << 25962u;
-
- QTest::newRow( "uri_01" ) << QtNetworkSettings::serverName() << 80u
- << QString("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt") << 1 << 200 << 25962u;
-
- QTest::newRow( "uri_02" ) << QString("www.ietf.org") << 80u
- << QString("http://www.ietf.org/rfc/rfc3252.txt") << 1 << 200 << 25962u;
-
- QTest::newRow( "fail_01" ) << QString("this-host-will-not-exist.") << 80u
- << QString("/qtest/rfc3252.txt") << 0 << 0 << 0u;
-
- QTest::newRow( "failprot_01" ) << QtNetworkSettings::serverName() << 80u
- << QString("/t") << 1 << 404 << 0u;
-
- QTest::newRow( "failprot_02" ) << QtNetworkSettings::serverName() << 80u
- << QString("qtest/rfc3252.txt") << 1 << 400 << 0u;
-
- /* qt.nokia.com/doc no longer seams to be using chuncked encodig.
- QTest::newRow( "chunked_01" ) << QString("qt.nokia.com/doc") << 80u
- << QString("/index.html") << 1 << 200 << 0u;
- */
- QTest::newRow( "chunked_02" ) << QtNetworkSettings::serverName() << 80u
- << QString("/qtest/cgi-bin/rfc.cgi") << 1 << 200 << 0u;
-}
-
-void tst_QHttp::head()
-{
- QFETCH( QString, host );
- QFETCH( uint, port );
- QFETCH( QString, path );
-
- http = newHttp();
- QCOMPARE( http->currentId(), 0 );
- QCOMPARE( (int)http->state(), (int)QHttp::Unconnected );
-
- addRequest( QHttpRequestHeader(), http->setHost( host, port ) );
- headId = http->head( path );
- addRequest( QHttpRequestHeader(), headId );
-
- QTestEventLoop::instance().enterLoop( 30 );
- if ( QTestEventLoop::instance().timeout() )
- QFAIL( "Network operation timed out" );
-
- ResMapIt res = resultMap.find( headId );
- QVERIFY( res != resultMap.end() );
- if ( res.value().success!=1 && host=="www.ietf.org" ) {
- // The nightly tests fail from time to time. In order to make them more
- // stable, add some debug output that might help locate the problem (I
- // can't reproduce the problem in the non-nightly builds).
- qDebug( "Error %d: %s", http->error(), http->errorString().toLatin1().constData() );
- }
- QTEST( res.value().success, "success" );
- if ( res.value().success ) {
- QTEST( res.value().resp.statusCode(), "statusCode" );
- QTEST( res.value().resp.contentLength(), "contentLength" );
-
- QCOMPARE( (uint)readyRead_ba.size(), 0u );
- QVERIFY( bytesTotalRead == bytesTotal_init );
- QVERIFY( bytesDoneRead == bytesDone_init );
- } else {
- QVERIFY( !res.value().resp.isValid() );
- }
-}
-
-void tst_QHttp::post_data()
-{
- QTest::addColumn<QString>("source");
- QTest::addColumn<bool>("useIODevice");
- QTest::addColumn<bool>("useProxy");
- QTest::addColumn<QString>("host");
- QTest::addColumn<int>("port");
- QTest::addColumn<bool>("ssl");
- QTest::addColumn<QString>("path");
- QTest::addColumn<QByteArray>("result");
-
- QByteArray md5sum;
- md5sum = "d41d8cd98f00b204e9800998ecf8427e";
- QTest::newRow("empty-data")
- << QString() << false << false
- << QtNetworkSettings::serverName() << 80 << false << "/qtest/cgi-bin/md5sum.cgi" << md5sum;
- QTest::newRow("empty-device")
- << QString() << true << false
- << QtNetworkSettings::serverName() << 80 << false << "/qtest/cgi-bin/md5sum.cgi" << md5sum;
- QTest::newRow("proxy-empty-data")
- << QString() << false << true
- << QtNetworkSettings::serverName() << 80 << false << "/qtest/cgi-bin/md5sum.cgi" << md5sum;
-
- md5sum = "b3e32ac459b99d3f59318f3ac31e4bee";
- QTest::newRow("data") << "rfc3252.txt" << false << false
- << QtNetworkSettings::serverName() << 80 << false << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
- QTest::newRow("device") << "rfc3252.txt" << true << false
- << QtNetworkSettings::serverName() << 80 << false << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
- QTest::newRow("proxy-data") << "rfc3252.txt" << false << true
- << QtNetworkSettings::serverName() << 80 << false << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
-
-#ifndef QT_NO_OPENSSL
- md5sum = "d41d8cd98f00b204e9800998ecf8427e";
- QTest::newRow("empty-data-ssl")
- << QString() << false << false
- << QtNetworkSettings::serverName() << 443 << true << "/qtest/cgi-bin/md5sum.cgi" << md5sum;
- QTest::newRow("empty-device-ssl")
- << QString() << true << false
- << QtNetworkSettings::serverName() << 443 << true << "/qtest/cgi-bin/md5sum.cgi" << md5sum;
- QTest::newRow("proxy-empty-data-ssl")
- << QString() << false << true
- << QtNetworkSettings::serverName() << 443 << true << "/qtest/cgi-bin/md5sum.cgi" << md5sum;
- md5sum = "b3e32ac459b99d3f59318f3ac31e4bee";
- QTest::newRow("data-ssl") << "rfc3252.txt" << false << false
- << QtNetworkSettings::serverName() << 443 << true << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
- QTest::newRow("device-ssl") << "rfc3252.txt" << true << false
- << QtNetworkSettings::serverName() << 443 << true << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
- QTest::newRow("proxy-data-ssl") << "rfc3252.txt" << false << true
- << QtNetworkSettings::serverName() << 443 << true << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
-#endif
-
- // the following test won't work. See task 185996
-/*
- QTest::newRow("proxy-device") << "rfc3252.txt" << true << true
- << QtNetworkSettings::serverName() << 80 << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
-*/
-}
-
-void tst_QHttp::post()
-{
- QFETCH(QString, source);
- QFETCH(bool, useIODevice);
- QFETCH(bool, useProxy);
- QFETCH(QString, host);
- QFETCH(int, port);
- QFETCH(bool, ssl);
- QFETCH(QString, path);
-
- http = newHttp(useProxy);
-#ifndef QT_NO_OPENSSL
- QObject::connect(http, SIGNAL(sslErrors(const QList<QSslError> &)),
- http, SLOT(ignoreSslErrors()));
-#endif
- QCOMPARE(http->currentId(), 0);
- QCOMPARE((int)http->state(), (int)QHttp::Unconnected);
- if (useProxy)
- addRequest(QHttpRequestHeader(), http->setProxy(QtNetworkSettings::serverName(), 3129));
- addRequest(QHttpRequestHeader(), http->setHost(host, (ssl ? QHttp::ConnectionModeHttps : QHttp::ConnectionModeHttp), port));
-
- // add the POST request
- QFile file(SRCDIR + source);
- QBuffer emptyBuffer;
- QIODevice *dev;
- if (!source.isEmpty()) {
- QVERIFY(file.open(QIODevice::ReadOnly));
- dev = &file;
- } else {
- emptyBuffer.open(QIODevice::ReadOnly);
- dev = &emptyBuffer;
- }
-
- if (useIODevice)
- postId = http->post(path, dev);
- else
- postId = http->post(path, dev->readAll());
- addRequest(QHttpRequestHeader(), postId);
-
- // run request
- connect(http, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
- SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
- QTestEventLoop::instance().enterLoop( 30 );
-
- if ( QTestEventLoop::instance().timeout() )
- QFAIL( "Network operation timed out" );
-
- ResMapIt res = resultMap.find(postId);
- QVERIFY(res != resultMap.end());
- QVERIFY(res.value().success);
- QCOMPARE(res.value().resp.statusCode(), 200);
- QTEST(readyRead_ba.trimmed(), "result");
-}
-
-void tst_QHttp::request_data()
-{
- QTest::addColumn<QString>("source");
- QTest::addColumn<bool>("useIODevice");
- QTest::addColumn<bool>("useProxy");
- QTest::addColumn<QString>("host");
- QTest::addColumn<int>("port");
- QTest::addColumn<QString>("method");
- QTest::addColumn<QString>("path");
- QTest::addColumn<QByteArray>("result");
-
- QFile source(SRCDIR "rfc3252.txt");
- if (!source.open(QIODevice::ReadOnly))
- return;
-
- QByteArray contents = source.readAll();
- QByteArray md5sum = QCryptographicHash::hash(contents, QCryptographicHash::Md5).toHex() + '\n';
- QByteArray emptyMd5sum = "d41d8cd98f00b204e9800998ecf8427e\n";
-
- QTest::newRow("head") << QString() << false << false << QtNetworkSettings::serverName() << 80
- << "HEAD" << "/qtest/rfc3252.txt"
- << QByteArray();
- QTest::newRow("get") << QString() << false << false << QtNetworkSettings::serverName() << 80
- << "GET" << "/qtest/rfc3252.txt"
- << contents;
- QTest::newRow("post-empty-data") << QString() << false << false
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << emptyMd5sum;
- QTest::newRow("post-empty-device") << QString() << true << false
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << emptyMd5sum;
- QTest::newRow("post-data") << "rfc3252.txt" << false << false
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
- QTest::newRow("post-device") << "rfc3252.txt" << true << false
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
-
- QTest::newRow("proxy-head") << QString() << false << true << QtNetworkSettings::serverName() << 80
- << "HEAD" << "/qtest/rfc3252.txt"
- << QByteArray();
- QTest::newRow("proxy-get") << QString() << false << true << QtNetworkSettings::serverName() << 80
- << "GET" << "/qtest/rfc3252.txt"
- << contents;
- QTest::newRow("proxy-post-empty-data") << QString() << false << true
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << emptyMd5sum;
- QTest::newRow("proxy-post-data") << "rfc3252.txt" << false << true
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
- // the following test won't work. See task 185996
-/*
- QTest::newRow("proxy-post-device") << "rfc3252.txt" << true << true
- << QtNetworkSettings::serverName() << 80 << "POST" << "/qtest/cgi-bin/md5sum.cgi"
- << md5sum;
-*/
-}
-
-void tst_QHttp::request()
-{
- QFETCH(QString, source);
- QFETCH(bool, useIODevice);
- QFETCH(bool, useProxy);
- QFETCH(QString, host);
- QFETCH(int, port);
- QFETCH(QString, method);
- QFETCH(QString, path);
-
- http = newHttp(useProxy);
- QCOMPARE(http->currentId(), 0);
- QCOMPARE((int)http->state(), (int)QHttp::Unconnected);
- if (useProxy)
- addRequest(QHttpRequestHeader(), http->setProxy(QtNetworkSettings::serverName(), 3129));
- addRequest(QHttpRequestHeader(), http->setHost(host, port));
-
- QFile file(SRCDIR + source);
- QBuffer emptyBuffer;
- QIODevice *dev;
- if (!source.isEmpty()) {
- QVERIFY(file.open(QIODevice::ReadOnly));
- dev = &file;
- } else {
- emptyBuffer.open(QIODevice::ReadOnly);
- dev = &emptyBuffer;
- }
-
- // prepare the request
- QHttpRequestHeader request;
- request.setRequest(method, path, 1,1);
- request.addValue("Host", host);
- int *theId;
-
- if (method == "POST")
- theId = &postId;
- else if (method == "GET")
- theId = &getId;
- else if (method == "HEAD")
- theId = &headId;
- else
- QFAIL("You're lazy! Please implement your test!");
-
- // now send the request
- if (useIODevice)
- *theId = http->request(request, dev);
- else
- *theId = http->request(request, dev->readAll());
- addRequest(QHttpRequestHeader(), *theId);
-
- // run request
- connect(http, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
- SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
- QTestEventLoop::instance().enterLoop( 30 );
-
- if ( QTestEventLoop::instance().timeout() )
- QFAIL( "Network operation timed out" );
-
- ResMapIt res = resultMap.find(*theId);
- QVERIFY(res != resultMap.end());
- QVERIFY(res.value().success);
- QCOMPARE(res.value().resp.statusCode(), 200);
- QTEST(readyRead_ba, "result");
-}
-
-void tst_QHttp::authorization_data()
-{
- QTest::addColumn<QString>("host");
- QTest::addColumn<QString>("path");
- QTest::addColumn<QString>("user");
- QTest::addColumn<QString>("pass");
- QTest::addColumn<int>("result");
-
- QTest::newRow("correct password") << QtNetworkSettings::serverName()
- << QString::fromLatin1("/qtest/rfcs-auth/index.html")
- << QString::fromLatin1("httptest")
- << QString::fromLatin1("httptest")
- << 200;
-
- QTest::newRow("no password") << QtNetworkSettings::serverName()
- << QString::fromLatin1("/qtest/rfcs-auth/index.html")
- << QString::fromLatin1("")
- << QString::fromLatin1("")
- << 401;
-
- QTest::newRow("wrong password") << QtNetworkSettings::serverName()
- << QString::fromLatin1("/qtest/rfcs-auth/index.html")
- << QString::fromLatin1("maliciu0s")
- << QString::fromLatin1("h4X0r")
- << 401;
-}
-
-void tst_QHttp::authorization()
-{
- QFETCH(QString, host);
- QFETCH(QString, path);
- QFETCH(QString, user);
- QFETCH(QString, pass);
- QFETCH(int, result);
-
- QEventLoop loop;
-
- QHttp http;
- connect(&http, SIGNAL(done(bool)), &loop, SLOT(quit()));
-
- if (!user.isEmpty())
- http.setUser(user, pass);
- http.setHost(host);
- int id = http.get(path);
- Q_UNUSED(id);
-
- QTimer::singleShot(5000, &loop, SLOT(quit()));
- loop.exec();
-
- QCOMPARE(http.lastResponse().statusCode(), result);
-}
-
-void tst_QHttp::proxy_data()
-{
- QTest::addColumn<QString>("proxyhost");
- QTest::addColumn<int>("port");
- QTest::addColumn<QString>("host");
- QTest::addColumn<QString>("path");
- QTest::addColumn<QString>("proxyuser");
- QTest::addColumn<QString>("proxypass");
-
- QTest::newRow("qt-test-server") << QtNetworkSettings::serverName() << 3128
- << QString::fromLatin1("qt.nokia.com") << QString::fromLatin1("/")
- << QString::fromLatin1("") << QString::fromLatin1("");
- QTest::newRow("qt-test-server pct") << QtNetworkSettings::serverName() << 3128
- << QString::fromLatin1("qt.nokia.com") << QString::fromLatin1("/%64eveloper")
- << QString::fromLatin1("") << QString::fromLatin1("");
- QTest::newRow("qt-test-server-basic") << QtNetworkSettings::serverName() << 3129
- << QString::fromLatin1("qt.nokia.com") << QString::fromLatin1("/")
- << QString::fromLatin1("qsockstest") << QString::fromLatin1("password");
-
-#if 0
- // NTLM requires sending the same request three times for it to work
- // the tst_QHttp class is too strict to handle the byte counts sent by dataSendProgress
- // So don't run this test:
- QTest::newRow("qt-test-server-ntlm") << QtNetworkSettings::serverName() << 3130
- << QString::fromLatin1("qt.nokia.com") << QString::fromLatin1("/")
- << QString::fromLatin1("qsockstest") << QString::fromLatin1("password");
-#endif
-}
-
-void tst_QHttp::proxy()
-{
- QFETCH(QString, proxyhost);
- QFETCH(int, port);
- QFETCH(QString, host);
- QFETCH(QString, path);
- QFETCH(QString, proxyuser);
- QFETCH(QString, proxypass);
-
- http = newHttp(!proxyuser.isEmpty());
-
- QCOMPARE(http->currentId(), 0);
- QCOMPARE((int)http->state(), (int)QHttp::Unconnected);
-
- addRequest(QHttpRequestHeader(), http->setProxy(proxyhost, port, proxyuser, proxypass));
- addRequest(QHttpRequestHeader(), http->setHost(host));
- getId = http->get(path);
- addRequest(QHttpRequestHeader(), getId);
-
- QTestEventLoop::instance().enterLoop(30);
- if (QTestEventLoop::instance().timeout())
- QFAIL("Network operation timed out");
-
- ResMapIt res = resultMap.find(getId);
- QVERIFY(res != resultMap.end());
- QVERIFY(res.value().success);
- QCOMPARE(res.value().resp.statusCode(), 200);
-}
-
-void tst_QHttp::proxy2()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- readyRead_ba.clear();
-
- QHttp http;
- http.setProxy(QtNetworkSettings::serverName(), 3128);
- http.setHost(QtNetworkSettings::serverName());
- http.get("/index.html");
- http.get("/index.html");
-
- connect(&http, SIGNAL(requestFinished(int, bool)),
- this, SLOT(proxy2_slot()));
- QTestEventLoop::instance().enterLoop(30);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(readyRead_ba.count("Welcome to qt-test-server"), 2);
-
- readyRead_ba.clear();
-}
-
-void tst_QHttp::proxy2_slot()
-{
- QHttp *http = static_cast<QHttp *>(sender());
- readyRead_ba.append(http->readAll());
- if (!http->hasPendingRequests())
- QTestEventLoop::instance().exitLoop();
-}
-
-void tst_QHttp::proxy3()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- readyRead_ba.clear();
-
- QTcpSocket socket;
- socket.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128));
-
- QHttp http;
- http.setSocket(&socket);
- http.setHost(QtNetworkSettings::serverName());
- http.get("/index.html");
- http.get("/index.html");
-
- connect(&http, SIGNAL(requestFinished(int, bool)),
- this, SLOT(proxy2_slot()));
- QTestEventLoop::instance().enterLoop(30);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(readyRead_ba.count("Welcome to qt-test-server"), 2);
-
- readyRead_ba.clear();
-}
-
-// test QHttp::currentId() and QHttp::currentRequest()
-#define CURRENTREQUEST_TEST \
- { \
- ResMapIt res = resultMap.find( http->currentId() ); \
- QVERIFY( res != resultMap.end() ); \
- if ( http->currentId() == getId ) { \
- QCOMPARE( http->currentRequest().method(), QString("GET") ); \
- } else if ( http->currentId() == headId ) { \
- QCOMPARE( http->currentRequest().method(), QString("HEAD") ); \
- } else if ( http->currentId() == postId ) { \
- QCOMPARE( http->currentRequest().method(), QString("POST") ); \
- } else { \
- QVERIFY( headerAreEqual( http->currentRequest(), res.value().req ) ); \
- } \
- }
-
-void tst_QHttp::requestStarted( int id )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d:requestStarted( %d )", http->currentId(), id );
-#endif
- // make sure that the requestStarted and requestFinished are nested correctly
- QVERIFY( current_id == 0 );
- current_id = id;
-
- QVERIFY( !ids.isEmpty() );
- QVERIFY( ids.first() == id );
- if ( ids.count() > 1 ) {
- QVERIFY( http->hasPendingRequests() );
- } else {
- QVERIFY( !http->hasPendingRequests() );
- }
-
- QVERIFY( http->currentId() == id );
- QVERIFY( cur_state == http->state() );
-
-
-
-
- CURRENTREQUEST_TEST;
-
- QVERIFY( http->error() == QHttp::NoError );
-}
-
-void tst_QHttp::requestFinished( int id, bool error )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d:requestFinished( %d, %d ) -- errorString: '%s'",
- http->currentId(), id, (int)error, http->errorString().toAscii().data() );
-#endif
- // make sure that the requestStarted and requestFinished are nested correctly
- QVERIFY( current_id == id );
- current_id = 0;
-
- QVERIFY( !ids.isEmpty() );
- QVERIFY( ids.first() == id );
- if ( ids.count() > 1 ) {
- QVERIFY( http->hasPendingRequests() );
- } else {
- QVERIFY( !http->hasPendingRequests() );
- }
-
- if ( error ) {
- QVERIFY( http->error() != QHttp::NoError );
- ids.clear();
- } else {
- QVERIFY( http->error() == QHttp::NoError );
- ids.pop_front();
- }
-
- QVERIFY( http->currentId() == id );
- QVERIFY( cur_state == http->state() );
- CURRENTREQUEST_TEST;
-
- ResMapIt res = resultMap.find( http->currentId() );
- QVERIFY( res != resultMap.end() );
- QVERIFY( res.value().success == -1 );
- if ( error )
- res.value().success = 0;
- else
- res.value().success = 1;
-}
-
-void tst_QHttp::done( bool error )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d:done( %d )", http->currentId(), (int)error );
-#endif
- QVERIFY( http->currentId() == 0 );
- QVERIFY( current_id == 0 );
- QVERIFY( ids.isEmpty() );
- QVERIFY( cur_state == http->state() );
- QVERIFY( !http->hasPendingRequests() );
-
- QVERIFY( done_success == -1 );
- if ( error ) {
- QVERIFY( http->error() != QHttp::NoError );
- done_success = 0;
- } else {
- QVERIFY( http->error() == QHttp::NoError );
- done_success = 1;
- }
- QTestEventLoop::instance().exitLoop();
-}
-
-void tst_QHttp::stateChanged( int state )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d: stateChanged( %d )", http->currentId(), state );
-#endif
- QCOMPARE( http->currentId(), current_id );
- if ( ids.count() > 0 )
- CURRENTREQUEST_TEST;
-
- QVERIFY( state != cur_state );
- QVERIFY( state == http->state() );
- if ( state != QHttp::Unconnected && !connectionWithAuth ) {
- // make sure that the states are always emitted in the right order (for
- // this, we assume an ordering on the enum values, which they have at
- // the moment)
- // connections with authentication will possibly reconnect, so ignore them
- QVERIFY( cur_state < state );
- }
- cur_state = state;
-
- if (state == QHttp::Connecting) {
- bytesTotalSend = bytesTotal_init;
- bytesDoneSend = bytesDone_init;
- bytesTotalRead = bytesTotal_init;
- bytesDoneRead = bytesDone_init;
- }
-}
-
-void tst_QHttp::responseHeaderReceived( const QHttpResponseHeader &header )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d: responseHeaderReceived(\n---{\n%s}---)", http->currentId(), header.toString().toAscii().data() );
-#endif
- QCOMPARE( http->currentId(), current_id );
- if ( ids.count() > 1 ) {
- QVERIFY( http->hasPendingRequests() );
- } else {
- QVERIFY( !http->hasPendingRequests() );
- }
- CURRENTREQUEST_TEST;
-
- resultMap[ http->currentId() ].resp = header;
-}
-
-void tst_QHttp::readyRead( const QHttpResponseHeader & )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d: readyRead()", http->currentId() );
-#endif
- QCOMPARE( http->currentId(), current_id );
- if ( ids.count() > 1 ) {
- QVERIFY( http->hasPendingRequests() );
- } else {
- QVERIFY( !http->hasPendingRequests() );
- }
- QVERIFY( cur_state == http->state() );
- CURRENTREQUEST_TEST;
-
- if ( QTest::currentTestFunction() != QLatin1String("bytesAvailable") ) {
- int oldSize = readyRead_ba.size();
- quint64 bytesAvail = http->bytesAvailable();
- QByteArray ba = http->readAll();
- QVERIFY( (quint64) ba.size() == bytesAvail );
- readyRead_ba.resize( oldSize + ba.size() );
- memcpy( readyRead_ba.data()+oldSize, ba.data(), ba.size() );
-
- if ( bytesTotalRead > 0 ) {
- QVERIFY( (int)readyRead_ba.size() <= bytesTotalRead );
- }
- QVERIFY( (int)readyRead_ba.size() == bytesDoneRead );
- }
-}
-
-void tst_QHttp::dataSendProgress( int done, int total )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d: dataSendProgress( %d, %d )", http->currentId(), done, total );
-#endif
- QCOMPARE( http->currentId(), current_id );
- if ( ids.count() > 1 ) {
- QVERIFY( http->hasPendingRequests() );
- } else {
- QVERIFY( !http->hasPendingRequests() );
- }
- QVERIFY( cur_state == http->state() );
- CURRENTREQUEST_TEST;
-
- if ( bytesTotalSend == bytesTotal_init ) {
- bytesTotalSend = total;
- } else {
- QCOMPARE( bytesTotalSend, total );
- }
-
- QVERIFY( bytesTotalSend != bytesTotal_init );
- QVERIFY( bytesDoneSend <= done );
- bytesDoneSend = done;
- if ( bytesTotalSend > 0 ) {
- QVERIFY( bytesDoneSend <= bytesTotalSend );
- }
-
- if ( QTest::currentTestFunction() == QLatin1String("abort") ) {
- // ### it would be nice if we could specify in our testdata when to do
- // the abort
- if ( done >= total/100000 ) {
- if ( ids.count() != 1 ) {
- // do abort only once
- int tmpId = ids.first();
- ids.clear();
- ids << tmpId;
- http->abort();
- }
- }
- }
-}
-
-void tst_QHttp::dataReadProgress( int done, int total )
-{
-#if defined( DUMP_SIGNALS )
- qDebug( "%d: dataReadProgress( %d, %d )", http->currentId(), done, total );
-#endif
- QCOMPARE( http->currentId(), current_id );
- if ( ids.count() > 1 ) {
- QVERIFY( http->hasPendingRequests() );
- } else {
- QVERIFY( !http->hasPendingRequests() );
- }
- QVERIFY( cur_state == http->state() );
- CURRENTREQUEST_TEST;
-
- if ( bytesTotalRead == bytesTotal_init )
- bytesTotalRead = total;
- else {
- QVERIFY( bytesTotalRead == total );
- }
-
- QVERIFY( bytesTotalRead != bytesTotal_init );
- QVERIFY( bytesDoneRead <= done );
- bytesDoneRead = done;
- if ( bytesTotalRead > 0 ) {
- QVERIFY( bytesDoneRead <= bytesTotalRead );
- }
-
- if ( QTest::currentTestFunction() == QLatin1String("abort") ) {
- // ### it would be nice if we could specify in our testdata when to do
- // the abort
- if ( done >= total/100000 ) {
- if ( ids.count() != 1 ) {
- // do abort only once
- int tmpId = ids.first();
- ids.clear();
- ids << tmpId;
- http->abort();
- }
- }
- }
-}
-
-
-QHttp *tst_QHttp::newHttp(bool withAuth)
-{
- QHttp *nHttp = new QHttp( 0 );
- connect( nHttp, SIGNAL(requestStarted(int)),
- SLOT(requestStarted(int)) );
- connect( nHttp, SIGNAL(requestFinished(int,bool)),
- SLOT(requestFinished(int,bool)) );
- connect( nHttp, SIGNAL(done(bool)),
- SLOT(done(bool)) );
- connect( nHttp, SIGNAL(stateChanged(int)),
- SLOT(stateChanged(int)) );
- connect( nHttp, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)),
- SLOT(responseHeaderReceived(const QHttpResponseHeader&)) );
- connect( nHttp, SIGNAL(readyRead(const QHttpResponseHeader&)),
- SLOT(readyRead(const QHttpResponseHeader&)) );
- connect( nHttp, SIGNAL(dataSendProgress(int,int)),
- SLOT(dataSendProgress(int,int)) );
- connect( nHttp, SIGNAL(dataReadProgress(int,int)),
- SLOT(dataReadProgress(int,int)) );
-
- connectionWithAuth = withAuth;
- return nHttp;
-}
-
-void tst_QHttp::addRequest( QHttpRequestHeader header, int id )
-{
- ids << id;
- RequestResult res;
- res.req = header;
- res.success = -1;
- resultMap[ id ] = res;
-}
-
-bool tst_QHttp::headerAreEqual( const QHttpHeader &h1, const QHttpHeader &h2 )
-{
- if ( !h1.isValid() )
- return !h2.isValid();
- if ( !h2.isValid() )
- return !h1.isValid();
-
- return h1.toString() == h2.toString();
-}
-
-
-void tst_QHttp::reconnect()
-{
- reconnect_state_connect_count = 0;
-
- QHttp http;
-
- QObject::connect(&http, SIGNAL(stateChanged(int)), this, SLOT(reconnect_state(int)));
- http.setHost("trolltech.com", 80);
- http.get("/company/index.html");
- http.setHost("trolltech.com", 8080);
- http.get("/company/index.html");
-
- QTestEventLoop::instance().enterLoop(60);
- if (QTestEventLoop::instance().timeout())
- QFAIL("Network operation timed out");
-
- QCOMPARE(reconnect_state_connect_count, 1);
-
- QTestEventLoop::instance().enterLoop(60);
- if (QTestEventLoop::instance().timeout())
- QFAIL("Network operation timed out");
-
- QCOMPARE(reconnect_state_connect_count, 2);
-}
-
-void tst_QHttp::reconnect_state(int state)
-{
- if (state == QHttp::Connecting) {
- ++reconnect_state_connect_count;
- QTestEventLoop::instance().exitLoop();
- }
-}
-
-void tst_QHttp::setSocket()
-{
- QHttp *http = new QHttp;
- QPointer<QTcpSocket> replacementSocket = new QTcpSocket;
- http->setSocket(replacementSocket);
- QCoreApplication::processEvents();
- delete http;
- QVERIFY(replacementSocket);
- delete replacementSocket;
-}
-
-class Server : public QTcpServer
-{
- Q_OBJECT
-public:
- Server()
- {
- connect(this, SIGNAL(newConnection()),
- this, SLOT(serveConnection()));
- }
-
-private slots:
- void serveConnection()
- {
- QTcpSocket *socket = nextPendingConnection();
- socket->write("HTTP/1.1 404 Not found\r\n"
- "content-length: 4\r\n\r\nabcd");
- socket->disconnectFromHost();
- };
-};
-
-void tst_QHttp::unexpectedRemoteClose()
-{
- QFETCH_GLOBAL(int, proxyType);
- if (proxyType == QNetworkProxy::Socks5Proxy) {
- // This test doesn't make sense for SOCKS5
- return;
- }
-
- Server server;
- server.listen();
- QCoreApplication::instance()->processEvents();
-
- QEventLoop loop;
- QTimer::singleShot(3000, &loop, SLOT(quit()));
-
- QHttp http;
- QObject::connect(&http, SIGNAL(done(bool)), &loop, SLOT(quit()));
- QSignalSpy finishedSpy(&http, SIGNAL(requestFinished(int, bool)));
- QSignalSpy doneSpy(&http, SIGNAL(done(bool)));
-
- http.setHost("localhost", server.serverPort());
- http.get("/");
- http.get("/");
- http.get("/");
-
- loop.exec();
-
- QCOMPARE(finishedSpy.count(), 4);
- QVERIFY(!finishedSpy.at(1).at(1).toBool());
- QVERIFY(!finishedSpy.at(2).at(1).toBool());
- QVERIFY(!finishedSpy.at(3).at(1).toBool());
- QCOMPARE(doneSpy.count(), 1);
- QVERIFY(!doneSpy.at(0).at(0).toBool());
-}
-
-void tst_QHttp::pctEncodedPath()
-{
- QHttpRequestHeader header;
- header.setRequest("GET", "/index.asp/a=%20&b=%20&c=%20");
- QCOMPARE(header.toString(), QString("GET /index.asp/a=%20&b=%20&c=%20 HTTP/1.1\r\n\r\n"));
-}
-
-void tst_QHttp::caseInsensitiveKeys()
-{
- QHttpResponseHeader header("HTTP/1.1 200 OK\r\nContent-Length: 213\r\nX-Been-There: True\r\nLocation: http://www.TrollTech.com/\r\n\r\n");
- QVERIFY(header.hasKey("Content-Length"));
- QVERIFY(header.hasKey("X-Been-There"));
- QVERIFY(header.hasKey("Location"));
- QVERIFY(header.hasKey("content-length"));
- QVERIFY(header.hasKey("x-been-there"));
- QVERIFY(header.hasKey("location"));
- QCOMPARE(header.value("Content-Length"), QString("213"));
- QCOMPARE(header.value("X-Been-There"), QString("True"));
- QCOMPARE(header.value("Location"), QString("http://www.TrollTech.com/"));
- QCOMPARE(header.value("content-length"), QString("213"));
- QCOMPARE(header.value("x-been-there"), QString("True"));
- QCOMPARE(header.value("location"), QString("http://www.TrollTech.com/"));
- QCOMPARE(header.allValues("location"), QStringList("http://www.TrollTech.com/"));
-
- header.addValue("Content-Length", "213");
- header.addValue("Content-Length", "214");
- header.addValue("Content-Length", "215");
- qDebug() << header.toString();
-}
-
-void tst_QHttp::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
-{
- proxyAuthCalled = true;
- auth->setUser("qsockstest");
- auth->setPassword("password");
-}
-
-void tst_QHttp::postAuthNtlm()
-{
- QSKIP("NTLM not working");
-
- QHostInfo info = QHostInfo::fromName(QHostInfo::localHostName());
- QByteArray postData("Hello World");
- QHttp http;
-
- http.setHost(QtNetworkSettings::serverName());
- http.setProxy(QtNetworkSettings::serverName(), 3130);
- http.post("/", postData);
-
- proxyAuthCalled = false;
- connect(&http, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
- SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(3);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY(proxyAuthCalled);
- QVERIFY(!QTestEventLoop::instance().timeout());
-};
-
-#ifndef QT_NO_OPENSSL
-void tst_QHttp::proxyAndSsl()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- QHttp http;
-
- http.setHost(QtNetworkSettings::serverName(), QHttp::ConnectionModeHttps);
- http.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3129));
- http.get("/");
-
- proxyAuthCalled = false;
- connect(&http, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
- SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
- connect(&http, SIGNAL(sslErrors(QList<QSslError>)),
- &http, SLOT(ignoreSslErrors()));
-
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(3);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY(!QTestEventLoop::instance().timeout());
- QVERIFY(proxyAuthCalled);
-
- QHttpResponseHeader header = http.lastResponse();
- QVERIFY(header.isValid());
- QVERIFY(header.statusCode() < 400); // Should be 200, but as long as it's not an error, we're happy
-}
-#endif
-
-#ifndef QT_NO_OPENSSL
-void tst_QHttp::cachingProxyAndSsl()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- QHttp http;
-
- http.setHost(QtNetworkSettings::serverName(), QHttp::ConnectionModeHttps);
- http.setProxy(QNetworkProxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::serverName(), 3129));
- http.get("/");
-
- proxyAuthCalled = false;
- connect(&http, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
- SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(3);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY(!QTestEventLoop::instance().timeout());
- QVERIFY(!proxyAuthCalled); // NOT called! QHttp should get a socket error
- QVERIFY(http.state() != QHttp::Connected);
-
- QHttpResponseHeader header = http.lastResponse();
- QVERIFY(!header.isValid());
-}
-#endif
-
-void tst_QHttp::emptyBodyInReply()
-{
- // Note: if this test starts failing, please verify the date on the file
- // returned by Apache on http://netiks.troll.no/
- // It is right now hard-coded to the date below
- QHttp http;
- http.setHost(QtNetworkSettings::serverName());
-
- QHttpRequestHeader headers("GET", "/");
- headers.addValue("If-Modified-Since", "Sun, 16 Nov 2008 12:29:51 GMT");
- headers.addValue("Host", QtNetworkSettings::serverName());
- http.request(headers);
-
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(10);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- // check the reply
- if (http.lastResponse().statusCode() != 304) {
- qWarning() << http.lastResponse().statusCode() << qPrintable(http.lastResponse().reasonPhrase());
- qWarning() << "Last-Modified:" << qPrintable(http.lastResponse().value("last-modified"));
- QFAIL("Server replied with the wrong status code; see warning output");
- }
-}
-
-void tst_QHttp::abortSender()
-{
- QHttp *http = qobject_cast<QHttp *>(sender());
- if (http)
- http->abort();
-}
-
-void tst_QHttp::abortInReadyRead()
-{
- QHttp http;
- http.setHost(QtNetworkSettings::serverName());
- http.get("/qtest/bigfile");
-
- qRegisterMetaType<QHttpResponseHeader>();
- QSignalSpy spy(&http, SIGNAL(readyRead(QHttpResponseHeader)));
-
- QObject::connect(&http, SIGNAL(readyRead(QHttpResponseHeader)), this, SLOT(abortSender()));
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(10);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY2(!QTestEventLoop::instance().timeout(), "Network timeout");
- QVERIFY(http.state() != QHttp::Connected);
-
- QCOMPARE(spy.count(), 1);
-}
-
-void tst_QHttp::abortInResponseHeaderReceived()
-{
- QHttp http;
- http.setHost(QtNetworkSettings::serverName());
- http.get("/qtest/bigfile");
-
- qRegisterMetaType<QHttpResponseHeader>();
- QSignalSpy spy(&http, SIGNAL(readyRead(QHttpResponseHeader)));
-
- QObject::connect(&http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(abortSender()));
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(10);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY2(!QTestEventLoop::instance().timeout(), "Network timeout");
- QVERIFY(http.state() != QHttp::Connected);
-
- QCOMPARE(spy.count(), 0);
-}
-
-void tst_QHttp::connectionClose()
-{
- // This was added in response to bug 176822
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- QHttp http;
- ClosingServer server;
- http.setHost("localhost", QHttp::ConnectionModeHttps, server.serverPort());
- http.get("/login/gateway/processLogin");
-
- // another possibility:
- //http.setHost("nexus.passport.com", QHttp::ConnectionModeHttps, 443);
- //http.get("/rdr/pprdr.asp");
-
- QObject::connect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTestEventLoop::instance().enterLoop(900);
- QObject::disconnect(&http, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QVERIFY(!QTestEventLoop::instance().timeout());
-}
-
-void tst_QHttp::nestedEventLoop_slot(int id)
-{
- if (!ids.contains(id))
- return;
- QEventLoop subloop;
-
- // 16 seconds: fluke times out in 15 seconds, which triggers a QTcpSocket error
- QTimer::singleShot(16000, &subloop, SLOT(quit()));
- subloop.exec();
-
- QTestEventLoop::instance().exitLoop();
-}
-
-void tst_QHttp::nestedEventLoop()
-{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- http = new QHttp;
- http->setHost(QtNetworkSettings::serverName());
- int getId = http->get("/");
-
- ids.clear();
- ids << getId;
-
- QSignalSpy spy(http, SIGNAL(requestStarted(int)));
- QSignalSpy spy2(http, SIGNAL(done(bool)));
-
- connect(http, SIGNAL(requestFinished(int,bool)), SLOT(nestedEventLoop_slot(int)));
- QTestEventLoop::instance().enterLoop(20);
-
- QVERIFY2(!QTestEventLoop::instance().timeout(), "Network timeout");
-
- // Find out how many signals with the first argument equalling our id were found
- int spyCount = 0;
- for (int i = 0; i < spy.count(); ++i)
- if (spy.at(i).at(0).toInt() == getId)
- ++spyCount;
-
- // each signal spied should have been emitted only once
- QCOMPARE(spyCount, 1);
- QCOMPARE(spy2.count(), 1);
-}
-
-QTEST_MAIN(tst_QHttp)
-#include "tst_qhttp.moc"
diff --git a/tests/auto/network/access/qhttp/webserver/cgi-bin/retrieve_testfile.cgi b/tests/auto/network/access/qhttp/webserver/cgi-bin/retrieve_testfile.cgi
deleted file mode 100755
index 7896c505ca..0000000000
--- a/tests/auto/network/access/qhttp/webserver/cgi-bin/retrieve_testfile.cgi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-echo "Content-type: text/plain";
-echo
-cat testfile
-echo "no file retrieved" > testfile
diff --git a/tests/auto/network/access/qhttp/webserver/cgi-bin/rfc.cgi b/tests/auto/network/access/qhttp/webserver/cgi-bin/rfc.cgi
deleted file mode 100755
index c68688ea31..0000000000
--- a/tests/auto/network/access/qhttp/webserver/cgi-bin/rfc.cgi
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-echo "Content-type: text/plain";
-echo
-cat ../rfc3252
diff --git a/tests/auto/network/access/qhttp/webserver/cgi-bin/store_testfile.cgi b/tests/auto/network/access/qhttp/webserver/cgi-bin/store_testfile.cgi
deleted file mode 100755
index e950f2af04..0000000000
--- a/tests/auto/network/access/qhttp/webserver/cgi-bin/store_testfile.cgi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-echo "Content-type: text/plain";
-echo
-echo "file stored under 'testfile'"
-cat > testfile
diff --git a/tests/auto/network/access/qhttp/webserver/index.html b/tests/auto/network/access/qhttp/webserver/index.html
deleted file mode 100644
index b80c61bf0a..0000000000
--- a/tests/auto/network/access/qhttp/webserver/index.html
+++ /dev/null
@@ -1,899 +0,0 @@
-
-
-
-
-
-
-Network Working Group H. Kennedy
-Request for Comments: 3252 Mimezine
-Category: Informational 1 April 2002
-
-
- Binary Lexical Octet Ad-hoc Transport
-
-Status of this Memo
-
- This memo provides information for the Internet community. It does
- not specify an Internet standard of any kind. Distribution of this
- memo is unlimited.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
-Abstract
-
- This document defines a reformulation of IP and two transport layer
- protocols (TCP and UDP) as XML applications.
-
-1. Introduction
-
-1.1. Overview
-
- This document describes the Binary Lexical Octet Ad-hoc Transport
- (BLOAT): a reformulation of a widely-deployed network-layer protocol
- (IP [RFC791]), and two associated transport layer protocols (TCP
- [RFC793] and UDP [RFC768]) as XML [XML] applications. It also
- describes methods for transporting BLOAT over Ethernet and IEEE 802
- networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
- across the public Internet.
-
-1.2. Motivation
-
- The wild popularity of XML as a basis for application-level protocols
- such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
- Object Access Protocol [SOAP], and Jabber [JABBER] prompted
- investigation into the possibility of extending the use of XML in the
- protocol stack. Using XML at both the transport and network layer in
- addition to the application layer would provide for an amazing amount
- of power and flexibility while removing dependencies on proprietary
- and hard-to-understand binary protocols. This protocol unification
- would also allow applications to use a single XML parser for all
- aspects of their operation, eliminating developer time spent figuring
- out the intricacies of each new protocol, and moving the hard work of
-
-
-
-
-Kennedy Informational [Page 1]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- parsing to the XML toolset. The use of XML also mitigates concerns
- over "network vs. host" byte ordering which is at the root of many
- network application bugs.
-
-1.3. Relation to Existing Protocols
-
- The reformulations specified in this RFC follow as closely as
- possible the spirit of the RFCs on which they are based, and so MAY
- contain elements or attributes that would not be needed in a pure
- reworking (e.g. length attributes, which are implicit in XML.)
-
- The layering of network and transport protocols are maintained in
- this RFC despite the optimizations that could be made if the line
- were somewhat blurred (i.e. merging TCP and IP into a single, larger
- element in the DTD) in order to foster future use of this protocol as
- a basis for reformulating other protocols (such as ICMP.)
-
- Other than the encoding, the behavioral aspects of each of the
- existing protocols remain unchanged. Routing, address spaces, TCP
- congestion control, etc. behave as specified in the extant standards.
- Adapting to new standards and experimental algorithm heuristics for
- improving performance will become much easier once the move to BLOAT
- has been completed.
-
-1.4. Requirement Levels
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
- "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
- document are to be interpreted as described in BCP 14, RFC 2119
- [RFC2119].
-
-2. IPoXML
-
- This protocol MUST be implemented to be compliant with this RFC.
- IPoXML is the root protocol REQUIRED for effective use of TCPoXML
- (section 3.) and higher-level application protocols.
-
- The DTD for this document type can be found in section 7.1.
-
- The routing of IPoXML can be easily implemented on hosts with an XML
- parser, as the regular structure lends itself handily to parsing and
- validation of the document/datagram and then processing the
- destination address, TTL, and checksum before sending it on to its
- next-hop.
-
- The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
- wider deployment of IPv4 and the fact that implementing IPv6 as XML
- would have exceeded the 1500 byte Ethernet MTU.
-
-
-
-Kennedy Informational [Page 2]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- All BLOAT implementations MUST use - and specify - the UTF-8 encoding
- of RFC 2279 [RFC2279]. All BLOAT document/datagrams MUST be well-
- formed and include the XMLDecl.
-
-2.1. IP Description
-
- A number of items have changed (for the better) from the original IP
- specification. Bit-masks, where present have been converted into
- human-readable values. IP addresses are listed in their dotted-
- decimal notation [RFC1123]. Length and checksum values are present
- as decimal integers.
-
- To calculate the length and checksum fields of the IP element, a
- canonicalized form of the element MUST be used. The canonical form
- SHALL have no whitespace (including newline characters) between
- elements and only one space character between attributes. There
- SHALL NOT be a space following the last attribute in an element.
-
- An iterative method SHOULD be used to calculate checksums, as the
- length field will vary based on the size of the checksum.
-
- The payload element bears special attention. Due to the character
- set restrictions of XML, the payload of IP datagrams (which MAY
- contain arbitrary data) MUST be encoded for transport. This RFC
- REQUIRES the contents of the payload to be encoded in the base-64
- encoding of RFC 2045 [RFC2045], but removes the requirement that the
- encoded output MUST be wrapped on 76-character lines.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 3]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-2.2. Example Datagram
-
- The following is an example IPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- <ip>
- <header length="474">
- <version value="4"/>
- <tos precedence="Routine" delay="Normal" throughput="Normal"
- relibility="Normal" reserved="0"/>
- <total.length value="461"/>
- <id value="1"/>
- <flags reserved="0" df="dont" mf="last"/>
- <offset value="0"/>
- <ttl value="255"/>
- <protocol value="6"/>
- <checksum value="8707"/>
- <source address="10.0.0.22"/>
- <destination address="10.0.0.1"/>
- <options>
- <end copied="0" class="0" number="0"/>
- </options>
- <padding pad="0"/>
- </header>
- <payload>
- </payload>
- </ip>
-
-3. TCPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.2.
-
-3.1. TCP Description
-
- A number of items have changed from the original TCP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
- To calculate the length and checksum fields of the TCP element, a
- canonicalized form of the element MUST be used as in section 2.1.
-
- An iterative method SHOULD be used to calculate checksums as in
- section 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
-
-
-Kennedy Informational [Page 4]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- The TCP offset element was expanded to a maximum of 255 from 16 to
- allow for the increased size of the header in XML.
-
- TCPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-3.2. Example Datagram
-
- The following is an example TCPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- <tcp>
- <tcp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <sequence number="322622954"/>
- <acknowledgement number="689715995"/>
- <offset number=""/>
- <reserved value="0"/>
- <control syn="1" ack="1"/>
- <window size="1"/>
- <urgent pointer="0"/>
- <checksum value="2988"/>
- <tcp.options>
- <tcp.end kind="0"/>
- </tcp.options>
- <padding pad="0"/>
- </tcp.header>
- <payload>
- </payload>
- </tcp>
-
-4. UDPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.3.
-
-4.1. UDP Description
-
- A number of items have changed from the original UDP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
-
-
-
-
-
-
-Kennedy Informational [Page 5]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- To calculate the length and checksum fields of the UDP element, a
- canonicalized form of the element MUST be used as in section 2.1. An
- iterative method SHOULD be used to calculate checksums as in section
- 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
- UDPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-4.2. Example Datagram
-
- The following is an example UDPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- <udp>
- <udp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <udp.length value="143"/>
- <checksum value="2988"/>
- </udp.header>
- <payload>
- </payload>
- </udp>
-
-5. Network Transport
-
- This document provides for the transmission of BLOAT datagrams over
- two common families of physical layer transport. Future RFCs will
- address additional transports as routing vendors catch up to the
- specification, and we begin to see BLOAT routed across the Internet
- backbone.
-
-5.1. Ethernet
-
- BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the
- exception that the type field of the Ethernet frame MUST contain the
- value 0xBEEF. The first 5 octets of the Ethernet frame payload will
- be 0x3c 3f 78 6d 6c ("<?xml".)
-
-5.2. IEEE 802
-
- BLOAT is encapsulated in IEEE 802 Networks as in [RFC1042] except
- that the protocol type code for IPoXML is 0xBEEF.
-
-
-
-
-
-Kennedy Informational [Page 6]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-6. Gatewaying over IP
-
- In order to facilitate the gradual introduction of BLOAT into the
- public Internet, BLOAT MAY be encapsulated in IP as in [RFC2003] to
- gateway between networks that run BLOAT natively on their LANs.
-
-7. DTDs
-
- The Transport DTDs (7.2. and 7.3.) build on the definitions in the
- Network DTD (7.1.)
-
- The DTDs are referenced by their PubidLiteral and SystemLiteral (from
- [XML]) although it is understood that most IPoXML implementations
- will not need to pull down the DTD, as it will normally be embedded
- in the implementation, and presents something of a catch-22 if you
- need to load part of your network protocol over the network.
-
-7.1. IPoXML DTD
-
- <!--
- DTD for IP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- -->
- <!--
- DTD data types:
-
- Digits [0..9]+
-
- Precedence "NetworkControl | InternetworkControl |
- CRITIC | FlashOverride | Flash | Immediate |
- Priority | Routine"
-
- IP4Addr "dotted-decimal" notation of [RFC1123]
-
- Class [0..3]
-
- Sec "Unclassified | Confidential | EFTO | MMMM | PROG |
- Restricted | Secret | Top Secret | Reserved"
-
- Compartments [0..65535]
-
- Handling [0..65535]
-
- TCC [0..16777216]
-
- -->
-
-
-
-Kennedy Informational [Page 7]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ENTITY % Digits "CDATA">
- <!ENTITY % Precedence "CDATA">
- <!ENTITY % IP4Addr "CDATA">
- <!ENTITY % Class "CDATA">
- <!ENTITY % Sec "CDATA">
- <!ENTITY % Compartments "CDATA">
- <!ENTITY % Handling "CDATA">
- <!ENTITY % TCC "CDATA">
-
- <!ELEMENT ip (header, payload)>
-
- <!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
- protocol, checksum, source, destination, options,
- padding)>
- <!-- length of header in 32-bit words -->
- <!ATTLIST header
- length %Digits; #REQUIRED>
-
- <!ELEMENT version EMPTY>
- <!-- ip version. SHOULD be "4" -->
- <!ATTLIST version
- value %Digits; #REQUIRED>
-
- <!ELEMENT tos EMPTY>
- <!ATTLIST tos
- precedence %Precedence; #REQUIRED
- delay (normal | low) #REQUIRED
- throughput (normal | high) #REQUIRED
- relibility (normal | high) #REQUIRED
- reserved CDATA #FIXED "0">
-
- <!ELEMENT total.length EMPTY>
- <!--
- total length of datagram (header and payload) in octets, MUST be
- less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
- ethernets).
- -->
- <!ATTLIST total.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT id EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST id
- value %Digits; #REQUIRED>
-
- <!ELEMENT flags EMPTY>
- <!-- df = don't fragment, mf = more fragments -->
- <!ATTLIST flags
-
-
-
-Kennedy Informational [Page 8]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- reserved CDATA #FIXED "0"
- df (may|dont) #REQUIRED
- mf (last|more) #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= offset <= 8192 measured in 8 octet (64-bit) chunks -->
- <!ATTLIST offset
- value %Digits; #REQUIRED>
-
- <!ELEMENT ttl EMPTY>
- <!-- 0 <= ttl <= 255 -->
- <!ATTLIST ttl
- value %Digits; #REQUIRED>
-
- <!ELEMENT protocol EMPTY>
- <!-- 0 <= protocol <= 255 (per IANA) -->
- <!ATTLIST protocol
- value %Digits; #REQUIRED>
-
- <!ELEMENT checksum EMPTY>
- <!-- 0 <= checksum <= 65535 (over header only) -->
- <!ATTLIST checksum
- value %Digits; #REQUIRED>
-
- <!ELEMENT source EMPTY>
- <!ATTLIST source
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT destination EMPTY>
- <!ATTLIST destination
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT options ( end | noop | security | loose | strict | record
- | stream | timestamp )*>
-
- <!ELEMENT end EMPTY>
- <!ATTLIST end
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "0">
-
- <!ELEMENT noop EMPTY>
- <!ATTLIST noop
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "1">
-
- <!ELEMENT security EMPTY>
-
-
-
-Kennedy Informational [Page 9]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST security
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "2"
- length CDATA #FIXED "11"
- security %Sec; #REQUIRED
- compartments %Compartments; #REQUIRED
- handling %Handling; #REQUIRED
- tcc %TCC; #REQUIRED>
- <!ELEMENT loose (hop)+>
- <!ATTLIST loose
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "3"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT hop EMPTY>
- <!ATTLIST hop
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT strict (hop)+>
- <!ATTLIST strict
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "9"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT record (hop)+>
- <!ATTLIST record
- copied CDATA #FIXED "0"
- class CDATA #FIXED "0"
- number CDATA #FIXED "7"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT stream EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST stream
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "8"
- length CDATA #FIXED "4"
- id %Digits; #REQUIRED>
-
- <!ELEMENT timestamp (tstamp)+>
- <!-- 0 <= oflw <=15 -->
-
-
-
-Kennedy Informational [Page 10]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST timestamp
- copied CDATA #FIXED "0"
- class CDATA #FIXED "2"
- number CDATA #FIXED "4"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED
- oflw %Digits; #REQUIRED
- flag (0 | 1 | 3) #REQUIRED>
-
- <!ELEMENT tstamp EMPTY>
- <!ATTLIST tstamp
- time %Digits; #REQUIRED
- address %IP4Addr; #IMPLIED>
- <!--
- padding to bring header to 32-bit boundary.
- pad MUST be "0"*
- -->
- <!ELEMENT padding EMPTY>
- <!ATTLIST padding
- pad CDATA #REQUIRED>
-
- <!-- payload MUST be encoded as base-64 [RFC2045], as modified
- by section 2.1 of this RFC -->
- <!ELEMENT payload (CDATA)>
-
-7.2. TCPoXML DTD
-
- <!--
- DTD for TCP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- -->
-
- <!-- the pseudoheader is only included for checksum calculations -->
- <!ELEMENT tcp (tcp.pseudoheader?, tcp.header, payload)>
-
- <!ELEMENT tcp.header (src, dest, sequence, acknowledgement, offset,
- reserved, control, window, checksum, urgent,
- tcp.options, padding)>
-
- <!ELEMENT src EMPTY>
- <!-- 0 <= port <= 65,535 -->
- <!ATTLIST src
- port %Digits; #REQUIRED>
-
- <!ELEMENT dest EMPTY>
- <!-- 0 <= port <= 65,535 -->
-
-
-
-Kennedy Informational [Page 11]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST dest
- port %Digits; #REQUIRED>
-
- <!ELEMENT sequence EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST sequence
- number %Digits; #REQUIRED>
-
- <!ELEMENT acknowledgement EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST acknowledgement
- number %Digits; #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= number <= 255 -->
- <!ATTLIST offset
- number %Digits; #REQUIRED>
-
- <!ELEMENT reserved EMPTY>
- <!ATTLIST reserved
- value CDATA #FIXED "0">
-
- <!ELEMENT control EMPTY>
- <!ATTLIST control
- urg (0|1) #IMPLIED
- ack (0|1) #IMPLIED
- psh (0|1) #IMPLIED
- rst (0|1) #IMPLIED
- syn (0|1) #IMPLIED
- fin (0|1) #IMPLIED>
-
- <!ELEMENT window EMPTY>
- <!-- 0 <= size <= 65,535 -->
- <!ATTLIST window
- size %Digits; #REQUIRED>
-
- <!--
- checksum as in ip, but with
- the following pseudo-header added into the tcp element:
- -->
- <!ELEMENT tcp.pseudoheader (source, destination, protocol,
- tcp.length)>
-
- <!--
- tcp header + data length in octets. does not include the size of
-
- the pseudoheader.
- -->
-
-
-
-Kennedy Informational [Page 12]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ELEMENT tcp.length EMPTY>
- <!ATTLIST tcp.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT urgent EMPTY>
- <!-- 0 <= pointer <= 65,535 -->
- <!ATTLIST urgent
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT tcp.options (tcp.end | tcp.noop | tcp.mss)+>
-
- <!ELEMENT tcp.end EMPTY>
- <!ATTLIST tcp.end
- kind CDATA #FIXED "0">
-
- <!ELEMENT tcp.noop EMPTY>
- <!ATTLIST tcp.noop
- kind CDATA #FIXED "1">
-
- <!ELEMENT tcp.mss EMPTY>
- <!ATTLIST tcp.mss
- kind CDATA #FIXED "2"
- length CDATA #FIXED "4"
- size %Digits; #REQUIRED>
-
-7.3. UDPoXML DTD
-
- <!--
- DTD for UDP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- -->
-
- <!ELEMENT udp (udp.pseudoheader?, udp.header, payload)>
-
- <!ELEMENT udp.header (src, dest, udp.length, checksum)>
-
- <!ELEMENT udp.pseudoheader (source, destination, protocol,
- udp.length)>
-
- <!--
- udp header + data length in octets. does not include the size of
- the pseudoheader.
- -->
- <!ELEMENT udp.length EMPTY>
- <!ATTLIST udp.length
- value %Digits; #REQUIRED>
-
-
-
-Kennedy Informational [Page 13]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-8. Security Considerations
-
- XML, as a subset of SGML, has the same security considerations as
- specified in SGML Media Types [RFC1874]. Security considerations
- that apply to IP, TCP and UDP also likely apply to BLOAT as it does
- not attempt to correct for issues not related to message format.
-
-9. References
-
- [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt,
- February 2002. (Work in Progress)
-
- [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
- August 1980.
-
- [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791,
- September 1981.
-
- [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC
- 793, September 1981.
-
- [RFC894] Hornig, C., "Standard for the Transmission of IP
- Datagrams over Ethernet Networks.", RFC 894, April 1984.
-
- [RFC1042] Postel, J. and J. Reynolds, "Standard for the
- Transmission of IP Datagrams Over IEEE 802 Networks", STD
- 43, RFC 1042, February 1988.
-
- [RFC1123] Braden, R., "Requirements for Internet Hosts -
- Application and Support", RFC 1123, October 1989.
-
- [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December
- 1995.
-
- [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
- October 1996.
-
- [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
- Extensions (MIME) Part One: Format of Internet Message
- Bodies", RFC 2045, November 1996.
-
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
- Requirement Levels", BCP 14, RFC 2119, March 1997.
-
- [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
- 10646", RFC 2279, January 1998.
-
-
-
-
-
-Kennedy Informational [Page 14]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
- (IPv6) Specification", RFC 2460, December 1998.
-
- [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core",
- RFC 3080, March 2001.
-
- [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A.,
- Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D.,
- "Simple Object Access Protocol (SOAP) 1.1" World Wide Web
- Consortium Note, May 2000 http://www.w3.org/TR/SOAP/
-
- [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible
- Markup Language (XML)" World Wide Web Consortium
- Recommendation REC- xml-19980210.
- http://www.w3.org/TR/1998/REC-xml-19980210
-
-10. Author's Address
-
- Hugh Kennedy
- Mimezine
- 1060 West Addison
- Chicago, IL 60613
- USA
-
- EMail: kennedyh@engin.umich.edu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 15]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-11. Full Copyright Statement
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published
- and distributed, in whole or in part, without restriction of any
- kind, provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be
- followed, or as required to translate it into languages other than
- English.
-
- The limited permissions granted above are perpetual and will not be
- revoked by the Internet Society or its successors or assigns.
-
- This document and the information contained herein is provided on an
- "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
- TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
- BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-Acknowledgement
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 16]
-
diff --git a/tests/auto/network/access/qhttp/webserver/rfc3252 b/tests/auto/network/access/qhttp/webserver/rfc3252
deleted file mode 100644
index b80c61bf0a..0000000000
--- a/tests/auto/network/access/qhttp/webserver/rfc3252
+++ /dev/null
@@ -1,899 +0,0 @@
-
-
-
-
-
-
-Network Working Group H. Kennedy
-Request for Comments: 3252 Mimezine
-Category: Informational 1 April 2002
-
-
- Binary Lexical Octet Ad-hoc Transport
-
-Status of this Memo
-
- This memo provides information for the Internet community. It does
- not specify an Internet standard of any kind. Distribution of this
- memo is unlimited.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
-Abstract
-
- This document defines a reformulation of IP and two transport layer
- protocols (TCP and UDP) as XML applications.
-
-1. Introduction
-
-1.1. Overview
-
- This document describes the Binary Lexical Octet Ad-hoc Transport
- (BLOAT): a reformulation of a widely-deployed network-layer protocol
- (IP [RFC791]), and two associated transport layer protocols (TCP
- [RFC793] and UDP [RFC768]) as XML [XML] applications. It also
- describes methods for transporting BLOAT over Ethernet and IEEE 802
- networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
- across the public Internet.
-
-1.2. Motivation
-
- The wild popularity of XML as a basis for application-level protocols
- such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
- Object Access Protocol [SOAP], and Jabber [JABBER] prompted
- investigation into the possibility of extending the use of XML in the
- protocol stack. Using XML at both the transport and network layer in
- addition to the application layer would provide for an amazing amount
- of power and flexibility while removing dependencies on proprietary
- and hard-to-understand binary protocols. This protocol unification
- would also allow applications to use a single XML parser for all
- aspects of their operation, eliminating developer time spent figuring
- out the intricacies of each new protocol, and moving the hard work of
-
-
-
-
-Kennedy Informational [Page 1]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- parsing to the XML toolset. The use of XML also mitigates concerns
- over "network vs. host" byte ordering which is at the root of many
- network application bugs.
-
-1.3. Relation to Existing Protocols
-
- The reformulations specified in this RFC follow as closely as
- possible the spirit of the RFCs on which they are based, and so MAY
- contain elements or attributes that would not be needed in a pure
- reworking (e.g. length attributes, which are implicit in XML.)
-
- The layering of network and transport protocols are maintained in
- this RFC despite the optimizations that could be made if the line
- were somewhat blurred (i.e. merging TCP and IP into a single, larger
- element in the DTD) in order to foster future use of this protocol as
- a basis for reformulating other protocols (such as ICMP.)
-
- Other than the encoding, the behavioral aspects of each of the
- existing protocols remain unchanged. Routing, address spaces, TCP
- congestion control, etc. behave as specified in the extant standards.
- Adapting to new standards and experimental algorithm heuristics for
- improving performance will become much easier once the move to BLOAT
- has been completed.
-
-1.4. Requirement Levels
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
- "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
- document are to be interpreted as described in BCP 14, RFC 2119
- [RFC2119].
-
-2. IPoXML
-
- This protocol MUST be implemented to be compliant with this RFC.
- IPoXML is the root protocol REQUIRED for effective use of TCPoXML
- (section 3.) and higher-level application protocols.
-
- The DTD for this document type can be found in section 7.1.
-
- The routing of IPoXML can be easily implemented on hosts with an XML
- parser, as the regular structure lends itself handily to parsing and
- validation of the document/datagram and then processing the
- destination address, TTL, and checksum before sending it on to its
- next-hop.
-
- The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
- wider deployment of IPv4 and the fact that implementing IPv6 as XML
- would have exceeded the 1500 byte Ethernet MTU.
-
-
-
-Kennedy Informational [Page 2]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- All BLOAT implementations MUST use - and specify - the UTF-8 encoding
- of RFC 2279 [RFC2279]. All BLOAT document/datagrams MUST be well-
- formed and include the XMLDecl.
-
-2.1. IP Description
-
- A number of items have changed (for the better) from the original IP
- specification. Bit-masks, where present have been converted into
- human-readable values. IP addresses are listed in their dotted-
- decimal notation [RFC1123]. Length and checksum values are present
- as decimal integers.
-
- To calculate the length and checksum fields of the IP element, a
- canonicalized form of the element MUST be used. The canonical form
- SHALL have no whitespace (including newline characters) between
- elements and only one space character between attributes. There
- SHALL NOT be a space following the last attribute in an element.
-
- An iterative method SHOULD be used to calculate checksums, as the
- length field will vary based on the size of the checksum.
-
- The payload element bears special attention. Due to the character
- set restrictions of XML, the payload of IP datagrams (which MAY
- contain arbitrary data) MUST be encoded for transport. This RFC
- REQUIRES the contents of the payload to be encoded in the base-64
- encoding of RFC 2045 [RFC2045], but removes the requirement that the
- encoded output MUST be wrapped on 76-character lines.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 3]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-2.2. Example Datagram
-
- The following is an example IPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- <ip>
- <header length="474">
- <version value="4"/>
- <tos precedence="Routine" delay="Normal" throughput="Normal"
- relibility="Normal" reserved="0"/>
- <total.length value="461"/>
- <id value="1"/>
- <flags reserved="0" df="dont" mf="last"/>
- <offset value="0"/>
- <ttl value="255"/>
- <protocol value="6"/>
- <checksum value="8707"/>
- <source address="10.0.0.22"/>
- <destination address="10.0.0.1"/>
- <options>
- <end copied="0" class="0" number="0"/>
- </options>
- <padding pad="0"/>
- </header>
- <payload>
- </payload>
- </ip>
-
-3. TCPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.2.
-
-3.1. TCP Description
-
- A number of items have changed from the original TCP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
- To calculate the length and checksum fields of the TCP element, a
- canonicalized form of the element MUST be used as in section 2.1.
-
- An iterative method SHOULD be used to calculate checksums as in
- section 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
-
-
-Kennedy Informational [Page 4]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- The TCP offset element was expanded to a maximum of 255 from 16 to
- allow for the increased size of the header in XML.
-
- TCPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-3.2. Example Datagram
-
- The following is an example TCPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- <tcp>
- <tcp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <sequence number="322622954"/>
- <acknowledgement number="689715995"/>
- <offset number=""/>
- <reserved value="0"/>
- <control syn="1" ack="1"/>
- <window size="1"/>
- <urgent pointer="0"/>
- <checksum value="2988"/>
- <tcp.options>
- <tcp.end kind="0"/>
- </tcp.options>
- <padding pad="0"/>
- </tcp.header>
- <payload>
- </payload>
- </tcp>
-
-4. UDPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.3.
-
-4.1. UDP Description
-
- A number of items have changed from the original UDP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
-
-
-
-
-
-
-Kennedy Informational [Page 5]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- To calculate the length and checksum fields of the UDP element, a
- canonicalized form of the element MUST be used as in section 2.1. An
- iterative method SHOULD be used to calculate checksums as in section
- 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
- UDPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-4.2. Example Datagram
-
- The following is an example UDPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- <udp>
- <udp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <udp.length value="143"/>
- <checksum value="2988"/>
- </udp.header>
- <payload>
- </payload>
- </udp>
-
-5. Network Transport
-
- This document provides for the transmission of BLOAT datagrams over
- two common families of physical layer transport. Future RFCs will
- address additional transports as routing vendors catch up to the
- specification, and we begin to see BLOAT routed across the Internet
- backbone.
-
-5.1. Ethernet
-
- BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the
- exception that the type field of the Ethernet frame MUST contain the
- value 0xBEEF. The first 5 octets of the Ethernet frame payload will
- be 0x3c 3f 78 6d 6c ("<?xml".)
-
-5.2. IEEE 802
-
- BLOAT is encapsulated in IEEE 802 Networks as in [RFC1042] except
- that the protocol type code for IPoXML is 0xBEEF.
-
-
-
-
-
-Kennedy Informational [Page 6]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-6. Gatewaying over IP
-
- In order to facilitate the gradual introduction of BLOAT into the
- public Internet, BLOAT MAY be encapsulated in IP as in [RFC2003] to
- gateway between networks that run BLOAT natively on their LANs.
-
-7. DTDs
-
- The Transport DTDs (7.2. and 7.3.) build on the definitions in the
- Network DTD (7.1.)
-
- The DTDs are referenced by their PubidLiteral and SystemLiteral (from
- [XML]) although it is understood that most IPoXML implementations
- will not need to pull down the DTD, as it will normally be embedded
- in the implementation, and presents something of a catch-22 if you
- need to load part of your network protocol over the network.
-
-7.1. IPoXML DTD
-
- <!--
- DTD for IP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- -->
- <!--
- DTD data types:
-
- Digits [0..9]+
-
- Precedence "NetworkControl | InternetworkControl |
- CRITIC | FlashOverride | Flash | Immediate |
- Priority | Routine"
-
- IP4Addr "dotted-decimal" notation of [RFC1123]
-
- Class [0..3]
-
- Sec "Unclassified | Confidential | EFTO | MMMM | PROG |
- Restricted | Secret | Top Secret | Reserved"
-
- Compartments [0..65535]
-
- Handling [0..65535]
-
- TCC [0..16777216]
-
- -->
-
-
-
-Kennedy Informational [Page 7]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ENTITY % Digits "CDATA">
- <!ENTITY % Precedence "CDATA">
- <!ENTITY % IP4Addr "CDATA">
- <!ENTITY % Class "CDATA">
- <!ENTITY % Sec "CDATA">
- <!ENTITY % Compartments "CDATA">
- <!ENTITY % Handling "CDATA">
- <!ENTITY % TCC "CDATA">
-
- <!ELEMENT ip (header, payload)>
-
- <!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
- protocol, checksum, source, destination, options,
- padding)>
- <!-- length of header in 32-bit words -->
- <!ATTLIST header
- length %Digits; #REQUIRED>
-
- <!ELEMENT version EMPTY>
- <!-- ip version. SHOULD be "4" -->
- <!ATTLIST version
- value %Digits; #REQUIRED>
-
- <!ELEMENT tos EMPTY>
- <!ATTLIST tos
- precedence %Precedence; #REQUIRED
- delay (normal | low) #REQUIRED
- throughput (normal | high) #REQUIRED
- relibility (normal | high) #REQUIRED
- reserved CDATA #FIXED "0">
-
- <!ELEMENT total.length EMPTY>
- <!--
- total length of datagram (header and payload) in octets, MUST be
- less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
- ethernets).
- -->
- <!ATTLIST total.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT id EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST id
- value %Digits; #REQUIRED>
-
- <!ELEMENT flags EMPTY>
- <!-- df = don't fragment, mf = more fragments -->
- <!ATTLIST flags
-
-
-
-Kennedy Informational [Page 8]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- reserved CDATA #FIXED "0"
- df (may|dont) #REQUIRED
- mf (last|more) #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= offset <= 8192 measured in 8 octet (64-bit) chunks -->
- <!ATTLIST offset
- value %Digits; #REQUIRED>
-
- <!ELEMENT ttl EMPTY>
- <!-- 0 <= ttl <= 255 -->
- <!ATTLIST ttl
- value %Digits; #REQUIRED>
-
- <!ELEMENT protocol EMPTY>
- <!-- 0 <= protocol <= 255 (per IANA) -->
- <!ATTLIST protocol
- value %Digits; #REQUIRED>
-
- <!ELEMENT checksum EMPTY>
- <!-- 0 <= checksum <= 65535 (over header only) -->
- <!ATTLIST checksum
- value %Digits; #REQUIRED>
-
- <!ELEMENT source EMPTY>
- <!ATTLIST source
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT destination EMPTY>
- <!ATTLIST destination
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT options ( end | noop | security | loose | strict | record
- | stream | timestamp )*>
-
- <!ELEMENT end EMPTY>
- <!ATTLIST end
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "0">
-
- <!ELEMENT noop EMPTY>
- <!ATTLIST noop
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "1">
-
- <!ELEMENT security EMPTY>
-
-
-
-Kennedy Informational [Page 9]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST security
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "2"
- length CDATA #FIXED "11"
- security %Sec; #REQUIRED
- compartments %Compartments; #REQUIRED
- handling %Handling; #REQUIRED
- tcc %TCC; #REQUIRED>
- <!ELEMENT loose (hop)+>
- <!ATTLIST loose
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "3"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT hop EMPTY>
- <!ATTLIST hop
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT strict (hop)+>
- <!ATTLIST strict
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "9"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT record (hop)+>
- <!ATTLIST record
- copied CDATA #FIXED "0"
- class CDATA #FIXED "0"
- number CDATA #FIXED "7"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT stream EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST stream
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "8"
- length CDATA #FIXED "4"
- id %Digits; #REQUIRED>
-
- <!ELEMENT timestamp (tstamp)+>
- <!-- 0 <= oflw <=15 -->
-
-
-
-Kennedy Informational [Page 10]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST timestamp
- copied CDATA #FIXED "0"
- class CDATA #FIXED "2"
- number CDATA #FIXED "4"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED
- oflw %Digits; #REQUIRED
- flag (0 | 1 | 3) #REQUIRED>
-
- <!ELEMENT tstamp EMPTY>
- <!ATTLIST tstamp
- time %Digits; #REQUIRED
- address %IP4Addr; #IMPLIED>
- <!--
- padding to bring header to 32-bit boundary.
- pad MUST be "0"*
- -->
- <!ELEMENT padding EMPTY>
- <!ATTLIST padding
- pad CDATA #REQUIRED>
-
- <!-- payload MUST be encoded as base-64 [RFC2045], as modified
- by section 2.1 of this RFC -->
- <!ELEMENT payload (CDATA)>
-
-7.2. TCPoXML DTD
-
- <!--
- DTD for TCP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- -->
-
- <!-- the pseudoheader is only included for checksum calculations -->
- <!ELEMENT tcp (tcp.pseudoheader?, tcp.header, payload)>
-
- <!ELEMENT tcp.header (src, dest, sequence, acknowledgement, offset,
- reserved, control, window, checksum, urgent,
- tcp.options, padding)>
-
- <!ELEMENT src EMPTY>
- <!-- 0 <= port <= 65,535 -->
- <!ATTLIST src
- port %Digits; #REQUIRED>
-
- <!ELEMENT dest EMPTY>
- <!-- 0 <= port <= 65,535 -->
-
-
-
-Kennedy Informational [Page 11]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST dest
- port %Digits; #REQUIRED>
-
- <!ELEMENT sequence EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST sequence
- number %Digits; #REQUIRED>
-
- <!ELEMENT acknowledgement EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST acknowledgement
- number %Digits; #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= number <= 255 -->
- <!ATTLIST offset
- number %Digits; #REQUIRED>
-
- <!ELEMENT reserved EMPTY>
- <!ATTLIST reserved
- value CDATA #FIXED "0">
-
- <!ELEMENT control EMPTY>
- <!ATTLIST control
- urg (0|1) #IMPLIED
- ack (0|1) #IMPLIED
- psh (0|1) #IMPLIED
- rst (0|1) #IMPLIED
- syn (0|1) #IMPLIED
- fin (0|1) #IMPLIED>
-
- <!ELEMENT window EMPTY>
- <!-- 0 <= size <= 65,535 -->
- <!ATTLIST window
- size %Digits; #REQUIRED>
-
- <!--
- checksum as in ip, but with
- the following pseudo-header added into the tcp element:
- -->
- <!ELEMENT tcp.pseudoheader (source, destination, protocol,
- tcp.length)>
-
- <!--
- tcp header + data length in octets. does not include the size of
-
- the pseudoheader.
- -->
-
-
-
-Kennedy Informational [Page 12]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ELEMENT tcp.length EMPTY>
- <!ATTLIST tcp.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT urgent EMPTY>
- <!-- 0 <= pointer <= 65,535 -->
- <!ATTLIST urgent
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT tcp.options (tcp.end | tcp.noop | tcp.mss)+>
-
- <!ELEMENT tcp.end EMPTY>
- <!ATTLIST tcp.end
- kind CDATA #FIXED "0">
-
- <!ELEMENT tcp.noop EMPTY>
- <!ATTLIST tcp.noop
- kind CDATA #FIXED "1">
-
- <!ELEMENT tcp.mss EMPTY>
- <!ATTLIST tcp.mss
- kind CDATA #FIXED "2"
- length CDATA #FIXED "4"
- size %Digits; #REQUIRED>
-
-7.3. UDPoXML DTD
-
- <!--
- DTD for UDP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- -->
-
- <!ELEMENT udp (udp.pseudoheader?, udp.header, payload)>
-
- <!ELEMENT udp.header (src, dest, udp.length, checksum)>
-
- <!ELEMENT udp.pseudoheader (source, destination, protocol,
- udp.length)>
-
- <!--
- udp header + data length in octets. does not include the size of
- the pseudoheader.
- -->
- <!ELEMENT udp.length EMPTY>
- <!ATTLIST udp.length
- value %Digits; #REQUIRED>
-
-
-
-Kennedy Informational [Page 13]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-8. Security Considerations
-
- XML, as a subset of SGML, has the same security considerations as
- specified in SGML Media Types [RFC1874]. Security considerations
- that apply to IP, TCP and UDP also likely apply to BLOAT as it does
- not attempt to correct for issues not related to message format.
-
-9. References
-
- [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt,
- February 2002. (Work in Progress)
-
- [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
- August 1980.
-
- [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791,
- September 1981.
-
- [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC
- 793, September 1981.
-
- [RFC894] Hornig, C., "Standard for the Transmission of IP
- Datagrams over Ethernet Networks.", RFC 894, April 1984.
-
- [RFC1042] Postel, J. and J. Reynolds, "Standard for the
- Transmission of IP Datagrams Over IEEE 802 Networks", STD
- 43, RFC 1042, February 1988.
-
- [RFC1123] Braden, R., "Requirements for Internet Hosts -
- Application and Support", RFC 1123, October 1989.
-
- [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December
- 1995.
-
- [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
- October 1996.
-
- [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
- Extensions (MIME) Part One: Format of Internet Message
- Bodies", RFC 2045, November 1996.
-
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
- Requirement Levels", BCP 14, RFC 2119, March 1997.
-
- [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
- 10646", RFC 2279, January 1998.
-
-
-
-
-
-Kennedy Informational [Page 14]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
- (IPv6) Specification", RFC 2460, December 1998.
-
- [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core",
- RFC 3080, March 2001.
-
- [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A.,
- Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D.,
- "Simple Object Access Protocol (SOAP) 1.1" World Wide Web
- Consortium Note, May 2000 http://www.w3.org/TR/SOAP/
-
- [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible
- Markup Language (XML)" World Wide Web Consortium
- Recommendation REC- xml-19980210.
- http://www.w3.org/TR/1998/REC-xml-19980210
-
-10. Author's Address
-
- Hugh Kennedy
- Mimezine
- 1060 West Addison
- Chicago, IL 60613
- USA
-
- EMail: kennedyh@engin.umich.edu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 15]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-11. Full Copyright Statement
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published
- and distributed, in whole or in part, without restriction of any
- kind, provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be
- followed, or as required to translate it into languages other than
- English.
-
- The limited permissions granted above are perpetual and will not be
- revoked by the Internet Society or its successors or assigns.
-
- This document and the information contained herein is provided on an
- "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
- TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
- BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-Acknowledgement
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 16]
-
diff --git a/tests/auto/network/access/qhttp/webserver/rfc3252.txt b/tests/auto/network/access/qhttp/webserver/rfc3252.txt
deleted file mode 100644
index b80c61bf0a..0000000000
--- a/tests/auto/network/access/qhttp/webserver/rfc3252.txt
+++ /dev/null
@@ -1,899 +0,0 @@
-
-
-
-
-
-
-Network Working Group H. Kennedy
-Request for Comments: 3252 Mimezine
-Category: Informational 1 April 2002
-
-
- Binary Lexical Octet Ad-hoc Transport
-
-Status of this Memo
-
- This memo provides information for the Internet community. It does
- not specify an Internet standard of any kind. Distribution of this
- memo is unlimited.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
-Abstract
-
- This document defines a reformulation of IP and two transport layer
- protocols (TCP and UDP) as XML applications.
-
-1. Introduction
-
-1.1. Overview
-
- This document describes the Binary Lexical Octet Ad-hoc Transport
- (BLOAT): a reformulation of a widely-deployed network-layer protocol
- (IP [RFC791]), and two associated transport layer protocols (TCP
- [RFC793] and UDP [RFC768]) as XML [XML] applications. It also
- describes methods for transporting BLOAT over Ethernet and IEEE 802
- networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
- across the public Internet.
-
-1.2. Motivation
-
- The wild popularity of XML as a basis for application-level protocols
- such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
- Object Access Protocol [SOAP], and Jabber [JABBER] prompted
- investigation into the possibility of extending the use of XML in the
- protocol stack. Using XML at both the transport and network layer in
- addition to the application layer would provide for an amazing amount
- of power and flexibility while removing dependencies on proprietary
- and hard-to-understand binary protocols. This protocol unification
- would also allow applications to use a single XML parser for all
- aspects of their operation, eliminating developer time spent figuring
- out the intricacies of each new protocol, and moving the hard work of
-
-
-
-
-Kennedy Informational [Page 1]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- parsing to the XML toolset. The use of XML also mitigates concerns
- over "network vs. host" byte ordering which is at the root of many
- network application bugs.
-
-1.3. Relation to Existing Protocols
-
- The reformulations specified in this RFC follow as closely as
- possible the spirit of the RFCs on which they are based, and so MAY
- contain elements or attributes that would not be needed in a pure
- reworking (e.g. length attributes, which are implicit in XML.)
-
- The layering of network and transport protocols are maintained in
- this RFC despite the optimizations that could be made if the line
- were somewhat blurred (i.e. merging TCP and IP into a single, larger
- element in the DTD) in order to foster future use of this protocol as
- a basis for reformulating other protocols (such as ICMP.)
-
- Other than the encoding, the behavioral aspects of each of the
- existing protocols remain unchanged. Routing, address spaces, TCP
- congestion control, etc. behave as specified in the extant standards.
- Adapting to new standards and experimental algorithm heuristics for
- improving performance will become much easier once the move to BLOAT
- has been completed.
-
-1.4. Requirement Levels
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
- "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
- document are to be interpreted as described in BCP 14, RFC 2119
- [RFC2119].
-
-2. IPoXML
-
- This protocol MUST be implemented to be compliant with this RFC.
- IPoXML is the root protocol REQUIRED for effective use of TCPoXML
- (section 3.) and higher-level application protocols.
-
- The DTD for this document type can be found in section 7.1.
-
- The routing of IPoXML can be easily implemented on hosts with an XML
- parser, as the regular structure lends itself handily to parsing and
- validation of the document/datagram and then processing the
- destination address, TTL, and checksum before sending it on to its
- next-hop.
-
- The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
- wider deployment of IPv4 and the fact that implementing IPv6 as XML
- would have exceeded the 1500 byte Ethernet MTU.
-
-
-
-Kennedy Informational [Page 2]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- All BLOAT implementations MUST use - and specify - the UTF-8 encoding
- of RFC 2279 [RFC2279]. All BLOAT document/datagrams MUST be well-
- formed and include the XMLDecl.
-
-2.1. IP Description
-
- A number of items have changed (for the better) from the original IP
- specification. Bit-masks, where present have been converted into
- human-readable values. IP addresses are listed in their dotted-
- decimal notation [RFC1123]. Length and checksum values are present
- as decimal integers.
-
- To calculate the length and checksum fields of the IP element, a
- canonicalized form of the element MUST be used. The canonical form
- SHALL have no whitespace (including newline characters) between
- elements and only one space character between attributes. There
- SHALL NOT be a space following the last attribute in an element.
-
- An iterative method SHOULD be used to calculate checksums, as the
- length field will vary based on the size of the checksum.
-
- The payload element bears special attention. Due to the character
- set restrictions of XML, the payload of IP datagrams (which MAY
- contain arbitrary data) MUST be encoded for transport. This RFC
- REQUIRES the contents of the payload to be encoded in the base-64
- encoding of RFC 2045 [RFC2045], but removes the requirement that the
- encoded output MUST be wrapped on 76-character lines.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 3]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-2.2. Example Datagram
-
- The following is an example IPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- <ip>
- <header length="474">
- <version value="4"/>
- <tos precedence="Routine" delay="Normal" throughput="Normal"
- relibility="Normal" reserved="0"/>
- <total.length value="461"/>
- <id value="1"/>
- <flags reserved="0" df="dont" mf="last"/>
- <offset value="0"/>
- <ttl value="255"/>
- <protocol value="6"/>
- <checksum value="8707"/>
- <source address="10.0.0.22"/>
- <destination address="10.0.0.1"/>
- <options>
- <end copied="0" class="0" number="0"/>
- </options>
- <padding pad="0"/>
- </header>
- <payload>
- </payload>
- </ip>
-
-3. TCPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.2.
-
-3.1. TCP Description
-
- A number of items have changed from the original TCP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
- To calculate the length and checksum fields of the TCP element, a
- canonicalized form of the element MUST be used as in section 2.1.
-
- An iterative method SHOULD be used to calculate checksums as in
- section 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
-
-
-Kennedy Informational [Page 4]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- The TCP offset element was expanded to a maximum of 255 from 16 to
- allow for the increased size of the header in XML.
-
- TCPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-3.2. Example Datagram
-
- The following is an example TCPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- <tcp>
- <tcp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <sequence number="322622954"/>
- <acknowledgement number="689715995"/>
- <offset number=""/>
- <reserved value="0"/>
- <control syn="1" ack="1"/>
- <window size="1"/>
- <urgent pointer="0"/>
- <checksum value="2988"/>
- <tcp.options>
- <tcp.end kind="0"/>
- </tcp.options>
- <padding pad="0"/>
- </tcp.header>
- <payload>
- </payload>
- </tcp>
-
-4. UDPoXML
-
- This protocol MUST be implemented to be compliant with this RFC. The
- DTD for this document type can be found in section 7.3.
-
-4.1. UDP Description
-
- A number of items have changed from the original UDP specification.
- Bit-masks, where present have been converted into human-readable
- values. Length and checksum and port values are present as decimal
- integers.
-
-
-
-
-
-
-
-Kennedy Informational [Page 5]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- To calculate the length and checksum fields of the UDP element, a
- canonicalized form of the element MUST be used as in section 2.1. An
- iterative method SHOULD be used to calculate checksums as in section
- 2.1.
-
- The payload element MUST be encoded as in section 2.1.
-
- UDPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
- as well as the <!DOCTYPE> declaration.
-
-4.2. Example Datagram
-
- The following is an example UDPoXML datagram with an empty payload:
-
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- <udp>
- <udp.header>
- <src port="31415"/>
- <dest port="42424"/>
- <udp.length value="143"/>
- <checksum value="2988"/>
- </udp.header>
- <payload>
- </payload>
- </udp>
-
-5. Network Transport
-
- This document provides for the transmission of BLOAT datagrams over
- two common families of physical layer transport. Future RFCs will
- address additional transports as routing vendors catch up to the
- specification, and we begin to see BLOAT routed across the Internet
- backbone.
-
-5.1. Ethernet
-
- BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the
- exception that the type field of the Ethernet frame MUST contain the
- value 0xBEEF. The first 5 octets of the Ethernet frame payload will
- be 0x3c 3f 78 6d 6c ("<?xml".)
-
-5.2. IEEE 802
-
- BLOAT is encapsulated in IEEE 802 Networks as in [RFC1042] except
- that the protocol type code for IPoXML is 0xBEEF.
-
-
-
-
-
-Kennedy Informational [Page 6]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-6. Gatewaying over IP
-
- In order to facilitate the gradual introduction of BLOAT into the
- public Internet, BLOAT MAY be encapsulated in IP as in [RFC2003] to
- gateway between networks that run BLOAT natively on their LANs.
-
-7. DTDs
-
- The Transport DTDs (7.2. and 7.3.) build on the definitions in the
- Network DTD (7.1.)
-
- The DTDs are referenced by their PubidLiteral and SystemLiteral (from
- [XML]) although it is understood that most IPoXML implementations
- will not need to pull down the DTD, as it will normally be embedded
- in the implementation, and presents something of a catch-22 if you
- need to load part of your network protocol over the network.
-
-7.1. IPoXML DTD
-
- <!--
- DTD for IP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
- -->
- <!--
- DTD data types:
-
- Digits [0..9]+
-
- Precedence "NetworkControl | InternetworkControl |
- CRITIC | FlashOverride | Flash | Immediate |
- Priority | Routine"
-
- IP4Addr "dotted-decimal" notation of [RFC1123]
-
- Class [0..3]
-
- Sec "Unclassified | Confidential | EFTO | MMMM | PROG |
- Restricted | Secret | Top Secret | Reserved"
-
- Compartments [0..65535]
-
- Handling [0..65535]
-
- TCC [0..16777216]
-
- -->
-
-
-
-Kennedy Informational [Page 7]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ENTITY % Digits "CDATA">
- <!ENTITY % Precedence "CDATA">
- <!ENTITY % IP4Addr "CDATA">
- <!ENTITY % Class "CDATA">
- <!ENTITY % Sec "CDATA">
- <!ENTITY % Compartments "CDATA">
- <!ENTITY % Handling "CDATA">
- <!ENTITY % TCC "CDATA">
-
- <!ELEMENT ip (header, payload)>
-
- <!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
- protocol, checksum, source, destination, options,
- padding)>
- <!-- length of header in 32-bit words -->
- <!ATTLIST header
- length %Digits; #REQUIRED>
-
- <!ELEMENT version EMPTY>
- <!-- ip version. SHOULD be "4" -->
- <!ATTLIST version
- value %Digits; #REQUIRED>
-
- <!ELEMENT tos EMPTY>
- <!ATTLIST tos
- precedence %Precedence; #REQUIRED
- delay (normal | low) #REQUIRED
- throughput (normal | high) #REQUIRED
- relibility (normal | high) #REQUIRED
- reserved CDATA #FIXED "0">
-
- <!ELEMENT total.length EMPTY>
- <!--
- total length of datagram (header and payload) in octets, MUST be
- less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
- ethernets).
- -->
- <!ATTLIST total.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT id EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST id
- value %Digits; #REQUIRED>
-
- <!ELEMENT flags EMPTY>
- <!-- df = don't fragment, mf = more fragments -->
- <!ATTLIST flags
-
-
-
-Kennedy Informational [Page 8]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- reserved CDATA #FIXED "0"
- df (may|dont) #REQUIRED
- mf (last|more) #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= offset <= 8192 measured in 8 octet (64-bit) chunks -->
- <!ATTLIST offset
- value %Digits; #REQUIRED>
-
- <!ELEMENT ttl EMPTY>
- <!-- 0 <= ttl <= 255 -->
- <!ATTLIST ttl
- value %Digits; #REQUIRED>
-
- <!ELEMENT protocol EMPTY>
- <!-- 0 <= protocol <= 255 (per IANA) -->
- <!ATTLIST protocol
- value %Digits; #REQUIRED>
-
- <!ELEMENT checksum EMPTY>
- <!-- 0 <= checksum <= 65535 (over header only) -->
- <!ATTLIST checksum
- value %Digits; #REQUIRED>
-
- <!ELEMENT source EMPTY>
- <!ATTLIST source
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT destination EMPTY>
- <!ATTLIST destination
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT options ( end | noop | security | loose | strict | record
- | stream | timestamp )*>
-
- <!ELEMENT end EMPTY>
- <!ATTLIST end
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "0">
-
- <!ELEMENT noop EMPTY>
- <!ATTLIST noop
- copied (0|1) #REQUIRED
- class CDATA #FIXED "0"
- number CDATA #FIXED "1">
-
- <!ELEMENT security EMPTY>
-
-
-
-Kennedy Informational [Page 9]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST security
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "2"
- length CDATA #FIXED "11"
- security %Sec; #REQUIRED
- compartments %Compartments; #REQUIRED
- handling %Handling; #REQUIRED
- tcc %TCC; #REQUIRED>
- <!ELEMENT loose (hop)+>
- <!ATTLIST loose
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "3"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT hop EMPTY>
- <!ATTLIST hop
- address %IP4Addr; #REQUIRED>
-
- <!ELEMENT strict (hop)+>
- <!ATTLIST strict
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "9"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT record (hop)+>
- <!ATTLIST record
- copied CDATA #FIXED "0"
- class CDATA #FIXED "0"
- number CDATA #FIXED "7"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT stream EMPTY>
- <!-- 0 <= id <= 65,535 -->
- <!ATTLIST stream
- copied CDATA #FIXED "1"
- class CDATA #FIXED "0"
- number CDATA #FIXED "8"
- length CDATA #FIXED "4"
- id %Digits; #REQUIRED>
-
- <!ELEMENT timestamp (tstamp)+>
- <!-- 0 <= oflw <=15 -->
-
-
-
-Kennedy Informational [Page 10]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST timestamp
- copied CDATA #FIXED "0"
- class CDATA #FIXED "2"
- number CDATA #FIXED "4"
- length %Digits; #REQUIRED
- pointer %Digits; #REQUIRED
- oflw %Digits; #REQUIRED
- flag (0 | 1 | 3) #REQUIRED>
-
- <!ELEMENT tstamp EMPTY>
- <!ATTLIST tstamp
- time %Digits; #REQUIRED
- address %IP4Addr; #IMPLIED>
- <!--
- padding to bring header to 32-bit boundary.
- pad MUST be "0"*
- -->
- <!ELEMENT padding EMPTY>
- <!ATTLIST padding
- pad CDATA #REQUIRED>
-
- <!-- payload MUST be encoded as base-64 [RFC2045], as modified
- by section 2.1 of this RFC -->
- <!ELEMENT payload (CDATA)>
-
-7.2. TCPoXML DTD
-
- <!--
- DTD for TCP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
- -->
-
- <!-- the pseudoheader is only included for checksum calculations -->
- <!ELEMENT tcp (tcp.pseudoheader?, tcp.header, payload)>
-
- <!ELEMENT tcp.header (src, dest, sequence, acknowledgement, offset,
- reserved, control, window, checksum, urgent,
- tcp.options, padding)>
-
- <!ELEMENT src EMPTY>
- <!-- 0 <= port <= 65,535 -->
- <!ATTLIST src
- port %Digits; #REQUIRED>
-
- <!ELEMENT dest EMPTY>
- <!-- 0 <= port <= 65,535 -->
-
-
-
-Kennedy Informational [Page 11]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ATTLIST dest
- port %Digits; #REQUIRED>
-
- <!ELEMENT sequence EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST sequence
- number %Digits; #REQUIRED>
-
- <!ELEMENT acknowledgement EMPTY>
- <!-- 0 <= number <= 4294967295 -->
- <!ATTLIST acknowledgement
- number %Digits; #REQUIRED>
-
- <!ELEMENT offset EMPTY>
- <!-- 0 <= number <= 255 -->
- <!ATTLIST offset
- number %Digits; #REQUIRED>
-
- <!ELEMENT reserved EMPTY>
- <!ATTLIST reserved
- value CDATA #FIXED "0">
-
- <!ELEMENT control EMPTY>
- <!ATTLIST control
- urg (0|1) #IMPLIED
- ack (0|1) #IMPLIED
- psh (0|1) #IMPLIED
- rst (0|1) #IMPLIED
- syn (0|1) #IMPLIED
- fin (0|1) #IMPLIED>
-
- <!ELEMENT window EMPTY>
- <!-- 0 <= size <= 65,535 -->
- <!ATTLIST window
- size %Digits; #REQUIRED>
-
- <!--
- checksum as in ip, but with
- the following pseudo-header added into the tcp element:
- -->
- <!ELEMENT tcp.pseudoheader (source, destination, protocol,
- tcp.length)>
-
- <!--
- tcp header + data length in octets. does not include the size of
-
- the pseudoheader.
- -->
-
-
-
-Kennedy Informational [Page 12]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- <!ELEMENT tcp.length EMPTY>
- <!ATTLIST tcp.length
- value %Digits; #REQUIRED>
-
- <!ELEMENT urgent EMPTY>
- <!-- 0 <= pointer <= 65,535 -->
- <!ATTLIST urgent
- pointer %Digits; #REQUIRED>
-
- <!ELEMENT tcp.options (tcp.end | tcp.noop | tcp.mss)+>
-
- <!ELEMENT tcp.end EMPTY>
- <!ATTLIST tcp.end
- kind CDATA #FIXED "0">
-
- <!ELEMENT tcp.noop EMPTY>
- <!ATTLIST tcp.noop
- kind CDATA #FIXED "1">
-
- <!ELEMENT tcp.mss EMPTY>
- <!ATTLIST tcp.mss
- kind CDATA #FIXED "2"
- length CDATA #FIXED "4"
- size %Digits; #REQUIRED>
-
-7.3. UDPoXML DTD
-
- <!--
- DTD for UDP over XML.
- Refer to this DTD as:
-
- <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
- -->
-
- <!ELEMENT udp (udp.pseudoheader?, udp.header, payload)>
-
- <!ELEMENT udp.header (src, dest, udp.length, checksum)>
-
- <!ELEMENT udp.pseudoheader (source, destination, protocol,
- udp.length)>
-
- <!--
- udp header + data length in octets. does not include the size of
- the pseudoheader.
- -->
- <!ELEMENT udp.length EMPTY>
- <!ATTLIST udp.length
- value %Digits; #REQUIRED>
-
-
-
-Kennedy Informational [Page 13]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-8. Security Considerations
-
- XML, as a subset of SGML, has the same security considerations as
- specified in SGML Media Types [RFC1874]. Security considerations
- that apply to IP, TCP and UDP also likely apply to BLOAT as it does
- not attempt to correct for issues not related to message format.
-
-9. References
-
- [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt,
- February 2002. (Work in Progress)
-
- [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
- August 1980.
-
- [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791,
- September 1981.
-
- [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC
- 793, September 1981.
-
- [RFC894] Hornig, C., "Standard for the Transmission of IP
- Datagrams over Ethernet Networks.", RFC 894, April 1984.
-
- [RFC1042] Postel, J. and J. Reynolds, "Standard for the
- Transmission of IP Datagrams Over IEEE 802 Networks", STD
- 43, RFC 1042, February 1988.
-
- [RFC1123] Braden, R., "Requirements for Internet Hosts -
- Application and Support", RFC 1123, October 1989.
-
- [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December
- 1995.
-
- [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
- October 1996.
-
- [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
- Extensions (MIME) Part One: Format of Internet Message
- Bodies", RFC 2045, November 1996.
-
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
- Requirement Levels", BCP 14, RFC 2119, March 1997.
-
- [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
- 10646", RFC 2279, January 1998.
-
-
-
-
-
-Kennedy Informational [Page 14]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
- [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
- (IPv6) Specification", RFC 2460, December 1998.
-
- [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core",
- RFC 3080, March 2001.
-
- [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A.,
- Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D.,
- "Simple Object Access Protocol (SOAP) 1.1" World Wide Web
- Consortium Note, May 2000 http://www.w3.org/TR/SOAP/
-
- [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible
- Markup Language (XML)" World Wide Web Consortium
- Recommendation REC- xml-19980210.
- http://www.w3.org/TR/1998/REC-xml-19980210
-
-10. Author's Address
-
- Hugh Kennedy
- Mimezine
- 1060 West Addison
- Chicago, IL 60613
- USA
-
- EMail: kennedyh@engin.umich.edu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 15]
-
-RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
-
-
-11. Full Copyright Statement
-
- Copyright (C) The Internet Society (2002). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published
- and distributed, in whole or in part, without restriction of any
- kind, provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be
- followed, or as required to translate it into languages other than
- English.
-
- The limited permissions granted above are perpetual and will not be
- revoked by the Internet Society or its successors or assigns.
-
- This document and the information contained herein is provided on an
- "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
- TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
- BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-Acknowledgement
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy Informational [Page 16]
-
diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index b4c0e2c93a..aa8617740b 100644
--- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp b/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp
index 513b20ec82..fa215a5422 100644
--- a/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp
+++ b/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp b/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
index 14804b5187..9fda95821e 100644
--- a/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
+++ b/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,11 +42,15 @@
#include <QtTest/QtTest>
#include <QtNetwork/QNetworkAccessManager>
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QtNetwork/QNetworkConfigurationManager>
+#endif
#include <QtCore/QDebug>
-Q_DECLARE_METATYPE(QNetworkAccessManager::NetworkAccessibility);
+#ifndef QT_NO_BEARERMANAGEMENT
+Q_DECLARE_METATYPE(QNetworkAccessManager::NetworkAccessibility)
+#endif
class tst_QNetworkAccessManager : public QObject
{
@@ -65,6 +69,7 @@ tst_QNetworkAccessManager::tst_QNetworkAccessManager()
void tst_QNetworkAccessManager::networkAccessible()
{
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkAccessManager manager;
qRegisterMetaType<QNetworkAccessManager::NetworkAccessibility>("QNetworkAccessManager::NetworkAccessibility");
@@ -105,6 +110,7 @@ void tst_QNetworkAccessManager::networkAccessible()
QNetworkAccessManager::NotAccessible);
QCOMPARE(manager.networkAccessible(), QNetworkAccessManager::NotAccessible);
}
+#endif
}
QTEST_MAIN(tst_QNetworkAccessManager)
diff --git a/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp b/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp
index a5b63bd7d5..b272c0b282 100644
--- a/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp
+++ b/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
index a83f6dda91..abf8e726d2 100644
--- a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 5051aa5fee..6ef08131a5 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,7 @@
#include <QtTest/QtTest>
#include <QtNetwork/QNetworkCookieJar>
+#include <QtNetwork/QNetworkCookie>
#include "private/qtldurl_p.h"
class tst_QNetworkCookieJar: public QObject
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 750721beab..dbd5e64627 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/qnetworkreply/echo/main.cpp b/tests/auto/network/access/qnetworkreply/echo/main.cpp
index a4ddda171a..5162842081 100644
--- a/tests/auto/network/access/qnetworkreply/echo/main.cpp
+++ b/tests/auto/network/access/qnetworkreply/echo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index d3b92ea9b1..9d3c8a7f2f 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -54,13 +54,16 @@
#include <QtNetwork/QLocalSocket>
#include <QtNetwork/QLocalServer>
#include <QtNetwork/QHostInfo>
-#include <QtNetwork/QFtp>
+#include <QtNetwork/QNetworkAccessManager>
+#include <QtNetwork/QNetworkRequest>
+#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QAbstractNetworkCache>
#include <QtNetwork/qauthenticator.h>
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtNetwork/qnetworkrequest.h>
#include <QtNetwork/qnetworkreply.h>
#include <QtNetwork/qnetworkcookie.h>
+#include <QtNetwork/QNetworkCookieJar>
#include <QtNetwork/QHttpPart>
#include <QtNetwork/QHttpMultiPart>
#include <QtNetwork/QNetworkProxyQuery>
@@ -73,7 +76,9 @@
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworksession.h>
#endif
-
+#ifdef QT_BUILD_INTERNAL
+#include <QtNetwork/private/qnetworkaccessmanager_p.h>
+#endif
#include <time.h>
#include "../../../network-settings.h"
@@ -163,6 +168,7 @@ public Q_SLOTS:
void gotError();
void authenticationRequired(QNetworkReply*,QAuthenticator*);
void proxyAuthenticationRequired(const QNetworkProxy &,QAuthenticator*);
+ void pipeliningHelperSlot();
#ifndef QT_NO_OPENSSL
void sslErrors(QNetworkReply*,const QList<QSslError> &);
@@ -366,6 +372,7 @@ private Q_SLOTS:
void qtbug15311doubleContentLength();
void qtbug18232gzipContentLengthZero();
+ void qtbug22660gzipNoContentLengthEmptyContent();
void synchronousRequest_data();
void synchronousRequest();
@@ -378,7 +385,11 @@ private Q_SLOTS:
void dontInsertPartialContentIntoTheCache();
void httpUserAgent();
+ void authenticationCacheAfterCancel_data();
+ void authenticationCacheAfterCancel();
+ void authenticationWithDifferentRealm();
void synchronousAuthenticationCache();
+ void pipelining();
// NOTE: This test must be last!
void parentingRepliesToTheApp();
@@ -463,7 +474,7 @@ public:
if (useipv6) {
listen(QHostAddress::AnyIPv6);
} else {
- listen();
+ listen(QHostAddress::AnyIPv4);
}
if (thread) {
connect(thread, SIGNAL(started()), this, SLOT(threadStartedSlot()));
@@ -474,7 +485,7 @@ public:
}
protected:
- void incomingConnection(int socketDescriptor)
+ void incomingConnection(qintptr socketDescriptor)
{
//qDebug() << "incomingConnection" << socketDescriptor << "doSsl:" << doSsl << "ipv6:" << ipv6;
if (!doSsl) {
@@ -796,7 +807,7 @@ public:
return nextPendingConnection();
}
}
- virtual void incomingConnection(int socketDescriptor)
+ virtual void incomingConnection(qintptr socketDescriptor)
{
#ifndef QT_NO_OPENSSL
if (doSsl) {
@@ -1304,9 +1315,11 @@ void tst_QNetworkReply::cleanupTestCase()
#if !defined Q_OS_WIN
QFile::remove(wronlyFileName);
#endif
+#ifndef QT_NO_BEARERMANAGEMENT
if (networkSession && networkSession->isOpen()) {
networkSession->close();
}
+#endif
}
void tst_QNetworkReply::init()
@@ -1841,23 +1854,22 @@ void tst_QNetworkReply::putToFtp()
// download the file again from FTP to make sure it was uploaded
// correctly
- QFtp ftp;
- ftp.connectToHost(url.host());
- ftp.login();
- ftp.get(url.path());
+ QNetworkAccessManager qnam;
+ QNetworkRequest req(url);
+ QNetworkReply *r = qnam.get(req);
- QObject::connect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(10);
- QObject::disconnect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QObject::disconnect(r, SIGNAL(finished(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QByteArray uploaded = ftp.readAll();
+ QByteArray uploaded = r->readAll();
QCOMPARE(uploaded.size(), data.size());
QCOMPARE(uploaded, data);
- ftp.close();
- QObject::connect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ r->close();
+ QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(10);
- QObject::disconnect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
}
void tst_QNetworkReply::putToHttp_data()
@@ -3893,23 +3905,22 @@ void tst_QNetworkReply::ioPutToFtpFromFile()
// download the file again from FTP to make sure it was uploaded
// correctly
- QFtp ftp;
- ftp.connectToHost(url.host());
- ftp.login();
- ftp.get(url.path());
+ QNetworkAccessManager qnam;
+ QNetworkRequest req(url);
+ QNetworkReply *r = qnam.get(req);
- QObject::connect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(3);
- QObject::disconnect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QObject::disconnect(r, SIGNAL(finished(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QByteArray uploaded = ftp.readAll();
+ QByteArray uploaded = r->readAll();
QCOMPARE(qint64(uploaded.size()), sourceFile.size());
QCOMPARE(uploaded, sourceFile.readAll());
- ftp.close();
- QObject::connect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ r->close();
+ QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(10);
- QObject::disconnect(&ftp, SIGNAL(done(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
}
void tst_QNetworkReply::ioPutToHttpFromFile_data()
@@ -4268,7 +4279,7 @@ class SslServer : public QTcpServer {
Q_OBJECT
public:
SslServer() : socket(0) {};
- void incomingConnection(int socketDescriptor) {
+ void incomingConnection(qintptr socketDescriptor) {
QSslSocket *serverSocket = new QSslSocket;
serverSocket->setParent(this);
@@ -6025,6 +6036,221 @@ void tst_QNetworkReply::qtbug4121unknownAuthentication()
QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError);
}
+void tst_QNetworkReply::authenticationCacheAfterCancel_data()
+{
+ QTest::addColumn<QNetworkProxy>("proxy");
+ QTest::addColumn<bool>("proxyAuth");
+ QTest::addColumn<QUrl>("url");
+ for (int i = 0; i < proxies.count(); ++i) {
+ QTest::newRow("http" + proxies.at(i).tag) << proxies.at(i).proxy << proxies.at(i).requiresAuthentication << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt");
+#ifndef QT_NO_OPENSSL
+ QTest::newRow("https" + proxies.at(i).tag) << proxies.at(i).proxy << proxies.at(i).requiresAuthentication << QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt");
+#endif
+ }
+}
+
+class AuthenticationCacheHelper : public QObject
+{
+ Q_OBJECT
+public:
+ AuthenticationCacheHelper()
+ {}
+public slots:
+ void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
+ {
+ if (!proxyPassword.isNull()) {
+ auth->setUser(proxyUserName);
+ auth->setPassword(proxyPassword);
+ //clear credentials, if they are asked again, they were bad
+ proxyUserName.clear();
+ proxyPassword.clear();
+ }
+ }
+ void authenticationRequired(QNetworkReply*,QAuthenticator *auth)
+ {
+ if (!httpPassword.isNull()) {
+ auth->setUser(httpUserName);
+ auth->setPassword(httpPassword);
+ //clear credentials, if they are asked again, they were bad
+ httpUserName.clear();
+ httpPassword.clear();
+ }
+ }
+public:
+ QString httpUserName;
+ QString httpPassword;
+ QString proxyUserName;
+ QString proxyPassword;
+};
+
+/* Purpose of this test is to check credentials are cached correctly.
+ - If user cancels authentication dialog (i.e. nothing is set to the QAuthenticator by the callback) then this is not cached
+ - if user supplies a wrong password, then this is not cached
+ - if user supplies a correct user/password combination then this is cached
+
+ Test is checking both the proxyAuthenticationRequired and authenticationRequired signals.
+ */
+void tst_QNetworkReply::authenticationCacheAfterCancel()
+{
+ QFETCH(QNetworkProxy, proxy);
+ QFETCH(bool, proxyAuth);
+ QFETCH(QUrl, url);
+ QNetworkAccessManager manager;
+#ifndef QT_NO_OPENSSL
+ connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
+ SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
+#endif
+ manager.setProxy(proxy);
+ QSignalSpy authSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+ QSignalSpy proxyAuthSpy(&manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
+
+ AuthenticationCacheHelper helper;
+ connect(&manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), &helper, SLOT(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
+ connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), &helper, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+
+ QNetworkRequest request(url);
+ QNetworkReplyPtr reply;
+ if (proxyAuth) {
+ //should fail due to no credentials
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->error(), QNetworkReply::ProxyAuthenticationRequiredError);
+ QCOMPARE(authSpy.count(), 0);
+ QCOMPARE(proxyAuthSpy.count(), 1);
+ proxyAuthSpy.clear();
+
+ //should fail due to bad credentials
+ helper.proxyUserName = "qsockstest";
+ helper.proxyPassword = "badpassword";
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QEXPECT_FAIL("http+socksauth", "QTBUG-23136 - danted accepts bad authentication but blocks the connection", Continue);
+ QEXPECT_FAIL("https+socksauth", "QTBUG-23136 - danted accepts bad authentication but blocks the connection", Continue);
+
+ QCOMPARE(reply->error(), QNetworkReply::ProxyAuthenticationRequiredError);
+ QCOMPARE(authSpy.count(), 0);
+ QVERIFY(proxyAuthSpy.count() > 0);
+ proxyAuthSpy.clear();
+
+ //QTBUG-23136 workaround
+ if (proxy.port() == 1081) {
+#ifdef QT_BUILD_INTERNAL
+ QNetworkAccessManagerPrivate::clearCache(&manager);
+#else
+ return; //XFAIL result above
+#endif
+ }
+
+ //next proxy auth should succeed, due to correct credentials
+ helper.proxyUserName = "qsockstest";
+ helper.proxyPassword = "password";
+ }
+
+ //should fail due to no credentials
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError);
+ QVERIFY(authSpy.count() > 0);
+ authSpy.clear();
+ if (proxyAuth) {
+ QVERIFY(proxyAuthSpy.count() > 0);
+ proxyAuthSpy.clear();
+ }
+
+ //should fail due to bad credentials
+ helper.httpUserName = "baduser";
+ helper.httpPassword = "badpassword";
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError);
+ QVERIFY(authSpy.count() > 0);
+ authSpy.clear();
+ if (proxyAuth) {
+ //should be supplied from cache
+ QCOMPARE(proxyAuthSpy.count(), 0);
+ proxyAuthSpy.clear();
+ }
+
+ //next auth should succeed, due to correct credentials
+ helper.httpUserName = "httptest";
+ helper.httpPassword = "httptest";
+
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(authSpy.count() > 0);
+ authSpy.clear();
+ if (proxyAuth) {
+ //should be supplied from cache
+ QCOMPARE(proxyAuthSpy.count(), 0);
+ proxyAuthSpy.clear();
+ }
+
+ //next auth should use cached credentials
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ //should be supplied from cache
+ QCOMPARE(authSpy.count(), 0);
+ authSpy.clear();
+ if (proxyAuth) {
+ //should be supplied from cache
+ QCOMPARE(proxyAuthSpy.count(), 0);
+ proxyAuthSpy.clear();
+ }
+
+}
+
+void tst_QNetworkReply::authenticationWithDifferentRealm()
+{
+ AuthenticationCacheHelper helper;
+ QNetworkAccessManager manager;
+#ifndef QT_NO_OPENSSL
+ connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
+ SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
+#endif
+ connect(&manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), &helper, SLOT(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
+ connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), &helper, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+
+ helper.httpUserName = "httptest";
+ helper.httpPassword = "httptest";
+
+ QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt"));
+ QNetworkReply* reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+
+ helper.httpUserName = "httptest";
+ helper.httpPassword = "httptest";
+
+ request.setUrl(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/auth-digest/"));
+ reply = manager.get(request);
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+}
+
class QtBug13431Helper : public QObject {
Q_OBJECT
public:
@@ -6141,6 +6367,28 @@ void tst_QNetworkReply::qtbug18232gzipContentLengthZero()
QCOMPARE(reply->readAll(), QByteArray());
}
+// Reproduced a crash in QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd
+// where zlib inflateEnd was called for uninitialized zlib stream
+void tst_QNetworkReply::qtbug22660gzipNoContentLengthEmptyContent()
+{
+ // Response with no Content-Length in header and empty content
+ QByteArray response("HTTP/1.0 200 OK\r\nContent-Encoding: gzip\r\n\r\n");
+ MiniHttpServer server(response);
+ server.doClose = true;
+
+ QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(reply->isFinished());
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QCOMPARE(reply->size(), qint64(0));
+ QVERIFY(!reply->header(QNetworkRequest::ContentLengthHeader).isValid());
+ QCOMPARE(reply->readAll(), QByteArray());
+}
+
void tst_QNetworkReply::synchronousRequest_data()
{
QTest::addColumn<QUrl>("url");
@@ -6443,6 +6691,43 @@ void tst_QNetworkReply::synchronousAuthenticationCache()
}
}
+void tst_QNetworkReply::pipelining()
+{
+ QString urlString("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/echo.cgi?");
+ QList<QNetworkReplyPtr> replies;
+ for (int a = 0; a < 20; a++) {
+ QNetworkRequest request(urlString + QString::number(a));
+ request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, QVariant(true));
+ replies.append(manager.get(request));
+ connect(replies.at(a), SIGNAL(finished()), this, SLOT(pipeliningHelperSlot()));
+ }
+ QTestEventLoop::instance().enterLoop(20);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+}
+
+void tst_QNetworkReply::pipeliningHelperSlot() {
+ static int a = 0;
+
+ // check that pipelining was used in at least one of the replies
+ static bool pipeliningWasUsed = false;
+ QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
+ bool pipeliningWasUsedInReply = reply->attribute(QNetworkRequest::HttpPipeliningWasUsedAttribute).toBool();
+ if (pipeliningWasUsedInReply)
+ pipeliningWasUsed = true;
+
+ // check that the contents match (the response to echo.cgi?3 should return 3 etc.)
+ QString urlQueryString = reply->url().queryItems().at(0).first;
+ QString content = reply->readAll();
+ QVERIFY2(urlQueryString == content, "data corruption with pipelining detected");
+
+ a++;
+
+ if (a == 20) { // all replies have finished
+ QTestEventLoop::instance().exitLoop();
+ QVERIFY2(pipeliningWasUsed, "pipelining was not used in any of the replies when trying to test pipelining");
+ }
+}
+
// NOTE: This test must be last testcase in tst_qnetworkreply!
void tst_QNetworkReply::parentingRepliesToTheApp()
{
diff --git a/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
index 90527163e2..e106230dc4 100644
--- a/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
+++ b/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/bearer/qbearertestcommon.h b/tests/auto/network/bearer/qbearertestcommon.h
index c16c2016e8..6279dbb1ef 100644
--- a/tests/auto/network/bearer/qbearertestcommon.h
+++ b/tests/auto/network/bearer/qbearertestcommon.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,6 +42,10 @@
#ifndef QBEARERTESTCOMMON_H
#define QBEARERTESTCOMMON_H
+#include <QtTest/qtestcase.h>
+
+enum { TestTimeOut = 90000 };
+
// Wait for __expr to happen, while still allowing events to be processed.
#define QTRY_NOOP(__expr) \
do { \
@@ -55,33 +59,4 @@
} \
} while(0)
-// Will try to wait for the condition while allowing event processing
-#define QTRY_VERIFY(__expr) \
- do { \
- const int __step = 50; \
- const int __timeout = 90000; \
- if (!(__expr)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QVERIFY(__expr); \
- } while(0)
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
- do { \
- const int __step = 50; \
- const int __timeout = 90000; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
- } while(0)
-
#endif
-
diff --git a/tests/auto/network/bearer/qnetworkconfiguration/qnetworkconfiguration.pro b/tests/auto/network/bearer/qnetworkconfiguration/qnetworkconfiguration.pro
index b01f8d380e..cde82a4fb2 100644
--- a/tests/auto/network/bearer/qnetworkconfiguration/qnetworkconfiguration.pro
+++ b/tests/auto/network/bearer/qnetworkconfiguration/qnetworkconfiguration.pro
@@ -4,9 +4,3 @@ SOURCES += tst_qnetworkconfiguration.cpp
HEADERS += ../qbearertestcommon.h
QT = core network testlib
-
-maemo6|maemo5 {
- CONFIG += link_pkgconfig
-
- PKGCONFIG += conninet
-}
diff --git a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
index a2c9acea6e..2a05f6132a 100644
--- a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
+++ b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,8 +42,10 @@
#include <QtTest/QtTest>
#include "../qbearertestcommon.h"
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworkconfigmanager.h>
+#endif
/*
Although this unit test doesn't use QNetworkAccessManager
@@ -52,136 +54,22 @@
*/
#include <QNetworkAccessManager>
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
-#include <stdio.h>
-#include <iapconf.h>
-#endif
-
QT_USE_NAMESPACE
+
class tst_QNetworkConfiguration : public QObject
{
Q_OBJECT
-public slots:
- void initTestCase();
- void cleanupTestCase();
-
private slots:
+#ifndef QT_NO_BEARERMANAGEMENT
void invalidPoint();
void comparison();
void children();
void isRoamingAvailable();
-
-private:
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- Maemo::IAPConf *iapconf;
- Maemo::IAPConf *iapconf2;
- Maemo::IAPConf *gprsiap;
-#define MAX_IAPS 50
- Maemo::IAPConf *iaps[MAX_IAPS];
- QProcess *icd_stub;
#endif
};
-void tst_QNetworkConfiguration::initTestCase()
-{
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- iapconf = new Maemo::IAPConf("007");
- iapconf->setValue("ipv4_type", "AUTO");
- iapconf->setValue("wlan_wepkey1", "connt");
- iapconf->setValue("wlan_wepdefkey", 1);
- iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
- iapconf->setValue("name", "James Bond");
- iapconf->setValue("type", "WLAN_INFRA");
-
- iapconf2 = new Maemo::IAPConf("osso.net");
- iapconf2->setValue("ipv4_type", "AUTO");
- iapconf2->setValue("wlan_wepkey1", "osso.net");
- iapconf2->setValue("wlan_wepdefkey", 1);
- iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
- iapconf2->setValue("name", "osso.net");
- iapconf2->setValue("type", "WLAN_INFRA");
- iapconf2->setValue("wlan_security", "WEP");
-
- gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
- gprsiap->setValue("ask_password", false);
- gprsiap->setValue("gprs_accesspointname", "internet");
- gprsiap->setValue("gprs_password", "");
- gprsiap->setValue("gprs_username", "");
- gprsiap->setValue("ipv4_autodns", true);
- gprsiap->setValue("ipv4_type", "AUTO");
- gprsiap->setValue("sim_imsi", "244070123456789");
- gprsiap->setValue("name", "MI6");
- gprsiap->setValue("type", "GPRS");
-
- /* Create large number of IAPs in the gconf and see what happens */
- fflush(stdout);
- printf("Creating %d IAPS: ", MAX_IAPS);
- for (int i=0; i<MAX_IAPS; i++) {
- QString num = QString().sprintf("%d", i);
- QString iap = "iap-" + num;
- iaps[i] = new Maemo::IAPConf(iap);
- iaps[i]->setValue("name", QString("test-iap-")+num);
- iaps[i]->setValue("type", "WLAN_INFRA");
- iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
- iaps[i]->setValue("wlan_security", "WPA_PSK");
- iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
- printf(".");
- fflush(stdout);
- }
- printf("\n");
- fflush(stdout);
-
- icd_stub = new QProcess(this);
- icd_stub->start("/usr/bin/icd2_stub.py");
- QTest::qWait(1000);
-
- // Add a known network to scan list that icd2 stub returns
- QProcess dbus_send;
- // 007 network
- dbus_send.start("dbus-send --type=method_call --system "
- "--dest=com.nokia.icd2 /com/nokia/icd2 "
- "com.nokia.icd2.testing.add_available_network "
- "string:'' uint32:0 string:'' "
- "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
- dbus_send.waitForFinished();
-
- // osso.net network
- dbus_send.start("dbus-send --type=method_call --system "
- "--dest=com.nokia.icd2 /com/nokia/icd2 "
- "com.nokia.icd2.testing.add_available_network "
- "string:'' uint32:0 string:'' "
- "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
- dbus_send.waitForFinished();
-#endif
-}
-
-void tst_QNetworkConfiguration::cleanupTestCase()
-{
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- iapconf->clear();
- delete iapconf;
- iapconf2->clear();
- delete iapconf2;
- gprsiap->clear();
- delete gprsiap;
-
- printf("Deleting %d IAPS : ", MAX_IAPS);
- for (int i=0; i<MAX_IAPS; i++) {
- iaps[i]->clear();
- delete iaps[i];
- printf(".");
- fflush(stdout);
- }
- printf("\n");
- qDebug() << "Deleted" << MAX_IAPS << "IAPs";
-
- // Terminate icd2 stub
- icd_stub->terminate();
- icd_stub->waitForFinished();
-#endif
-}
-
+#ifndef QT_NO_BEARERMANAGEMENT
void tst_QNetworkConfiguration::invalidPoint()
{
QNetworkConfiguration pt;
@@ -239,7 +127,7 @@ void tst_QNetworkConfiguration::comparison()
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
QList<QNetworkConfiguration> configs = manager.allConfigurations(QNetworkConfiguration::Discovered);
QVERIFY(configs.count());
@@ -286,7 +174,7 @@ void tst_QNetworkConfiguration::isRoamingAvailable()
//force update to get maximum list
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
foreach(QNetworkConfiguration c, configs)
{
@@ -306,6 +194,7 @@ void tst_QNetworkConfiguration::isRoamingAvailable()
}
}
}
+#endif
QTEST_MAIN(tst_QNetworkConfiguration)
#include "tst_qnetworkconfiguration.moc"
diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/auto/network/bearer/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
index e7ff28ee63..52cee1f64d 100644
--- a/tests/auto/network/bearer/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
+++ b/tests/auto/network/bearer/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
@@ -4,9 +4,3 @@ SOURCES += tst_qnetworkconfigurationmanager.cpp
HEADERS += ../qbearertestcommon.h
QT = core network testlib
-
-maemo6|maemo5 {
- CONFIG += link_pkgconfig
-
- PKGCONFIG += conninet
-}
diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index 6b299ac459..c801534a50 100644
--- a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,12 +42,9 @@
#include <QtTest/QtTest>
#include "../qbearertestcommon.h"
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworkconfigmanager.h>
-
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
-#include <stdio.h>
-#include <iapconf.h>
#endif
QT_USE_NAMESPACE
@@ -55,136 +52,16 @@ class tst_QNetworkConfigurationManager : public QObject
{
Q_OBJECT
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
-
private slots:
+#ifndef QT_NO_BEARERMANAGEMENT
void usedInThread(); // this test must be first, or it will falsely pass
void allConfigurations();
void defaultConfiguration();
void configurationFromIdentifier();
-
-private:
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- Maemo::IAPConf *iapconf;
- Maemo::IAPConf *iapconf2;
- Maemo::IAPConf *gprsiap;
-#define MAX_IAPS 50
- Maemo::IAPConf *iaps[MAX_IAPS];
- QProcess *icd_stub;
#endif
};
-void tst_QNetworkConfigurationManager::initTestCase()
-{
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- iapconf = new Maemo::IAPConf("007");
- iapconf->setValue("ipv4_type", "AUTO");
- iapconf->setValue("wlan_wepkey1", "connt");
- iapconf->setValue("wlan_wepdefkey", 1);
- iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
- iapconf->setValue("name", "James Bond");
- iapconf->setValue("type", "WLAN_INFRA");
-
- gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
- gprsiap->setValue("ask_password", false);
- gprsiap->setValue("gprs_accesspointname", "internet");
- gprsiap->setValue("gprs_password", "");
- gprsiap->setValue("gprs_username", "");
- gprsiap->setValue("ipv4_autodns", true);
- gprsiap->setValue("ipv4_type", "AUTO");
- gprsiap->setValue("sim_imsi", "244070123456789");
- gprsiap->setValue("name", "MI6");
- gprsiap->setValue("type", "GPRS");
-
- iapconf2 = new Maemo::IAPConf("osso.net");
- iapconf2->setValue("ipv4_type", "AUTO");
- iapconf2->setValue("wlan_wepkey1", "osso.net");
- iapconf2->setValue("wlan_wepdefkey", 1);
- iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
- iapconf2->setValue("name", "osso.net");
- iapconf2->setValue("type", "WLAN_INFRA");
- iapconf2->setValue("wlan_security", "WEP");
-
- /* Create large number of IAPs in the gconf and see what happens */
- fflush(stdout);
- printf("Creating %d IAPS: ", MAX_IAPS);
- for (int i=0; i<MAX_IAPS; i++) {
- QString num = QString().sprintf("%d", i);
- QString iap = "iap-" + num;
- iaps[i] = new Maemo::IAPConf(iap);
- iaps[i]->setValue("name", QString("test-iap-")+num);
- iaps[i]->setValue("type", "WLAN_INFRA");
- iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
- iaps[i]->setValue("wlan_security", "WPA_PSK");
- iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
- printf(".");
- fflush(stdout);
- }
- printf("\n");
- fflush(stdout);
-
- icd_stub = new QProcess(this);
- icd_stub->start("/usr/bin/icd2_stub.py");
- QTest::qWait(1000);
-
- // Add a known network to scan list that icd2 stub returns
- QProcess dbus_send;
- // 007 network
- dbus_send.start("dbus-send --type=method_call --system "
- "--dest=com.nokia.icd2 /com/nokia/icd2 "
- "com.nokia.icd2.testing.add_available_network "
- "string:'' uint32:0 string:'' "
- "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
- dbus_send.waitForFinished();
-
- // osso.net network
- dbus_send.start("dbus-send --type=method_call --system "
- "--dest=com.nokia.icd2 /com/nokia/icd2 "
- "com.nokia.icd2.testing.add_available_network "
- "string:'' uint32:0 string:'' "
- "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
- dbus_send.waitForFinished();
-#endif
-}
-
-
-void tst_QNetworkConfigurationManager::cleanupTestCase()
-{
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- iapconf->clear();
- delete iapconf;
- iapconf2->clear();
- delete iapconf2;
- gprsiap->clear();
- delete gprsiap;
-
- printf("Deleting %d IAPS : ", MAX_IAPS);
- for (int i=0; i<MAX_IAPS; i++) {
- iaps[i]->clear();
- delete iaps[i];
- printf(".");
- fflush(stdout);
- }
- printf("\n");
- qDebug() << "Deleted" << MAX_IAPS << "IAPs";
-
- icd_stub->terminate();
- icd_stub->waitForFinished();
-#endif
-}
-
-void tst_QNetworkConfigurationManager::init()
-{
-}
-
-void tst_QNetworkConfigurationManager::cleanup()
-{
-}
-
+#ifndef QT_NO_BEARERMANAGEMENT
void printConfigurationDetails(const QNetworkConfiguration& p)
{
qDebug() << p.name() <<": isvalid->" <<p.isValid() << " type->"<< p.type() <<
@@ -204,7 +81,7 @@ void tst_QNetworkConfigurationManager::allConfigurations()
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
QList<QNetworkConfiguration> configs = manager.allConfigurations();
@@ -281,7 +158,7 @@ void tst_QNetworkConfigurationManager::defaultConfiguration()
QNetworkConfigurationManager manager;
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
QList<QNetworkConfiguration> configs = manager.allConfigurations();
QNetworkConfiguration defaultConfig = manager.defaultConfiguration();
@@ -311,7 +188,7 @@ void tst_QNetworkConfigurationManager::configurationFromIdentifier()
//force an update to get maximum number of configs
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
QList<QNetworkConfiguration> configs = manager.allConfigurations();
@@ -339,7 +216,7 @@ protected:
preScanConfigs = manager.allConfigurations();
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
configs = manager.allConfigurations();
}
public:
@@ -356,7 +233,7 @@ void tst_QNetworkConfigurationManager::usedInThread()
QNCMTestThread thread;
connect(&thread, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
thread.start();
- QTestEventLoop::instance().enterLoop(100); //QTRY_VERIFY could take ~90 seconds to time out in the thread
+ QTestEventLoop::instance().enterLoop(100); //QTRY_VERIFY_WITH_TIMEOUT could take ~90 seconds to time out in the thread
QVERIFY(!QTestEventLoop::instance().timeout());
qDebug() << "prescan:" << thread.preScanConfigs.count();
qDebug() << "postscan:" << thread.configs.count();
@@ -365,7 +242,7 @@ void tst_QNetworkConfigurationManager::usedInThread()
QList<QNetworkConfiguration> preScanConfigs = manager.allConfigurations();
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete
QList<QNetworkConfiguration> configs = manager.allConfigurations();
QCOMPARE(thread.configs, configs);
//Don't compare pre scan configs, because these may be cached and therefore give different results
@@ -373,6 +250,7 @@ void tst_QNetworkConfigurationManager::usedInThread()
//QCOMPARE(thread.preScanConfigs, preScanConfigs);
#endif
}
+#endif
QTEST_MAIN(tst_QNetworkConfigurationManager)
#include "tst_qnetworkconfigurationmanager.moc"
diff --git a/tests/auto/network/bearer/qnetworksession/lackey/main.cpp b/tests/auto/network/bearer/qnetworksession/lackey/main.cpp
index 2b0f50f23e..1182454fda 100644
--- a/tests/auto/network/bearer/qnetworksession/lackey/main.cpp
+++ b/tests/auto/network/bearer/qnetworksession/lackey/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,9 +43,11 @@
#include <QStringList>
#include <QLocalSocket>
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworkconfigmanager.h>
#include <QtNetwork/qnetworksession.h>
+#endif
#include <QEventLoop>
#include <QTimer>
@@ -62,6 +64,7 @@ int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
+#ifndef QT_NO_BEARERMANAGEMENT
// Update configurations so that everything is up to date for this process too.
// Event loop is used to wait for awhile.
QNetworkConfigurationManager manager;
@@ -150,6 +153,7 @@ int main(int argc, char** argv)
oopSocket.disconnectFromServer();
oopSocket.waitForDisconnected(-1);
+#endif
return 0;
}
diff --git a/tests/auto/network/bearer/qnetworksession/test/test.pro b/tests/auto/network/bearer/qnetworksession/test/test.pro
index ad55a4223b..5567e35b02 100644
--- a/tests/auto/network/bearer/qnetworksession/test/test.pro
+++ b/tests/auto/network/bearer/qnetworksession/test/test.pro
@@ -14,9 +14,3 @@ CONFIG(debug_and_release) {
} else {
DESTDIR = ..
}
-
-maemo6|maemo5 {
- CONFIG += link_pkgconfig
-
- PKGCONFIG += conninet
-}
diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
index 685c0ba696..26bdec5c9b 100644
--- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,12 +45,9 @@
#include <QTimer>
#include "../../qbearertestcommon.h"
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QtNetwork/qnetworkconfigmanager.h>
#include <QtNetwork/qnetworksession.h>
-
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
-#include <stdio.h>
-#include <iapconf.h>
#endif
QT_USE_NAMESPACE
@@ -58,19 +55,21 @@ QT_USE_NAMESPACE
// Can be used to configure tests that require manual attention (such as roaming)
//#define QNETWORKSESSION_MANUAL_TESTS 1
+#ifndef QT_NO_BEARERMANAGEMENT
Q_DECLARE_METATYPE(QNetworkConfiguration)
-Q_DECLARE_METATYPE(QNetworkConfiguration::Type);
+Q_DECLARE_METATYPE(QNetworkConfiguration::Type)
+#endif
class tst_QNetworkSession : public QObject
{
Q_OBJECT
+#ifndef QT_NO_BEARERMANAGEMENT
public slots:
void initTestCase();
void cleanupTestCase();
private slots:
-
void robustnessBombing();
void sessionClosing_data();
@@ -97,17 +96,10 @@ private slots:
private:
QNetworkConfigurationManager manager;
int inProcessSessionManagementCount;
-
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- Maemo::IAPConf *iapconf;
- Maemo::IAPConf *iapconf2;
- Maemo::IAPConf *gprsiap;
-#define MAX_IAPS 10
- Maemo::IAPConf *iaps[MAX_IAPS];
- QProcess *icd_stub;
#endif
};
+#ifndef QT_NO_BEARERMANAGEMENT
// Helper functions
bool openSession(QNetworkSession *session);
bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration = true);
@@ -120,81 +112,11 @@ void tst_QNetworkSession::initTestCase()
qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
qRegisterMetaType<QNetworkConfiguration::Type>("QNetworkConfiguration::Type");
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- iapconf = new Maemo::IAPConf("007");
- iapconf->setValue("ipv4_type", "AUTO");
- iapconf->setValue("wlan_wepkey1", "connt");
- iapconf->setValue("wlan_wepdefkey", 1);
- iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
- iapconf->setValue("name", "James Bond");
- iapconf->setValue("type", "WLAN_INFRA");
-
- gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
- gprsiap->setValue("ask_password", false);
- gprsiap->setValue("gprs_accesspointname", "internet");
- gprsiap->setValue("gprs_password", "");
- gprsiap->setValue("gprs_username", "");
- gprsiap->setValue("ipv4_autodns", true);
- gprsiap->setValue("ipv4_type", "AUTO");
- gprsiap->setValue("sim_imsi", "244070123456789");
- gprsiap->setValue("name", "MI6");
- gprsiap->setValue("type", "GPRS");
-
- iapconf2 = new Maemo::IAPConf("osso.net");
- iapconf2->setValue("ipv4_type", "AUTO");
- iapconf2->setValue("wlan_wepkey1", "osso.net");
- iapconf2->setValue("wlan_wepdefkey", 1);
- iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
- iapconf2->setValue("name", "osso.net");
- iapconf2->setValue("type", "WLAN_INFRA");
- iapconf2->setValue("wlan_security", "WEP");
-
- /* Create large number of IAPs in the gconf and see what happens */
- fflush(stdout);
- printf("Creating %d IAPS: ", MAX_IAPS);
- for (int i=0; i<MAX_IAPS; i++) {
- QString num = QString().sprintf("%d", i);
- QString iap = "iap-" + num;
- iaps[i] = new Maemo::IAPConf(iap);
- iaps[i]->setValue("name", QString("test-iap-")+num);
- iaps[i]->setValue("type", "WLAN_INFRA");
- iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
- iaps[i]->setValue("wlan_security", "WPA_PSK");
- iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
- printf(".");
- fflush(stdout);
- }
- printf("\n");
- fflush(stdout);
-
- icd_stub = new QProcess(this);
- icd_stub->start("/usr/bin/icd2_stub.py");
- QTest::qWait(1000);
-
- // Add a known network to scan list that icd2 stub returns
- QProcess dbus_send;
- // 007 network
- dbus_send.start("dbus-send --type=method_call --system "
- "--dest=com.nokia.icd2 /com/nokia/icd2 "
- "com.nokia.icd2.testing.add_available_network "
- "string:'' uint32:0 string:'' "
- "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
- dbus_send.waitForFinished();
-
- // osso.net network
- dbus_send.start("dbus-send --type=method_call --system "
- "--dest=com.nokia.icd2 /com/nokia/icd2 "
- "com.nokia.icd2.testing.add_available_network "
- "string:'' uint32:0 string:'' "
- "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
- dbus_send.waitForFinished();
-#endif
-
inProcessSessionManagementCount = -1;
QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
manager.updateConfigurations();
- QTRY_VERIFY(spy.count() == 1);
+ QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut);
}
void tst_QNetworkSession::cleanupTestCase()
@@ -205,28 +127,6 @@ void tst_QNetworkSession::cleanupTestCase()
qWarning("No usable configurations found to complete all possible tests in "
"inProcessSessionManagement()");
}
-
-#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
- iapconf->clear();
- delete iapconf;
- iapconf2->clear();
- delete iapconf2;
- gprsiap->clear();
- delete gprsiap;
-
- printf("Deleting %d IAPS : ", MAX_IAPS);
- for (int i=0; i<MAX_IAPS; i++) {
- iaps[i]->clear();
- delete iaps[i];
- printf(".");
- fflush(stdout);
- }
- printf("\n");
- qDebug() << "Deleted" << MAX_IAPS << "IAPs";
-
- icd_stub->terminate();
- icd_stub->waitForFinished();
-#endif
}
// Robustness test for calling interfaces in nonsense order / with nonsense parameters
@@ -278,7 +178,7 @@ void tst_QNetworkSession::sessionClosing()
session.close();
// Sooner or later session must end in Disconnected state,
// no matter what the phase was.
- QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Disconnected, TestTimeOut);
QTest::qWait(200); // Give platform a breathe, otherwise we'll be catching other errors
}
}
@@ -526,7 +426,7 @@ void tst_QNetworkSession::userChoiceSession()
QVERIFY(errorSpy.isEmpty());
if (expectStateChange)
- QTRY_VERIFY(!stateChangedSpy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!stateChangedSpy.isEmpty(), TestTimeOut);
QVERIFY(session.state() == QNetworkSession::Connected);
#ifndef QT_NO_NETWORKINTERFACE
@@ -630,7 +530,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
// Wait until the configuration is uptodate as well, it may be signaled 'connected'
// bit later than the session
- QTRY_VERIFY(configuration.state() == QNetworkConfiguration::Active);
+ QTRY_VERIFY_WITH_TIMEOUT(configuration.state() == QNetworkConfiguration::Active, TestTimeOut);
if (session.isOpen())
QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
@@ -664,7 +564,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(errorSpy.isEmpty());
if (expectStateChange) {
- QTRY_VERIFY(stateChangedSpy.count() >= 2);
+ QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy.count() >= 2, TestTimeOut);
QNetworkSession::State state =
qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(0).at(0));
@@ -704,7 +604,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
session2.open();
- QTRY_VERIFY(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty(), TestTimeOut);
if (errorSpy2.isEmpty()) {
QVERIFY(session2.isOpen());
@@ -731,13 +631,13 @@ void tst_QNetworkSession::sessionOpenCloseStop()
// QNetworkSession::stop() must result either closed() signal
// or error() signal
- QTRY_VERIFY(!sessionClosedSpy2.isEmpty() || !errorSpy2.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!sessionClosedSpy2.isEmpty() || !errorSpy2.isEmpty(), TestTimeOut);
QVERIFY(!session2.isOpen());
if (!errorSpy2.isEmpty()) {
// QNetworkSession::stop() resulted error() signal for session2
// => also session should emit error() signal
- QTRY_VERIFY(!errorSpy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!errorSpy.isEmpty(), TestTimeOut);
// check for SessionAbortedError
QNetworkSession::SessionError error =
@@ -762,7 +662,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QTRY_NOOP(session2.state() == QNetworkSession::Disconnected);
if (expectStateChange)
- QTRY_VERIFY(stateChangedSpy2.count() >= 1 || !errorSpy2.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy2.count() >= 1 || !errorSpy2.isEmpty(), TestTimeOut);
if (!errorSpy2.isEmpty()) {
QVERIFY(session2.state() == previousState);
@@ -814,11 +714,11 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QFAIL("Unexpected amount of state changes when roaming.");
}
- QTRY_VERIFY(session.state() == QNetworkSession::Roaming ||
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Roaming ||
session.state() == QNetworkSession::Connected ||
- session.state() == QNetworkSession::Disconnected);
+ session.state() == QNetworkSession::Disconnected, TestTimeOut);
- QTRY_VERIFY(stateChangedSpy.count() > 0);
+ QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy.count() > 0, TestTimeOut);
state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0));
for (int i = 0; i < stateChangedSpy.count(); i++) {
@@ -829,19 +729,19 @@ void tst_QNetworkSession::sessionOpenCloseStop()
}
if (state == QNetworkSession::Roaming) {
- QTRY_VERIFY(session.state() == QNetworkSession::Connected);
- QTRY_VERIFY(session2.state() == QNetworkSession::Connected);
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Connected, TestTimeOut);
+ QTRY_VERIFY_WITH_TIMEOUT(session2.state() == QNetworkSession::Connected, TestTimeOut);
roamedSuccessfully = true;
} else if (state == QNetworkSession::Closing) {
- QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
- QTRY_VERIFY(session.state() == QNetworkSession::Connected ||
- session.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY_WITH_TIMEOUT(session2.state() == QNetworkSession::Disconnected, TestTimeOut);
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Connected ||
+ session.state() == QNetworkSession::Disconnected, TestTimeOut );
roamedSuccessfully = false;
} else if (state == QNetworkSession::Disconnected) {
- QTRY_VERIFY(!errorSpy.isEmpty());
- QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY_WITH_TIMEOUT(!errorSpy.isEmpty(), TestTimeOut);
+ QTRY_VERIFY_WITH_TIMEOUT(session2.state() == QNetworkSession::Disconnected, TestTimeOut);
} else if (state == QNetworkSession::Connected) {
- QTRY_VERIFY(errorSpy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(errorSpy.isEmpty(),TestTimeOut);
if (stateChangedSpy.count() > 1) {
state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0));
@@ -863,7 +763,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
if (session.isOpen())
QVERIFY(!sessionOpenedSpy3.isEmpty() || !errorSpy3.isEmpty());
session.stop();
- QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Disconnected, TestTimeOut);
}
if (!roamedSuccessfully)
QVERIFY(!errorSpy.isEmpty());
@@ -892,8 +792,8 @@ void tst_QNetworkSession::sessionOpenCloseStop()
}
}
- QTRY_VERIFY(!sessionClosedSpy.isEmpty());
- QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY_WITH_TIMEOUT(!sessionClosedSpy.isEmpty(), TestTimeOut);
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Disconnected, TestTimeOut);
}
QVERIFY(errorSpy2.isEmpty());
@@ -914,7 +814,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
int stateChangedCountBeforeClose = stateChangedSpy2.count();
session2.close();
- QTRY_VERIFY(!sessionClosedSpy2.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!sessionClosedSpy2.isEmpty(), TestTimeOut);
QVERIFY(stateChangedSpy2.count() == stateChangedCountBeforeClose);
QVERIFY(sessionClosedSpy.isEmpty());
@@ -939,12 +839,12 @@ void tst_QNetworkSession::sessionOpenCloseStop()
session.close();
- QTRY_VERIFY(!sessionClosedSpy.isEmpty() || !errorSpy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!sessionClosedSpy.isEmpty() || !errorSpy.isEmpty(), TestTimeOut);
QVERIFY(!session.isOpen());
if (expectStateChange)
- QTRY_VERIFY(!stateChangedSpy.isEmpty() || !errorSpy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!stateChangedSpy.isEmpty() || !errorSpy.isEmpty(), TestTimeOut);
if (!errorSpy.isEmpty()) {
QNetworkSession::SessionError error =
@@ -973,7 +873,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(errorSpy.isEmpty());
if (expectStateChange)
- QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Disconnected, TestTimeOut);
++inProcessSessionManagementCount;
} else {
@@ -1035,7 +935,7 @@ void tst_QNetworkSession::outOfProcessSession()
QNetworkConfiguration changed;
do {
- QTRY_VERIFY(!spy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!spy.isEmpty(), TestTimeOut);
changed = qvariant_cast<QNetworkConfiguration>(spy.takeFirst().at(0));
} while (changed.identifier() != identifier);
@@ -1055,7 +955,7 @@ void tst_QNetworkSession::outOfProcessSession()
oopSocket->waitForBytesWritten();
do {
- QTRY_VERIFY(!spy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!spy.isEmpty(), TestTimeOut);
changed = qvariant_cast<QNetworkConfiguration>(spy.takeFirst().at(0));
} while (changed.identifier() != identifier);
@@ -1342,7 +1242,7 @@ void tst_QNetworkSession::sessionAutoClose()
// set session to auto close at next polling interval.
session.setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), 0);
- QTRY_VERIFY(!closeSpy.isEmpty());
+ QTRY_VERIFY_WITH_TIMEOUT(!closeSpy.isEmpty(), TestTimeOut);
QCOMPARE(session.state(), QNetworkSession::Connected);
@@ -1356,7 +1256,7 @@ void tst_QNetworkSession::sessionAutoClose()
QCOMPARE(autoCloseSession.toInt(), -1);
}
+#endif
QTEST_MAIN(tst_QNetworkSession)
-
#include "tst_qnetworksession.moc"
diff --git a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
index ae78e10440..38aa684ec9 100644
--- a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
+++ b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
index 8af3a37665..7869ab76fe 100644
--- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
+++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -157,67 +157,67 @@ void tst_QHostAddress::setAddress_QString_data()
QTest::addColumn<int>("protocol"); // 4: IPv4, 6: IPv6, other: undefined
//next we fill it with data
- QTest::newRow("ip4_00") << QString("127.0.0.1") << (bool)TRUE << QString("127.0.0.1") << 4;
- QTest::newRow("ip4_01") << QString("255.3.2.1") << (bool)TRUE << QString("255.3.2.1") << 4;
- QTest::newRow("ip4_03") << QString(" 255.3.2.1") << (bool)TRUE << QString("255.3.2.1") << 4;
- QTest::newRow("ip4_04") << QString("255.3.2.1\r ") << (bool)TRUE << QString("255.3.2.1") << 4;
- QTest::newRow("ip4_05") << QString("0.0.0.0") << (bool)TRUE << QString("0.0.0.0") << 4;
+ QTest::newRow("ip4_00") << QString("127.0.0.1") << true << QString("127.0.0.1") << 4;
+ QTest::newRow("ip4_01") << QString("255.3.2.1") << true << QString("255.3.2.1") << 4;
+ QTest::newRow("ip4_03") << QString(" 255.3.2.1") << true << QString("255.3.2.1") << 4;
+ QTest::newRow("ip4_04") << QString("255.3.2.1\r ") << true << QString("255.3.2.1") << 4;
+ QTest::newRow("ip4_05") << QString("0.0.0.0") << true << QString("0.0.0.0") << 4;
// for the format of IPv6 addresses see also RFC 5952
- QTest::newRow("ip6_00") << QString("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210") << (bool)TRUE << QString("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210") << 6;
- QTest::newRow("ip6_01") << QString("1080:0000:0000:0000:0008:0800:200C:417A") << (bool)TRUE << QString("1080::8:800:200C:417A") << 6;
- QTest::newRow("ip6_02") << QString("1080:0:0:0:8:800:200C:417A") << (bool)TRUE << QString("1080::8:800:200C:417A") << 6;
- QTest::newRow("ip6_03") << QString("1080::8:800:200C:417A") << (bool)TRUE << QString("1080::8:800:200C:417A") << 6;
- QTest::newRow("ip6_04") << QString("FF01::43") << (bool)TRUE << QString("FF01::43") << 6;
- QTest::newRow("ip6_05") << QString("::1") << (bool)TRUE << QString("::1") << 6;
- QTest::newRow("ip6_06") << QString("1::") << (bool)TRUE << QString("1::") << 6;
- QTest::newRow("ip6_07") << QString("::") << (bool)TRUE << QString("::") << 6;
- QTest::newRow("ip6_08") << QString("0:0:0:0:0:0:13.1.68.3") << (bool)TRUE << QString("::D01:4403") << 6;
- QTest::newRow("ip6_09") << QString("::13.1.68.3") << (bool)TRUE << QString("::D01:4403") << 6;
- QTest::newRow("ip6_10") << QString("0:0:0:0:0:FFFF:129.144.52.38") << (bool)TRUE << QString("::FFFF:8190:3426") << 6;
- QTest::newRow("ip6_11") << QString("::FFFF:129.144.52.38") << (bool)TRUE << QString("::FFFF:8190:3426") << 6;
- QTest::newRow("ip6_12") << QString("1::FFFF:129.144.52.38") << (bool)TRUE << QString("1::FFFF:8190:3426") << 6;
- QTest::newRow("ip6_13") << QString("A:B::D:E") << (bool)TRUE << QString("A:B::D:E") << 6;
- QTest::newRow("ip6_14") << QString("1080:0:1:0:8:800:200C:417A") << (bool)TRUE << QString("1080:0:1:0:8:800:200C:417A") << 6;
- QTest::newRow("ip6_15") << QString("1080:0:1:0:8:800:200C:0") << (bool)TRUE << QString("1080:0:1:0:8:800:200C:0") << 6;
- QTest::newRow("ip6_16") << QString("1080:0:1:0:8:800:0:0") << (bool)TRUE << QString("1080:0:1:0:8:800::") << 6;
- QTest::newRow("ip6_17") << QString("1080:0:0:0:8:800:0:0") << (bool)TRUE << QString("1080::8:800:0:0") << 6;
- QTest::newRow("ip6_18") << QString("0:1:1:1:8:800:0:0") << (bool)TRUE << QString("0:1:1:1:8:800::") << 6;
- QTest::newRow("ip6_19") << QString("0:1:1:1:8:800:0:1") << (bool)TRUE << QString("0:1:1:1:8:800:0:1") << 6;
-
- QTest::newRow("error_00") << QString("foobarcom") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_01") << QString("foo.bar.com") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_02") << QString("") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_03") << QString() << (bool)FALSE << QString() << 0;
- QTest::newRow("error_04") << QString(" \t\r") << (bool)FALSE << QString() << 0;
-
- QTest::newRow("error_ip4_00") << QString("256.9.9.9") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip4_01") << QString("-1.9.9.9") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip4_02") << QString("123.0.0") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip4_03") << QString("123.0.0.0.0") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip4_04") << QString("255.2 3.2.1") << (bool)FALSE << QString() << 0;
-
- QTest::newRow("error_ip6_00") << QString(":") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_01") << QString(":::") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_02") << QString("::AAAA:") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_03") << QString(":AAAA::") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_04") << QString("FFFF:::129.144.52.38") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_05") << QString("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210:1234") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_06") << QString("129.144.52.38::") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_07") << QString("::129.144.52.38:129.144.52.38") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_08") << QString(":::129.144.52.38") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_09") << QString("1FEDC:BA98:7654:3210:FEDC:BA98:7654:3210") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_10") << QString("::FFFFFFFF") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_11") << QString("::EFGH") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_12") << QString("ABCD:ABCD:ABCD") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_13") << QString("::ABCD:ABCD::") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_14") << QString("1::2::3") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_15") << QString("1:2:::") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_16") << QString(":::1:2") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_17") << QString("1:::2") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_18") << QString("FEDC::7654:3210:FEDC:BA98::3210") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_19") << QString("ABCD:ABCD:ABCD:1.2.3.4") << (bool)FALSE << QString() << 0;
- QTest::newRow("error_ip6_20") << QString("ABCD::ABCD::ABCD:1.2.3.4") << (bool)FALSE << QString() << 0;
+ QTest::newRow("ip6_00") << QString("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210") << true << QString("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210") << 6;
+ QTest::newRow("ip6_01") << QString("1080:0000:0000:0000:0008:0800:200C:417A") << true << QString("1080::8:800:200C:417A") << 6;
+ QTest::newRow("ip6_02") << QString("1080:0:0:0:8:800:200C:417A") << true << QString("1080::8:800:200C:417A") << 6;
+ QTest::newRow("ip6_03") << QString("1080::8:800:200C:417A") << true << QString("1080::8:800:200C:417A") << 6;
+ QTest::newRow("ip6_04") << QString("FF01::43") << true << QString("FF01::43") << 6;
+ QTest::newRow("ip6_05") << QString("::1") << true << QString("::1") << 6;
+ QTest::newRow("ip6_06") << QString("1::") << true << QString("1::") << 6;
+ QTest::newRow("ip6_07") << QString("::") << true << QString("::") << 6;
+ QTest::newRow("ip6_08") << QString("0:0:0:0:0:0:13.1.68.3") << true << QString("::D01:4403") << 6;
+ QTest::newRow("ip6_09") << QString("::13.1.68.3") << true << QString("::D01:4403") << 6;
+ QTest::newRow("ip6_10") << QString("0:0:0:0:0:FFFF:129.144.52.38") << true << QString("::FFFF:8190:3426") << 6;
+ QTest::newRow("ip6_11") << QString("::FFFF:129.144.52.38") << true << QString("::FFFF:8190:3426") << 6;
+ QTest::newRow("ip6_12") << QString("1::FFFF:129.144.52.38") << true << QString("1::FFFF:8190:3426") << 6;
+ QTest::newRow("ip6_13") << QString("A:B::D:E") << true << QString("A:B::D:E") << 6;
+ QTest::newRow("ip6_14") << QString("1080:0:1:0:8:800:200C:417A") << true << QString("1080:0:1:0:8:800:200C:417A") << 6;
+ QTest::newRow("ip6_15") << QString("1080:0:1:0:8:800:200C:0") << true << QString("1080:0:1:0:8:800:200C:0") << 6;
+ QTest::newRow("ip6_16") << QString("1080:0:1:0:8:800:0:0") << true << QString("1080:0:1:0:8:800::") << 6;
+ QTest::newRow("ip6_17") << QString("1080:0:0:0:8:800:0:0") << true << QString("1080::8:800:0:0") << 6;
+ QTest::newRow("ip6_18") << QString("0:1:1:1:8:800:0:0") << true << QString("0:1:1:1:8:800::") << 6;
+ QTest::newRow("ip6_19") << QString("0:1:1:1:8:800:0:1") << true << QString("0:1:1:1:8:800:0:1") << 6;
+
+ QTest::newRow("error_00") << QString("foobarcom") << false << QString() << 0;
+ QTest::newRow("error_01") << QString("foo.bar.com") << false << QString() << 0;
+ QTest::newRow("error_02") << QString("") << false << QString() << 0;
+ QTest::newRow("error_03") << QString() << false << QString() << 0;
+ QTest::newRow("error_04") << QString(" \t\r") << false << QString() << 0;
+
+ QTest::newRow("error_ip4_00") << QString("256.9.9.9") << false << QString() << 0;
+ QTest::newRow("error_ip4_01") << QString("-1.9.9.9") << false << QString() << 0;
+ QTest::newRow("error_ip4_02") << QString("123.0.0") << false << QString() << 0;
+ QTest::newRow("error_ip4_03") << QString("123.0.0.0.0") << false << QString() << 0;
+ QTest::newRow("error_ip4_04") << QString("255.2 3.2.1") << false << QString() << 0;
+
+ QTest::newRow("error_ip6_00") << QString(":") << false << QString() << 0;
+ QTest::newRow("error_ip6_01") << QString(":::") << false << QString() << 0;
+ QTest::newRow("error_ip6_02") << QString("::AAAA:") << false << QString() << 0;
+ QTest::newRow("error_ip6_03") << QString(":AAAA::") << false << QString() << 0;
+ QTest::newRow("error_ip6_04") << QString("FFFF:::129.144.52.38") << false << QString() << 0;
+ QTest::newRow("error_ip6_05") << QString("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210:1234") << false << QString() << 0;
+ QTest::newRow("error_ip6_06") << QString("129.144.52.38::") << false << QString() << 0;
+ QTest::newRow("error_ip6_07") << QString("::129.144.52.38:129.144.52.38") << false << QString() << 0;
+ QTest::newRow("error_ip6_08") << QString(":::129.144.52.38") << false << QString() << 0;
+ QTest::newRow("error_ip6_09") << QString("1FEDC:BA98:7654:3210:FEDC:BA98:7654:3210") << false << QString() << 0;
+ QTest::newRow("error_ip6_10") << QString("::FFFFFFFF") << false << QString() << 0;
+ QTest::newRow("error_ip6_11") << QString("::EFGH") << false << QString() << 0;
+ QTest::newRow("error_ip6_12") << QString("ABCD:ABCD:ABCD") << false << QString() << 0;
+ QTest::newRow("error_ip6_13") << QString("::ABCD:ABCD::") << false << QString() << 0;
+ QTest::newRow("error_ip6_14") << QString("1::2::3") << false << QString() << 0;
+ QTest::newRow("error_ip6_15") << QString("1:2:::") << false << QString() << 0;
+ QTest::newRow("error_ip6_16") << QString(":::1:2") << false << QString() << 0;
+ QTest::newRow("error_ip6_17") << QString("1:::2") << false << QString() << 0;
+ QTest::newRow("error_ip6_18") << QString("FEDC::7654:3210:FEDC:BA98::3210") << false << QString() << 0;
+ QTest::newRow("error_ip6_19") << QString("ABCD:ABCD:ABCD:1.2.3.4") << false << QString() << 0;
+ QTest::newRow("error_ip6_20") << QString("ABCD::ABCD::ABCD:1.2.3.4") << false << QString() << 0;
}
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index 9226b3475a..6c89819094 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -356,7 +356,7 @@ void tst_QHostInfo::reverseLookup_data()
QTest::addColumn<int>("err");
QTest::addColumn<bool>("ipv6");
- QTest::newRow("trolltech.com") << QString("62.70.27.69") << QStringList(QString("diverse.troll.no")) << 0 << false;
+ QTest::newRow("google-public-dns-a.google.com") << QString("8.8.8.8") << QStringList(QString("google-public-dns-a.google.com")) << 0 << false;
QTest::newRow("gitorious.org") << QString("87.238.52.168") << QStringList(QString("gitorious.org")) << 0 << false;
QTest::newRow("bogus-name") << QString("1::2::3::4") << QStringList() << 1 << true;
}
diff --git a/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp b/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp
index d210cdfdfb..cc46427653 100644
--- a/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp
+++ b/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
index f8a9def46a..9a82be67a7 100644
--- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
+++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,8 +45,10 @@
#include <qcoreapplication.h>
#include <qnetworkinterface.h>
#include <qtcpsocket.h>
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QNetworkConfigurationManager>
#include <QNetworkSession>
+#endif
#include "../../../network-settings.h"
class tst_QNetworkInterface : public QObject
@@ -68,7 +70,7 @@ private slots:
void copyInvalidInterface();
private:
-#ifndef QT_NO_BEARER_MANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager *netConfMan;
QNetworkConfiguration networkConfiguration;
QScopedPointer<QNetworkSession> networkSession;
diff --git a/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp b/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp
index a96e771c0d..70a6eaa9df 100644
--- a/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp
+++ b/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
index de06a54447..088a5361ab 100644
--- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
+++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index 5cd57b587e..d315e1e76b 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp b/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp
index 5b115f81bc..f39a9c66bf 100644
--- a/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp
+++ b/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
index 93344a3bf4..b411dd2651 100644
--- a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,7 +50,6 @@
#include <qhostinfo.h>
#include <qhostaddress.h>
#include <qtcpsocket.h>
-#include <qhttp.h>
#include <qdebug.h>
#include <qtcpserver.h>
diff --git a/tests/auto/network/socket/qlocalsocket/example/client/main.cpp b/tests/auto/network/socket/qlocalsocket/example/client/main.cpp
index acf5cbc388..86b6b34cf3 100644
--- a/tests/auto/network/socket/qlocalsocket/example/client/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/example/client/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qlocalsocket/example/server/main.cpp b/tests/auto/network/socket/qlocalsocket/example/server/main.cpp
index 0d3de3a2e1..06c8b8501f 100644
--- a/tests/auto/network/socket/qlocalsocket/example/server/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/example/server/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qlocalsocket/lackey/main.cpp b/tests/auto/network/socket/qlocalsocket/lackey/main.cpp
index f7b2ff10b3..014a6eb2f8 100644
--- a/tests/auto/network/socket/qlocalsocket/lackey/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/lackey/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index b4449df86c..87cfaeed6c 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -264,7 +264,7 @@ void tst_QLocalSocket::socket_basic()
QCOMPARE(socket.isValid(), false);
QVERIFY(socket.readBufferSize() == 0);
socket.setReadBufferSize(0);
- //QCOMPARE(socket.socketDescriptor(), -1);
+ //QCOMPARE(socket.socketDescriptor(), (qintptr)-1);
QCOMPARE(socket.state(), QLocalSocket::UnconnectedState);
QCOMPARE(socket.waitForConnected(0), false);
QCOMPARE(socket.waitForDisconnected(0), false);
@@ -632,7 +632,7 @@ void tst_QLocalSocket::hitMaximumConnections()
void tst_QLocalSocket::setSocketDescriptor()
{
LocalSocket socket;
- quintptr minusOne = -1;
+ qintptr minusOne = -1;
socket.setSocketDescriptor(minusOne, QLocalSocket::ConnectingState, QIODevice::Append);
QCOMPARE(socket.socketDescriptor(), minusOne);
QCOMPARE(socket.state(), QLocalSocket::ConnectingState);
@@ -717,6 +717,7 @@ void tst_QLocalSocket::threadedConnection()
server.mutex.lock();
server.start();
server.wc.wait(&server.mutex);
+ server.mutex.unlock();
QList<Client*> clients;
for (int i = 0; i < threads; ++i) {
diff --git a/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro b/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro
index f3c24e19fd..389c8ca4dc 100644
--- a/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro
+++ b/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro
@@ -10,4 +10,7 @@ MOC_DIR=tmp
QT = core-private network-private testlib
+# QTBUG-23380 - udpTest failing on Ubuntu 11.10 x64
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
+
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
index 8c600c5400..df677875e6 100644
--- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,7 +52,6 @@
#include <qhostinfo.h>
#include <qhostaddress.h>
#include <qtcpsocket.h>
-#include <qhttp.h>
#include <qauthenticator.h>
#include <qdebug.h>
#include <qtcpserver.h>
diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
index e223bff8c5..f2e813497b 100644
--- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
+++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index c1897779e1..0f4e60e258 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -191,7 +191,7 @@ void tst_QTcpServer::constructing()
QCOMPARE(socket.serverAddress(), QHostAddress());
QCOMPARE(socket.maxPendingConnections(), 30);
QCOMPARE(socket.hasPendingConnections(), false);
- QCOMPARE(socket.socketDescriptor(), -1);
+ QCOMPARE(socket.socketDescriptor(), (qintptr)-1);
QCOMPARE(socket.serverError(), QAbstractSocket::UnknownSocketError);
// Check the state of the socket layer?
@@ -510,7 +510,7 @@ public:
bool ok;
protected:
- void incomingConnection(int socketDescriptor)
+ void incomingConnection(qintptr socketDescriptor)
{
// how a user woulddo it (qabstractsocketengine is not public)
unsigned long arg = 0;
diff --git a/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro b/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
index aa7ac6bbb7..a7b9f6126e 100644
--- a/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
+++ b/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
@@ -4,5 +4,6 @@ TEMPLATE = subdirs
!wince*: SUBDIRS = test stressTest
wince*|vxworks* : SUBDIRS = test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):DEFINES+=UBUNTU_ONEIRIC
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp b/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
index 995fc0528c..a112966b41 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -107,7 +107,7 @@ My4Server::My4Server(QObject *parent)
}
//------------------------------------------------------------------------------
-void My4Server::incomingConnection(int socketId)
+void My4Server::incomingConnection(qintptr socketId)
{
m_socket = new My4Socket(this);
m_socket->setSocketDescriptor(socketId);
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/Test.h b/tests/auto/network/socket/qtcpsocket/stressTest/Test.h
index 5440e7ffa9..3adcbe4e5c 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/Test.h
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/Test.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -69,7 +69,7 @@ public:
My4Server(QObject *parent = 0);
protected:
- void incomingConnection(int socket);
+ void incomingConnection(qintptr socket);
private slots:
void stopServer();
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp b/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
index 76ce7bd820..57194a4948 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 218e372e4d..c9c7054960 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -458,7 +458,7 @@ void tst_QTcpSocket::constructing()
QCOMPARE((int) socket->bytesAvailable(), 0);
QCOMPARE(socket->canReadLine(), false);
QCOMPARE(socket->readLine(), QByteArray());
- QCOMPARE(socket->socketDescriptor(), -1);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)-1);
QCOMPARE((int) socket->localPort(), 0);
QVERIFY(socket->localAddress() == QHostAddress());
QCOMPARE((int) socket->peerPort(), 0);
@@ -538,9 +538,9 @@ void tst_QTcpSocket::bind()
void tst_QTcpSocket::setInvalidSocketDescriptor()
{
QTcpSocket *socket = newSocket();
- QCOMPARE(socket->socketDescriptor(), -1);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)-1);
QVERIFY(!socket->setSocketDescriptor(-5, QTcpSocket::UnconnectedState));
- QCOMPARE(socket->socketDescriptor(), -1);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)-1);
QCOMPARE(socket->error(), QTcpSocket::UnsupportedSocketOperationError);
@@ -577,17 +577,17 @@ void tst_QTcpSocket::setSocketDescriptor()
QVERIFY(sock != INVALID_SOCKET);
QTcpSocket *socket = newSocket();
QVERIFY(socket->setSocketDescriptor(sock, QTcpSocket::UnconnectedState));
- QCOMPARE(socket->socketDescriptor(), (int)sock);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)sock);
qt_qhostinfo_clear_cache(); //avoid the HostLookupState being skipped due to address being in cache from previous test.
socket->connectToHost(QtNetworkSettings::serverName(), 143);
QCOMPARE(socket->state(), QTcpSocket::HostLookupState);
- QCOMPARE(socket->socketDescriptor(), (int)sock);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)sock);
QVERIFY(socket->waitForConnected(10000));
// skip this, it has been broken for years, see task 260735
// if somebody complains, consider fixing it, but it might break existing applications.
QEXPECT_FAIL("", "bug has been around for years, will not fix without need", Continue);
- QCOMPARE(socket->socketDescriptor(), (int)sock);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)sock);
delete socket;
#ifdef Q_OS_WIN
delete dummy;
@@ -600,7 +600,7 @@ void tst_QTcpSocket::socketDescriptor()
{
QTcpSocket *socket = newSocket();
- QCOMPARE(socket->socketDescriptor(), -1);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)-1);
socket->connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY((socket->state() == QAbstractSocket::HostLookupState && socket->socketDescriptor() == -1) ||
(socket->state() == QAbstractSocket::ConnectingState && socket->socketDescriptor() != -1));
@@ -1025,7 +1025,7 @@ void tst_QTcpSocket::openCloseOpenClose()
QCOMPARE((int) socket->bytesAvailable(), 0);
QCOMPARE(socket->canReadLine(), false);
QCOMPARE(socket->readLine(), QByteArray());
- QCOMPARE(socket->socketDescriptor(), -1);
+ QCOMPARE(socket->socketDescriptor(), (qintptr)-1);
QCOMPARE((int) socket->localPort(), 0);
QVERIFY(socket->localAddress() == QHostAddress());
QCOMPARE((int) socket->peerPort(), 0);
@@ -2259,6 +2259,9 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
QVERIFY(stopWatch.elapsed() < 20000);
// Check that both exited normally.
+#if defined(UBUNTU_ONEIRIC) && defined(__x86_64__)
+ QEXPECT_FAIL("", "Fails on this platform", Abort);
+#endif
QCOMPARE(clientProcess.readAll().constData(), "SUCCESS\n");
QCOMPARE(serverProcess.readAll().constData(), "SUCCESS\n");
}
diff --git a/tests/auto/network/socket/qudpsocket/clientserver/main.cpp b/tests/auto/network/socket/qudpsocket/clientserver/main.cpp
index 9145a5199f..a88c0f1335 100644
--- a/tests/auto/network/socket/qudpsocket/clientserver/main.cpp
+++ b/tests/auto/network/socket/qudpsocket/clientserver/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index a0928b42eb..fb23483451 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -63,7 +63,9 @@
Q_DECLARE_METATYPE(QHostAddress)
Q_DECLARE_METATYPE(QNetworkInterface)
+#ifndef QT_NO_BEARERMANAGEMENT
Q_DECLARE_METATYPE(QSharedPointer<QNetworkSession>)
+#endif
QT_FORWARD_DECLARE_CLASS(QUdpSocket)
@@ -195,7 +197,7 @@ void tst_QUdpSocket::constructing()
QCOMPARE((int) socket.bytesAvailable(), 0);
QCOMPARE(socket.canReadLine(), false);
QCOMPARE(socket.readLine(), QByteArray());
- QCOMPARE(socket.socketDescriptor(), -1);
+ QCOMPARE(socket.socketDescriptor(), (qintptr)-1);
QCOMPARE(socket.error(), QUdpSocket::UnknownSocketError);
QCOMPARE(socket.errorString(), QString("Unknown error"));
diff --git a/tests/auto/network/socket/qudpsocket/udpServer/main.cpp b/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
index ff3ca111d0..90ddcf1748 100644
--- a/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
+++ b/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/socket/socket.pro b/tests/auto/network/socket/socket.pro
index 49fb52d1a5..426dca2277 100644
--- a/tests/auto/network/socket/socket.pro
+++ b/tests/auto/network/socket/socket.pro
@@ -10,8 +10,7 @@ SUBDIRS=\
platformsocketengine \
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
- platformsocketengine \
- qhttpsocketengine \
- qsocks5socketengine \
-
-
+ platformsocketengine \
+ qtcpsocket \
+ qhttpsocketengine \
+ qsocks5socketengine \
diff --git a/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh b/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh
index 0bac191326..915bf796b1 100755
--- a/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh
+++ b/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index a521d0e389..a2fab2b479 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -200,10 +200,8 @@ void tst_QSslCertificate::emptyConstructor()
QCOMPARE(certificate.issuerInfo(QSslCertificate::Organization), QStringList());
QCOMPARE(certificate.subjectInfo(QSslCertificate::Organization), QStringList());
QCOMPARE(certificate.subjectAlternativeNames(),(QMultiMap<QSsl::AlternativeNameEntryType, QString>()));
-#ifndef QT_NO_TEXTSTREAM
QCOMPARE(certificate.effectiveDate(), QDateTime());
QCOMPARE(certificate.expiryDate(), QDateTime());
-#endif
}
Q_DECLARE_METATYPE(QSsl::EncodingFormat);
diff --git a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
index 5fe4d03bdd..89b735aed3 100644
--- a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
+++ b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
index 3fae88ec00..481d73650b 100644
--- a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
+++ b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
index 559ef5cf5d..087a3a64b9 100755
--- a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
+++ b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index fe79c39363..cf1489c76c 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
index cc24add331..2739a7eb25 100644
--- a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
+++ b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
@@ -32,4 +32,7 @@ wince* {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+# QTBUG-23575
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):DEFINES+=UBUNTU_ONEIRIC
+
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index a83611e2b5..96aea6a4e5 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -396,7 +396,7 @@ void tst_QSslSocket::constructing()
QCOMPARE(socket.peerPort(), quint16(0));
QCOMPARE(socket.proxy().type(), QNetworkProxy::DefaultProxy);
QCOMPARE(socket.readBufferSize(), qint64(0));
- QCOMPARE(socket.socketDescriptor(), -1);
+ QCOMPARE(socket.socketDescriptor(), (qintptr)-1);
QCOMPARE(socket.socketType(), QAbstractSocket::TcpSocket);
QVERIFY(!socket.waitForConnected(10));
QTest::ignoreMessage(QtWarningMsg, "QSslSocket::waitForDisconnected() is not allowed in UnconnectedState");
@@ -912,7 +912,7 @@ public:
QString m_certFile;
protected:
- void incomingConnection(int socketDescriptor)
+ void incomingConnection(qintptr socketDescriptor)
{
socket = new QSslSocket(this);
socket->setProtocol(protocol);
@@ -947,7 +947,6 @@ protected slots:
void tst_QSslSocket::protocolServerSide_data()
{
-
QTest::addColumn<QSsl::SslProtocol>("serverProtocol");
QTest::addColumn<QSsl::SslProtocol>("clientProtocol");
QTest::addColumn<bool>("works");
@@ -1046,6 +1045,10 @@ void tst_QSslSocket::protocolServerSide()
QFETCH(bool, works);
QAbstractSocket::SocketState expectedState = (works) ? QAbstractSocket::ConnectedState : QAbstractSocket::UnconnectedState;
+#if defined(UBUNTU_ONEIRIC) && defined(__x86_64__)
+ QEXPECT_FAIL("ssl3-any", "QTBUG-23575 - Fails on this platform", Abort);
+ QEXPECT_FAIL("tls1.0-any", "QTBUG-23575 - Fails on this platform", Abort);
+#endif
QCOMPARE(int(client->state()), int(expectedState));
QCOMPARE(client->isEncrypted(), works);
}
@@ -1326,7 +1329,7 @@ void tst_QSslSocket::wildcard()
class SslServer2 : public QTcpServer
{
protected:
- void incomingConnection(int socketDescriptor)
+ void incomingConnection(qintptr socketDescriptor)
{
QSslSocket *socket = new QSslSocket(this);
socket->ignoreSslErrors();
@@ -1546,7 +1549,7 @@ public:
QSslSocket *socket;
protected:
- void incomingConnection(int socketDescriptor)
+ void incomingConnection(qintptr socketDescriptor)
{
socket = new QSslSocket(this);
connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
@@ -1715,7 +1718,7 @@ public:
QSslSocket *socket;
protected:
- void incomingConnection(int socketDescriptor)
+ void incomingConnection(qintptr socketDescriptor)
{
socket = new QSslSocket(this);
@@ -1761,6 +1764,9 @@ void tst_QSslSocket::verifyMode()
loop.exec();
QVERIFY(clientSocket.isEncrypted());
+#if defined(UBUNTU_ONEIRIC) && defined(__x86_64__)
+ QEXPECT_FAIL("", "QTBUG-23575 - Fails on this platform", Abort);
+#endif
QVERIFY(server.socket->sslErrors().isEmpty());
}
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
index 7e9c427192..d331658fc8 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
index 59894244a4..4c76a44ac1 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro
index dd92ec0358..294caeba5a 100644
--- a/tests/auto/network/ssl/ssl.pro
+++ b/tests/auto/network/ssl/ssl.pro
@@ -7,3 +7,8 @@ SUBDIRS=\
qsslsocket \
qsslsocket_onDemandCertificates_member \
qsslsocket_onDemandCertificates_static \
+
+!contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ qsslsocket \
+ qsslsocket_onDemandCertificates_member \
+ qsslsocket_onDemandCertificates_static \
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 492c250b6b..0b8952f9ab 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
index 399d624027..865a31bfce 100644
--- a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
+++ b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
index 7755d89c0b..3ad39f754a 100644
--- a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
+++ b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
index 940220217d..97718d136a 100644
--- a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
+++ b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.h b/tests/auto/opengl/qglthreads/tst_qglthreads.h
index 7972638085..54ada3bcce 100644
--- a/tests/auto/opengl/qglthreads/tst_qglthreads.h
+++ b/tests/auto/opengl/qglthreads/tst_qglthreads.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/atwrapper/atWrapper.cpp b/tests/auto/other/atwrapper/atWrapper.cpp
index 121f742201..5dc0cd599b 100644
--- a/tests/auto/other/atwrapper/atWrapper.cpp
+++ b/tests/auto/other/atwrapper/atWrapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/atwrapper/atWrapper.h b/tests/auto/other/atwrapper/atWrapper.h
index e325c087d8..48fe202267 100644
--- a/tests/auto/other/atwrapper/atWrapper.h
+++ b/tests/auto/other/atwrapper/atWrapper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/atwrapper/atWrapperAutotest.cpp b/tests/auto/other/atwrapper/atWrapperAutotest.cpp
index 0c24286d6b..2ff3327349 100644
--- a/tests/auto/other/atwrapper/atWrapperAutotest.cpp
+++ b/tests/auto/other/atwrapper/atWrapperAutotest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/baselineexample/tst_baselineexample.cpp b/tests/auto/other/baselineexample/tst_baselineexample.cpp
index 73657bdf6d..7253082974 100644
--- a/tests/auto/other/baselineexample/tst_baselineexample.cpp
+++ b/tests/auto/other/baselineexample/tst_baselineexample.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/collections/tst_collections.cpp b/tests/auto/other/collections/tst_collections.cpp
index 3f96aa94d5..3c55897b46 100644
--- a/tests/auto/other/collections/tst_collections.cpp
+++ b/tests/auto/other/collections/tst_collections.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/compiler/baseclass.cpp b/tests/auto/other/compiler/baseclass.cpp
index 22ccba8f78..5eea58d1dc 100644
--- a/tests/auto/other/compiler/baseclass.cpp
+++ b/tests/auto/other/compiler/baseclass.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/compiler/baseclass.h b/tests/auto/other/compiler/baseclass.h
index e510112f2f..1cfa1079a4 100644
--- a/tests/auto/other/compiler/baseclass.h
+++ b/tests/auto/other/compiler/baseclass.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/compiler/derivedclass.cpp b/tests/auto/other/compiler/derivedclass.cpp
index 45ef6df3ee..e43e2f9b5b 100644
--- a/tests/auto/other/compiler/derivedclass.cpp
+++ b/tests/auto/other/compiler/derivedclass.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/compiler/derivedclass.h b/tests/auto/other/compiler/derivedclass.h
index c5fb61f46e..47227a95b5 100644
--- a/tests/auto/other/compiler/derivedclass.h
+++ b/tests/auto/other/compiler/derivedclass.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp
index b6fb391fb1..db57af63bb 100644
--- a/tests/auto/other/compiler/tst_compiler.cpp
+++ b/tests/auto/other/compiler/tst_compiler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp b/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp
index ba384e0290..309f6b7d78 100644
--- a/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp
+++ b/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/exceptionsafety_objects/oomsimulator.h b/tests/auto/other/exceptionsafety_objects/oomsimulator.h
index 15500f590b..0727723d47 100644
--- a/tests/auto/other/exceptionsafety_objects/oomsimulator.h
+++ b/tests/auto/other/exceptionsafety_objects/oomsimulator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -173,17 +173,17 @@ static int qCrtAllocHook(int allocType, void * /*userData*/, size_t /*size*/,
const unsigned char * /*filename*/, int /*lineNumber*/)
{
if (blockType == _CRT_BLOCK)
- return TRUE; // ignore allocations from the C library
+ return true; // ignore allocations from the C library
switch (allocType) {
case _HOOK_ALLOC:
case _HOOK_REALLOC:
++mallocCount;
if (mallocFailActive && --mallocFailIndex < 0)
- return FALSE; // simulate OOM
+ return false; // simulate OOM
}
- return TRUE;
+ return true;
}
static struct QCrtDebugRegistrator
diff --git a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index 304f834cac..7e569fe7f7 100644
--- a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
+++ b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp
index 1a71f9170a..daa1893807 100644
--- a/tests/auto/other/gestures/tst_gestures.cpp
+++ b/tests/auto/other/gestures/tst_gestures.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/headersclean/tst_headersclean.cpp b/tests/auto/other/headersclean/tst_headersclean.cpp
index 4cc11caf71..807f97af69 100644
--- a/tests/auto/other/headersclean/tst_headersclean.cpp
+++ b/tests/auto/other/headersclean/tst_headersclean.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/lancelot/lancelot.pro b/tests/auto/other/lancelot/lancelot.pro
index bbb48c745e..ced8aceb99 100644
--- a/tests/auto/other/lancelot/lancelot.pro
+++ b/tests/auto/other/lancelot/lancelot.pro
@@ -10,7 +10,6 @@ RESOURCES += images.qrc
include($$PWD/../../../baselineserver/shared/qbaselinetest.pri)
-!wince*:DEFINES += SRCDIR=\\\"$$PWD\\\"
-linux-g++-maemo:DEFINES += USE_RUNTIME_DIR
+TESTDATA += scripts/*
CONFIG += insignificant_test # QTBUG-21402
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp
index dc23575fc5..08c6918eb6 100644
--- a/tests/auto/other/lancelot/paintcommands.cpp
+++ b/tests/auto/other/lancelot/paintcommands.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/lancelot/paintcommands.h b/tests/auto/other/lancelot/paintcommands.h
index 925a867f2f..b22ab58b32 100644
--- a/tests/auto/other/lancelot/paintcommands.h
+++ b/tests/auto/other/lancelot/paintcommands.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index cbbd28dc82..50688ffa17 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -50,10 +50,6 @@
#include <QtOpenGL>
#endif
-#ifndef SRCDIR
-#define SRCDIR "."
-#endif
-
class tst_Lancelot : public QObject
{
Q_OBJECT
@@ -114,11 +110,8 @@ void tst_Lancelot::initTestCase()
if (!proto.connect(QLatin1String("tst_Lancelot"), &dryRunMode, clientInfo))
QSKIP(qPrintable(proto.errorMessage()));
-#if defined(USE_RUNTIME_DIR)
- scriptsDir = QCoreApplication::applicationDirPath() + "/scripts/";
-#else
- scriptsDir = SRCDIR "/scripts/";
-#endif
+ QString baseDir = QFINDTESTDATA("scripts/text.qps");
+ scriptsDir = baseDir.left(baseDir.lastIndexOf('/')) + '/';
QDir qpsDir(scriptsDir);
QStringList files = qpsDir.entryList(QStringList() << QLatin1String("*.qps"), QDir::Files | QDir::Readable);
if (files.isEmpty()) {
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 3b77b13275..12b35795fe 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,6 +46,7 @@
#include <QtCore/QSet>
#include <QtCore/QFile>
#include <QtCore/QTranslator>
+#include <QtCore/QTemporaryDir>
#include <private/qthread_p.h>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QColorDialog>
@@ -116,16 +117,53 @@ public:
virtual bool isEmpty() const { return false; }
-public slots:
- void install() {
- QCoreApplication::installTranslator(this);
- QTest::qWait(2500);
- QApplication::closeAllWindows();
- }
public:
mutable QSet<QByteArray> m_translations;
};
+// Install the translator and close all application windows after a while to
+// quit the event loop.
+class LanguageTestStateMachine : public QObject
+{
+ Q_OBJECT
+public:
+ LanguageTestStateMachine(QTranslator *translator);
+ void start() { m_timer.start(); }
+
+private slots:
+ void timeout();
+
+private:
+ enum State { InstallTranslator, CloseDialog };
+
+ QTimer m_timer;
+ QTranslator *m_translator;
+ State m_state;
+};
+
+LanguageTestStateMachine::LanguageTestStateMachine(QTranslator *translator) :
+ m_translator(translator), m_state(InstallTranslator)
+{
+ m_timer.setInterval(500);
+ connect(&m_timer, SIGNAL(timeout()), this, SLOT(timeout()));
+}
+
+void LanguageTestStateMachine::timeout()
+{
+ switch (m_state) {
+ case InstallTranslator:
+ m_timer.stop();
+ QCoreApplication::installTranslator(m_translator);
+ m_timer.setInterval(2500);
+ m_timer.start();
+ m_state = CloseDialog;
+ break;
+ case CloseDialog: // Close repeatedly in case file dialog is slow.
+ QApplication::closeAllWindows();
+ break;
+ }
+}
+
enum DialogType {
InputDialog = 1,
ColorDialog,
@@ -208,17 +246,20 @@ void tst_languageChange::retranslatability()
"get proper widget layout.");
TransformTranslator translator;
- QTimer::singleShot(500, &translator, SLOT(install()));
+ LanguageTestStateMachine stateMachine(&translator);
+
switch (dialogType) {
case InputDialog:
- (void)QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label"));
+ stateMachine.start();
+ QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label"));
break;
case ColorDialog:
#ifdef Q_OS_MAC
QSKIP("The native color dialog is used on Mac OS");
#else
- (void)QColorDialog::getColor();
+ stateMachine.start();
+ QColorDialog::getColor();
#endif
break;
case FileDialog: {
@@ -227,29 +268,30 @@ void tst_languageChange::retranslatability()
#endif
QFileDialog dlg;
dlg.setOption(QFileDialog::DontUseNativeDialog);
- QString tmpParentDir = QDir::tempPath();
- if (!tmpParentDir.endsWith(QLatin1Char('/')))
- tmpParentDir += QLatin1Char('/');
- tmpParentDir += QStringLiteral("languagechangetestdir");
- const QString tmpDir = tmpParentDir + QStringLiteral("/finaldir");
- const QString fooName = tmpParentDir + QStringLiteral("/foo");
+ QString tempDirPattern = QDir::tempPath();
+ if (!tempDirPattern.endsWith(QLatin1Char('/')))
+ tempDirPattern += QLatin1Char('/');
+ tempDirPattern += QStringLiteral("languagechangetestdirXXXXXX");
+ QTemporaryDir temporaryDir(tempDirPattern);
+ temporaryDir.setAutoRemove(true);
+ QVERIFY(temporaryDir.isValid());
+ const QString finalDir = temporaryDir.path() + QStringLiteral("/finaldir");
+ const QString fooName = temporaryDir.path() + QStringLiteral("/foo");
QDir dir;
- QCOMPARE(dir.mkpath(tmpDir), true);
+ QVERIFY(dir.mkpath(finalDir));
QFile fooFile(fooName);
QVERIFY(fooFile.open(QIODevice::WriteOnly|QIODevice::Text));
fooFile.write("test");
fooFile.close();
- dlg.setDirectory(tmpParentDir);
+ dlg.setDirectory(temporaryDir.path());
#ifdef Q_OS_WINCE
dlg.setDirectory("\\Windows");
#endif
dlg.setFileMode(QFileDialog::ExistingFiles);
dlg.setViewMode(QFileDialog::Detail);
+ stateMachine.start();
dlg.exec();
QTest::qWait(3000);
- QCOMPARE(QFile::remove(fooName), true);
- QCOMPARE(dir.rmdir(tmpDir), true);
- QCOMPARE(dir.rmdir(tmpParentDir), true);
break; }
}
diff --git a/tests/auto/other/macgui/guitest.cpp b/tests/auto/other/macgui/guitest.cpp
index e5245528cb..6ab5a64a97 100644
--- a/tests/auto/other/macgui/guitest.cpp
+++ b/tests/auto/other/macgui/guitest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macgui/guitest.h b/tests/auto/other/macgui/guitest.h
index 170fc5c19c..39a63b0443 100644
--- a/tests/auto/other/macgui/guitest.h
+++ b/tests/auto/other/macgui/guitest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macgui/tst_macgui.cpp b/tests/auto/other/macgui/tst_macgui.cpp
index 9ff2897aa8..8f66d54a2c 100644
--- a/tests/auto/other/macgui/tst_macgui.cpp
+++ b/tests/auto/other/macgui/tst_macgui.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/expectedeventlist.cpp b/tests/auto/other/macnativeevents/expectedeventlist.cpp
index d603f82f27..9067a38ec6 100644
--- a/tests/auto/other/macnativeevents/expectedeventlist.cpp
+++ b/tests/auto/other/macnativeevents/expectedeventlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/expectedeventlist.h b/tests/auto/other/macnativeevents/expectedeventlist.h
index e3fef2d56d..fb4c18d493 100644
--- a/tests/auto/other/macnativeevents/expectedeventlist.h
+++ b/tests/auto/other/macnativeevents/expectedeventlist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/nativeeventlist.cpp b/tests/auto/other/macnativeevents/nativeeventlist.cpp
index 8c7f609d9f..781c3f5374 100644
--- a/tests/auto/other/macnativeevents/nativeeventlist.cpp
+++ b/tests/auto/other/macnativeevents/nativeeventlist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/nativeeventlist.h b/tests/auto/other/macnativeevents/nativeeventlist.h
index 6bebca1613..f6493e56da 100644
--- a/tests/auto/other/macnativeevents/nativeeventlist.h
+++ b/tests/auto/other/macnativeevents/nativeeventlist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/qnativeevents.cpp b/tests/auto/other/macnativeevents/qnativeevents.cpp
index b530d7bbe3..79667adcd0 100644
--- a/tests/auto/other/macnativeevents/qnativeevents.cpp
+++ b/tests/auto/other/macnativeevents/qnativeevents.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/qnativeevents.h b/tests/auto/other/macnativeevents/qnativeevents.h
index d303a55397..3a3e4f1590 100644
--- a/tests/auto/other/macnativeevents/qnativeevents.h
+++ b/tests/auto/other/macnativeevents/qnativeevents.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/qnativeevents_mac.cpp b/tests/auto/other/macnativeevents/qnativeevents_mac.cpp
index 8987a8d502..35028f9cf7 100644
--- a/tests/auto/other/macnativeevents/qnativeevents_mac.cpp
+++ b/tests/auto/other/macnativeevents/qnativeevents_mac.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
index ea30b0b5c2..c5131e19fc 100644
--- a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
+++ b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macplist/app/main.cpp b/tests/auto/other/macplist/app/main.cpp
index 90bf60ae38..c28c372f08 100644
--- a/tests/auto/other/macplist/app/main.cpp
+++ b/tests/auto/other/macplist/app/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/macplist/tst_macplist.cpp b/tests/auto/other/macplist/tst_macplist.cpp
index 5b48c586b5..f2b47c1d99 100644
--- a/tests/auto/other/macplist/tst_macplist.cpp
+++ b/tests/auto/other/macplist/tst_macplist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/modeltest/modeltest.cpp b/tests/auto/other/modeltest/modeltest.cpp
index 76803dfbe5..118b4a8e1f 100644
--- a/tests/auto/other/modeltest/modeltest.cpp
+++ b/tests/auto/other/modeltest/modeltest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/modeltest/modeltest.h b/tests/auto/other/modeltest/modeltest.h
index e4ef478c5e..f70aebabde 100644
--- a/tests/auto/other/modeltest/modeltest.h
+++ b/tests/auto/other/modeltest/modeltest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/modeltest/tst_modeltest.cpp b/tests/auto/other/modeltest/tst_modeltest.cpp
index e5c227d167..fa9b98acb6 100644
--- a/tests/auto/other/modeltest/tst_modeltest.cpp
+++ b/tests/auto/other/modeltest/tst_modeltest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index c768a29bf8..3129fd965d 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 2a838c0e3d..90ab5b4c67 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -66,6 +66,8 @@ inline bool IsValidCEPlatform() {
}
#endif
+typedef QSharedPointer<QAccessibleInterface> QAIPtr;
+
static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
int index, const QRect &domain)
{
@@ -89,7 +91,6 @@ static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
// QAccessibleInterface::indexOfChild():
// Verify that indexOfChild() returns an index equal to the index passed in
int indexFromIndexOfChild = interface->indexOfChild(childInterface);
- delete childInterface;
if (indexFromIndexOfChild != index) {
qWarning("tst_QAccessibility::verifyChild (indexOfChild()):");
qWarning() << "Expected:" << index;
@@ -98,7 +99,7 @@ static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
}
// Navigate to child, compare its object and role with the interface from queryAccessibleInterface(child).
- QAccessibleInterface *navigatedChildInterface = interface->child(index - 1);
+ QAccessibleInterface *navigatedChildInterface = interface->child(index);
if (navigatedChildInterface == 0)
return false;
@@ -109,13 +110,21 @@ static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
// Calculate global child position and check that the interface
// returns the correct index for that position.
QPoint globalChildPos = child->mapToGlobal(QPoint(0, 0));
- int indexFromChildAt = interface->childAt(globalChildPos.x(), globalChildPos.y());
- if (indexFromChildAt != index) {
+ QAccessibleInterface *childAtInterface = interface->childAt(globalChildPos.x(), globalChildPos.y());
+ if (!childAtInterface) {
qWarning("tst_QAccessibility::verifyChild (childAt()):");
- qWarning() << "Expected:" << index;
- qWarning() << "Actual: " << indexFromChildAt;
+ qWarning() << "Expected:" << childInterface;
+ qWarning() << "Actual: no child";
return false;
}
+ if (childAtInterface->object() != childInterface->object()) {
+ qWarning("tst_QAccessibility::verifyChild (childAt()):");
+ qWarning() << "Expected:" << childInterface;
+ qWarning() << "Actual: " << childAtInterface;
+ return false;
+ }
+ delete childInterface;
+ delete childAtInterface;
// QAccessibleInterface::rect():
// Calculate global child geometry and check that the interface
@@ -221,7 +230,7 @@ private slots:
void customWidget();
void deletedWidget();
- void navigateGeometric();
+ void statesStructTest();
void navigateHierarchy();
void sliderTest();
void navigateCovered();
@@ -321,7 +330,7 @@ QAccessible::State state(QWidget * const widget)
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
if (!iface)
qWarning() << "Cannot get QAccessibleInterface for widget";
- QAccessible::State state = (iface ? iface->state() : static_cast<QAccessible::State>(0));
+ QAccessible::State state = (iface ? iface->state() : QAccessible::State());
delete iface;
return state;
}
@@ -454,100 +463,24 @@ void tst_QAccessibility::deletedWidget()
delete iface;
}
-void tst_QAccessibility::navigateGeometric()
+void tst_QAccessibility::statesStructTest()
{
- {
- static const int skip = 20; //speed the test up significantly
- static const double step = Q_PI / 180;
- QWidget *w = new QWidget(0);
- w->setObjectName(QString("Josef"));
- w->setFixedSize(400, 400);
-
- // center widget
- QtTestAccessibleWidget *center = new QtTestAccessibleWidget(w, "Sol");
- center->move(200, 200);
-
- // arrange 360 widgets around it in a circle
- QtTestAccessibleWidget *aw = 0;
- for (int i = 0; i < 360; i += skip) {
- aw = new QtTestAccessibleWidget(w, QString::number(i).toLatin1());
- aw->move( int(200.0 + 100.0 * sin(step * (double)i)), int(200.0 + 100.0 * cos(step * (double)i)) );
- }
-
- aw = new QtTestAccessibleWidget(w, "Earth");
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(center);
- QAccessibleInterface *target = 0;
- QVERIFY(iface != 0);
- QVERIFY(iface->isValid());
-
- w->show();
- QCoreApplication::processEvents();
- QTest::qWait(100);
-
- // let one widget rotate around center
- for (int i = 0; i < 360; i+=skip) {
- aw->move( int(200.0 + 75.0 * sin(step * (double)i)), int(200.0 + 75.0 * cos(step * (double)i)) );
-
- if (i < 45 || i > 315) {
- QCOMPARE(iface->navigate(QAccessible::Down, 0, &target), 0);
- } else if ( i < 135 ) {
- QCOMPARE(iface->navigate(QAccessible::Right, 0, &target), 0);
- } else if ( i < 225 ) {
- QCOMPARE(iface->navigate(QAccessible::Up, 0, &target), 0);
- } else {
- QCOMPARE(iface->navigate(QAccessible::Left, 0, &target), 0);
- }
-
- QVERIFY(target);
- QVERIFY(target->isValid());
- QVERIFY(target->object());
- QCOMPARE(target->object()->objectName(), aw->objectName());
- delete target; target = 0;
- }
-
- // test invisible widget
- target = QAccessible::queryAccessibleInterface(aw);
- QVERIFY(!(target->state() & QAccessible::Invisible));
- aw->hide();
- QVERIFY(target->state() & QAccessible::Invisible);
- delete target; target = 0;
-
- aw->move(center->x() + 10, center->y());
- QCOMPARE(iface->navigate(QAccessible::Right, 0, &target), 0);
- QVERIFY(target);
- QVERIFY(target->isValid());
- QVERIFY(target->object());
- QVERIFY(QString(target->object()->objectName()) != "Earth");
- delete target; target = 0;
-
- aw->move(center->x() - 10, center->y());
- QCOMPARE(iface->navigate(QAccessible::Left, 0, &target), 0);
- QVERIFY(target);
- QVERIFY(target->isValid());
- QVERIFY(target->object());
- QVERIFY(QString(target->object()->objectName()) != "Earth");
- delete target; target = 0;
-
- aw->move(center->x(), center->y() + 10);
- QCOMPARE(iface->navigate(QAccessible::Down, 0, &target), 0);
- QVERIFY(target);
- QVERIFY(target->isValid());
- QVERIFY(target->object());
- QVERIFY(QString(target->object()->objectName()) != "Earth");
- delete target; target = 0;
-
- aw->move(center->x(), center->y() - 10);
- QCOMPARE(iface->navigate(QAccessible::Up, 0, &target), 0);
- QVERIFY(target);
- QVERIFY(target->isValid());
- QVERIFY(target->object());
- QVERIFY(QString(target->object()->objectName()) != "Earth");
- delete target; target = 0;
-
- delete iface;
- delete w;
- }
- QTestAccessibility::clearEvents();
+ QAccessible::State s1;
+ QVERIFY(s1.disabled == 0);
+ QVERIFY(s1.focusable == 0);
+ QVERIFY(s1.modal == 0);
+
+ QAccessible::State s2;
+ QVERIFY(s2 == s1);
+ s2.busy = true;
+ QVERIFY(!(s2 == s1));
+ s1.busy = true;
+ QVERIFY(s2 == s1);
+ s1 = QAccessible::State();
+ QVERIFY(!(s2 == s1));
+ s1 = s2;
+ QVERIFY(s2 == s1);
+ QVERIFY(s1.busy == 1);
}
void tst_QAccessibility::sliderTest()
@@ -671,9 +604,9 @@ void tst_QAccessibility::navigateCovered()
w1->raise();
QVERIFY(iface1->relationTo(iface2) & QAccessible::Covers);
QVERIFY(iface2->relationTo(iface1) & QAccessible::Covered);
- QVERIFY(!(iface1->state() & QAccessible::Invisible));
+ QVERIFY(!iface1->state().invisible);
w1->hide();
- QVERIFY(iface1->state() & QAccessible::Invisible);
+ QVERIFY(iface1->state().invisible);
QVERIFY(!(iface1->relationTo(iface2) & QAccessible::Covers));
QVERIFY(!(iface2->relationTo(iface1) & QAccessible::Covered));
QCOMPARE(iface2->navigate(QAccessible::Covered, 1, &iface3), -1);
@@ -712,11 +645,6 @@ void tst_QAccessibility::navigateHierarchy()
QVERIFY(iface != 0);
QVERIFY(iface->isValid());
- QCOMPARE(iface->navigate(QAccessible::Sibling, -42, &target), -1);
- QVERIFY(target == 0);
- QCOMPARE(iface->navigate(QAccessible::Sibling, 42, &target), -1);
- QVERIFY(target == 0);
-
target = iface->child(14);
QVERIFY(target == 0);
target = iface->child(-1);
@@ -732,38 +660,27 @@ void tst_QAccessibility::navigateHierarchy()
delete interfaceW1;
delete iface; iface = 0;
- QCOMPARE(target->navigate(QAccessible::Sibling, 0, &iface), -1);
- QVERIFY(iface == 0);
- QCOMPARE(target->navigate(QAccessible::Sibling, 42, &iface), -1);
- QVERIFY(iface == 0);
- QCOMPARE(target->navigate(QAccessible::Sibling, -42, &iface), -1);
- QVERIFY(iface == 0);
- QCOMPARE(target->navigate(QAccessible::Sibling, 2, &iface), 0);
- QVERIFY(iface != 0);
- QVERIFY(iface->isValid());
- QCOMPARE(iface->object(), (QObject*)w2);
- delete target; target = 0;
- QCOMPARE(iface->navigate(QAccessible::Sibling, 3, &target), 0);
+ iface = QAccessible::queryAccessibleInterface(w);
+ target = iface->child(2);
QVERIFY(target != 0);
QVERIFY(target->isValid());
QCOMPARE(target->object(), (QObject*)w3);
delete iface; iface = 0;
+
+ iface = target->child(1);
+ QCOMPARE(iface, (QAccessibleInterface*)0);
iface = target->child(0);
QVERIFY(iface != 0);
QVERIFY(iface->isValid());
QCOMPARE(iface->object(), (QObject*)w31);
- delete target; target = 0;
- QCOMPARE(iface->navigate(QAccessible::Sibling, -1, &target), -1);
- QVERIFY(target == 0);
- QCOMPARE(iface->navigate(QAccessible::Sibling, 0, &target), -1);
- QVERIFY(target == 0);
- QCOMPARE(iface->navigate(QAccessible::Sibling, 1, &target), 0);
- QVERIFY(target != 0);
- QVERIFY(target->isValid());
+ iface = QAccessible::queryAccessibleInterface(w);
+ QAccessibleInterface *acc3 = iface->child(2);
+ target = acc3->child(0);
+ delete acc3;
+ delete iface;
QCOMPARE(target->object(), (QObject*)w31);
- delete iface; iface = 0;
iface = target->parent();
QVERIFY(iface != 0);
@@ -913,23 +830,23 @@ void tst_QAccessibility::hideShowTest()
QWidget * const window = new QWidget();
QWidget * const child = new QWidget(window);
- QVERIFY(state(window) & QAccessible::Invisible);
- QVERIFY(state(child) & QAccessible::Invisible);
+ QVERIFY(state(window).invisible);
+ QVERIFY(state(child).invisible);
QTestAccessibility::clearEvents();
// show() and veryfy that both window and child are not invisible and get ObjectShow events.
window->show();
- QVERIFY(state(window) ^ QAccessible::Invisible);
- QVERIFY(state(child) ^ QAccessible::Invisible);
+ QVERIFY(!state(window).invisible);
+ QVERIFY(!state(child).invisible);
QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(window, 0, QAccessible::ObjectShow)));
QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(child, 0, QAccessible::ObjectShow)));
QTestAccessibility::clearEvents();
// hide() and veryfy that both window and child are invisible and get ObjectHide events.
window->hide();
- QVERIFY(state(window) & QAccessible::Invisible);
- QVERIFY(state(child) & QAccessible::Invisible);
+ QVERIFY(state(window).invisible);
+ QVERIFY(state(child).invisible);
QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(window, 0, QAccessible::ObjectHide)));
QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(child, 0, QAccessible::ObjectHide)));
QTestAccessibility::clearEvents();
@@ -1053,7 +970,7 @@ void tst_QAccessibility::buttonTest()
// tristate checkbox
QCheckBox tristate("Tristate!", &window);
- tristate.setTristate(TRUE);
+ tristate.setTristate(true);
// radiobutton
QRadioButton radio("Radio me!", &window);
@@ -1091,12 +1008,12 @@ void tst_QAccessibility::buttonTest()
QCOMPARE(actionInterface->actionNames(), QStringList() << QAccessibleActionInterface::checkAction() << QAccessibleActionInterface::setFocusAction());
QCOMPARE(actionInterface->localizedActionDescription(QAccessibleActionInterface::checkAction()), QString("Checks the checkbox"));
QVERIFY(!toggleButton.isChecked());
- QVERIFY((interface->state() & QAccessible::Checked) == 0);
+ QVERIFY(!interface->state().checked);
actionInterface->doAction(QAccessibleActionInterface::checkAction());
QTest::qWait(500);
QVERIFY(toggleButton.isChecked());
QCOMPARE(actionInterface->actionNames().at(0), QAccessibleActionInterface::uncheckAction());
- QVERIFY(interface->state() & QAccessible::Checked);
+ QVERIFY(interface->state().checked);
delete interface;
{
@@ -1110,7 +1027,7 @@ void tst_QAccessibility::buttonTest()
menuButton.show();
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&menuButton);
QCOMPARE(interface->role(), QAccessible::ButtonMenu);
- QVERIFY(interface->state() & QAccessible::HasPopup);
+ QVERIFY(interface->state().hasPopup);
QCOMPARE(interface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction() << QAccessibleActionInterface::setFocusAction());
// showing the menu enters a new event loop...
// interface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
@@ -1124,11 +1041,11 @@ void tst_QAccessibility::buttonTest()
actionInterface = interface->actionInterface();
QCOMPARE(interface->role(), QAccessible::CheckBox);
QCOMPARE(actionInterface->actionNames(), QStringList() << QAccessibleActionInterface::checkAction() << QAccessibleActionInterface::setFocusAction());
- QVERIFY((interface->state() & QAccessible::Checked) == 0);
+ QVERIFY(!interface->state().checked);
actionInterface->doAction(QAccessibleActionInterface::checkAction());
QTest::qWait(500);
QCOMPARE(actionInterface->actionNames(), QStringList() << QAccessibleActionInterface::uncheckAction() << QAccessibleActionInterface::setFocusAction());
- QVERIFY(interface->state() & QAccessible::Checked);
+ QVERIFY(interface->state().checked);
QVERIFY(checkBox.isChecked());
delete interface;
@@ -1137,11 +1054,11 @@ void tst_QAccessibility::buttonTest()
actionInterface = interface->actionInterface();
QCOMPARE(interface->role(), QAccessible::RadioButton);
QCOMPARE(actionInterface->actionNames(), QStringList() << QAccessibleActionInterface::checkAction() << QAccessibleActionInterface::setFocusAction());
- QVERIFY((interface->state() & QAccessible::Checked) == 0);
+ QVERIFY(!interface->state().checked);
actionInterface->doAction(QAccessibleActionInterface::checkAction());
QTest::qWait(500);
QCOMPARE(actionInterface->actionNames(), QStringList() << QAccessibleActionInterface::checkAction() << QAccessibleActionInterface::setFocusAction());
- QVERIFY(interface->state() & QAccessible::Checked);
+ QVERIFY(interface->state().checked);
QVERIFY(checkBox.isChecked());
delete interface;
@@ -1202,15 +1119,15 @@ void tst_QAccessibility::scrollBarTest()
QScrollBar *scrollBar = new QScrollBar(Qt::Horizontal);
QAccessibleInterface * const scrollBarInterface = QAccessible::queryAccessibleInterface(scrollBar);
QVERIFY(scrollBarInterface);
- QVERIFY(scrollBarInterface->state() & QAccessible::Invisible);
+ QVERIFY(scrollBarInterface->state().invisible);
scrollBar->resize(200, 50);
scrollBar->show();
- QVERIFY(scrollBarInterface->state() ^ QAccessible::Invisible);
+ QVERIFY(!scrollBarInterface->state().invisible);
QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(scrollBar, 0, QAccessible::ObjectShow)));
QTestAccessibility::clearEvents();
scrollBar->hide();
- QVERIFY(scrollBarInterface->state() & QAccessible::Invisible);
+ QVERIFY(scrollBarInterface->state().invisible);
QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(scrollBar, 0, QAccessible::ObjectHide)));
QTestAccessibility::clearEvents();
@@ -1254,7 +1171,7 @@ void tst_QAccessibility::tabTest()
// and cleared correctly.
QAccessibleInterface *leftButton = interface->child(0);
QCOMPARE(leftButton->role(), QAccessible::PushButton);
- QVERIFY(leftButton->state() & QAccessible::Invisible);
+ QVERIFY(leftButton->state().invisible);
delete leftButton;
const int lots = 5;
@@ -1268,13 +1185,13 @@ void tst_QAccessibility::tabTest()
QVERIFY(child2);
QCOMPARE(child2->role(), QAccessible::PageTab);
- QVERIFY((child1->state() & QAccessible::Invisible) == false);
+ QVERIFY((child1->state().invisible) == false);
tabBar->hide();
QCoreApplication::processEvents();
QTest::qWait(100);
- QVERIFY(child1->state() & QAccessible::Invisible);
+ QVERIFY(child1->state().invisible);
tabBar->show();
tabBar->setCurrentIndex(0);
@@ -1533,7 +1450,6 @@ void tst_QAccessibility::menuTest()
QAccessibleInterface *iface2 = 0;
// traverse siblings with navigate(Sibling, ...)
- int entry;
iface = interface->child(0);
QVERIFY(iface);
QCOMPARE(iface->role(), QAccessible::MenuItem);
@@ -1546,44 +1462,13 @@ void tst_QAccessibility::menuTest()
QAccessible::MenuItem
};
for (int child = 0; child < 5; ++child) {
- entry = iface->navigate(QAccessible::Sibling, child + 1, &iface2);
- QCOMPARE(entry, 0);
+ iface2 = interface->child(child);
QVERIFY(iface2);
QCOMPARE(iface2->role(), fileRoles[child]);
delete iface2;
}
delete iface;
- // traverse menu items with navigate(Down, ...)
- iface = interface->child(0);
- QVERIFY(iface);
- QCOMPARE(iface->role(), QAccessible::MenuItem);
-
- for (int child = 0; child < 4; ++child) {
- entry = iface->navigate(QAccessible::Down, 1, &iface2);
- delete iface;
- iface = iface2;
- QCOMPARE(entry, 0);
- QVERIFY(iface);
- QCOMPARE(iface->role(), fileRoles[child + 1]);
- }
- delete iface;
-
- // traverse menu items with navigate(Up, ...)
- iface = interface->child(interface->childCount() - 1);
- QVERIFY(iface);
- QCOMPARE(iface->role(), QAccessible::MenuItem);
-
- for (int child = 3; child >= 0; --child) {
- entry = iface->navigate(QAccessible::Up, 1, &iface2);
- delete iface;
- iface = iface2;
- QCOMPARE(entry, 0);
- QVERIFY(iface);
- QCOMPARE(iface->role(), fileRoles[child]);
- }
- delete iface;
-
// "New" item
iface = interface->child(0);
QVERIFY(iface);
@@ -1593,7 +1478,6 @@ void tst_QAccessibility::menuTest()
iface2 = iface->child(0);
delete iface;
iface = iface2;
- QCOMPARE(entry, 0);
QVERIFY(iface);
QCOMPARE(iface->role(), QAccessible::PopupMenu);
@@ -1785,37 +1669,6 @@ void tst_QAccessibility::mdiAreaTest()
QVERIFY(interface);
QCOMPARE(interface->childCount(), subWindowCount);
- // Right, right, right, ...
- for (int i = 0; i < subWindowCount; ++i) {
- QAccessibleInterface *destination = 0;
- int index = interface->navigate(QAccessible::Right, i + 1, &destination);
- if (i == subWindowCount - 1) {
- QVERIFY(!destination);
- QCOMPARE(index, -1);
- } else {
- QVERIFY(destination);
- QCOMPARE(index, 0);
- QCOMPARE(destination->object(), (QObject*)subWindows.at(i + 1));
- delete destination;
- }
- }
-
- // Left, left, left, ...
- for (int i = subWindowCount; i > 0; --i) {
- QAccessibleInterface *destination = 0;
- int index = interface->navigate(QAccessible::Left, i, &destination);
- if (i == 1) {
- QVERIFY(!destination);
- QCOMPARE(index, -1);
- } else {
- QVERIFY(destination);
- QCOMPARE(index, 0);
- QCOMPARE(destination->object(), (QObject*)subWindows.at(i - 2));
- delete destination;
- }
- }
- // ### Add test for Up and Down.
-
}
QTestAccessibility::clearEvents();
}
@@ -1831,7 +1684,6 @@ void tst_QAccessibility::mdiSubWindowTest()
QTest::qWait(150);
#endif
- bool isSubWindowsPlacedNextToEachOther = false;
const int subWindowCount = 5;
for (int i = 0; i < subWindowCount; ++i) {
QMdiSubWindow *window = mdiArea.addSubWindow(new QPushButton("QAccessibilityTest"));
@@ -1846,8 +1698,6 @@ void tst_QAccessibility::mdiSubWindowTest()
QCoreApplication::processEvents();
QTest::qWait(100);
#endif
- if (mdiArea.width() >= minimumWidth)
- isSubWindowsPlacedNextToEachOther = true;
}
}
@@ -1872,47 +1722,34 @@ void tst_QAccessibility::mdiSubWindowTest()
mdiArea.setActiveSubWindow(testWindow);
// state
- QAccessible::State state = QAccessible::Normal | QAccessible::Focusable | QAccessible::Focused
- | QAccessible::Movable | QAccessible::Sizeable;
+ QAccessible::State state;
+ state.focusable = true;
+ state.focused = true;
+ state.movable = true;
+ state.sizeable = true;
+
QCOMPARE(interface->state(), state);
const QRect originalGeometry = testWindow->geometry();
testWindow->showMaximized();
- state &= (uint)~QAccessible::Sizeable;
- state &= (uint)~QAccessible::Movable;
+ state.sizeable = false;
+ state.movable = false;
QCOMPARE(interface->state(), state);
testWindow->showNormal();
testWindow->move(-10, 0);
- QVERIFY(interface->state() & QAccessible::Offscreen);
+ QVERIFY(interface->state().offscreen);
testWindow->setVisible(false);
- QVERIFY(interface->state() & QAccessible::Invisible);
+ QVERIFY(interface->state().invisible);
testWindow->setVisible(true);
testWindow->setEnabled(false);
- QVERIFY(interface->state() & QAccessible::Unavailable);
+ QVERIFY(interface->state().disabled);
testWindow->setEnabled(true);
qApp->setActiveWindow(&mdiArea);
mdiArea.setActiveSubWindow(testWindow);
testWindow->setFocus();
QVERIFY(testWindow->isAncestorOf(qApp->focusWidget()));
- QVERIFY(interface->state() & QAccessible::Focused);
+ QVERIFY(interface->state().focused);
testWindow->setGeometry(originalGeometry);
- if (isSubWindowsPlacedNextToEachOther) {
- // This part of the test can only be run if the sub windows are
- // placed next to each other.
- QAccessibleInterface *destination = interface->child(0);
- QVERIFY(destination);
- QCOMPARE(destination->object(), (QObject*)testWindow->widget());
- delete destination;
- QCOMPARE(interface->navigate(QAccessible::Left, 0, &destination), 0);
- QVERIFY(destination);
- QCOMPARE(destination->object(), (QObject*)subWindows.at(2));
- delete destination;
- QCOMPARE(interface->navigate(QAccessible::Right, 0, &destination), 0);
- QVERIFY(destination);
- QCOMPARE(destination->object(), (QObject*)subWindows.at(4));
- delete destination;
- }
-
// rect
const QPoint globalPos = testWindow->mapToGlobal(QPoint(0, 0));
QCOMPARE(interface->rect(), QRect(globalPos, testWindow->size()));
@@ -1931,11 +1768,14 @@ void tst_QAccessibility::mdiSubWindowTest()
QCOMPARE(childRect(interface), QRect(globalWidgetPos, widgetGeometry.size()));
// childAt
- QCOMPARE(interface->childAt(-10, 0), -1);
- QCOMPARE(interface->childAt(globalPos.x(), globalPos.y()), 0);
- QCOMPARE(interface->childAt(globalWidgetPos.x(), globalWidgetPos.y()), 1);
+ QCOMPARE(interface->childAt(-10, 0), static_cast<QAccessibleInterface*>(0));
+ QCOMPARE(interface->childAt(globalPos.x(), globalPos.y()), static_cast<QAccessibleInterface*>(0));
+ QAccessibleInterface *child = interface->childAt(globalWidgetPos.x(), globalWidgetPos.y());
+ QCOMPARE(child->role(), QAccessible::PushButton);
+ QCOMPARE(child->text(QAccessible::Name), QString("QAccessibilityTest"));
+ delete child;
testWindow->widget()->hide();
- QCOMPARE(interface->childAt(globalWidgetPos.x(), globalWidgetPos.y()), 0);
+ QCOMPARE(interface->childAt(globalWidgetPos.x(), globalWidgetPos.y()), static_cast<QAccessibleInterface*>(0));
}
QTestAccessibility::clearEvents();
@@ -1950,41 +1790,41 @@ void tst_QAccessibility::lineEditTest()
QApplication::processEvents();
QCOMPARE(iface->childCount(), 0);
- QVERIFY(iface->state() & QAccessible::Sizeable);
- QVERIFY(iface->state() & QAccessible::Movable);
- QCOMPARE(bool(iface->state() & QAccessible::Focusable), le->isActiveWindow());
- QVERIFY(iface->state() & QAccessible::Selectable);
- QVERIFY(iface->state() & QAccessible::HasPopup);
- QCOMPARE(bool(iface->state() & QAccessible::Focused), le->hasFocus());
+ QVERIFY(iface->state().sizeable);
+ QVERIFY(iface->state().movable);
+ QCOMPARE(bool(iface->state().focusable), le->isActiveWindow());
+ QVERIFY(iface->state().selectable);
+ QVERIFY(iface->state().hasPopup);
+ QCOMPARE(bool(iface->state().focused), le->hasFocus());
QString secret(QLatin1String("secret"));
le->setText(secret);
le->setEchoMode(QLineEdit::Normal);
- QVERIFY(!(iface->state() & QAccessible::Protected));
+ QVERIFY(!(iface->state().passwordEdit));
QCOMPARE(iface->text(QAccessible::Value), secret);
le->setEchoMode(QLineEdit::NoEcho);
- QVERIFY(iface->state() & QAccessible::Protected);
+ QVERIFY(iface->state().passwordEdit);
QVERIFY(iface->text(QAccessible::Value).isEmpty());
le->setEchoMode(QLineEdit::Password);
- QVERIFY(iface->state() & QAccessible::Protected);
+ QVERIFY(iface->state().passwordEdit);
QVERIFY(iface->text(QAccessible::Value).isEmpty());
le->setEchoMode(QLineEdit::PasswordEchoOnEdit);
- QVERIFY(iface->state() & QAccessible::Protected);
+ QVERIFY(iface->state().passwordEdit);
QVERIFY(iface->text(QAccessible::Value).isEmpty());
le->setEchoMode(QLineEdit::Normal);
- QVERIFY(!(iface->state() & QAccessible::Protected));
+ QVERIFY(!(iface->state().passwordEdit));
QCOMPARE(iface->text(QAccessible::Value), secret);
QWidget *toplevel = new QWidget;
le->setParent(toplevel);
toplevel->show();
QApplication::processEvents();
- QVERIFY(!(iface->state() & QAccessible::Sizeable));
- QVERIFY(!(iface->state() & QAccessible::Movable));
- QCOMPARE(bool(iface->state() & QAccessible::Focusable), le->isActiveWindow());
- QVERIFY(iface->state() & QAccessible::Selectable);
- QVERIFY(iface->state() & QAccessible::HasPopup);
- QCOMPARE(bool(iface->state() & QAccessible::Focused), le->hasFocus());
+ QVERIFY(!(iface->state().sizeable));
+ QVERIFY(!(iface->state().movable));
+ QCOMPARE(bool(iface->state().focusable), le->isActiveWindow());
+ QVERIFY(iface->state().selectable);
+ QVERIFY(iface->state().hasPopup);
+ QCOMPARE(bool(iface->state().focused), le->hasFocus());
QLineEdit *le2 = new QLineEdit(toplevel);
le2->show();
@@ -2086,39 +1926,18 @@ void tst_QAccessibility::workspaceTest()
QVERIFY(interface);
QCOMPARE(interface->childCount(), subWindowCount);
- // Right, right, right, ...
- for (int i = 0; i < subWindowCount; ++i) {
- QAccessibleInterface *destination = 0;
- int index = interface->navigate(QAccessible::Right, i + 1, &destination);
- if (i == subWindowCount - 1) {
- QVERIFY(!destination);
- QCOMPARE(index, -1);
- } else {
- QVERIFY(destination);
- QCOMPARE(index, 0);
- QCOMPARE(destination->object(), (QObject*)subWindows.at(i + 1));
- delete destination;
- }
}
+ QTestAccessibility::clearEvents();
+}
- // Left, left, left, ...
- for (int i = subWindowCount; i > 0; --i) {
- QAccessibleInterface *destination = 0;
- int index = interface->navigate(QAccessible::Left, i, &destination);
- if (i == 1) {
- QVERIFY(!destination);
- QCOMPARE(index, -1);
- } else {
- QVERIFY(destination);
- QCOMPARE(index, 0);
- QCOMPARE(destination->object(), (QObject*)subWindows.at(i - 2));
- delete destination;
- }
- }
- // ### Add test for Up and Down.
+bool accessibleInterfaceLeftOf(const QAccessibleInterface *a1, const QAccessibleInterface *a2)
+{
+ return a1->rect().x() < a2->rect().x();
+}
- }
- QTestAccessibility::clearEvents();
+bool accessibleInterfaceAbove(const QAccessibleInterface *a1, const QAccessibleInterface *a2)
+{
+ return a1->rect().y() < a2->rect().y();
}
void tst_QAccessibility::dialogButtonBoxTest()
@@ -2142,25 +1961,17 @@ void tst_QAccessibility::dialogButtonBoxTest()
QCOMPARE(iface->role(), QAccessible::Grouping);
QStringList actualOrder;
QAccessibleInterface *child;
- QAccessibleInterface *leftmost;
child = iface->child(0);
QCOMPARE(child->role(), QAccessible::PushButton);
- // first find the leftmost button
- while (child->navigate(QAccessible::Left, 1, &leftmost) != -1) {
- delete child;
- child = leftmost;
- }
- leftmost = child;
-
- // then traverse from left to right to find the correct order of the buttons
- int right = 0;
- while (right != -1) {
- actualOrder << leftmost->text(QAccessible::Name);
- right = leftmost->navigate(QAccessible::Right, 1, &child);
- delete leftmost;
- leftmost = child;
- }
+ QVector<QAccessibleInterface *> buttons;
+ for (int i = 0; i < iface->childCount(); ++i)
+ buttons << iface->child(i);
+
+ qSort(buttons.begin(), buttons.end(), accessibleInterfaceLeftOf);
+
+ for (int i = 0; i < buttons.count(); ++i)
+ actualOrder << buttons.at(i)->text(QAccessible::Name);
QStringList expectedOrder;
QDialogButtonBox::ButtonLayout btnlout =
@@ -2202,26 +2013,16 @@ void tst_QAccessibility::dialogButtonBoxTest()
#endif
QApplication::processEvents();
- QAccessibleInterface *child;
QStringList actualOrder;
- child = iface->child(0);
- // first find the topmost button
- QAccessibleInterface *other;
- while (child->navigate(QAccessible::Up, 1, &other) != -1) {
- delete child;
- child = other;
- }
- other = child;
-
- // then traverse from top to bottom to find the correct order of the buttons
- actualOrder.clear();
- int right = 0;
- while (right != -1) {
- actualOrder << other->text(QAccessible::Name);
- right = other->navigate(QAccessible::Down, 1, &child);
- delete other;
- other = child;
- }
+
+ QVector<QAccessibleInterface *> buttons;
+ for (int i = 0; i < iface->childCount(); ++i)
+ buttons << iface->child(i);
+
+ qSort(buttons.begin(), buttons.end(), accessibleInterfaceAbove);
+
+ for (int i = 0; i < buttons.count(); ++i)
+ actualOrder << buttons.at(i)->text(QAccessible::Name);
QStringList expectedOrder;
expectedOrder << QDialogButtonBox::tr("OK")
@@ -2288,7 +2089,7 @@ void tst_QAccessibility::abstractScrollAreaTest()
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&abstractScrollArea);
QVERIFY(interface);
QVERIFY(!interface->rect().isValid());
- QCOMPARE(interface->childAt(200, 200), -1);
+ QCOMPARE(interface->childAt(200, 200), static_cast<QAccessibleInterface*>(0));
abstractScrollArea.resize(400, 400);
abstractScrollArea.show();
@@ -2303,14 +2104,14 @@ void tst_QAccessibility::abstractScrollAreaTest()
QCOMPARE(interface->childCount(), 1);
QWidget *viewport = abstractScrollArea.viewport();
QVERIFY(viewport);
- QVERIFY(verifyChild(viewport, interface, 1, globalGeometry));
+ QVERIFY(verifyChild(viewport, interface, 0, globalGeometry));
// Horizontal scrollBar.
abstractScrollArea.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
QCOMPARE(interface->childCount(), 2);
QWidget *horizontalScrollBar = abstractScrollArea.horizontalScrollBar();
QWidget *horizontalScrollBarContainer = horizontalScrollBar->parentWidget();
- QVERIFY(verifyChild(horizontalScrollBarContainer, interface, 2, globalGeometry));
+ QVERIFY(verifyChild(horizontalScrollBarContainer, interface, 1, globalGeometry));
// Horizontal scrollBar widgets.
QLabel *secondLeftLabel = new QLabel(QLatin1String("L2"));
@@ -2334,7 +2135,7 @@ void tst_QAccessibility::abstractScrollAreaTest()
QCOMPARE(interface->childCount(), 3);
QWidget *verticalScrollBar = abstractScrollArea.verticalScrollBar();
QWidget *verticalScrollBarContainer = verticalScrollBar->parentWidget();
- QVERIFY(verifyChild(verticalScrollBarContainer, interface, 3, globalGeometry));
+ QVERIFY(verifyChild(verticalScrollBarContainer, interface, 2, globalGeometry));
// Vertical scrollBar widgets.
QLabel *secondTopLabel = new QLabel(QLatin1String("T2"));
@@ -2357,80 +2158,7 @@ void tst_QAccessibility::abstractScrollAreaTest()
abstractScrollArea.setCornerWidget(new QLabel(QLatin1String("C")));
QCOMPARE(interface->childCount(), 4);
QWidget *cornerWidget = abstractScrollArea.cornerWidget();
- QVERIFY(verifyChild(cornerWidget, interface, 4, globalGeometry));
-
- // Test navigate.
- QAccessibleInterface *target = 0;
-
- // viewport -> Up -> NOTHING
- const int viewportIndex = indexOfChild(interface, viewport);
- QVERIFY(viewportIndex != -1);
- QCOMPARE(interface->navigate(QAccessible::Up, viewportIndex, &target), -1);
- QVERIFY(!target);
-
- // viewport -> Left -> NOTHING
- QCOMPARE(interface->navigate(QAccessible::Left, viewportIndex, &target), -1);
- QVERIFY(!target);
-
- // viewport -> Down -> horizontalScrollBarContainer
- const int horizontalScrollBarContainerIndex = indexOfChild(interface, horizontalScrollBarContainer);
- QVERIFY(horizontalScrollBarContainerIndex != -1);
- QCOMPARE(interface->navigate(QAccessible::Down, viewportIndex, &target), 0);
- QVERIFY(target);
- QCOMPARE(target->object(), static_cast<QObject *>(horizontalScrollBarContainer));
- delete target;
- target = 0;
-
- // horizontalScrollBarContainer -> Left -> NOTHING
- QCOMPARE(interface->navigate(QAccessible::Left, horizontalScrollBarContainerIndex, &target), -1);
- QVERIFY(!target);
-
- // horizontalScrollBarContainer -> Down -> NOTHING
- QVERIFY(horizontalScrollBarContainerIndex != -1);
- QCOMPARE(interface->navigate(QAccessible::Down, horizontalScrollBarContainerIndex, &target), -1);
- QVERIFY(!target);
-
- // horizontalScrollBarContainer -> Right -> cornerWidget
- const int cornerWidgetIndex = indexOfChild(interface, cornerWidget);
- QVERIFY(cornerWidgetIndex != -1);
- QCOMPARE(interface->navigate(QAccessible::Right, horizontalScrollBarContainerIndex, &target), 0);
- QVERIFY(target);
- QCOMPARE(target->object(), static_cast<QObject *>(cornerWidget));
- delete target;
- target = 0;
-
- // cornerWidget -> Down -> NOTHING
- QCOMPARE(interface->navigate(QAccessible::Down, cornerWidgetIndex, &target), -1);
- QVERIFY(!target);
-
- // cornerWidget -> Right -> NOTHING
- QVERIFY(cornerWidgetIndex != -1);
- QCOMPARE(interface->navigate(QAccessible::Right, cornerWidgetIndex, &target), -1);
- QVERIFY(!target);
-
- // cornerWidget -> Up -> verticalScrollBarContainer
- const int verticalScrollBarContainerIndex = indexOfChild(interface, verticalScrollBarContainer);
- QVERIFY(verticalScrollBarContainerIndex != -1);
- QCOMPARE(interface->navigate(QAccessible::Up, cornerWidgetIndex, &target), 0);
- QVERIFY(target);
- QCOMPARE(target->object(), static_cast<QObject *>(verticalScrollBarContainer));
- delete target;
- target = 0;
-
- // verticalScrollBarContainer -> Right -> NOTHING
- QCOMPARE(interface->navigate(QAccessible::Right, verticalScrollBarContainerIndex, &target), -1);
- QVERIFY(!target);
-
- // verticalScrollBarContainer -> Up -> NOTHING
- QCOMPARE(interface->navigate(QAccessible::Up, verticalScrollBarContainerIndex, &target), -1);
- QVERIFY(!target);
-
- // verticalScrollBarContainer -> Left -> viewport
- QCOMPARE(interface->navigate(QAccessible::Left, verticalScrollBarContainerIndex, &target), 0);
- QVERIFY(target);
- QCOMPARE(target->object(), static_cast<QObject *>(viewport));
- delete target;
- target = 0;
+ QVERIFY(verifyChild(cornerWidget, interface, 3, globalGeometry));
QCOMPARE(verifyHierarchy(interface), 0);
@@ -2459,6 +2187,7 @@ void tst_QAccessibility::scrollAreaTest()
void tst_QAccessibility::listTest()
{
+ {
QListWidget *listView = new QListWidget;
listView->addItem("Oslo");
listView->addItem("Berlin");
@@ -2469,33 +2198,29 @@ void tst_QAccessibility::listTest()
QCoreApplication::processEvents();
QTest::qWait(100);
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(listView);
- QCOMPARE(verifyHierarchy(iface), 0);
+ QAIPtr iface = QAIPtr(QAccessible::queryAccessibleInterface(listView));
+ QCOMPARE(verifyHierarchy(iface.data()), 0);
QCOMPARE((int)iface->role(), (int)QAccessible::List);
QCOMPARE(iface->childCount(), 3);
- QAccessibleInterface *child1 = 0;
- child1 = iface->child(0);
+ {
+ QAIPtr child1 = QAIPtr(iface->child(0));
QVERIFY(child1);
- QCOMPARE(iface->indexOfChild(child1), 1);
+ QCOMPARE(iface->indexOfChild(child1.data()), 0);
QCOMPARE(child1->text(QAccessible::Name), QString("Oslo"));
QCOMPARE(child1->role(), QAccessible::ListItem);
- delete child1;
- QAccessibleInterface *child2 = 0;
- child2 = iface->child(1);
+ QAIPtr child2 = QAIPtr(iface->child(1));
QVERIFY(child2);
- QCOMPARE(iface->indexOfChild(child2), 2);
+ QCOMPARE(iface->indexOfChild(child2.data()), 1);
QCOMPARE(child2->text(QAccessible::Name), QString("Berlin"));
- delete child2;
- QAccessibleInterface *child3 = 0;
- child3 = iface->child(2);
+ QAIPtr child3 = QAIPtr(iface->child(2));
QVERIFY(child3);
- QCOMPARE(iface->indexOfChild(child3), 3);
+ QCOMPARE(iface->indexOfChild(child3.data()), 2);
QCOMPARE(child3->text(QAccessible::Name), QString("Brisbane"));
- delete child3;
+ }
QTestAccessibility::clearEvents();
// Check for events
@@ -2514,11 +2239,12 @@ void tst_QAccessibility::listTest()
QVERIFY(table2);
QCOMPARE(table2->columnCount(), 1);
QCOMPARE(table2->rowCount(), 4);
- QAccessibleInterface *cell1;
- QVERIFY(cell1 = table2->cellAt(0,0));
+ QAIPtr cell1 = QAIPtr(table2->cellAt(0,0));
+ QVERIFY(cell1);
QCOMPARE(cell1->text(QAccessible::Name), QString("Oslo"));
- QAccessibleInterface *cell4;
- QVERIFY(cell4 = table2->cellAt(3,0));
+
+ QAIPtr cell4 = QAIPtr(table2->cellAt(3,0));
+ QVERIFY(cell4);
QCOMPARE(cell4->text(QAccessible::Name), QString("Munich"));
QCOMPARE(cell4->role(), QAccessible::ListItem);
@@ -2526,12 +2252,30 @@ void tst_QAccessibility::listTest()
QVERIFY(cellInterface);
QCOMPARE(cellInterface->rowIndex(), 3);
QCOMPARE(cellInterface->columnIndex(), 0);
- QVERIFY(!(cell4->state() & QAccessible::Expandable));
+ QCOMPARE(cellInterface->rowExtent(), 1);
+ QCOMPARE(cellInterface->columnExtent(), 1);
+ QCOMPARE(cellInterface->rowHeaderCells(), QList<QAccessibleInterface*>());
+ QCOMPARE(cellInterface->columnHeaderCells(), QList<QAccessibleInterface*>());
+
+ QCOMPARE(QAIPtr(cellInterface->table())->object(), listView);
+
+ listView->clearSelection();
+ QVERIFY(!(cell4->state().expandable));
+ QVERIFY( (cell4->state().selectable));
+ QVERIFY(!(cell4->state().selected));
+ table2->selectRow(3);
+ QCOMPARE(listView->selectedItems().size(), 1);
+ QCOMPARE(listView->selectedItems().at(0)->text(), QLatin1String("Munich"));
+ QVERIFY(cell4->state().selected);
+ QVERIFY(cellInterface->isSelected());
+
+ QVERIFY(table2->cellAt(-1, 0) == 0);
+ QVERIFY(table2->cellAt(0, -1) == 0);
+ QVERIFY(table2->cellAt(0, 1) == 0);
+ QVERIFY(table2->cellAt(4, 0) == 0);
- delete cell4;
- delete cell1;
- delete iface;
delete listView;
+ }
QTestAccessibility::clearEvents();
}
@@ -2583,7 +2327,7 @@ void tst_QAccessibility::treeTest()
QAccessibleInterface *header1 = 0;
header1 = iface->child(0);
QVERIFY(header1);
- QCOMPARE(iface->indexOfChild(header1), 1);
+ QCOMPARE(iface->indexOfChild(header1), 0);
QCOMPARE(header1->text(QAccessible::Name), QString("Artist"));
QCOMPARE(header1->role(), QAccessible::ColumnHeader);
delete header1;
@@ -2591,16 +2335,16 @@ void tst_QAccessibility::treeTest()
QAccessibleInterface *child1 = 0;
child1 = iface->child(2);
QVERIFY(child1);
- QCOMPARE(iface->indexOfChild(child1), 3);
+ QCOMPARE(iface->indexOfChild(child1), 2);
QCOMPARE(child1->text(QAccessible::Name), QString("Spain"));
QCOMPARE(child1->role(), QAccessible::TreeItem);
- QVERIFY(!(child1->state() & QAccessible::Expanded));
+ QVERIFY(!(child1->state().expanded));
delete child1;
QAccessibleInterface *child2 = 0;
child2 = iface->child(4);
QVERIFY(child2);
- QCOMPARE(iface->indexOfChild(child2), 5);
+ QCOMPARE(iface->indexOfChild(child2), 4);
QCOMPARE(child2->text(QAccessible::Name), QString("Austria"));
delete child2;
@@ -2620,9 +2364,9 @@ void tst_QAccessibility::treeTest()
QCOMPARE(cell2->role(), QAccessible::TreeItem);
QCOMPARE(cell2->tableCellInterface()->rowIndex(), 1);
QCOMPARE(cell2->tableCellInterface()->columnIndex(), 0);
- QVERIFY(cell2->state() & QAccessible::Expandable);
- QCOMPARE(iface->indexOfChild(cell2), 5);
- QVERIFY(!(cell2->state() & QAccessible::Expanded));
+ QVERIFY(cell2->state().expandable);
+ QCOMPARE(iface->indexOfChild(cell2), 4);
+ QVERIFY(!(cell2->state().expanded));
QCOMPARE(table2->columnDescription(1), QString("Work"));
delete cell2;
delete cell1;
@@ -2637,15 +2381,15 @@ void tst_QAccessibility::treeTest()
QCOMPARE(table2->rowCount(), 5);
cell1 = table2->cellAt(1,0);
QCOMPARE(cell1->text(QAccessible::Name), QString("Picasso"));
- QCOMPARE(iface->indexOfChild(cell1), 5); // 1 based + 2 header + 2 for root item
+ QCOMPARE(iface->indexOfChild(cell1), 4); // 2 header + 2 for root item
cell2 = table2->cellAt(4,0);
QCOMPARE(cell2->text(QAccessible::Name), QString("Klimt"));
QCOMPARE(cell2->role(), QAccessible::TreeItem);
QCOMPARE(cell2->tableCellInterface()->rowIndex(), 4);
QCOMPARE(cell2->tableCellInterface()->columnIndex(), 0);
- QVERIFY(!(cell2->state() & QAccessible::Expandable));
- QCOMPARE(iface->indexOfChild(cell2), 11);
+ QVERIFY(!(cell2->state().expandable));
+ QCOMPARE(iface->indexOfChild(cell2), 10);
QCOMPARE(table2->columnDescription(0), QString("Artist"));
QCOMPARE(table2->columnDescription(1), QString("Work"));
@@ -2687,21 +2431,21 @@ void tst_QAccessibility::tableTest()
QAccessibleInterface *cornerButton = iface->child(0);
QVERIFY(cornerButton);
- QCOMPARE(iface->indexOfChild(cornerButton), 1);
+ QCOMPARE(iface->indexOfChild(cornerButton), 0);
QCOMPARE(cornerButton->role(), QAccessible::Pane);
delete cornerButton;
QAccessibleInterface *child1 = iface->child(2);
QVERIFY(child1);
- QCOMPARE(iface->indexOfChild(child1), 3);
+ QCOMPARE(iface->indexOfChild(child1), 2);
QCOMPARE(child1->text(QAccessible::Name), QString("h2"));
QCOMPARE(child1->role(), QAccessible::ColumnHeader);
- QVERIFY(!(child1->state() & QAccessible::Expanded));
+ QVERIFY(!(child1->state().expanded));
delete child1;
QAccessibleInterface *child2 = iface->child(10);
QVERIFY(child2);
- QCOMPARE(iface->indexOfChild(child2), 11);
+ QCOMPARE(iface->indexOfChild(child2), 10);
QCOMPARE(child2->text(QAccessible::Name), QString("1.1"));
QAccessibleTableCellInterface *cell2Iface = child2->tableCellInterface();
QCOMPARE(cell2Iface->rowIndex(), 1);
@@ -2709,7 +2453,7 @@ void tst_QAccessibility::tableTest()
delete child2;
QAccessibleInterface *child3 = iface->child(11);
- QCOMPARE(iface->indexOfChild(child3), 12);
+ QCOMPARE(iface->indexOfChild(child3), 11);
QCOMPARE(child3->text(QAccessible::Name), QString("1.2"));
delete child3;
@@ -2723,7 +2467,7 @@ void tst_QAccessibility::tableTest()
QAccessibleInterface *cell1;
QVERIFY(cell1 = table2->cellAt(0,0));
QCOMPARE(cell1->text(QAccessible::Name), QString("0.0"));
- QCOMPARE(iface->indexOfChild(cell1), 6);
+ QCOMPARE(iface->indexOfChild(cell1), 5);
QAccessibleInterface *cell2;
QVERIFY(cell2 = table2->cellAt(0,1));
@@ -2731,7 +2475,7 @@ void tst_QAccessibility::tableTest()
QCOMPARE(cell2->role(), QAccessible::Cell);
QCOMPARE(cell2->tableCellInterface()->rowIndex(), 0);
QCOMPARE(cell2->tableCellInterface()->columnIndex(), 1);
- QCOMPARE(iface->indexOfChild(cell2), 7);
+ QCOMPARE(iface->indexOfChild(cell2), 6);
delete cell2;
QAccessibleInterface *cell3;
@@ -2740,7 +2484,7 @@ void tst_QAccessibility::tableTest()
QCOMPARE(cell3->role(), QAccessible::Cell);
QCOMPARE(cell3->tableCellInterface()->rowIndex(), 1);
QCOMPARE(cell3->tableCellInterface()->columnIndex(), 2);
- QCOMPARE(iface->indexOfChild(cell3), 12);
+ QCOMPARE(iface->indexOfChild(cell3), 11);
delete cell3;
QCOMPARE(table2->columnDescription(0), QString("h1"));
@@ -2767,7 +2511,7 @@ void tst_QAccessibility::calendarWidgetTest()
QVERIFY(interface);
QCOMPARE(interface->role(), QAccessible::Table);
QVERIFY(!interface->rect().isValid());
- QCOMPARE(interface->childAt(200, 200), -1);
+ QCOMPARE(interface->childAt(200, 200), static_cast<QAccessibleInterface*>(0));
calendarWidget.resize(400, 300);
calendarWidget.show();
@@ -2791,7 +2535,7 @@ void tst_QAccessibility::calendarWidgetTest()
}
}
QVERIFY(navigationBar);
- QVERIFY(verifyChild(navigationBar, interface, 1, globalGeometry));
+ QVERIFY(verifyChild(navigationBar, interface, 0, globalGeometry));
QAbstractItemView *calendarView = 0;
foreach (QObject *child, calendarWidget.children()) {
@@ -2801,14 +2545,14 @@ void tst_QAccessibility::calendarWidgetTest()
}
}
QVERIFY(calendarView);
- QVERIFY(verifyChild(calendarView, interface, 2, globalGeometry));
+ QVERIFY(verifyChild(calendarView, interface, 1, globalGeometry));
// Hide navigation bar.
calendarWidget.setNavigationBarVisible(false);
QCOMPARE(interface->childCount(), 1);
QVERIFY(!navigationBar->isVisible());
- QVERIFY(verifyChild(calendarView, interface, 1, globalGeometry));
+ QVERIFY(verifyChild(calendarView, interface, 0, globalGeometry));
// Show navigation bar.
calendarWidget.setNavigationBarVisible(true);
@@ -2819,29 +2563,19 @@ void tst_QAccessibility::calendarWidgetTest()
QAccessibleInterface *navigationBarInterface = interface->child(0);
QVERIFY(navigationBarInterface);
QCOMPARE(navigationBarInterface->object(), (QObject*)navigationBar);
- delete navigationBarInterface;
- navigationBarInterface = 0;
// Navigate to the view via Child.
QAccessibleInterface *calendarViewInterface = interface->child(1);
QVERIFY(calendarViewInterface);
QCOMPARE(calendarViewInterface->object(), (QObject*)calendarView);
- delete calendarViewInterface;
- calendarViewInterface = 0;
QVERIFY(!interface->child(-1));
- // Navigate from navigation bar -> view (Down).
- QCOMPARE(interface->navigate(QAccessible::Down, 1, &calendarViewInterface), 0);
- QVERIFY(calendarViewInterface);
- QCOMPARE(calendarViewInterface->object(), (QObject*)calendarView);
+ // In order for geometric navigation to work they must share the same parent
+ QCOMPARE(navigationBarInterface->parent()->object(), calendarViewInterface->parent()->object());
+ QVERIFY(navigationBarInterface->rect().bottom() < calendarViewInterface->rect().top());
delete calendarViewInterface;
calendarViewInterface = 0;
-
- // Navigate from view -> navigation bar (Up).
- QCOMPARE(interface->navigate(QAccessible::Up, 2, &navigationBarInterface), 0);
- QVERIFY(navigationBarInterface);
- QCOMPARE(navigationBarInterface->object(), (QObject*)navigationBar);
delete navigationBarInterface;
navigationBarInterface = 0;
@@ -2903,12 +2637,14 @@ void tst_QAccessibility::dockWidgetTest()
QPoint globalPos = dock1->mapToGlobal(QPoint(0,0));
globalPos.rx()+=5; //### query style
globalPos.ry()+=5;
- int entry = accDock1->childAt(globalPos.x(), globalPos.y()); //###
- QCOMPARE(entry, 1);
- QAccessibleInterface *accTitleBar = accDock1->child(entry - 1);
+ QAccessibleInterface *childAt = accDock1->childAt(globalPos.x(), globalPos.y()); //###
+ QCOMPARE(childAt->role(), QAccessible::TitleBar);
+ int index = accDock1->indexOfChild(childAt);
+ delete childAt;
+ QAccessibleInterface *accTitleBar = accDock1->child(index);
QCOMPARE(accTitleBar->role(), QAccessible::TitleBar);
- QCOMPARE(accDock1->indexOfChild(accTitleBar), 1);
+ QCOMPARE(accDock1->indexOfChild(accTitleBar), 0);
QAccessibleInterface *acc;
acc = accTitleBar->parent();
QVERIFY(acc);
diff --git a/tests/auto/other/qcomplextext/bidireorderstring.h b/tests/auto/other/qcomplextext/bidireorderstring.h
index e0bbf6e80b..32f0c81e69 100644
--- a/tests/auto/other/qcomplextext/bidireorderstring.h
+++ b/tests/auto/other/qcomplextext/bidireorderstring.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index ce45500e74..c741a76a7e 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qdirectpainter/runDirectPainter/main.cpp b/tests/auto/other/qdirectpainter/runDirectPainter/main.cpp
index af3dd90beb..475cb9c035 100644
--- a/tests/auto/other/qdirectpainter/runDirectPainter/main.cpp
+++ b/tests/auto/other/qdirectpainter/runDirectPainter/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp b/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp
index f60f011a20..352dd96dd9 100644
--- a/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp
+++ b/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index a0803b029c..9f82a72f65 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,14 +73,14 @@ protected:
QLineEdit::focusInEvent( e );
focusInEventReason = e->reason();
focusInEventGotFocus = e->gotFocus();
- focusInEventRecieved = TRUE;
+ focusInEventRecieved = true;
}
void focusOutEvent( QFocusEvent* e )
{
QLineEdit::focusOutEvent( e );
focusOutEventReason = e->reason();
focusOutEventLostFocus = !e->gotFocus();
- focusOutEventRecieved = TRUE;
+ focusOutEventRecieved = true;
}
};
@@ -173,17 +173,17 @@ void tst_QFocusEvent::initWidget()
// The first lineedit should have focus
QVERIFY( childFocusWidgetOne->hasFocus() );
- childFocusWidgetOne->focusInEventRecieved = FALSE;
- childFocusWidgetOne->focusInEventGotFocus = FALSE;
+ childFocusWidgetOne->focusInEventRecieved = false;
+ childFocusWidgetOne->focusInEventGotFocus = false;
childFocusWidgetOne->focusInEventReason = -1;
- childFocusWidgetOne->focusOutEventRecieved = FALSE;
- childFocusWidgetOne->focusOutEventLostFocus = FALSE;
+ childFocusWidgetOne->focusOutEventRecieved = false;
+ childFocusWidgetOne->focusOutEventLostFocus = false;
childFocusWidgetOne->focusOutEventReason = -1;
- childFocusWidgetTwo->focusInEventRecieved = FALSE;
- childFocusWidgetTwo->focusInEventGotFocus = FALSE;
+ childFocusWidgetTwo->focusInEventRecieved = false;
+ childFocusWidgetTwo->focusInEventGotFocus = false;
childFocusWidgetTwo->focusInEventReason = -1;
- childFocusWidgetTwo->focusOutEventRecieved = FALSE;
- childFocusWidgetTwo->focusOutEventLostFocus = FALSE;
+ childFocusWidgetTwo->focusOutEventRecieved = false;
+ childFocusWidgetTwo->focusOutEventLostFocus = false;
childFocusWidgetTwo->focusOutEventReason = -1;
}
diff --git a/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp b/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp
index 9f7411f3ab..e6f2432e64 100644
--- a/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp
+++ b/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
index 63506fed1d..6cf4147091 100644
--- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp b/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp
index 4403a3f57b..2533cfb55b 100644
--- a/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp
+++ b/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
index 8cb7845e78..41e3001415 100644
--- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
index 90b71c517c..3cda8ed1ee 100644
--- a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
+++ b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -62,10 +62,10 @@ private slots:
void strong_sharedptrDelete();
public slots:
- void cleanup() { check(); }
+ void cleanup() { safetyCheck(); }
public:
- inline void check()
+ inline void safetyCheck()
{
#ifdef QT_BUILD_INTERNAL
QtSharedPointer::internalSafetyCheckCleanCheck();
diff --git a/tests/auto/other/qtokenautomaton/generateTokenizers.sh b/tests/auto/other/qtokenautomaton/generateTokenizers.sh
index 0fb602aae4..0a67a1dca0 100755
--- a/tests/auto/other/qtokenautomaton/generateTokenizers.sh
+++ b/tests/auto/other/qtokenautomaton/generateTokenizers.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
index 7f96e41894..89e22719d1 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h
index 2f0efa1ffc..8ff67a5b23 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
index 3874777d74..5eab3d972a 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h
index 074bb304ba..147619604c 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
index 5f374030bb..ba7cdfac91 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h
index 735ca68e18..ec3631e272 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml
index 604c147c43..c6f37a218b 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml
@@ -23,7 +23,7 @@
<boilerplate>
<prolog>/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
index 2d349ad637..38f7ca90a3 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h
index f922dfcb50..086a9a0ce4 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
index d45c7302cd..a62eab1da7 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h
index 12142bc4f0..f551b46f47 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
index 235bd60501..fdff637450 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h
index 678b3a7903..627da4b93a 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp b/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp
index cbbf5a2a0d..789d2f6491 100644
--- a/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp
+++ b/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.cpp b/tests/auto/other/windowsmobile/test/ddhelper.cpp
index 55469f5901..7a8c9ea94e 100644
--- a/tests/auto/other/windowsmobile/test/ddhelper.cpp
+++ b/tests/auto/other/windowsmobile/test/ddhelper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.h b/tests/auto/other/windowsmobile/test/ddhelper.h
index 3d2f06aa36..de3f79afca 100644
--- a/tests/auto/other/windowsmobile/test/ddhelper.h
+++ b/tests/auto/other/windowsmobile/test/ddhelper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
index 4318de7991..b211f3e6e2 100644
--- a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
index c2099a648b..2c39605f54 100644
--- a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
+++ b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/platformquirks.h b/tests/auto/platformquirks.h
index b9c9885bc4..35ef232aa3 100644
--- a/tests/auto/platformquirks.h
+++ b/tests/auto/platformquirks.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index e663289f6c..21459a0080 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index 466dd59663..767744a8a9 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index a124e6c5f5..b018c7428b 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
index 11622e4b2a..410389e53a 100644
--- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
+++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
index 8eb6ae77b7..5a2b4b3f57 100644
--- a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
+++ b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
index c121dfa3a9..75fb6e19ce 100644
--- a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
+++ b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index c970020a01..76090fd947 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -3135,6 +3135,7 @@ void tst_QSqlQuery::QTBUG_21884()
*/
void tst_QSqlQuery::QTBUG_16967()
{
+ QSqlQuery q2;
QFETCH(QString, dbName);
{
QSqlDatabase db = QSqlDatabase::database(dbName);
@@ -3146,6 +3147,7 @@ void tst_QSqlQuery::QTBUG_16967()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
QSqlQuery q(db);
+ q2 = q;
q.prepare("CREATE TABLE t1 (id INTEGER PRIMARY KEY, str TEXT);");
db.close();
QCOMPARE(db.lastError().type(), QSqlError::NoError);
@@ -3154,8 +3156,9 @@ void tst_QSqlQuery::QTBUG_16967()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
QSqlQuery q(db);
- q.prepare("CREATE TABLE t1 (id INTEGER PRIMARY KEY, str TEXT);");
- q.exec();
+ q2 = q;
+ q2.prepare("CREATE TABLE t1 (id INTEGER PRIMARY KEY, str TEXT);");
+ q2.exec();
db.close();
QCOMPARE(db.lastError().type(), QSqlError::NoError);
}
@@ -3163,6 +3166,7 @@ void tst_QSqlQuery::QTBUG_16967()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
QSqlQuery q(db);
+ q2 = q;
q.exec("INSERT INTO t1 (id, str) VALUES(1, \"test1\");");
db.close();
QCOMPARE(db.lastError().type(), QSqlError::NoError);
@@ -3171,6 +3175,7 @@ void tst_QSqlQuery::QTBUG_16967()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
QSqlQuery q(db);
+ q2 = q;
q.exec("SELECT * FROM t1;");
db.close();
QCOMPARE(db.lastError().type(), QSqlError::NoError);
diff --git a/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp b/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
index 60b3069e1f..8dd130a543 100644
--- a/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
+++ b/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
index f14b3d4e93..db92696084 100644
--- a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
+++ b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
index 71cb59f971..333b599c08 100644
--- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index c18de4acce..0414ee235f 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index 13f6f67a0f..067dd0f7b8 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/test.pl b/tests/auto/test.pl
index 4c7a6954d0..8a9c54c7a2 100755
--- a/tests/auto/test.pl
+++ b/tests/auto/test.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp
index f8e8553e7c..0499c2e38b 100644
--- a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp
+++ b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/.gitignore b/tests/auto/testlib/selftests/.gitignore
index 98a3f49081..56ba17abd7 100644
--- a/tests/auto/testlib/selftests/.gitignore
+++ b/tests/auto/testlib/selftests/.gitignore
@@ -13,6 +13,7 @@ fetchbogus/tst_fetchbogus
globaldata/tst_globaldata
maxwarnings/tst_maxwarnings
multiexec/tst_multiexec
+qexecstringlist/tst_qexecstringlist
singleskip/tst_singleskip
skip/tst_skip
skipglobal/tst_skipglobal
diff --git a/tests/auto/testlib/selftests/alive/qtestalive.cpp b/tests/auto/testlib/selftests/alive/qtestalive.cpp
index dd3d411ce5..5220142456 100644
--- a/tests/auto/testlib/selftests/alive/qtestalive.cpp
+++ b/tests/auto/testlib/selftests/alive/qtestalive.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/alive/tst_alive.cpp b/tests/auto/testlib/selftests/alive/tst_alive.cpp
index f29aebb176..112ef493b7 100644
--- a/tests/auto/testlib/selftests/alive/tst_alive.cpp
+++ b/tests/auto/testlib/selftests/alive/tst_alive.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -52,8 +52,6 @@ class tst_Alive: public QObject
private slots:
void alive();
void addMouseDClick() const;
- void compareQStringLists() const;
- void compareQStringLists_data() const;
};
void tst_Alive::alive()
@@ -95,80 +93,5 @@ void tst_Alive::addMouseDClick() const
QVERIFY(listener.isTested);
}
-void tst_Alive::compareQStringLists() const
-{
- QFETCH(QStringList, opA);
- QFETCH(QStringList, opB);
-
- QCOMPARE(opA, opB);
-}
-
-void tst_Alive::compareQStringLists_data() const
-{
- QTest::addColumn<QStringList>("opA");
- QTest::addColumn<QStringList>("opB");
-
- {
- QStringList opA;
- opA.append(QLatin1String("string1"));
- opA.append(QLatin1String("string2"));
-
- QStringList opB(opA);
- opA.append(QLatin1String("string3"));
- opB.append(QLatin1String("DIFFERS"));
-
- QTest::newRow("") << opA << opB;
- }
-
- {
- QStringList opA;
- opA.append(QLatin1String("string1"));
- opA.append(QLatin1String("string2"));
-
- QStringList opB(opA);
- opA.append(QLatin1String("string3"));
- opA.append(QLatin1String("string4"));
-
- opB.append(QLatin1String("DIFFERS"));
- opB.append(QLatin1String("string4"));
-
- QTest::newRow("") << opA << opB;
- }
-
- {
- QStringList opA;
- opA.append(QLatin1String("string1"));
- opA.append(QLatin1String("string2"));
-
- QStringList opB;
- opB.append(QLatin1String("string1"));
-
- QTest::newRow("") << opA << opB;
- }
-
- {
- QStringList opA;
- opA.append(QLatin1String("openInNewWindow"));
- opA.append(QLatin1String("openInNewTab"));
- opA.append(QLatin1String("separator"));
- opA.append(QLatin1String("bookmark_add"));
- opA.append(QLatin1String("savelinkas"));
- opA.append(QLatin1String("copylinklocation"));
- opA.append(QLatin1String("separator"));
- opA.append(QLatin1String("openWith_submenu"));
- opA.append(QLatin1String("preview1"));
- opA.append(QLatin1String("actions_submenu"));
- opA.append(QLatin1String("separator"));
- opA.append(QLatin1String("viewDocumentSource"));
-
- QStringList opB;
- opB.append(QLatin1String("viewDocumentSource"));
-
- QTest::newRow("") << opA << opB;
-
- QTest::newRow("") << opB << opA;
- }
-}
-
QTEST_MAIN(tst_Alive)
#include "tst_alive.moc"
diff --git a/tests/auto/testlib/selftests/assert/tst_assert.cpp b/tests/auto/testlib/selftests/assert/tst_assert.cpp
index bd44162971..c2ec453317 100644
--- a/tests/auto/testlib/selftests/assert/tst_assert.cpp
+++ b/tests/auto/testlib/selftests/assert/tst_assert.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,7 +44,7 @@
# undef QT_NO_DEBUG
#endif
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_Assert: public QObject
diff --git a/tests/auto/testlib/selftests/badxml/badxml.pro b/tests/auto/testlib/selftests/badxml/badxml.pro
index 561c7e01db..5eaa1c3216 100644
--- a/tests/auto/testlib/selftests/badxml/badxml.pro
+++ b/tests/auto/testlib/selftests/badxml/badxml.pro
@@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = badxml
-
diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
index 2d0b007df9..0d10504020 100644
--- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
/*
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
index baa996c8d3..6cbefe518c 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = benchlibcallgrind
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
index 1199462c99..7a7a190e7d 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
/* This test must be explicitly enabled since there are no compile tests for valgrind.h */
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
index d1fe909fa1..5e2b963491 100644
--- a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = benchlibeventcounter
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
index ccb69ddb6a..8a9a7e3f3a 100644
--- a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
/* Custom event dispatcher to ensure we don't receive any spontaneous events */
@@ -57,8 +57,7 @@ public:
void interrupt() {}
bool processEvents(QEventLoop::ProcessEventsFlags) { return false; }
void registerSocketNotifier(QSocketNotifier*) {}
- int registerTimer(int,QObject*) { return -1; }
- void registerTimer(int,int,QObject*) {}
+ void registerTimer(int,int,Qt::TimerType,QObject*) {}
QList<TimerInfo> registeredTimers(QObject*) const { return QList<TimerInfo>(); }
void unregisterSocketNotifier(QSocketNotifier*) {}
bool unregisterTimer(int) { return false; }
diff --git a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
index 73173b0a08..f4bcc92129 100644
--- a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
+++ b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = benchliboptions
diff --git a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
index cbe5af5ce8..2431a1df78 100644
--- a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
+++ b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
/* Custom event dispatcher to ensure we don't receive any spontaneous events */
@@ -57,8 +57,7 @@ public:
void interrupt() {}
bool processEvents(QEventLoop::ProcessEventsFlags) { return false; }
void registerSocketNotifier(QSocketNotifier*) {}
- int registerTimer(int,QObject*) { return -1; }
- void registerTimer(int,int,QObject*) {}
+ void registerTimer(int,int,Qt::TimerType,QObject*) {}
QList<TimerInfo> registeredTimers(QObject*) const { return QList<TimerInfo>(); }
void unregisterSocketNotifier(QSocketNotifier*) {}
bool unregisterTimer(int) { return false; }
diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp b/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp
index 9e274edea5..38a7029262 100644
--- a/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp
+++ b/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
#include <private/cycle_p.h>
diff --git a/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp b/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
index 9042c27936..c079983e6c 100644
--- a/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
+++ b/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_BenchlibWalltime: public QObject
diff --git a/tests/auto/testlib/selftests/cmptest/cmptest.pro b/tests/auto/testlib/selftests/cmptest/cmptest.pro
index ac392b0234..a793c203dd 100644
--- a/tests/auto/testlib/selftests/cmptest/cmptest.pro
+++ b/tests/auto/testlib/selftests/cmptest/cmptest.pro
@@ -1,8 +1,7 @@
SOURCES += tst_cmptest.cpp
-QT = core testlib
+QT = core gui testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = cmptest
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index 70396a75b3..72d3ac9665 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,8 +40,90 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
+#include <QtGui/QImage>
+#include <QtGui/QPixmap>
+
+/* XPM test data for QPixmap, QImage tests (use drag cursors as example) */
+
+static const char * const xpmPixmapData1[] = {
+"11 20 3 1",
+". c None",
+"a c #FFFFFF",
+"X c #000000", // X11 cursor is traditionally black
+"aa.........",
+"aXa........",
+"aXXa.......",
+"aXXXa......",
+"aXXXXa.....",
+"aXXXXXa....",
+"aXXXXXXa...",
+"aXXXXXXXa..",
+"aXXXXXXXXa.",
+"aXXXXXXXXXa",
+"aXXXXXXaaaa",
+"aXXXaXXa...",
+"aXXaaXXa...",
+"aXa..aXXa..",
+"aa...aXXa..",
+"a.....aXXa.",
+"......aXXa.",
+".......aXXa",
+".......aXXa",
+"........aa."};
+
+static const char * const xpmPixmapData2[] = {
+"11 20 4 1",
+". c None",
+"a c #FFFFFF",
+"b c #0000FF",
+"X c #000000",
+"aab........",
+"aXab.......",
+"aXXab......",
+"aXXXab.....",
+"aXXXXab....",
+"aXXXXXab...",
+"aXXXXXXab..",
+"aXXXXXXXa..",
+"aXXXXXXXXa.",
+"aXXXXXXXXXa",
+"aXXXXXXaaaa",
+"aXXXaXXa...",
+"aXXaaXXa...",
+"aXa..aXXa..",
+"aa...aXXa..",
+"a.....aXXa.",
+"......aXXa.",
+".......aXXa",
+".......aXXa",
+"........aa."};
+
+static const char * const xpmPixmapData3[] = {
+"20 20 2 1",
+" c #000000",
+". c #C32D2D",
+" ..........",
+" ........",
+" .......",
+" ......",
+" ....",
+" ..",
+" .",
+" ",
+" ",
+". ",
+"... ",
+"..... ",
+"...... ",
+"....... ",
+"......... ",
+"........... ",
+"........... ",
+"............ ",
+"............ ",
+"............. "};
class tst_Cmptest: public QObject
{
@@ -52,6 +134,12 @@ private slots:
void compare_pointerfuncs();
void compare_tostring();
void compare_tostring_data();
+ void compareQStringLists();
+ void compareQStringLists_data();
+ void compareQPixmaps();
+ void compareQPixmaps_data();
+ void compareQImages();
+ void compareQImages_data();
};
static bool boolfunc() { return true; }
@@ -126,6 +214,151 @@ void tst_Cmptest::compare_tostring()
QCOMPARE(actual, expected);
}
-QTEST_MAIN(tst_Cmptest)
+void tst_Cmptest::compareQStringLists_data()
+{
+ QTest::addColumn<QStringList>("opA");
+ QTest::addColumn<QStringList>("opB");
+
+ {
+ QStringList opA;
+ QStringList opB(opA);
+
+ QTest::newRow("empty lists") << opA << opB;
+ }
+
+ {
+ QStringList opA;
+ opA.append(QLatin1String("string1"));
+ opA.append(QLatin1String("string2"));
+ opA.append(QLatin1String("string3"));
+ opA.append(QLatin1String("string4"));
+
+ QStringList opB(opA);
+
+ QTest::newRow("equal lists") << opA << opB;
+ }
+
+ {
+ QStringList opA;
+ opA.append(QLatin1String("string1"));
+ opA.append(QLatin1String("string2"));
+
+ QStringList opB(opA);
+ opA.append(QLatin1String("string3"));
+ opB.append(QLatin1String("DIFFERS"));
+ QTest::newRow("last item different") << opA << opB;
+ }
+
+ {
+ QStringList opA;
+ opA.append(QLatin1String("string1"));
+ opA.append(QLatin1String("string2"));
+
+ QStringList opB(opA);
+ opA.append(QLatin1String("string3"));
+ opA.append(QLatin1String("string4"));
+
+ opB.append(QLatin1String("DIFFERS"));
+ opB.append(QLatin1String("string4"));
+
+ QTest::newRow("second-last item different") << opA << opB;
+ }
+
+ {
+ QStringList opA;
+ opA.append(QLatin1String("string1"));
+ opA.append(QLatin1String("string2"));
+
+ QStringList opB;
+ opB.append(QLatin1String("string1"));
+
+ QTest::newRow("prefix") << opA << opB;
+ }
+
+ {
+ QStringList opA;
+ opA.append(QLatin1String("openInNewWindow"));
+ opA.append(QLatin1String("openInNewTab"));
+ opA.append(QLatin1String("separator"));
+ opA.append(QLatin1String("bookmark_add"));
+ opA.append(QLatin1String("savelinkas"));
+ opA.append(QLatin1String("copylinklocation"));
+ opA.append(QLatin1String("separator"));
+ opA.append(QLatin1String("openWith_submenu"));
+ opA.append(QLatin1String("preview1"));
+ opA.append(QLatin1String("actions_submenu"));
+ opA.append(QLatin1String("separator"));
+ opA.append(QLatin1String("viewDocumentSource"));
+
+ QStringList opB;
+ opB.append(QLatin1String("viewDocumentSource"));
+
+ QTest::newRow("short list second") << opA << opB;
+
+ QTest::newRow("short list first") << opB << opA;
+ }
+}
+
+void tst_Cmptest::compareQStringLists()
+{
+ QFETCH(QStringList, opA);
+ QFETCH(QStringList, opB);
+
+ QCOMPARE(opA, opB);
+}
+
+void tst_Cmptest::compareQPixmaps_data()
+{
+ QTest::addColumn<QPixmap>("opA");
+ QTest::addColumn<QPixmap>("opB");
+
+ const QPixmap pixmap1(xpmPixmapData1);
+ const QPixmap pixmap2(xpmPixmapData2);
+ const QPixmap pixmap3(xpmPixmapData3);
+
+ QTest::newRow("both null") << QPixmap() << QPixmap();
+ QTest::newRow("one null") << QPixmap() << pixmap1;
+ QTest::newRow("other null") << pixmap1 << QPixmap();
+ QTest::newRow("equal") << pixmap1 << pixmap1;
+ QTest::newRow("different size") << pixmap1 << pixmap3;
+ QTest::newRow("different pixels") << pixmap1 << pixmap2;
+}
+
+void tst_Cmptest::compareQPixmaps()
+{
+ QFETCH(QPixmap, opA);
+ QFETCH(QPixmap, opB);
+
+ QCOMPARE(opA, opB);
+}
+
+void tst_Cmptest::compareQImages_data()
+{
+ QTest::addColumn<QImage>("opA");
+ QTest::addColumn<QImage>("opB");
+
+ const QImage image1(QPixmap(xpmPixmapData1).toImage());
+ const QImage image2(QPixmap(xpmPixmapData2).toImage());
+ const QImage image1Indexed = image1.convertToFormat(QImage::Format_Indexed8);
+ const QImage image3(QPixmap(xpmPixmapData3).toImage());
+
+ QTest::newRow("both null") << QImage() << QImage();
+ QTest::newRow("one null") << QImage() << image1;
+ QTest::newRow("other null") << image1 << QImage();
+ QTest::newRow("equal") << image1 << image1;
+ QTest::newRow("different size") << image1 << image3;
+ QTest::newRow("different format") << image1 << image1Indexed;
+ QTest::newRow("different pixels") << image1 << image2;
+}
+
+void tst_Cmptest::compareQImages()
+{
+ QFETCH(QImage, opA);
+ QFETCH(QImage, opB);
+
+ QCOMPARE(opA, opB);
+}
+
+QTEST_MAIN(tst_Cmptest)
#include "tst_cmptest.moc"
diff --git a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
index 9dd1212eba..056388333a 100644
--- a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
+++ b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = commandlinedata
diff --git a/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp b/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp
index 5f2dd3fffc..d6d3db886b 100644
--- a/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp
+++ b/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
/*!
diff --git a/tests/auto/testlib/selftests/crashes/crashes.pro b/tests/auto/testlib/selftests/crashes/crashes.pro
index e9f0f3e5b7..25e24243d1 100644
--- a/tests/auto/testlib/selftests/crashes/crashes.pro
+++ b/tests/auto/testlib/selftests/crashes/crashes.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = crashes
diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
index d707414f5b..35a55a367a 100644
--- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
+++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
#ifdef Q_OS_WIN
diff --git a/tests/auto/testlib/selftests/datatable/datatable.pro b/tests/auto/testlib/selftests/datatable/datatable.pro
index 7c36d4a911..72fa851ae6 100644
--- a/tests/auto/testlib/selftests/datatable/datatable.pro
+++ b/tests/auto/testlib/selftests/datatable/datatable.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = datatable
diff --git a/tests/auto/testlib/selftests/datatable/tst_datatable.cpp b/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
index a55e9cbae2..de2495ce65 100644
--- a/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+++ b/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
/*!
diff --git a/tests/auto/testlib/selftests/datetime/datetime.pro b/tests/auto/testlib/selftests/datetime/datetime.pro
index f73a763d6b..d65c59354f 100644
--- a/tests/auto/testlib/selftests/datetime/datetime.pro
+++ b/tests/auto/testlib/selftests/datetime/datetime.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = datetime
diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
index 64126644db..ee6baacd5b 100644
--- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,11 +40,10 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDateTime>
#include <QtTest/QtTest>
-#include <QDateTime>
-
/*!
\internal
*/
diff --git a/tests/auto/testlib/selftests/differentexec/differentexec.pro b/tests/auto/testlib/selftests/differentexec/differentexec.pro
index 60000d12ea..7f148ba996 100644
--- a/tests/auto/testlib/selftests/differentexec/differentexec.pro
+++ b/tests/auto/testlib/selftests/differentexec/differentexec.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = differentexec
diff --git a/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp b/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp
index 5061369776..3a9e0eddf4 100644
--- a/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp
+++ b/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
index 4a72181a07..6b8c821e6e 100644
--- a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
+++ b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = exceptionthrow
diff --git a/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp b/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp
index 23cc89ca61..34dae53d0f 100644
--- a/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp
+++ b/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/expected_alive.txt b/tests/auto/testlib/selftests/expected_alive.txt
index 74d93c5a21..352c878575 100644
--- a/tests/auto/testlib/selftests/expected_alive.txt
+++ b/tests/auto/testlib/selftests/expected_alive.txt
@@ -8,26 +8,6 @@ QWARN : tst_Alive::alive() TEST LAGS 3 PINGS behind!
QWARN : tst_Alive::alive() TEST LAGS 4 PINGS behind!
PASS : tst_Alive::alive()
PASS : tst_Alive::addMouseDClick()
-FAIL! : tst_Alive::compareQStringLists() Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
-FAIL! : tst_Alive::compareQStringLists() Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
-FAIL! : tst_Alive::compareQStringLists() Compared QStringLists have different sizes.
- Actual (opA) size : '2'
- Expected (opB) size: '1'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
-FAIL! : tst_Alive::compareQStringLists() Compared QStringLists have different sizes.
- Actual (opA) size : '12'
- Expected (opB) size: '1'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
-FAIL! : tst_Alive::compareQStringLists() Compared QStringLists have different sizes.
- Actual (opA) size : '1'
- Expected (opB) size: '12'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
PASS : tst_Alive::cleanupTestCase()
-Totals: 4 passed, 5 failed, 0 skipped
+Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_Alive *********
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index 97b0621f9c..17f3e6ec3a 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -12,31 +12,117 @@
<Incident type="pass" file="" line="0" />
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)]]></Description>
</Incident>
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)]]></Description>
</Incident>
</TestFunction>
+<TestFunction name="compareQStringLists">
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[last item different]]></DataTag>
+ <Description><![CDATA[Compared QStringLists differ at index 2.
+ Actual (opA) : 'string3'
+ Expected (opB) : 'DIFFERS']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[second-last item different]]></DataTag>
+ <Description><![CDATA[Compared QStringLists differ at index 2.
+ Actual (opA) : 'string3'
+ Expected (opB) : 'DIFFERS']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[prefix]]></DataTag>
+ <Description><![CDATA[Compared QStringLists have different sizes.
+ Actual (opA) size : '2'
+ Expected (opB) size: '1']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[short list second]]></DataTag>
+ <Description><![CDATA[Compared QStringLists have different sizes.
+ Actual (opA) size : '12'
+ Expected (opB) size: '1']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[short list first]]></DataTag>
+ <Description><![CDATA[Compared QStringLists have different sizes.
+ Actual (opA) size : '1'
+ Expected (opB) size: '12']]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="compareQPixmaps">
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[one null]]></DataTag>
+ <Description><![CDATA[Compared QPixmaps differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[other null]]></DataTag>
+ <Description><![CDATA[Compared QPixmaps differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[different size]]></DataTag>
+ <Description><![CDATA[Compared QPixmaps differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[different pixels]]></DataTag>
+ <Description><![CDATA[Compared values are not the same]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="compareQImages">
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[one null]]></DataTag>
+ <Description><![CDATA[Compared QImages differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[other null]]></DataTag>
+ <Description><![CDATA[Compared QImages differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[different size]]></DataTag>
+ <Description><![CDATA[Compared QImages differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[different format]]></DataTag>
+ <Description><![CDATA[Compared QImages differ in format.
+ Actual (opA) : 6
+ Expected (opB): 3]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[different pixels]]></DataTag>
+ <Description><![CDATA[Compared values are not the same]]></Description>
+</Incident>
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index 30cc201ef1..36a4995d91 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -6,19 +6,71 @@ PASS : tst_Cmptest::compare_pointerfuncs()
FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same
Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same
Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same
Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same
Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
+FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared QStringLists differ at index 2.
+ Actual (opA) : 'string3'
+ Expected (opB) : 'DIFFERS'
+ Loc: [tst_cmptest.cpp(308)]
+FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared QStringLists differ at index 2.
+ Actual (opA) : 'string3'
+ Expected (opB) : 'DIFFERS'
+ Loc: [tst_cmptest.cpp(308)]
+FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared QStringLists have different sizes.
+ Actual (opA) size : '2'
+ Expected (opB) size: '1'
+ Loc: [tst_cmptest.cpp(308)]
+FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared QStringLists have different sizes.
+ Actual (opA) size : '12'
+ Expected (opB) size: '1'
+ Loc: [tst_cmptest.cpp(308)]
+FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared QStringLists have different sizes.
+ Actual (opA) size : '1'
+ Expected (opB) size: '12'
+ Loc: [tst_cmptest.cpp(308)]
+FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format.
+ Actual (opA) : 6
+ Expected (opB): 3
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same
+ Loc: [tst_cmptest.cpp(360)]
PASS : tst_Cmptest::cleanupTestCase()
-Totals: 4 passed, 4 failed, 0 skipped
+Totals: 4 passed, 18 failed, 0 skipped
********* Finished testing of tst_Cmptest *********
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml
index ea05c725fd..aba1ce5edd 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -14,31 +14,117 @@
<Incident type="pass" file="" line="0" />
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)]]></Description>
</Incident>
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="122">
+<Incident type="fail" file="tst_cmptest.cpp" line="214">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)]]></Description>
</Incident>
</TestFunction>
+<TestFunction name="compareQStringLists">
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[last item different]]></DataTag>
+ <Description><![CDATA[Compared QStringLists differ at index 2.
+ Actual (opA) : 'string3'
+ Expected (opB) : 'DIFFERS']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[second-last item different]]></DataTag>
+ <Description><![CDATA[Compared QStringLists differ at index 2.
+ Actual (opA) : 'string3'
+ Expected (opB) : 'DIFFERS']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[prefix]]></DataTag>
+ <Description><![CDATA[Compared QStringLists have different sizes.
+ Actual (opA) size : '2'
+ Expected (opB) size: '1']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[short list second]]></DataTag>
+ <Description><![CDATA[Compared QStringLists have different sizes.
+ Actual (opA) size : '12'
+ Expected (opB) size: '1']]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="308">
+ <DataTag><![CDATA[short list first]]></DataTag>
+ <Description><![CDATA[Compared QStringLists have different sizes.
+ Actual (opA) size : '1'
+ Expected (opB) size: '12']]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="compareQPixmaps">
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[one null]]></DataTag>
+ <Description><![CDATA[Compared QPixmaps differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[other null]]></DataTag>
+ <Description><![CDATA[Compared QPixmaps differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[different size]]></DataTag>
+ <Description><![CDATA[Compared QPixmaps differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="333">
+ <DataTag><![CDATA[different pixels]]></DataTag>
+ <Description><![CDATA[Compared values are not the same]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="compareQImages">
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[one null]]></DataTag>
+ <Description><![CDATA[Compared QImages differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[other null]]></DataTag>
+ <Description><![CDATA[Compared QImages differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[different size]]></DataTag>
+ <Description><![CDATA[Compared QImages differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[different format]]></DataTag>
+ <Description><![CDATA[Compared QImages differ in format.
+ Actual (opA) : 6
+ Expected (opB): 3]]></Description>
+</Incident>
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
+ <DataTag><![CDATA[different pixels]]></DataTag>
+ <Description><![CDATA[Compared values are not the same]]></Description>
+</Incident>
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
index 01bfda8d01..00f5f7f480 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="4" tests="5" name="tst_Cmptest">
+<testsuite errors="0" failures="18" tests="8" name="tst_Cmptest">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -21,6 +21,50 @@
Actual (actual): QVariant(PhonyClass,&lt;value not representable as string&gt;)
Expected (expected): QVariant(PhonyClass,&lt;value not representable as string&gt;)" result="fail"/>
</testcase>
+ <testcase result="fail" name="compareQStringLists">
+ <failure tag="last item different" message="Compared QStringLists differ at index 2.
+ Actual (opA) : &apos;string3&apos;
+ Expected (opB) : &apos;DIFFERS&apos;" result="fail"/>
+ <failure tag="second&#x002D;last item different" message="Compared QStringLists differ at index 2.
+ Actual (opA) : &apos;string3&apos;
+ Expected (opB) : &apos;DIFFERS&apos;" result="fail"/>
+ <failure tag="prefix" message="Compared QStringLists have different sizes.
+ Actual (opA) size : &apos;2&apos;
+ Expected (opB) size: &apos;1&apos;" result="fail"/>
+ <failure tag="short list second" message="Compared QStringLists have different sizes.
+ Actual (opA) size : &apos;12&apos;
+ Expected (opB) size: &apos;1&apos;" result="fail"/>
+ <failure tag="short list first" message="Compared QStringLists have different sizes.
+ Actual (opA) size : &apos;1&apos;
+ Expected (opB) size: &apos;12&apos;" result="fail"/>
+ </testcase>
+ <testcase result="fail" name="compareQPixmaps">
+ <failure tag="one null" message="Compared QPixmaps differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0" result="fail"/>
+ <failure tag="other null" message="Compared QPixmaps differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1" result="fail"/>
+ <failure tag="different size" message="Compared QPixmaps differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20" result="fail"/>
+ <failure tag="different pixels" message="Compared values are not the same" result="fail"/>
+ </testcase>
+ <testcase result="fail" name="compareQImages">
+ <failure tag="one null" message="Compared QImages differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0" result="fail"/>
+ <failure tag="other null" message="Compared QImages differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1" result="fail"/>
+ <failure tag="different size" message="Compared QImages differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20" result="fail"/>
+ <failure tag="different format" message="Compared QImages differ in format.
+ Actual (opA) : 6
+ Expected (opB): 3" result="fail"/>
+ <failure tag="different pixels" message="Compared values are not the same" result="fail"/>
+ </testcase>
<testcase result="pass" name="cleanupTestCase"/>
<system-err/>
</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml
index f983a870d3..79e5827caa 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.lightxml
+++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml
@@ -9,7 +9,7 @@
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="60">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="70">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
@@ -21,20 +21,55 @@
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="68">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
+<TestFunction name="expectTwice">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="87">
+ <Description><![CDATA[Already expecting a fail]]></Description>
+</Incident>
+</TestFunction>
<TestFunction name="xfailWithQString">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="75">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="97">
<Description><![CDATA[A string]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="80">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="102">
<Description><![CDATA[Bug 5 (The message)]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
+<TestFunction name="xpass">
+<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="108">
+ <Description><![CDATA['true' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="dataDrivenTest">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+ <DataTag><![CDATA[Abort]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+ <DataTag><![CDATA[Continue]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="expectOnWrongRow">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="expectOnAnyRow">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+ <DataTag><![CDATA[first row]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+ <DataTag><![CDATA[second row]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0" />
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt
index 77b01dfd86..b31245151d 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.txt
+++ b/tests/auto/testlib/selftests/expected_expectfail.txt
@@ -3,18 +3,33 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE
PASS : tst_ExpectFail::initTestCase()
QDEBUG : tst_ExpectFail::expectAndContinue() begin
XFAIL : tst_ExpectFail::expectAndContinue() This should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(27)]
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(70)]
QDEBUG : tst_ExpectFail::expectAndContinue() after
PASS : tst_ExpectFail::expectAndContinue()
QDEBUG : tst_ExpectFail::expectAndAbort() begin
XFAIL : tst_ExpectFail::expectAndAbort() This should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(35)]
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(78)]
PASS : tst_ExpectFail::expectAndAbort()
+FAIL! : tst_ExpectFail::expectTwice() Already expecting a fail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(87)]
XFAIL : tst_ExpectFail::xfailWithQString() A string
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(42)]
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(97)]
XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(47)]
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(102)]
PASS : tst_ExpectFail::xfailWithQString()
+XPASS : tst_ExpectFail::xpass() 'true' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(108)]
+XFAIL : tst_ExpectFail::dataDrivenTest(Abort) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(141)]
+XFAIL : tst_ExpectFail::dataDrivenTest(Continue) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(141)]
+PASS : tst_ExpectFail::dataDrivenTest()
+PASS : tst_ExpectFail::expectOnWrongRow()
+XFAIL : tst_ExpectFail::expectOnAnyRow(first row) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(176)]
+XFAIL : tst_ExpectFail::expectOnAnyRow(second row) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(176)]
+PASS : tst_ExpectFail::expectOnAnyRow()
PASS : tst_ExpectFail::cleanupTestCase()
-Totals: 5 passed, 0 failed, 0 skipped
+Totals: 8 passed, 2 failed, 0 skipped
********* Finished testing of tst_ExpectFail *********
diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml
index 12a1d5cdbf..676a030b3f 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.xml
+++ b/tests/auto/testlib/selftests/expected_expectfail.xml
@@ -11,7 +11,7 @@
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="60">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="70">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
@@ -23,20 +23,55 @@
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="68">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
+<TestFunction name="expectTwice">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="87">
+ <Description><![CDATA[Already expecting a fail]]></Description>
+</Incident>
+</TestFunction>
<TestFunction name="xfailWithQString">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="75">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="97">
<Description><![CDATA[A string]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="80">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="102">
<Description><![CDATA[Bug 5 (The message)]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
+<TestFunction name="xpass">
+<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="108">
+ <Description><![CDATA['true' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="dataDrivenTest">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+ <DataTag><![CDATA[Abort]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+ <DataTag><![CDATA[Continue]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="expectOnWrongRow">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="expectOnAnyRow">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+ <DataTag><![CDATA[first row]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+ <DataTag><![CDATA[second row]]></DataTag>
+ <Description><![CDATA[This test should xfail]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0" />
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml
index 32a5cfca81..328bb6433b 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml
+++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="7" failures="0" tests="5" name="tst_ExpectFail">
+<testsuite errors="11" failures="2" tests="10" name="tst_ExpectFail">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -14,10 +14,25 @@
<!-- message="begin" type="qdebug" -->
<!-- message="This should xfail" type="info" -->
</testcase>
+ <testcase result="fail" name="expectTwice">
+ <failure message="Already expecting a fail" result="fail"/>
+ </testcase>
<testcase result="xfail" name="xfailWithQString">
<!-- message="A string" type="info" -->
<!-- message="Bug 5 (The message)" type="info" -->
</testcase>
+ <testcase result="xpass" name="xpass">
+ <failure message="&apos;true&apos; returned FALSE. ()" result="xpass"/>
+ </testcase>
+ <testcase result="xfail" name="dataDrivenTest">
+ <!-- tag="Abort" message="This test should xfail" type="info" -->
+ <!-- tag="Continue" message="This test should xfail" type="info" -->
+ </testcase>
+ <testcase result="pass" name="expectOnWrongRow"/>
+ <testcase result="xfail" name="expectOnAnyRow">
+ <!-- tag="first row" message="This test should xfail" type="info" -->
+ <!-- tag="second row" message="This test should xfail" type="info" -->
+ </testcase>
<testcase result="pass" name="cleanupTestCase"/>
<system-err>
<![CDATA[begin]]>
@@ -27,5 +42,9 @@
<![CDATA[This should xfail]]>
<![CDATA[A string]]>
<![CDATA[Bug 5 (The message)]]>
+<![CDATA[This test should xfail]]>
+<![CDATA[This test should xfail]]>
+<![CDATA[This test should xfail]]>
+<![CDATA[This test should xfail]]>
</system-err>
</testsuite>
diff --git a/tests/auto/testlib/selftests/expectfail/expectfail.pro b/tests/auto/testlib/selftests/expectfail/expectfail.pro
index a2916b2830..c1849990f2 100644
--- a/tests/auto/testlib/selftests/expectfail/expectfail.pro
+++ b/tests/auto/testlib/selftests/expectfail/expectfail.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = expectfail
diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
index 04aef02cc7..79325a3bfc 100644
--- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,9 +40,11 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
+Q_DECLARE_METATYPE(QTest::TestFailMode)
+
class tst_ExpectFail: public QObject
{
Q_OBJECT
@@ -50,7 +52,15 @@ class tst_ExpectFail: public QObject
private slots:
void expectAndContinue() const;
void expectAndAbort() const;
+ void expectTwice() const;
void xfailWithQString() const;
+ void xpass() const;
+ void dataDrivenTest_data() const;
+ void dataDrivenTest() const;
+ void expectOnWrongRow_data() const;
+ void expectOnWrongRow() const;
+ void expectOnAnyRow_data() const;
+ void expectOnAnyRow() const;
};
void tst_ExpectFail::expectAndContinue() const
@@ -66,7 +76,19 @@ void tst_ExpectFail::expectAndAbort() const
qDebug("begin");
QEXPECT_FAIL("", "This should xfail", Abort);
QVERIFY(false);
- qDebug("this should not be reached");
+
+ // If we get here the test did not correctly abort on the previous QVERIFY.
+ QVERIFY2(false, "This should not be reached");
+}
+
+void tst_ExpectFail::expectTwice() const
+{
+ QEXPECT_FAIL("", "Calling QEXPECT_FAIL once is fine", Abort);
+ QEXPECT_FAIL("", "Calling QEXPECT_FAIL when already expecting a failure is "
+ "an error and should abort this test function", Abort);
+
+ // If we get here the test did not correctly abort on the double call to QEXPECT_FAIL.
+ QVERIFY2(false, "This should not be reached");
}
void tst_ExpectFail::xfailWithQString() const
@@ -80,6 +102,79 @@ void tst_ExpectFail::xfailWithQString() const
QVERIFY(false);
}
-QTEST_MAIN(tst_ExpectFail)
+void tst_ExpectFail::xpass() const
+{
+ QEXPECT_FAIL("", "This test should xpass", Abort);
+ QVERIFY(true);
+
+ // If we get here the test did not correctly abort on the previous
+ // unexpected pass.
+ QVERIFY2(false, "This should not be reached");
+}
+
+void tst_ExpectFail::dataDrivenTest_data() const
+{
+ QTest::addColumn<bool>("shouldPass");
+ QTest::addColumn<QTest::TestFailMode>("failMode");
+
+ QTest::newRow("Pass 1") << true << QTest::Abort;
+ QTest::newRow("Pass 2") << true << QTest::Continue;
+ QTest::newRow("Abort") << false << QTest::Abort;
+ QTest::newRow("Continue") << false << QTest::Continue;
+}
+
+void tst_ExpectFail::dataDrivenTest() const
+{
+ QFETCH(bool, shouldPass);
+ QFETCH(QTest::TestFailMode, failMode);
+
+ // You can't pass a variable as the last parameter of QEXPECT_FAIL,
+ // because the macro adds "QTest::" in front of the last parameter.
+ // That is why the following code appears to be a little strange.
+ if (!shouldPass) {
+ if (failMode == QTest::Abort)
+ QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Abort);
+ else
+ QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Continue);
+ }
+
+ QVERIFY(shouldPass);
+ // If we get here, we either expected to pass or we expected to
+ // fail and the failure mode was Continue.
+ if (!shouldPass)
+ QCOMPARE(failMode, QTest::Continue);
+}
+
+void tst_ExpectFail::expectOnWrongRow_data() const
+{
+ QTest::addColumn<int>("dummy");
+
+ QTest::newRow("right row") << 0;
+}
+
+void tst_ExpectFail::expectOnWrongRow() const
+{
+ // QEXPECT_FAIL for a row that is not the current row should be ignored.
+ QEXPECT_FAIL("wrong row", "This xfail should be ignored", Abort);
+ QVERIFY(true);
+}
+
+void tst_ExpectFail::expectOnAnyRow_data() const
+{
+ QTest::addColumn<int>("dummy");
+
+ QTest::newRow("first row") << 0;
+ QTest::newRow("second row") << 1;
+}
+
+void tst_ExpectFail::expectOnAnyRow() const
+{
+ // In a data-driven test, passing an empty first parameter to QEXPECT_FAIL
+ // should mean that the failure is expected for all data rows.
+ QEXPECT_FAIL("", "This test should xfail", Abort);
+ QVERIFY(false);
+}
+
+QTEST_MAIN(tst_ExpectFail)
#include "tst_expectfail.moc"
diff --git a/tests/auto/testlib/selftests/failinit/failinit.pro b/tests/auto/testlib/selftests/failinit/failinit.pro
index 9a781840c6..6a30a5af68 100644
--- a/tests/auto/testlib/selftests/failinit/failinit.pro
+++ b/tests/auto/testlib/selftests/failinit/failinit.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = failinit
diff --git a/tests/auto/testlib/selftests/failinit/tst_failinit.cpp b/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
index 0bf448f428..8f217f1d0a 100644
--- a/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
+++ b/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
index 7b0b15a59b..b608c67dbb 100644
--- a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
+++ b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = failinitdata
diff --git a/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp b/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
index 00e4d12256..b14242f129 100644
--- a/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
+++ b/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
index 1f8652d533..33b306ca75 100644
--- a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
+++ b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = fetchbogus
diff --git a/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp b/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp
index 65d10c180c..f6f4f0de99 100644
--- a/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp
+++ b/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_FetchBogus: public QObject
diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp
index 473ba19798..09b8634334 100644
--- a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp
+++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
#define TESTFILE "testfile"
@@ -62,7 +62,11 @@ void FindTestData::initTestCase()
{
// verify that our qt.conf is working as expected.
QString app_path = QCoreApplication::applicationDirPath();
- QString install_path = app_path + "/tests";
+ QString install_path = app_path
+#ifdef Q_OS_MAC
+ + "/Contents"
+#endif
+ + "/tests";
QVERIFY(QDir("/").mkpath(install_path));
QVERIFY(QDir("/").mkpath(install_path + "/findtestdata"));
QCOMPARE(QLibraryInfo::location(QLibraryInfo::TestsPath), install_path);
@@ -107,7 +111,11 @@ void FindTestData::paths()
QVERIFY(touch(testfile_path1));
// 2. at the test install path (faked via qt.conf)
- QString testfile_path2 = app_path + "/tests/findtestdata/" TESTFILE;
+ QString testfile_path2 = app_path
+#ifdef Q_OS_MAC
+ + "/Contents"
+#endif
+ + "/tests/findtestdata/" TESTFILE;
QVERIFY(touch(testfile_path2));
// 3. at the source path (which we will fake later on)
diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp
index 65bd3188cb..47fb253cd0 100644
--- a/tests/auto/testlib/selftests/float/tst_float.cpp
+++ b/tests/auto/testlib/selftests/float/tst_float.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
#include <QDebug>
diff --git a/tests/auto/testlib/selftests/globaldata/globaldata.pro b/tests/auto/testlib/selftests/globaldata/globaldata.pro
index 3d49d3515b..c0b1554c0f 100644
--- a/tests/auto/testlib/selftests/globaldata/globaldata.pro
+++ b/tests/auto/testlib/selftests/globaldata/globaldata.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = globaldata
diff --git a/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp b/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp
index 898cccf435..5a7ffd328f 100644
--- a/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp
+++ b/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
#include <QDebug>
diff --git a/tests/auto/testlib/selftests/longstring/longstring.pro b/tests/auto/testlib/selftests/longstring/longstring.pro
index 9b393e9cc7..d16ba85095 100644
--- a/tests/auto/testlib/selftests/longstring/longstring.pro
+++ b/tests/auto/testlib/selftests/longstring/longstring.pro
@@ -4,6 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = longstring
-
diff --git a/tests/auto/testlib/selftests/longstring/tst_longstring.cpp b/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
index 99dac95ba1..d42e760483 100644
--- a/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
+++ b/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
char const lipsum[] =
diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp
index 398d0d8e4a..fdfe00fc42 100644
--- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp
+++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore/QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class MaxWarnings: public QObject
diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
index 9ebdde5015..79451af1ec 100644
--- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
+++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = maxwarnings
diff --git a/tests/auto/testlib/selftests/multiexec/multiexec.pro b/tests/auto/testlib/selftests/multiexec/multiexec.pro
index 79ae010bcb..2038acbd31 100644
--- a/tests/auto/testlib/selftests/multiexec/multiexec.pro
+++ b/tests/auto/testlib/selftests/multiexec/multiexec.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = multiexec
diff --git a/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp b/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp
index 0480714c77..d6a5e32f05 100644
--- a/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp
+++ b/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
index f0882316b8..4fdd33268a 100644
--- a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
+++ b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
index 53454fc1ac..23dbfa1ee4 100644
--- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
new file mode 100644
index 0000000000..bd967f32e6
--- /dev/null
+++ b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
@@ -0,0 +1,7 @@
+SOURCES += tst_qexecstringlist.cpp
+QT = core testlib
+
+mac:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = qexecstringlist
diff --git a/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp b/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp
new file mode 100644
index 0000000000..5df7e1e1d5
--- /dev/null
+++ b/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtCore/QCoreApplication>
+#include <QtTest/QtTest>
+
+class tst_QExecStringList: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testA() const;
+ void testB() const;
+ void testB_data() const;
+ void testC() const;
+};
+
+void tst_QExecStringList::testA() const
+{
+}
+
+void tst_QExecStringList::testB() const
+{
+ QFETCH(bool, dummy);
+ Q_UNUSED(dummy);
+}
+
+void tst_QExecStringList::testB_data() const
+{
+ QTest::addColumn<bool>("dummy");
+
+ QTest::newRow("Data1") << false;
+ QTest::newRow("Data2") << false;
+ QTest::newRow("Data3") << false;
+}
+
+void tst_QExecStringList::testC() const
+{
+}
+
+int main(int argc,char *argv[])
+{
+ QCoreApplication app(argc, argv);
+
+ tst_QExecStringList test;
+
+ QTest::qExec(&test, app.arguments());
+ QTest::qExec(&test, QStringList("appName"));
+ QTest::qExec(&test, QStringList("appName") << "testA");
+ QTest::qExec(&test, QStringList("appName") << "testB");
+ QTest::qExec(&test, QStringList("appName") << "testB:Data2");
+ QTest::qExec(&test, QStringList("appName") << "testC");
+
+ return 0;
+}
+
+#include "tst_qexecstringlist.moc"
diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri
new file mode 100644
index 0000000000..f506c8c08c
--- /dev/null
+++ b/tests/auto/testlib/selftests/selftests.pri
@@ -0,0 +1,7 @@
+SUBPROGRAMS = subtest warnings maxwarnings cmptest globaldata skip \
+ strcmp expectfail sleep fetchbogus crashes multiexec failinit failinitdata \
+ skipinit skipinitdata datetime singleskip assert differentexec \
+ exceptionthrow qexecstringlist datatable commandlinedata\
+ benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \
+ benchliboptions xunit badxml longstring float printdatatags \
+ printdatatagswithglobaltags findtestdata
diff --git a/tests/auto/testlib/selftests/selftests.pro b/tests/auto/testlib/selftests/selftests.pro
index b4c4255dfc..1d39e6a899 100644
--- a/tests/auto/testlib/selftests/selftests.pro
+++ b/tests/auto/testlib/selftests/selftests.pro
@@ -1,12 +1,8 @@
TEMPLATE = subdirs
-SUBDIRS = subtest test warnings maxwarnings cmptest globaldata skip \
- strcmp expectfail sleep fetchbogus crashes multiexec failinit failinitdata \
- skipinit skipinitdata datetime singleskip assert differentexec \
- exceptionthrow datatable commandlinedata \
- benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \
- benchliboptions xunit badxml longstring float printdatatags \
- printdatatagswithglobaltags findtestdata
+include(selftests.pri)
+
+SUBDIRS = $$SUBPROGRAMS test
INSTALLS =
diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc
index 5090fa7378..fb303af2b5 100644
--- a/tests/auto/testlib/selftests/selftests.qrc
+++ b/tests/auto/testlib/selftests/selftests.qrc
@@ -95,6 +95,7 @@
<file>expected_multiexec.xunitxml</file>
<file>expected_printdatatags.txt</file>
<file>expected_printdatatagswithglobaltags.txt</file>
+ <file>expected_qexecstringlist.txt</file>
<file>expected_singleskip.lightxml</file>
<file>expected_singleskip.txt</file>
<file>expected_singleskip.xml</file>
diff --git a/tests/auto/testlib/selftests/singleskip/singleskip.pro b/tests/auto/testlib/selftests/singleskip/singleskip.pro
index f4bde92d62..9f63e62747 100644
--- a/tests/auto/testlib/selftests/singleskip/singleskip.pro
+++ b/tests/auto/testlib/selftests/singleskip/singleskip.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = singleskip
diff --git a/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp b/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp
index 7701eb81a0..d36b9b52f9 100644
--- a/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp
+++ b/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_SingleSkip: public QObject
diff --git a/tests/auto/testlib/selftests/skip/skip.pro b/tests/auto/testlib/selftests/skip/skip.pro
index 82576212ad..8780d295cf 100644
--- a/tests/auto/testlib/selftests/skip/skip.pro
+++ b/tests/auto/testlib/selftests/skip/skip.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = skip
diff --git a/tests/auto/testlib/selftests/skip/tst_skip.cpp b/tests/auto/testlib/selftests/skip/tst_skip.cpp
index 905fe2dde4..76e9059f87 100644
--- a/tests/auto/testlib/selftests/skip/tst_skip.cpp
+++ b/tests/auto/testlib/selftests/skip/tst_skip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_Skip: public QObject
diff --git a/tests/auto/testlib/selftests/skipinit/skipinit.pro b/tests/auto/testlib/selftests/skipinit/skipinit.pro
index 848252eabd..7defce9a52 100644
--- a/tests/auto/testlib/selftests/skipinit/skipinit.pro
+++ b/tests/auto/testlib/selftests/skipinit/skipinit.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = skipinit
diff --git a/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp b/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp
index 1a9fc1eeec..052dabb343 100644
--- a/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp
+++ b/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
index 762543a60b..cd806c2a43 100644
--- a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
+++ b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = skipinitdata
diff --git a/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp b/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp
index b09e99b32f..96c9eb6aff 100644
--- a/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp
+++ b/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/sleep/sleep.pro b/tests/auto/testlib/selftests/sleep/sleep.pro
index e0ae72f54a..affcba22ee 100644
--- a/tests/auto/testlib/selftests/sleep/sleep.pro
+++ b/tests/auto/testlib/selftests/sleep/sleep.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = sleep
diff --git a/tests/auto/testlib/selftests/sleep/tst_sleep.cpp b/tests/auto/testlib/selftests/sleep/tst_sleep.cpp
index e509954b5d..349ecb1d1c 100644
--- a/tests/auto/testlib/selftests/sleep/tst_sleep.cpp
+++ b/tests/auto/testlib/selftests/sleep/tst_sleep.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_Sleep: public QObject
diff --git a/tests/auto/testlib/selftests/strcmp/strcmp.pro b/tests/auto/testlib/selftests/strcmp/strcmp.pro
index ac1f1e840e..f5f6eecc88 100644
--- a/tests/auto/testlib/selftests/strcmp/strcmp.pro
+++ b/tests/auto/testlib/selftests/strcmp/strcmp.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = strcmp
diff --git a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
index 89689bb3bc..2cd69a5873 100644
--- a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+++ b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_StrCmp: public QObject
diff --git a/tests/auto/testlib/selftests/subtest/subtest.pro b/tests/auto/testlib/selftests/subtest/subtest.pro
index 3066f20247..09dee1b1b9 100644
--- a/tests/auto/testlib/selftests/subtest/subtest.pro
+++ b/tests/auto/testlib/selftests/subtest/subtest.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = subtest
diff --git a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
index 7ccfc507d7..385d43ab8d 100644
--- a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
+++ b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,9 +40,9 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
#include <QtTest/QtTest>
-#include <QDebug>
class tst_Subtest: public QObject
{
diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro
index 29d2cc5f36..a395ecea47 100644
--- a/tests/auto/testlib/selftests/test/test.pro
+++ b/tests/auto/testlib/selftests/test/test.pro
@@ -13,3 +13,8 @@ win32 {
}
RESOURCES += ../selftests.qrc
+
+include(../selftests.pri)
+load(testcase) # for target.path and installTestHelperApp()
+for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file})
+
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index f7a485b857..04696a1387 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,15 +39,19 @@
**
****************************************************************************/
-#include <QtCore>
-#include <QtTest/QtTest>
+#include <QtCore/QCoreApplication>
#include <QtCore/QXmlStreamReader>
+#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
+#include <QtTest/QtTest>
+
#include <private/cycle_p.h>
class tst_Selftests: public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
void runSubTest_data();
void runSubTest();
void cleanup();
@@ -285,6 +289,22 @@ static QList<LoggerSet> allLoggerSets()
;
}
+void tst_Selftests::initTestCase()
+{
+ //Detect the location of the sub programs
+ QString subProgram = QLatin1String("float/float");
+#if defined(Q_OS_WIN)
+ subProgram = QLatin1String("float/float.exe");
+#endif
+ QString testdataDir = QFINDTESTDATA(subProgram);
+ if (testdataDir.lastIndexOf(subProgram) > 0)
+ testdataDir = testdataDir.left(testdataDir.lastIndexOf(subProgram));
+ else
+ testdataDir = QCoreApplication::applicationDirPath();
+ // chdir to our testdata path and execute helper apps relative to that.
+ QVERIFY2(QDir::setCurrent(testdataDir), qPrintable("Could not chdir to " + testdataDir));
+}
+
void tst_Selftests::runSubTest_data()
{
QTest::addColumn<QString>("subdir");
@@ -311,7 +331,7 @@ void tst_Selftests::runSubTest_data()
<< "datatable"
<< "datetime"
<< "differentexec"
-#if !defined(QT_NO_EXCEPTIONS) && (!defined(Q_CC_INTEL) || !defined(Q_OS_WIN))
+#if !defined(QT_NO_EXCEPTIONS) && !defined(Q_CC_INTEL) && !defined(Q_OS_WIN)
// Disable this test on Windows and for intel compiler, as the run-times
// will popup dialogs with warnings that uncaught exceptions were thrown
<< "exceptionthrow"
@@ -319,7 +339,10 @@ void tst_Selftests::runSubTest_data()
<< "expectfail"
<< "failinit"
<< "failinitdata"
+#if !defined(Q_OS_WIN)
+ // Disable this test on Windows, as the run-time will popup dialogs with warnings
<< "fetchbogus"
+#endif
<< "float"
<< "globaldata"
<< "longstring"
@@ -327,6 +350,7 @@ void tst_Selftests::runSubTest_data()
<< "multiexec"
<< "printdatatags"
<< "printdatatagswithglobaltags"
+ << "qexecstringlist"
<< "singleskip"
<< "skip"
<< "skipinit"
@@ -391,6 +415,9 @@ void tst_Selftests::runSubTest_data()
if (subtest == "multiexec") {
continue;
}
+ if (subtest == "qexecstringlist") {
+ continue;
+ }
if (subtest == "benchliboptions") {
continue;
}
@@ -430,16 +457,41 @@ static inline QProcessEnvironment processEnvironment()
{
QProcessEnvironment result;
const QString path = QStringLiteral("PATH");
- result.insert(path, QProcessEnvironment::systemEnvironment().value(path));
+ const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment();
+ result.insert(path, systemEnvironment.value(path));
+ // Preserve DISPLAY for X11 as some tests use QtGui.
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+ const QString display = QStringLiteral("DISPLAY");
+ const QString displayValue = systemEnvironment.value(display);
+ if (!displayValue.isEmpty())
+ result.insert(display, displayValue);
+#endif
+ const QString platform = QStringLiteral("QT_QPA_PLATFORM");
+ const QString platformValue = systemEnvironment.value(platform);
+ if (!platformValue.isEmpty())
+ result.insert(platform, platformValue);
return result;
}
void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& loggers, QStringList const& arguments)
{
+#if defined(__GNUC__) && defined(__i386) && defined(Q_OS_LINUX)
+ if (arguments.contains("-callgrind")) {
+ QProcess checkProcess;
+ QStringList args;
+ args << QLatin1String("--version");
+ checkProcess.start(QLatin1String("valgrind"), args);
+ if (!checkProcess.waitForFinished(-1))
+ QSKIP(QString("Valgrind broken or not available. Not running %1 test!").arg(subdir).toLocal8Bit());
+ }
+#endif
+
QProcess proc;
static const QProcessEnvironment environment = processEnvironment();
proc.setProcessEnvironment(environment);
- proc.start(subdir + QLatin1Char('/') + subdir, arguments);
+ const QString path = subdir + QLatin1Char('/') + subdir;
+ proc.start(path, arguments);
+ QVERIFY2(proc.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, proc.errorString())));
QVERIFY2(proc.waitForFinished(), qPrintable(proc.errorString()));
QList<QByteArray> actualOutputs;
@@ -469,6 +521,7 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
// newer than the valgrind version, such that valgrind can't understand the
// debug information on the binary.
if (subdir != QLatin1String("exceptionthrow")
+ && subdir != QLatin1String("cmptest") // QImage comparison requires QGuiApplication
&& subdir != QLatin1String("fetchbogus")
&& subdir != QLatin1String("xunit")
&& subdir != QLatin1String("benchlibcallgrind"))
@@ -507,7 +560,9 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
}
}
} else {
- QCOMPARE(res.count(), exp.count());
+ QVERIFY2(res.count() == exp.count(),
+ qPrintable(QString::fromLatin1("Mismatch in line count: %1 != %2 (%3).")
+ .arg(res.count()).arg(exp.count()).arg(loggers.at(n))));
}
// For xml output formats, verify that the log is valid XML.
@@ -568,7 +623,9 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
QCOMPARE(actualResult, expectedResult);
} else {
- QCOMPARE(output, expected);
+ QVERIFY2(output == expected,
+ qPrintable(QString::fromLatin1("Mismatch at line %1 (%2): '%3' != '%4'")
+ .arg(i).arg(loggers.at(n), output, expected)));
}
benchmark = line.startsWith("RESULT : ");
@@ -741,9 +798,12 @@ void tst_Selftests::cleanup()
// Remove the test output files
for (int i = 0; i < loggers.count(); ++i) {
- QString logFile = logName(loggers[i]);
- if (!logFile.isEmpty())
- QVERIFY(QFile::remove(logFile));
+ QString logFileName = logName(loggers[i]);
+ if (!logFileName.isEmpty()) {
+ QFile logFile(logFileName);
+ if (logFile.exists())
+ QVERIFY2(logFile.remove(), qPrintable(QString::fromLatin1("Cannot remove file '%1': %2: ").arg(logFileName, logFile.errorString())));
+ }
}
}
diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
index e14f9c3d98..30fe15d354 100644
--- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
+++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,7 +40,7 @@
****************************************************************************/
-#include <QtCore>
+#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
class tst_Warnings: public QObject
diff --git a/tests/auto/testlib/selftests/warnings/warnings.pro b/tests/auto/testlib/selftests/warnings/warnings.pro
index 0c6ca01588..0c6cddcefb 100644
--- a/tests/auto/testlib/selftests/warnings/warnings.pro
+++ b/tests/auto/testlib/selftests/warnings/warnings.pro
@@ -4,5 +4,4 @@ QT = core testlib
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-
TARGET = warnings
diff --git a/tests/auto/testlib/selftests/xunit/tst_xunit.cpp b/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
index 05acc8cfe7..4193387bc1 100644
--- a/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
+++ b/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/testlib/selftests/xunit/xunit.pro b/tests/auto/testlib/selftests/xunit/xunit.pro
index d3ae402e6f..b8c606e828 100644
--- a/tests/auto/testlib/selftests/xunit/xunit.pro
+++ b/tests/auto/testlib/selftests/xunit/xunit.pro
@@ -1,8 +1,8 @@
QT = core testlib
-SOURCES += tst_xunit.cpp
+SOURCES += tst_xunit.cpp
+
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = xunit
-
diff --git a/tests/auto/tools/moc/Test.framework/Headers/testinterface.h b/tests/auto/tools/moc/Test.framework/Headers/testinterface.h
index 9662a02bc3..d9f9a2b0f5 100644
--- a/tests/auto/tools/moc/Test.framework/Headers/testinterface.h
+++ b/tests/auto/tools/moc/Test.framework/Headers/testinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/assign-namespace.h b/tests/auto/tools/moc/assign-namespace.h
index fc6631c18b..c73724918c 100644
--- a/tests/auto/tools/moc/assign-namespace.h
+++ b/tests/auto/tools/moc/assign-namespace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/backslash-newlines.h b/tests/auto/tools/moc/backslash-newlines.h
index d65c15c6d5..e7edf4664b 100644
--- a/tests/auto/tools/moc/backslash-newlines.h
+++ b/tests/auto/tools/moc/backslash-newlines.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/c-comments.h b/tests/auto/tools/moc/c-comments.h
index 8c0709338d..fc58191e86 100644
--- a/tests/auto/tools/moc/c-comments.h
+++ b/tests/auto/tools/moc/c-comments.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/cstyle-enums.h b/tests/auto/tools/moc/cstyle-enums.h
index 59076a535f..21a883eb58 100644
--- a/tests/auto/tools/moc/cstyle-enums.h
+++ b/tests/auto/tools/moc/cstyle-enums.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/dir-in-include-path.h b/tests/auto/tools/moc/dir-in-include-path.h
index b69514ec74..cb530e20d9 100644
--- a/tests/auto/tools/moc/dir-in-include-path.h
+++ b/tests/auto/tools/moc/dir-in-include-path.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/error-on-wrong-notify.h b/tests/auto/tools/moc/error-on-wrong-notify.h
index 381932a265..2f8de785a0 100644
--- a/tests/auto/tools/moc/error-on-wrong-notify.h
+++ b/tests/auto/tools/moc/error-on-wrong-notify.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/escapes-in-string-literals.h b/tests/auto/tools/moc/escapes-in-string-literals.h
index 437ceae82b..71e9759f36 100644
--- a/tests/auto/tools/moc/escapes-in-string-literals.h
+++ b/tests/auto/tools/moc/escapes-in-string-literals.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/extraqualification.h b/tests/auto/tools/moc/extraqualification.h
index b2b028eb03..a54ed1770e 100644
--- a/tests/auto/tools/moc/extraqualification.h
+++ b/tests/auto/tools/moc/extraqualification.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/forgotten-qinterface.h b/tests/auto/tools/moc/forgotten-qinterface.h
index e52a63e4df..3be4422bdc 100644
--- a/tests/auto/tools/moc/forgotten-qinterface.h
+++ b/tests/auto/tools/moc/forgotten-qinterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/gadgetwithnoenums.h b/tests/auto/tools/moc/gadgetwithnoenums.h
index c5ec939b3a..1ef0eeece9 100644
--- a/tests/auto/tools/moc/gadgetwithnoenums.h
+++ b/tests/auto/tools/moc/gadgetwithnoenums.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/interface-from-framework.h b/tests/auto/tools/moc/interface-from-framework.h
index 242d9f2286..e78b6ec51a 100644
--- a/tests/auto/tools/moc/interface-from-framework.h
+++ b/tests/auto/tools/moc/interface-from-framework.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/macro-on-cmdline.h b/tests/auto/tools/moc/macro-on-cmdline.h
index a1c162d10b..78ca4778cc 100644
--- a/tests/auto/tools/moc/macro-on-cmdline.h
+++ b/tests/auto/tools/moc/macro-on-cmdline.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/namespaced-flags.h b/tests/auto/tools/moc/namespaced-flags.h
index b1c10792c1..86b9891028 100644
--- a/tests/auto/tools/moc/namespaced-flags.h
+++ b/tests/auto/tools/moc/namespaced-flags.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/no-keywords.h b/tests/auto/tools/moc/no-keywords.h
index 2da7100aeb..4f15aa2ad0 100644
--- a/tests/auto/tools/moc/no-keywords.h
+++ b/tests/auto/tools/moc/no-keywords.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/oldstyle-casts.h b/tests/auto/tools/moc/oldstyle-casts.h
index 2754bb4e18..f26aeb5629 100644
--- a/tests/auto/tools/moc/oldstyle-casts.h
+++ b/tests/auto/tools/moc/oldstyle-casts.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/os9-newlines.h b/tests/auto/tools/moc/os9-newlines.h
index 66bc51653e..a2bf57fbb4 100644
--- a/tests/auto/tools/moc/os9-newlines.h
+++ b/tests/auto/tools/moc/os9-newlines.h
@@ -1 +1 @@
-/**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** 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. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QObject> class Os9Newlines : public QObject { Q_OBJECT public Q_SLOTS: inline void testSlot() {} }; \ No newline at end of file
+/**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** 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. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QObject> class Os9Newlines : public QObject { Q_OBJECT public Q_SLOTS: inline void testSlot() {} }; \ No newline at end of file
diff --git a/tests/auto/tools/moc/parse-boost.h b/tests/auto/tools/moc/parse-boost.h
index 9453f7f2bf..f475cb8778 100644
--- a/tests/auto/tools/moc/parse-boost.h
+++ b/tests/auto/tools/moc/parse-boost.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/pure-virtual-signals.h b/tests/auto/tools/moc/pure-virtual-signals.h
index a70370c5bc..4009de1e86 100644
--- a/tests/auto/tools/moc/pure-virtual-signals.h
+++ b/tests/auto/tools/moc/pure-virtual-signals.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/qinvokable.h b/tests/auto/tools/moc/qinvokable.h
index 313a49d7a8..17f1610ebe 100644
--- a/tests/auto/tools/moc/qinvokable.h
+++ b/tests/auto/tools/moc/qinvokable.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/qprivateslots.h b/tests/auto/tools/moc/qprivateslots.h
index 4713b41522..25c2ce2ba6 100644
--- a/tests/auto/tools/moc/qprivateslots.h
+++ b/tests/auto/tools/moc/qprivateslots.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/single_function_keyword.h b/tests/auto/tools/moc/single_function_keyword.h
index 1ce2517e4c..62b91e2b38 100644
--- a/tests/auto/tools/moc/single_function_keyword.h
+++ b/tests/auto/tools/moc/single_function_keyword.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/slots-with-void-template.h b/tests/auto/tools/moc/slots-with-void-template.h
index 62eb42e13d..d182e752d9 100644
--- a/tests/auto/tools/moc/slots-with-void-template.h
+++ b/tests/auto/tools/moc/slots-with-void-template.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/task189996.h b/tests/auto/tools/moc/task189996.h
index 6f8701f008..1f07266d18 100644
--- a/tests/auto/tools/moc/task189996.h
+++ b/tests/auto/tools/moc/task189996.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/task192552.h b/tests/auto/tools/moc/task192552.h
index 016d12a12a..843c19f11d 100644
--- a/tests/auto/tools/moc/task192552.h
+++ b/tests/auto/tools/moc/task192552.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/task234909.h b/tests/auto/tools/moc/task234909.h
index a24e0b301a..ead7ce7791 100644
--- a/tests/auto/tools/moc/task234909.h
+++ b/tests/auto/tools/moc/task234909.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/task240368.h b/tests/auto/tools/moc/task240368.h
index 320cad3ff8..c019a5457d 100644
--- a/tests/auto/tools/moc/task240368.h
+++ b/tests/auto/tools/moc/task240368.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/task87883.h b/tests/auto/tools/moc/task87883.h
index aedbd386c9..3079809020 100644
--- a/tests/auto/tools/moc/task87883.h
+++ b/tests/auto/tools/moc/task87883.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/template-gtgt.h b/tests/auto/tools/moc/template-gtgt.h
index 42aae6e633..601c706c14 100644
--- a/tests/auto/tools/moc/template-gtgt.h
+++ b/tests/auto/tools/moc/template-gtgt.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/testproject/Plugin/Plugin.h b/tests/auto/tools/moc/testproject/Plugin/Plugin.h
index 6c8cffe7d9..90ed8e9be1 100644
--- a/tests/auto/tools/moc/testproject/Plugin/Plugin.h
+++ b/tests/auto/tools/moc/testproject/Plugin/Plugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/trigraphs.h b/tests/auto/tools/moc/trigraphs.h
index cb074e7dcd..9a76c933b1 100644
--- a/tests/auto/tools/moc/trigraphs.h
+++ b/tests/auto/tools/moc/trigraphs.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 6d3ee2611e..bce1ad8d00 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1091,15 +1091,15 @@ void tst_Moc::invokable()
{
{
const QMetaObject &mobj = InvokableBeforeReturnType::staticMetaObject;
- QCOMPARE(mobj.methodCount(), 5);
- QVERIFY(mobj.method(4).signature() == QByteArray("foo()"));
+ QCOMPARE(mobj.methodCount(), 6);
+ QVERIFY(mobj.method(5).signature() == QByteArray("foo()"));
}
{
const QMetaObject &mobj = InvokableBeforeInline::staticMetaObject;
- QCOMPARE(mobj.methodCount(), 6);
- QVERIFY(mobj.method(4).signature() == QByteArray("foo()"));
- QVERIFY(mobj.method(5).signature() == QByteArray("bar()"));
+ QCOMPARE(mobj.methodCount(), 7);
+ QVERIFY(mobj.method(5).signature() == QByteArray("foo()"));
+ QVERIFY(mobj.method(6).signature() == QByteArray("bar()"));
}
}
@@ -1107,23 +1107,23 @@ void tst_Moc::singleFunctionKeywordSignalAndSlot()
{
{
const QMetaObject &mobj = SingleFunctionKeywordBeforeReturnType::staticMetaObject;
- QCOMPARE(mobj.methodCount(), 6);
- QVERIFY(mobj.method(4).signature() == QByteArray("mySignal()"));
- QVERIFY(mobj.method(5).signature() == QByteArray("mySlot()"));
+ QCOMPARE(mobj.methodCount(), 7);
+ QVERIFY(mobj.method(5).signature() == QByteArray("mySignal()"));
+ QVERIFY(mobj.method(6).signature() == QByteArray("mySlot()"));
}
{
const QMetaObject &mobj = SingleFunctionKeywordBeforeInline::staticMetaObject;
- QCOMPARE(mobj.methodCount(), 6);
- QVERIFY(mobj.method(4).signature() == QByteArray("mySignal()"));
- QVERIFY(mobj.method(5).signature() == QByteArray("mySlot()"));
+ QCOMPARE(mobj.methodCount(), 7);
+ QVERIFY(mobj.method(5).signature() == QByteArray("mySignal()"));
+ QVERIFY(mobj.method(6).signature() == QByteArray("mySlot()"));
}
{
const QMetaObject &mobj = SingleFunctionKeywordAfterInline::staticMetaObject;
- QCOMPARE(mobj.methodCount(), 6);
- QVERIFY(mobj.method(4).signature() == QByteArray("mySignal()"));
- QVERIFY(mobj.method(5).signature() == QByteArray("mySlot()"));
+ QCOMPARE(mobj.methodCount(), 7);
+ QVERIFY(mobj.method(5).signature() == QByteArray("mySignal()"));
+ QVERIFY(mobj.method(6).signature() == QByteArray("mySlot()"));
}
}
diff --git a/tests/auto/tools/moc/using-namespaces.h b/tests/auto/tools/moc/using-namespaces.h
index 6be9c283a3..52d15e7541 100644
--- a/tests/auto/tools/moc/using-namespaces.h
+++ b/tests/auto/tools/moc/using-namespaces.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h b/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h
index f6863bdde6..ae4ca10960 100644
--- a/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h
+++ b/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/warn-on-property-without-read.h b/tests/auto/tools/moc/warn-on-property-without-read.h
index 77fbedab14..c631b9da52 100644
--- a/tests/auto/tools/moc/warn-on-property-without-read.h
+++ b/tests/auto/tools/moc/warn-on-property-without-read.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/moc/win-newlines.h b/tests/auto/tools/moc/win-newlines.h
index 568cd300f7..0dd7366bbc 100644
--- a/tests/auto/tools/moc/win-newlines.h
+++ b/tests/auto/tools/moc/win-newlines.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/qmake.pro b/tests/auto/tools/qmake/qmake.pro
index d535c9c0b8..1d9c5bec6e 100644
--- a/tests/auto/tools/qmake/qmake.pro
+++ b/tests/auto/tools/qmake/qmake.pro
@@ -5,3 +5,5 @@ SOURCES += tst_qmake.cpp testcompiler.cpp
QT = core testlib
cross_compile: DEFINES += QMAKE_CROSS_COMPILED
+
+TESTDATA += testdata/*
diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp
index 1f21713b99..098c8c6d7c 100644
--- a/tests/auto/tools/qmake/testcompiler.cpp
+++ b/tests/auto/tools/qmake/testcompiler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testcompiler.h b/tests/auto/tools/qmake/testcompiler.h
index fa827685f7..7e8d7ecbe6 100644
--- a/tests/auto/tools/qmake/testcompiler.h
+++ b/tests/auto/tools/qmake/testcompiler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/main.cpp b/tests/auto/tools/qmake/testdata/findDeps/main.cpp
index f203909aa4..ab39567517 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/main.cpp
+++ b/tests/auto/tools/qmake/testdata/findDeps/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object1.h b/tests/auto/tools/qmake/testdata/findDeps/object1.h
index fe29c9d5d8..a2a9bc3978 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object1.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object1.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object2.h b/tests/auto/tools/qmake/testdata/findDeps/object2.h
index c03434a7a7..d055694a48 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object2.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object2.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object3.h b/tests/auto/tools/qmake/testdata/findDeps/object3.h
index 63fd98248a..d3e6ae685e 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object3.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object3.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object4.h b/tests/auto/tools/qmake/testdata/findDeps/object4.h
index d1191b72cb..8ef8458b50 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object4.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object4.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object5.h b/tests/auto/tools/qmake/testdata/findDeps/object5.h
index 3bce90fa0b..508ac33832 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object5.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object5.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object6.h b/tests/auto/tools/qmake/testdata/findDeps/object6.h
index 1c4bbd22b5..460f2ba6cd 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object6.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object6.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object7.h b/tests/auto/tools/qmake/testdata/findDeps/object7.h
index 8b0f328a30..19837add87 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object7.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object7.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object8.h b/tests/auto/tools/qmake/testdata/findDeps/object8.h
index d768e1d9b5..025e656a39 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object8.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object8.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object9.h b/tests/auto/tools/qmake/testdata/findDeps/object9.h
index 734437ad6f..8b8c84478b 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object9.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object9.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/main.cpp b/tests/auto/tools/qmake/testdata/findMocs/main.cpp
index 2413dcc2a1..ed2faacfba 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/main.cpp
+++ b/tests/auto/tools/qmake/testdata/findMocs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object1.h b/tests/auto/tools/qmake/testdata/findMocs/object1.h
index c62b314e14..1b3f3b6cba 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object1.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object1.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object2.h b/tests/auto/tools/qmake/testdata/findMocs/object2.h
index 8a873c3875..a95a971d98 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object2.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object2.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object3.h b/tests/auto/tools/qmake/testdata/findMocs/object3.h
index 6e61f1cb5f..c347385688 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object3.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object3.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object4.h b/tests/auto/tools/qmake/testdata/findMocs/object4.h
index 2e51228476..67814ee6eb 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object4.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object4.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object5.h b/tests/auto/tools/qmake/testdata/findMocs/object5.h
index d3addb2ddf..a17eaab6f4 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object5.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object5.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object6.h b/tests/auto/tools/qmake/testdata/findMocs/object6.h
index 17b56ac2ed..41b1d9635f 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object6.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object6.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object7.h b/tests/auto/tools/qmake/testdata/findMocs/object7.h
index 981a3d5689..a09faed78a 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object7.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object7.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/1.cpp b/tests/auto/tools/qmake/testdata/functions/1.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/1.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/2.cpp b/tests/auto/tools/qmake/testdata/functions/2.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/2.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/one/1.cpp b/tests/auto/tools/qmake/testdata/functions/one/1.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/one/1.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/one/1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/one/2.cpp b/tests/auto/tools/qmake/testdata/functions/one/2.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/one/2.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/one/2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp b/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp b/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/two/1.cpp b/tests/auto/tools/qmake/testdata/functions/two/1.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/two/1.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/two/1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/two/2.cpp b/tests/auto/tools/qmake/testdata/functions/two/2.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/two/2.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/two/2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp b/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp b/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp
index df92035b61..b7ac2c493e 100644
--- a/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/include_dir/main.cpp b/tests/auto/tools/qmake/testdata/include_dir/main.cpp
index 8471e367e9..f88dbac4fc 100644
--- a/tests/auto/tools/qmake/testdata/include_dir/main.cpp
+++ b/tests/auto/tools/qmake/testdata/include_dir/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp b/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
index 43807d0867..5c7dcc4825 100644
--- a/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/include_dir/test_file.h b/tests/auto/tools/qmake/testdata/include_dir/test_file.h
index 994874284e..cf8236084d 100644
--- a/tests/auto/tools/qmake/testdata/include_dir/test_file.h
+++ b/tests/auto/tools/qmake/testdata/include_dir/test_file.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/include_function/main.cpp b/tests/auto/tools/qmake/testdata/include_function/main.cpp
index 67224bf860..980b3b2eef 100644
--- a/tests/auto/tools/qmake/testdata/include_function/main.cpp
+++ b/tests/auto/tools/qmake/testdata/include_function/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/install_depends/main.cpp b/tests/auto/tools/qmake/testdata/install_depends/main.cpp
index 05d257f8b6..253be88814 100644
--- a/tests/auto/tools/qmake/testdata/install_depends/main.cpp
+++ b/tests/auto/tools/qmake/testdata/install_depends/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp b/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
index 0dc2d5b263..14b431f00d 100644
--- a/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/install_depends/test_file.h b/tests/auto/tools/qmake/testdata/install_depends/test_file.h
index d7f12ddbad..a00d395580 100644
--- a/tests/auto/tools/qmake/testdata/install_depends/test_file.h
+++ b/tests/auto/tools/qmake/testdata/install_depends/test_file.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/one_space/main.cpp b/tests/auto/tools/qmake/testdata/one_space/main.cpp
index a47ff9b99d..d75a55df27 100644
--- a/tests/auto/tools/qmake/testdata/one_space/main.cpp
+++ b/tests/auto/tools/qmake/testdata/one_space/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp b/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
index 91dfc156b9..5a64aad773 100644
--- a/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
+++ b/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/shadow_files/main.cpp b/tests/auto/tools/qmake/testdata/shadow_files/main.cpp
index 05d257f8b6..253be88814 100644
--- a/tests/auto/tools/qmake/testdata/shadow_files/main.cpp
+++ b/tests/auto/tools/qmake/testdata/shadow_files/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp b/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
index 0dc2d5b263..14b431f00d 100644
--- a/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/shadow_files/test_file.h b/tests/auto/tools/qmake/testdata/shadow_files/test_file.h
index d7f12ddbad..a00d395580 100644
--- a/tests/auto/tools/qmake/testdata/shadow_files/test_file.h
+++ b/tests/auto/tools/qmake/testdata/shadow_files/test_file.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_app/main.cpp b/tests/auto/tools/qmake/testdata/simple_app/main.cpp
index 697c7c050a..ef011a10b0 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/main.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_app/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp b/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
index 0dc2d5b263..14b431f00d 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_app/test_file.h b/tests/auto/tools/qmake/testdata/simple_app/test_file.h
index d7f12ddbad..a00d395580 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/test_file.h
+++ b/tests/auto/tools/qmake/testdata/simple_app/test_file.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp b/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
index 539725eb0b..a0a8911644 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple.h b/tests/auto/tools/qmake/testdata/simple_dll/simple.h
index 1a76482985..351b568923 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple.h
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp b/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
index 539725eb0b..a0a8911644 100644
--- a/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple.h b/tests/auto/tools/qmake/testdata/simple_lib/simple.h
index 912f028ced..ce9311e0a1 100644
--- a/tests/auto/tools/qmake/testdata/simple_lib/simple.h
+++ b/tests/auto/tools/qmake/testdata/simple_lib/simple.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp b/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
index 5597ef22cc..76e559325e 100644
--- a/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
+++ b/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp
index 697c7c050a..ef011a10b0 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp
index 0dc2d5b263..14b431f00d 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h
index d7f12ddbad..a00d395580 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp
index 539725eb0b..a0a8911644 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h
index 1a76482985..351b568923 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index 8de822b47a..03f7720c22 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -98,6 +98,15 @@ private:
tst_qmake::tst_qmake()
{
+}
+
+tst_qmake::~tst_qmake()
+{
+
+}
+
+void tst_qmake::initTestCase()
+{
QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
QString cmd = QString("%2/qmake \"QT_VERSION=%1\"").arg(QT_VERSION).arg(binpath);
#ifdef Q_CC_MSVC
@@ -109,17 +118,13 @@ tst_qmake::tst_qmake()
#else
test_compiler.setBaseCommands( "make", cmd );
#endif
- QDir dir;
- base_path = dir.currentPath();
-}
-
-tst_qmake::~tst_qmake()
-{
-
-}
-
-void tst_qmake::initTestCase()
-{
+ //Detect the location of the testdata
+ QString subProgram = QLatin1String("testdata/simple_app/main.cpp");
+ base_path = QFINDTESTDATA(subProgram);
+ if (base_path.lastIndexOf(subProgram) > 0)
+ base_path = base_path.left(base_path.lastIndexOf(subProgram));
+ else
+ base_path = QCoreApplication::applicationDirPath();
}
void tst_qmake::cleanupTestCase()
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp
index 90baf36b35..963ec75d75 100644
--- a/tests/auto/tools/rcc/tst_rcc.cpp
+++ b/tests/auto/tools/rcc/tst_rcc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui b/tests/auto/tools/uic/baseline/batchtranslation.ui
index 6cb2943606..e3103cb358 100644
--- a/tests/auto/tools/uic/baseline/batchtranslation.ui
+++ b/tests/auto/tools/uic/baseline/batchtranslation.ui
@@ -2,7 +2,7 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
index 29cefd5720..a2f65b58a9 100644
--- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h
+++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/config.ui b/tests/auto/tools/uic/baseline/config.ui
index bebe17b41f..e509a5dcc9 100644
--- a/tests/auto/tools/uic/baseline/config.ui
+++ b/tests/auto/tools/uic/baseline/config.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h
index 1b32b61796..cfaf7b7846 100644
--- a/tests/auto/tools/uic/baseline/config.ui.h
+++ b/tests/auto/tools/uic/baseline/config.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/finddialog.ui b/tests/auto/tools/uic/baseline/finddialog.ui
index 913a868ad1..b2d3c4097d 100644
--- a/tests/auto/tools/uic/baseline/finddialog.ui
+++ b/tests/auto/tools/uic/baseline/finddialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h
index 919eea42de..3f544c999d 100644
--- a/tests/auto/tools/uic/baseline/finddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/finddialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui b/tests/auto/tools/uic/baseline/formwindowsettings.ui
index fea18fe873..bca70a7fe1 100644
--- a/tests/auto/tools/uic/baseline/formwindowsettings.ui
+++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
index d84186bdbe..9e9edc08a6 100644
--- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
+++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui b/tests/auto/tools/uic/baseline/helpdialog.ui
index 133f3d2af4..7da10cd4f7 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui
@@ -2,7 +2,7 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h
index a1f10c221e..fa7bbe3810 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui b/tests/auto/tools/uic/baseline/listwidgeteditor.ui
index fa7d962bdb..0a38d8f65f 100644
--- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui
+++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
index 5da2aadbaa..a95f2cb860 100644
--- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui b/tests/auto/tools/uic/baseline/newactiondialog.ui
index ae6212f868..ef326fe63e 100644
--- a/tests/auto/tools/uic/baseline/newactiondialog.ui
+++ b/tests/auto/tools/uic/baseline/newactiondialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
index 05cd8b8279..d409ccb786 100644
--- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h
+++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/newform.ui b/tests/auto/tools/uic/baseline/newform.ui
index 3f0a92dfb1..d83aef26a2 100644
--- a/tests/auto/tools/uic/baseline/newform.ui
+++ b/tests/auto/tools/uic/baseline/newform.ui
@@ -2,7 +2,7 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h
index 3771bfac47..b744dd6869 100644
--- a/tests/auto/tools/uic/baseline/newform.ui.h
+++ b/tests/auto/tools/uic/baseline/newform.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui b/tests/auto/tools/uic/baseline/orderdialog.ui
index b44824778f..e95ac2906f 100644
--- a/tests/auto/tools/uic/baseline/orderdialog.ui
+++ b/tests/auto/tools/uic/baseline/orderdialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h
index 6745813f76..16fa98b6de 100644
--- a/tests/auto/tools/uic/baseline/orderdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui b/tests/auto/tools/uic/baseline/paletteeditor.ui
index 1cc6a18583..62b728267b 100644
--- a/tests/auto/tools/uic/baseline/paletteeditor.ui
+++ b/tests/auto/tools/uic/baseline/paletteeditor.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
index 681d6705b3..808295ddf6 100644
--- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h
+++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui b/tests/auto/tools/uic/baseline/phrasebookbox.ui
index 66558ea28a..95e92e4311 100644
--- a/tests/auto/tools/uic/baseline/phrasebookbox.ui
+++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
index dc3e4e1038..2b1c6222c1 100644
--- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
+++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui b/tests/auto/tools/uic/baseline/plugindialog.ui
index d4bec98834..924d506c2d 100644
--- a/tests/auto/tools/uic/baseline/plugindialog.ui
+++ b/tests/auto/tools/uic/baseline/plugindialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h
index 353470c484..bbde5ab416 100644
--- a/tests/auto/tools/uic/baseline/plugindialog.ui.h
+++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui b/tests/auto/tools/uic/baseline/previewwidget.ui
index d38ab7cf30..00bcfbe66c 100644
--- a/tests/auto/tools/uic/baseline/previewwidget.ui
+++ b/tests/auto/tools/uic/baseline/previewwidget.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h
index a3e4e4d0e5..84eba31b17 100644
--- a/tests/auto/tools/uic/baseline/previewwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui b/tests/auto/tools/uic/baseline/qfiledialog.ui
index 85f5991722..7994f104ac 100644
--- a/tests/auto/tools/uic/baseline/qfiledialog.ui
+++ b/tests/auto/tools/uic/baseline/qfiledialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
index 50a9de3cf6..75b03ed518 100644
--- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui b/tests/auto/tools/uic/baseline/qtgradientdialog.ui
index 0c5578fd0b..045806eb31 100644
--- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui
+++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
index 30af7cebc4..f9721bad0a 100644
--- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui b/tests/auto/tools/uic/baseline/qtgradienteditor.ui
index 472066b7fa..4754bc5899 100644
--- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui
+++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
index d53d4f9cc1..ca9de7f2a8 100644
--- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui
index c84907289b..4b02db52de 100644
--- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui
+++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
index e5491cbaf6..61c814964a 100644
--- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui b/tests/auto/tools/uic/baseline/saveformastemplate.ui
index 81d55d3b63..40ee76fbba 100644
--- a/tests/auto/tools/uic/baseline/saveformastemplate.ui
+++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
index 8c83f0f2e6..bf04e7b22c 100644
--- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
+++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/statistics.ui b/tests/auto/tools/uic/baseline/statistics.ui
index ba752e386a..359c6f7612 100644
--- a/tests/auto/tools/uic/baseline/statistics.ui
+++ b/tests/auto/tools/uic/baseline/statistics.ui
@@ -2,7 +2,7 @@
<class>Statistics</class>
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h
index a73ab6d3b3..76aadcce6d 100644
--- a/tests/auto/tools/uic/baseline/statistics.ui.h
+++ b/tests/auto/tools/uic/baseline/statistics.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui b/tests/auto/tools/uic/baseline/stringlisteditor.ui
index 96fff1c3ea..c6223a5f83 100644
--- a/tests/auto/tools/uic/baseline/stringlisteditor.ui
+++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
index 0278966d55..163e9a8613 100644
--- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui b/tests/auto/tools/uic/baseline/tabbedbrowser.ui
index 6bb608f79f..5b28dd85a4 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui
@@ -2,7 +2,7 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
index a4e28c8d22..00b6c9cdd6 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui
index ebd15a2f80..558e7e89ee 100644
--- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui
+++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
index 136c70ebc4..3d69f59938 100644
--- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui b/tests/auto/tools/uic/baseline/translatedialog.ui
index b1cd99cbe7..57a0a7a039 100644
--- a/tests/auto/tools/uic/baseline/translatedialog.ui
+++ b/tests/auto/tools/uic/baseline/translatedialog.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h
index 099bd7e8c8..3f66587f65 100644
--- a/tests/auto/tools/uic/baseline/translatedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui b/tests/auto/tools/uic/baseline/treewidgeteditor.ui
index 1256a0a2fa..6fdcc54625 100644
--- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui
+++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui
@@ -1,7 +1,7 @@
<ui version="4.0" >
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
index e8883ee67d..2aa95b8f0a 100644
--- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui b/tests/auto/tools/uic/baseline/trpreviewtool.ui
index 03441139ed..520442b348 100644
--- a/tests/auto/tools/uic/baseline/trpreviewtool.ui
+++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui
@@ -2,7 +2,7 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
index c984bcc2c7..196a820c55 100644
--- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
+++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp
index 3244e584f5..d298078487 100644
--- a/tests/auto/tools/uic/tst_uic.cpp
+++ b/tests/auto/tools/uic/tst_uic.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/v8/Makefile.nonqt b/tests/auto/v8/Makefile.nonqt
deleted file mode 100644
index ded1ba3a74..0000000000
--- a/tests/auto/v8/Makefile.nonqt
+++ /dev/null
@@ -1,16 +0,0 @@
-V8PATH = ../../../src/3rdparty/v8
-V8LIBPATH = $(V8PATH)
-V8INCPATH = $(V8PATH)/include
-SOURCES = v8main.cpp v8test.cpp
-
-release-m32:
- g++ -o v8test_release_m32 -m32 -O2 -I$(V8INCPATH) $(SOURCES) -lpthread -L$(V8LIBPATH) -lv8
-
-debug-m32:
- g++ -o v8test_debug_m32 -m32 -g -I$(V8INCPATH) $(SOURCES) -lpthread -L$(V8LIBPATH) -lv8_g
-
-release:
- g++ -o v8test_release -O2 -I$(V8INCPATH) $(SOURCES) -lpthread -L$(V8LIBPATH) -lv8
-
-debug:
- g++ -o v8test_debug -g -I$(V8INCPATH) $(SOURCES) -lpthread -L$(V8LIBPATH) -lv8_g
diff --git a/tests/auto/v8/README.txt b/tests/auto/v8/README.txt
deleted file mode 100644
index 097c459036..0000000000
--- a/tests/auto/v8/README.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-The v8 tests are actually implemented in v8test.[h|cpp]. There are also QtTest
-(tst_v8.cpp) and non-Qt (v8main.cpp) stubs provided to run these tests. This
-is done to allow the tests to be run both in the Qt CI system, and manually
-without a build of Qt. The latter is necessary to run them against more exotic
-build of V8, like the ARM simulator.
-
-To build the non-Qt version of the tests, first build a debug or release V8
-library under src/3rdparty/v8 using scons, and then use the Makefile.nonqt
-makefile selecting one of the following targets:
- release: Build the tests with -O2 and link against libv8
- debug: Build the tests with -g and link against libv8_g
- release-m32: Build the tests with -O2 -m32 and link against libv8
- debug-m32: Build the tests with -g -m32 and link against libv8_g
diff --git a/tests/auto/v8/v8.pro b/tests/auto/v8/v8.pro
deleted file mode 100644
index 493ea8e1cb..0000000000
--- a/tests/auto/v8/v8.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-CONFIG += testcase
-TARGET = tst_v8
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_v8.cpp v8test.cpp
-HEADERS += v8test.h
-
-CONFIG += parallel_test
-
-QT = core v8-private testlib
diff --git a/tests/auto/v8/v8test.cpp b/tests/auto/v8/v8test.cpp
deleted file mode 100644
index 3792679272..0000000000
--- a/tests/auto/v8/v8test.cpp
+++ /dev/null
@@ -1,379 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "v8test.h"
-
-using namespace v8;
-
-#define BEGINTEST() bool _testPassed = true;
-#define ENDTEST() return _testPassed;
-
-#define VERIFY(expr) { \
- if (!(expr)) { \
- fprintf(stderr, "FAIL: %s:%d %s\n", __FILE__, __LINE__, # expr); \
- _testPassed = false; \
- goto cleanup; \
- } \
-}
-
-struct MyStringResource : public String::ExternalAsciiStringResource
-{
- static bool wasDestroyed;
- virtual ~MyStringResource() { wasDestroyed = true; }
- virtual const char* data() const { return "v8test"; }
- virtual size_t length() const { return 6; }
-};
-bool MyStringResource::wasDestroyed = false;
-
-struct MyResource : public Object::ExternalResource
-{
- static bool wasDestroyed;
- virtual ~MyResource() { wasDestroyed = true; }
-};
-bool MyResource::wasDestroyed = false;
-
-bool v8test_externalteardown()
-{
- BEGINTEST();
-
- Isolate *isolate = v8::Isolate::New();
- isolate->Enter();
-
- {
- HandleScope handle_scope;
- Persistent<Context> context = Context::New();
- Context::Scope context_scope(context);
-
- String::NewExternal(new MyStringResource);
-
- Local<FunctionTemplate> ft = FunctionTemplate::New();
- ft->InstanceTemplate()->SetHasExternalResource(true);
-
- Local<Object> obj = ft->GetFunction()->NewInstance();
- obj->SetExternalResource(new MyResource);
-
- context.Dispose();
- }
-
- // while (!v8::V8::IdleNotification()) ;
- isolate->Exit();
- isolate->Dispose();
-
- // ExternalString resources aren't guaranteed to be freed by v8 at this
- // point. Uncommenting the IdleNotification() line above helps.
-// VERIFY(MyStringResource::wasDestroyed);
-
- VERIFY(MyResource::wasDestroyed);
-
-cleanup:
-
- ENDTEST();
-}
-
-bool v8test_eval()
-{
- BEGINTEST();
-
- HandleScope handle_scope;
- Persistent<Context> context = Context::New();
- Context::Scope context_scope(context);
-
- Local<Object> qmlglobal = Object::New();
- qmlglobal->Set(String::New("a"), Integer::New(1922));
-
- Local<Script> script = Script::Compile(String::New("eval(\"a\")"), NULL, NULL,
- Handle<String>(), Script::QmlMode);
-
- TryCatch tc;
- Local<Value> result = script->Run(qmlglobal);
-
- VERIFY(!tc.HasCaught());
- VERIFY(result->Int32Value() == 1922);
-
-cleanup:
- context.Dispose();
-
- ENDTEST();
-}
-
-bool v8test_globalcall()
-{
- BEGINTEST();
-
- HandleScope handle_scope;
- Persistent<Context> context = Context::New();
- Context::Scope context_scope(context);
-
- Local<Object> qmlglobal = Object::New();
-
-#define SOURCE "function func1() { return 1; }\n" \
- "function func2() { var sum = 0; for (var ii = 0; ii < 10000000; ++ii) { sum += func1(); } return sum; }\n" \
- "func2();"
-
- Local<Script> script = Script::Compile(String::New(SOURCE), NULL, NULL,
- Handle<String>(), Script::QmlMode);
- Local<Value> result = script->Run(qmlglobal);
- VERIFY(!result.IsEmpty());
- VERIFY(result->IsInt32());
- VERIFY(result->Int32Value() == 10000000);
-
-#undef SOURCE
-
-cleanup:
- context.Dispose();
-
- ENDTEST();
-}
-
-bool v8test_evalwithinwith()
-{
- BEGINTEST();
-
- HandleScope handle_scope;
- Persistent<Context> context = Context::New();
- Context::Scope context_scope(context);
-
- Local<Object> qmlglobal = Object::New();
- qmlglobal->Set(String::New("a"), Integer::New(1922));
- // There was a bug that the "eval" lookup would incorrectly resolve
- // to the QML global object
- qmlglobal->Set(String::New("eval"), Integer::New(1922));
-
-#define SOURCE \
- "(function() { " \
- " var b = { c: 10 }; " \
- " with (b) { " \
- " return eval(\"a\"); " \
- " } " \
- "})"
- Local<Script> script = Script::Compile(String::New(SOURCE), NULL, NULL,
- Handle<String>(), Script::QmlMode);
-#undef SOURCE
-
- TryCatch tc;
- Local<Value> result = script->Run(qmlglobal);
-
- VERIFY(!tc.HasCaught());
- VERIFY(result->IsFunction());
-
- {
- Local<Value> fresult = Handle<Function>::Cast(result)->Call(context->Global(), 0, 0);
- VERIFY(!tc.HasCaught());
- VERIFY(fresult->Int32Value() == 1922);
- }
-
-cleanup:
- context.Dispose();
-
- ENDTEST();
-}
-
-static int userObjectComparisonCalled = 0;
-static bool userObjectComparisonReturn = false;
-static Local<Object> expectedLhs;
-static Local<Object> expectedRhs;
-static bool expectedObjectsCompared = false;
-
-#define SET_EXPECTED(lhs, rhs) { \
- expectedObjectsCompared = false; \
- expectedLhs = lhs; \
- expectedRhs = rhs; \
-}
-
-static bool UserObjectComparison(Local<Object> lhs, Local<Object> rhs)
-{
- userObjectComparisonCalled++;
-
- expectedObjectsCompared = (lhs == expectedLhs && rhs == expectedRhs);
-
- return userObjectComparisonReturn;
-}
-
-inline bool runscript(const char *source) {
- Local<Script> script = Script::Compile(String::New(source));
- Local<Value> result = script->Run();
- return result->BooleanValue();
-}
-
-bool v8test_userobjectcompare()
-{
- BEGINTEST();
-
- HandleScope handle_scope;
- Persistent<Context> context = Context::New();
- Context::Scope context_scope(context);
-
- V8::SetUserObjectComparisonCallbackFunction(UserObjectComparison);
-
- Local<ObjectTemplate> ot = ObjectTemplate::New();
- ot->MarkAsUseUserObjectComparison();
-
- Local<Object> uoc1 = ot->NewInstance();
- Local<Object> uoc2 = ot->NewInstance();
- context->Global()->Set(String::New("uoc1a"), uoc1);
- context->Global()->Set(String::New("uoc1b"), uoc1);
- context->Global()->Set(String::New("uoc2"), uoc2);
- Local<Object> obj1 = Object::New();
- context->Global()->Set(String::New("obj1a"), obj1);
- context->Global()->Set(String::New("obj1b"), obj1);
- context->Global()->Set(String::New("obj2"), Object::New());
- Local<String> string1 = String::New("Hello World");
- context->Global()->Set(String::New("string1a"), string1);
- context->Global()->Set(String::New("string1b"), string1);
- context->Global()->Set(String::New("string2"), v8::String::New("Goodbye World"));
-
- // XXX Opportunity for optimization - don't invoke user callback if objects are
- // equal.
-#if 0
- userObjectComparisonCalled = 0; userObjectComparisonReturn = false;
- VERIFY(true == runscript("uoc1a == uoc1b"));
- VERIFY(userObjectComparisonCalled == 0);
-#endif
-
- // Comparing two uoc objects invokes uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- VERIFY(false == runscript("uoc1a == uoc2"));
- VERIFY(userObjectComparisonCalled == 1);
-
- VERIFY(false == runscript("uoc2 == uoc1a"));
- VERIFY(userObjectComparisonCalled == 2);
- userObjectComparisonReturn = true;
- VERIFY(true == runscript("uoc1a == uoc2"));
- VERIFY(userObjectComparisonCalled == 3);
- VERIFY(true == runscript("uoc2 == uoc1a"));
- VERIFY(userObjectComparisonCalled == 4);
-
- // != on two uoc object invokes uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- VERIFY(true == runscript("uoc1a != uoc2"));
- VERIFY(userObjectComparisonCalled == 1);
- VERIFY(true == runscript("uoc2 != uoc1a"));
- VERIFY(userObjectComparisonCalled == 2);
- userObjectComparisonReturn = true;
- VERIFY(false == runscript("uoc1a != uoc2"));
- VERIFY(userObjectComparisonCalled == 3);
- VERIFY(false == runscript("uoc2 != uoc1a"));
- VERIFY(userObjectComparisonCalled == 4);
-
- // Comparison against a non-object doesn't invoke uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- VERIFY(false == runscript("uoc1a == string1a"));
- VERIFY(userObjectComparisonCalled == 0);
- VERIFY(false == runscript("string1a == uoc1a"));
- VERIFY(userObjectComparisonCalled == 0);
- VERIFY(false == runscript("2 == uoc1a"));
- VERIFY(userObjectComparisonCalled == 0);
- VERIFY(true == runscript("uoc1a != string1a"));
- VERIFY(userObjectComparisonCalled == 0);
- VERIFY(true == runscript("string1a != uoc1a"));
- VERIFY(userObjectComparisonCalled == 0);
- VERIFY(true == runscript("2 != uoc1a"));
- VERIFY(userObjectComparisonCalled == 0);
-
- // Comparison against a non-uoc-object still invokes uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- VERIFY(false == runscript("uoc1a == obj1a"));
- VERIFY(userObjectComparisonCalled == 1);
- VERIFY(false == runscript("obj1a == uoc1a"));
- VERIFY(userObjectComparisonCalled == 2);
- userObjectComparisonReturn = true;
- VERIFY(true == runscript("uoc1a == obj1a"));
- VERIFY(userObjectComparisonCalled == 3);
- VERIFY(true == runscript("obj1a == uoc1a"));
- VERIFY(userObjectComparisonCalled == 4);
-
- // != comparison against a non-uoc-object still invokes uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- VERIFY(true == runscript("uoc1a != obj1a"));
- VERIFY(userObjectComparisonCalled == 1);
- VERIFY(true == runscript("obj1a != uoc1a"));
- VERIFY(userObjectComparisonCalled == 2);
- userObjectComparisonReturn = true;
- VERIFY(false == runscript("uoc1a != obj1a"));
- VERIFY(userObjectComparisonCalled == 3);
- VERIFY(false == runscript("obj1a != uoc1a"));
- VERIFY(userObjectComparisonCalled == 4);
-
- // Comparing two non-uoc objects does not invoke uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- VERIFY(true == runscript("obj1a == obj1a"));
- VERIFY(true == runscript("obj1a == obj1b"));
- VERIFY(false == runscript("obj1a == obj2"));
- VERIFY(false == runscript("obj1a == string1a"));
- VERIFY(true == runscript("string1a == string1a"));
- VERIFY(true == runscript("string1a == string1b"));
- VERIFY(false == runscript("string1a == string2"));
- VERIFY(userObjectComparisonCalled == 0);
-
- // Correct lhs and rhs passed to uoc
- userObjectComparisonCalled = 0;
- userObjectComparisonReturn = false;
- SET_EXPECTED(uoc1, uoc2);
- VERIFY(false == runscript("uoc1a == uoc2"));
- VERIFY(true == expectedObjectsCompared);
- SET_EXPECTED(uoc2, uoc1);
- VERIFY(false == runscript("uoc2 == uoc1a"));
- VERIFY(true == expectedObjectsCompared);
- SET_EXPECTED(uoc1, uoc2);
- VERIFY(true == runscript("uoc1a != uoc2"));
- VERIFY(true == expectedObjectsCompared);
- SET_EXPECTED(uoc2, uoc1);
- VERIFY(true == runscript("uoc2 != uoc1a"));
- VERIFY(true == expectedObjectsCompared);
- SET_EXPECTED(uoc1, obj1);
- VERIFY(false == runscript("uoc1a == obj1a"));
- VERIFY(true == expectedObjectsCompared);
- SET_EXPECTED(obj1, uoc1);
- VERIFY(false == runscript("obj1a == uoc1a"));
- VERIFY(true == expectedObjectsCompared);
-
-cleanup:
- V8::SetUserObjectComparisonCallbackFunction(0);
- context.Dispose();
-
- ENDTEST();
-}
diff --git a/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp b/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp
index 5e60b6a888..c3ede37e7f 100644
--- a/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp
+++ b/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
index 1b1b7137eb..f972bb3054 100644
--- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
+++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index 0ebe27f053..2a17cb4efc 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -170,10 +170,10 @@ void tst_QDialog::showExtension_data()
QTest::addColumn<QSize>("result");
//next we fill it with data
- QTest::newRow( "data0" ) << QSize(100,100) << QSize(50,50) << (bool)FALSE << QSize(100,150);
- QTest::newRow( "data1" ) << QSize(100,100) << QSize(120,50) << (bool)FALSE << QSize(120,150);
- QTest::newRow( "data2" ) << QSize(100,100) << QSize(50,50) << (bool)TRUE << QSize(150,100);
- QTest::newRow( "data3" ) << QSize(100,100) << QSize(50,120) << (bool)TRUE << QSize(150,120);
+ QTest::newRow( "data0" ) << QSize(100,100) << QSize(50,50) << false << QSize(100,150);
+ QTest::newRow( "data1" ) << QSize(100,100) << QSize(120,50) << false << QSize(120,150);
+ QTest::newRow( "data2" ) << QSize(100,100) << QSize(50,50) << true << QSize(150,100);
+ QTest::newRow( "data3" ) << QSize(100,100) << QSize(50,120) << true << QSize(150,120);
}
void tst_QDialog::showExtension()
@@ -193,7 +193,7 @@ void tst_QDialog::showExtension()
QPoint oldPosition = testWidget->pos();
// show
- ((DummyDialog*)testWidget)->showExtension( TRUE );
+ ((DummyDialog*)testWidget)->showExtension( true );
// while ( testWidget->size() == dlgSize )
// qApp->processEvents();
@@ -202,7 +202,7 @@ void tst_QDialog::showExtension()
QCOMPARE(testWidget->pos(), oldPosition);
// hide extension. back to old size ?
- ((DummyDialog*)testWidget)->showExtension( FALSE );
+ ((DummyDialog*)testWidget)->showExtension( false );
QCOMPARE( testWidget->size(), dlgSize );
testWidget->setExtension( 0 );
@@ -214,14 +214,14 @@ void tst_QDialog::defaultButtons()
QPushButton *push = new QPushButton("Button 1", testWidget);
QPushButton *pushTwo = new QPushButton("Button 2", testWidget);
QPushButton *pushThree = new QPushButton("Button 3", testWidget);
- pushThree->setAutoDefault(FALSE);
+ pushThree->setAutoDefault(false);
//we need to show the buttons. Otherwise they won't get the focus
push->show();
pushTwo->show();
pushThree->show();
- push->setDefault(TRUE);
+ push->setDefault(true);
QVERIFY(push->isDefault());
pushTwo->setFocus();
@@ -231,7 +231,7 @@ void tst_QDialog::defaultButtons()
lineEdit->setFocus();
QVERIFY(push->isDefault());
- pushTwo->setDefault(TRUE);
+ pushTwo->setDefault(true);
QVERIFY(pushTwo->isDefault());
pushTwo->setFocus();
diff --git a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
index d3ee640b1a..cdf53c361e 100644
--- a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
+++ b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index 41f4798709..c2d21c2cf1 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index bac6b82d37..3ea66c5729 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -931,7 +931,7 @@ void tst_QFileDialog2::task251341_sideBarRemoveEntries()
QCOMPARE(qvariant_cast<bool>(value), false);
MyQSideBar mySideBar;
- mySideBar.init(model, urls);
+ mySideBar.setModelAndUrls(model, urls);
mySideBar.show();
mySideBar.selectUrl(QUrl::fromLocalFile(testSubDir.absolutePath()));
QTest::qWait(1000);
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 5e02dec28b..dbd1cfa016 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index 855cc14095..d97d32698c 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -119,10 +119,10 @@ void tst_QFontDialog::postKeyReturn() {
void tst_QFontDialog::defaultOkButton()
{
- bool ok = FALSE;
+ bool ok = false;
QTimer::singleShot(2000, this, SLOT(postKeyReturn()));
QFontDialog::getFont(&ok);
- QVERIFY(ok == TRUE);
+ QVERIFY(ok);
}
@@ -132,7 +132,7 @@ void tst_QFontDialog::setFont()
while the font dialog was open.
Task #27662
*/
- bool ok = FALSE;
+ bool ok = false;
#if defined Q_OS_HPUX
QString fontName = "Courier";
int fontSize = 25;
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm
index d12f696f7e..d10c789aec 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
index 91b55cdc20..0a62ac3099 100644
--- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index 20cbdfbed4..b41a41124b 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
index bccf9ac153..281a028835 100644
--- a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
+++ b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
index bb4c671d43..77a7baaf94 100644
--- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
+++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -84,7 +84,7 @@ void tst_QSidebar::setUrls()
QList<QUrl> urls;
QFileSystemModel fsmodel;
QSidebar qsidebar;
- qsidebar.init(&fsmodel, urls);
+ qsidebar.setModelAndUrls(&fsmodel, urls);
QAbstractItemModel *model = qsidebar.model();
urls << QUrl::fromLocalFile(QDir::rootPath())
@@ -105,7 +105,7 @@ void tst_QSidebar::selectUrls()
<< QUrl::fromLocalFile(QDir::temp().absolutePath());
QFileSystemModel fsmodel;
QSidebar qsidebar;
- qsidebar.init(&fsmodel, urls);
+ qsidebar.setModelAndUrls(&fsmodel, urls);
QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(const QUrl &)));
qsidebar.selectUrl(urls.at(0));
@@ -117,7 +117,7 @@ void tst_QSidebar::addUrls()
QList<QUrl> emptyUrls;
QFileSystemModel fsmodel;
QSidebar qsidebar;
- qsidebar.init(&fsmodel, emptyUrls);
+ qsidebar.setModelAndUrls(&fsmodel, emptyUrls);
QAbstractItemModel *model = qsidebar.model();
QDir testDir = QDir::home();
@@ -214,7 +214,7 @@ void tst_QSidebar::goToUrl()
<< QUrl::fromLocalFile(QDir::temp().absolutePath());
QFileSystemModel fsmodel;
QSidebar qsidebar;
- qsidebar.init(&fsmodel, urls);
+ qsidebar.setModelAndUrls(&fsmodel, urls);
qsidebar.show();
QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(const QUrl &)));
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index 1b109223b6..c00d42bacd 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -855,7 +855,7 @@ public:
void cleanupPage() { ++cleanup; QWizardPage::cleanupPage(); }
bool validatePage() { ++validate; return QWizardPage::validatePage(); }
- bool check(int init, int cleanup)
+ bool sanityCheck(int init, int cleanup)
{
return init == this->init
&& cleanup == this->cleanup
@@ -868,9 +868,9 @@ public:
};
#define CHECK_PAGE_INIT(i0, c0, i1, c1, i2, c2) \
- QVERIFY(page0->check((i0), (c0))); \
- QVERIFY(page1->check((i1), (c1))); \
- QVERIFY(page2->check((i2), (c2)));
+ QVERIFY(page0->sanityCheck((i0), (c0))); \
+ QVERIFY(page1->sanityCheck((i1), (c1))); \
+ QVERIFY(page2->sanityCheck((i2), (c2)));
void tst_QWizard::setOption_IndependentPages()
{
diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
index a5214832c9..3ebc4dc5cb 100644
--- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 6bf2f0b733..54b9355777 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1377,8 +1377,8 @@ void tst_QGraphicsAnchorLayout::stability()
//static const int primes[] = {2, 3, 5, 13, 89, 233, 1597, 28657, 514229}; // fibo primes
//const int primeCount = sizeof(primes)/sizeof(int);
//int alloc = primes[pass % primeCount] + pass;
- //void *mem = qMalloc(alloc);
- //qFree(mem);
+ //void *mem = malloc(alloc);
+ //free(mem);
QGraphicsAnchorLayout *l = createAmbiguousS60Layout();
p->setLayout(l);
QSizeF layoutMinimumSize = l->effectiveSizeHint(Qt::MinimumSize);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index 05f08e8719..0fd19c417f 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index a69440da50..6b90404255 100644
--- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -122,7 +122,7 @@ public:
source()->draw(painter);
}
- void sourceChanged()
+ void sourceChanged(ChangeFlags)
{ m_sourceChanged = true; }
void sourceBoundingRectChanged()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 2247173c7f..42e0caa6a6 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index 8474293a54..28ee69a36c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -61,7 +61,6 @@
#include <QScrollBar>
#include <QVBoxLayout>
#include <QGraphicsEffect>
-#include <QInputContext>
#include <QPushButton>
#include <QLineEdit>
#include <QGraphicsLinearLayout>
@@ -440,7 +439,6 @@ private slots:
void modality_keyEvents();
void itemIsInFront();
void scenePosChange();
- void updateMicroFocus();
void textItem_shortcuts();
void scroll();
void focusHandling_data();
@@ -10436,86 +10434,6 @@ void tst_QGraphicsItem::scenePosChange()
QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
}
-class MyInputContext : public QInputContext
-{
-public:
- MyInputContext() : nbUpdates(0) {}
- ~MyInputContext() {}
-
- QString identifierName() { return QString(); }
- QString language() { return QString(); }
-
- void reset() {}
-
- bool isComposing() const { return false; }
-
- void update() { nbUpdates++; }
-
- bool nbUpdates;
-};
-
-class MyInputWidget : public QGraphicsWidget
-{
-public:
- MyInputWidget()
- {
- setFlag(QGraphicsItem::ItemIsFocusable, true);
- setFlag(QGraphicsItem::ItemAcceptsInputMethod, true);
- }
- void mousePressEvent(QGraphicsSceneMouseEvent *event)
- {
- event->accept();
- }
-
- void doUpdateMicroFocus()
- {
- if (QWidget *fw = QApplication::focusWidget()) {
- if (scene()) {
- for (int i = 0 ; i < scene()->views().count() ; ++i) {
- if (scene()->views().at(i) == fw) {
- if (QInputContext *inputContext = fw->inputContext()) {
- inputContext->update();
- }
- }
- }
- }
- }
- }
-};
-
-void tst_QGraphicsItem::updateMicroFocus()
-{
-#if defined Q_OS_WIN || defined Q_OS_MAC
- QSKIP("QTBUG-9578");
-#endif
- QGraphicsScene scene;
- QWidget parent;
- QGridLayout layout;
- parent.setLayout(&layout);
- QGraphicsView view(&scene);
- QGraphicsView view2(&scene);
- layout.addWidget(&view, 0, 0);
- layout.addWidget(&view2, 0, 1);
- MyInputContext *ic = new MyInputContext;
- qApp->setInputContext(ic);
- MyInputWidget input;
- input.setPos(0, 0);
- input.resize(150, 150);
- scene.addItem(&input);
- input.setFocus();
- parent.show();
- view.setFocus();
- qApp->setAutoSipEnabled(true);
- QApplication::setActiveWindow(&parent);
- QTest::qWaitForWindowShown(&parent);
- QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&parent));
- //We reset the number of updates that happened previously (initialisation)
- ic->nbUpdates = 0;
- input.doUpdateMicroFocus();
- QApplication::processEvents();
- QTRY_COMPARE(ic->nbUpdates, 1);
-}
-
void tst_QGraphicsItem::textItem_shortcuts()
{
QWidget w;
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
index 6785ca5620..0344755480 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index a4f375ec25..d640ce7bea 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
index a8b6c0854e..bdcb3c8ad9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 3c458b0ead..c708ae7e27 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp b/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
index 85e36b74b2..40581f28e9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
index b2dccb0b09..a76b5dfd56 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
index 061b3eda81..36e45fcddd 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 3f782d0808..4cd32a9186 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index dc1e1cb804..f1afb9ff69 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,6 +51,8 @@
#include <private/qgraphicssceneindex_p.h>
#include <math.h>
#include "../../../gui/painting/qpathclipper/pathcompare.h"
+#include "../../shared/platforminputcontext.h"
+#include <private/qinputpanel_p.h>
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
#include <windows.h>
@@ -186,6 +188,7 @@ class tst_QGraphicsScene : public QObject
Q_OBJECT
public slots:
void initTestCase();
+ void cleanup();
private slots:
void construction();
@@ -289,6 +292,13 @@ void tst_QGraphicsScene::initTestCase()
#endif
}
+void tst_QGraphicsScene::cleanup()
+{
+ // ensure not even skipped tests with custom input context leave it dangling
+ QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
+ inputPanelPrivate->testContext = 0;
+}
+
void tst_QGraphicsScene::construction()
{
QGraphicsScene scene;
@@ -3070,7 +3080,7 @@ void tst_QGraphicsScene::tabFocus_sceneWithFocusableItems()
item->setFocus();
item->clearFocus();
- QGraphicsTextItem *item2 = scene.addText("Trolltech rocks!");
+ QGraphicsTextItem *item2 = scene.addText("Qt rocks!");
item2->setTabChangesFocus(true);
item2->setTextInteractionFlags(Qt::TextEditorInteraction);
item2->setPos(0, item->boundingRect().bottom());
@@ -3753,25 +3763,12 @@ public:
mutable int queryCalls;
};
-class TestInputContext : public QInputContext
-{
-public:
- TestInputContext() {}
-
- QString identifierName() { return QString(); }
- QString language() { return QString(); }
-
- void reset() {
- ++resetCalls;
- sendEvent(QInputMethodEvent()); }
-
- bool isComposing() const { return false; }
-
- int resetCalls;
-};
-
void tst_QGraphicsScene::inputMethod()
{
+ PlatformInputContext inputContext;
+ QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
+ inputPanelPrivate->testContext = &inputContext;
+
QFETCH(int, flags);
QFETCH(bool, callFocusItem);
@@ -3780,21 +3777,19 @@ void tst_QGraphicsScene::inputMethod()
QGraphicsScene scene;
QGraphicsView view(&scene);
- TestInputContext *inputContext = new TestInputContext;
- qApp->setInputContext(inputContext);
view.show();
QApplication::setActiveWindow(&view);
view.setFocus();
QTest::qWaitForWindowShown(&view);
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
- inputContext->resetCalls = 0;
+ inputContext.m_resetCallCount = 0;
scene.addItem(item);
QInputMethodEvent event;
scene.setFocusItem(item);
QCOMPARE(!!(item->flags() & QGraphicsItem::ItemIsFocusable), scene.focusItem() == item);
- QCOMPARE(inputContext->resetCalls, 0);
+ QCOMPARE(inputContext.m_resetCallCount, 0);
item->eventCalls = 0;
qApp->sendEvent(&scene, &event);
@@ -3807,9 +3802,7 @@ void tst_QGraphicsScene::inputMethod()
scene.setFocusItem(0);
// the input context is reset twice, once because an item has lost focus and again because
// the Qt::WA_InputMethodEnabled flag is cleared because no item has focus.
- QEXPECT_FAIL("3", "QTBUG-22456", Abort);
- QCOMPARE(inputContext->resetCalls, callFocusItem ? 2 : 0);
- QCOMPARE(item->eventCalls, callFocusItem ? 2 : 0); // verify correct delivery of "reset" event
+ QCOMPARE(inputContext.m_resetCallCount, callFocusItem ? 2 : 0);
QCOMPARE(item->queryCalls, callFocusItem ? 1 : 0); // verify that value is unaffected
item->eventCalls = 0;
diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
index 56d2508840..a318141d07 100644
--- a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
index 7d5a9578ad..156adec6a7 100644
--- a/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
index 20cff5500a..e3a6edd682 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
@@ -6,3 +6,5 @@ QT += core-private gui-private
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
DEFINES += QT_NO_CAST_TO_ASCII
+
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index bf8ece42e2..9066ded329 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -68,10 +68,11 @@
#include <QtWidgets/QBoxLayout>
#include <QtWidgets/QStyle>
#include <QtWidgets/QPushButton>
-#include <QtWidgets/QInputContext>
#include <QtWidgets/QDesktopWidget>
#include <private/qgraphicsview_p.h>
#include "../../../platformquirks.h"
+#include "../../shared/platforminputcontext.h"
+#include <private/qinputpanel_p.h>
Q_DECLARE_METATYPE(QList<int>)
Q_DECLARE_METATYPE(QList<QRectF>)
@@ -141,6 +142,7 @@ class tst_QGraphicsView : public QObject
private slots:
void initTestCase();
+ void cleanup();
void construction();
void renderHints();
void alignment();
@@ -259,6 +261,13 @@ void tst_QGraphicsView::initTestCase()
#endif
}
+void tst_QGraphicsView::cleanup()
+{
+ // ensure not even skipped tests with custom input context leave it dangling
+ QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
+ inputPanelPrivate->testContext = 0;
+}
+
void tst_QGraphicsView::construction()
{
QGraphicsView view;
@@ -4100,26 +4109,16 @@ void tst_QGraphicsView::inputMethodSensitivity()
QCOMPARE(scene.focusItem(), static_cast<QGraphicsItem *>(item));
}
-class InputContextTester : public QInputContext
-{
- Q_OBJECT
-public:
- QString identifierName() { return QString(); }
- bool isComposing() const { return false; }
- QString language() { return QString(); }
- void reset() { ++resets; }
- int resets;
-};
-
void tst_QGraphicsView::inputContextReset()
{
+ PlatformInputContext inputContext;
+ QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
+ inputPanelPrivate->testContext = &inputContext;
+
QGraphicsScene scene;
QGraphicsView view(&scene);
QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
- InputContextTester *inputContext = new InputContextTester;
- qApp->setInputContext(inputContext);
-
view.show();
QTest::qWaitForWindowShown(&view);
QApplication::setActiveWindow(&view);
@@ -4128,40 +4127,40 @@ void tst_QGraphicsView::inputContextReset()
QGraphicsItem *item1 = new QGraphicsRectItem;
item1->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemAcceptsInputMethod);
- inputContext->resets = 0;
+ inputContext.m_resetCallCount = 0;
scene.addItem(item1);
- QCOMPARE(inputContext->resets, 0);
+ QCOMPARE(inputContext.m_resetCallCount, 0);
- inputContext->resets = 0;
+ inputContext.m_resetCallCount = 0;
scene.setFocusItem(item1);
QCOMPARE(scene.focusItem(), (QGraphicsItem *)item1);
QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
- QCOMPARE(inputContext->resets, 0);
+ QCOMPARE(inputContext.m_resetCallCount, 0);
- inputContext->resets = 0;
+ inputContext.m_resetCallCount = 0;
scene.setFocusItem(0);
// the input context is reset twice, once because an item has lost focus and again because
// the Qt::WA_InputMethodEnabled flag is cleared because no item has focus.
- QEXPECT_FAIL("", "QTBUG-22454", Abort);
- QCOMPARE(inputContext->resets, 2);
+ // QEXPECT_FAIL("", "QTBUG-22454", Abort);
+ QCOMPARE(inputContext.m_resetCallCount, 2);
// introduce another item that is focusable but does not accept input methods
QGraphicsItem *item2 = new QGraphicsRectItem;
item2->setFlags(QGraphicsItem::ItemIsFocusable);
scene.addItem(item2);
- inputContext->resets = 0;
+ inputContext.m_resetCallCount = 0;
scene.setFocusItem(item2);
- QCOMPARE(inputContext->resets, 0);
+ QCOMPARE(inputContext.m_resetCallCount, 0);
- inputContext->resets = 0;
+ inputContext.m_resetCallCount = 0;
scene.setFocusItem(item1);
- QCOMPARE(inputContext->resets, 0);
+ QCOMPARE(inputContext.m_resetCallCount, 0);
// test changing between between items that accept input methods.
item2->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemAcceptsInputMethod);
scene.setFocusItem(item2);
- QCOMPARE(inputContext->resets, 1);
+ QCOMPARE(inputContext.m_resetCallCount, 1);
}
void tst_QGraphicsView::indirectPainting()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
index 122ffbc875..7f056e6700 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,23 +39,11 @@
**
****************************************************************************/
#include <QtTest/QtTest>
-#include <QSize>
-#include <QRectF>
-#include <QTransform>
-
-#ifdef Q_OS_WINCE
-#include <qguifunctions_wince.h>
-
-bool qt_wince_is_high_dpi() {
- HDC deviceContext = GetDC(0);
- int dpi = GetDeviceCaps(deviceContext, LOGPIXELSX);
- ReleaseDC(0, deviceContext);
- if ((dpi < 1000) && (dpi > 0))
- return dpi > 96;
- else
- return false;
-}
-#endif
+#include <QtCore/QSize>
+#include <QtCore/QRectF>
+#include <QtGui/QTransform>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QScreen>
Q_DECLARE_METATYPE(QList<int>)
Q_DECLARE_METATYPE(QList<QRectF>)
@@ -286,7 +274,7 @@ static void _scrollBarRanges_data_1(int offset)
<< -200 << (50 + 16) << -200 << (100 + 16) << false << false;
}
-static void _scrollBarRanges_data_2(int offset)
+static void _scrollBarRangesMotif_data_1(int offset)
{
// Motif, flat frame
QTest::newRow("Motif, 1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform()
@@ -507,7 +495,7 @@ static void _scrollBarRanges_data_2(int offset)
<< -200 << (50 + 16) << -200 << (100 + 16) << true << false;
}
-static void _scrollBarRanges_data_3(int offset)
+static void _scrollBarRanges_data_2(int offset)
{
// No motif, styled panel
QTest::newRow("Styled, 1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform()
@@ -728,7 +716,7 @@ static void _scrollBarRanges_data_3(int offset)
<< -200 << (50 + 16) << -200 << (100 + 16) << false << true;
}
-static void _scrollBarRanges_data_4(int offset)
+static void _scrollBarRangesMotif_data_2(int offset)
{
// Motif, styled panel
QTest::newRow("Motif, Styled, 1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform()
@@ -963,14 +951,14 @@ void _scrollBarRanges_data()
QTest::addColumn<bool>("useMotif");
QTest::addColumn<bool>("useStyledPanel");
- int offset = 16;
-#ifdef Q_OS_WINCE
- if (qt_wince_is_high_dpi())
- offset *= 2;
-#endif
+ const int offset = 16;
_scrollBarRanges_data_1(offset);
_scrollBarRanges_data_2(offset);
- _scrollBarRanges_data_3(offset);
- _scrollBarRanges_data_4(offset);
+ // Motif tests are suitable for 96 DPI, only.
+ const QScreen *screen = QGuiApplication::primaryScreen();
+ if (screen && qFuzzyCompare(screen->logicalDotsPerInchX(), 96.0)) {
+ _scrollBarRangesMotif_data_1(offset);
+ _scrollBarRangesMotif_data_2(offset);
+ }
}
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
index afe584e57d..af9ff4d42c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
@@ -6,5 +6,6 @@ QT += core-private gui-private
SOURCES += tst_qgraphicswidget.cpp
-
+# QTBUG-23616 - unstable test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
mac*:CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 164d5564e3..89cd63f482 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/itemviews.pro b/tests/auto/widgets/itemviews/itemviews.pro
index fc338fdb7b..e13a5a82ca 100644
--- a/tests/auto/widgets/itemviews/itemviews.pro
+++ b/tests/auto/widgets/itemviews/itemviews.pro
@@ -1,23 +1,18 @@
TEMPLATE=subdirs
SUBDIRS=\
qabstractitemview \
- qabstractproxymodel \
qcolumnview \
qdatawidgetmapper \
qdirmodel \
qfileiconprovider \
qheaderview \
- qidentityproxymodel \
qitemdelegate \
qitemeditorfactory \
- qitemselectionmodel \
qitemview \
qlistview \
qlistwidget \
- qsortfilterproxymodel \
qstandarditem \
qstandarditemmodel \
- qstringlistmodel \
qtableview \
qtablewidget \
qtreeview \
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 4e1b61e32d..764838fc96 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
index 4b1a5a1a21..abf7929a94 100644
--- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp b/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp
index 7488195497..4ad8de1d3d 100644
--- a/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp
+++ b/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index acbe652c89..ef183ed91c 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
index cf53019ff1..286a352304 100644
--- a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
+++ b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index bf547cc7d9..f1a7b4588e 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
index 17a5d5ea57..d47b3bfa31 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
+++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
@@ -5,3 +5,5 @@ SOURCES += tst_qitemdelegate.cpp
win32:!wince*: LIBS += -lUser32
+# QTBUG-23637
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index a2c85c2f48..30bf867249 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp b/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
index 53c00dab0e..3945e65f80 100644
--- a/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
+++ b/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
index 55a406cc74..7f8337a5d8 100644
--- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp b/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
index b61ecd5c2a..15f1a4d02f 100644
--- a/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 86ec6c1a09..e56a8e1008 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index ea3f6ae143..8849b3ae6d 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp b/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp
index 00c8a868d9..a0e485a8c3 100644
--- a/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp
+++ b/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp
index 6b0636ce77..78ac43f79a 100644
--- a/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp
+++ b/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 383fcf8b3f..74917fbf9a 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
index 1e5d63c261..5e2658a47f 100644
--- a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro
index e3955469dc..95d1ba1c2f 100644
--- a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro
+++ b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro
@@ -1,4 +1,8 @@
CONFIG += testcase
TARGET = tst_qtreeview
QT += widgets testlib
+QT += widgets-private gui-private core-private
SOURCES += tst_qtreeview.cpp
+
+# QTBUG-23638
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
index fad4d3deea..5d0ef9d09b 100644
--- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,6 +43,7 @@
#include <QtTest/QtTest>
#include <QtGui/QtGui>
#include <QtWidgets/QtWidgets>
+#include <private/qabstractitemview_p.h>
Q_DECLARE_METATYPE(QModelIndex)
#ifndef QT_NO_DRAGANDDROP
@@ -106,6 +107,7 @@ struct PublicView : public QTreeView
inline QStyleOptionViewItem viewOptions() const { return QTreeView::viewOptions(); }
inline int sizeHintForColumn(int column) const { return QTreeView::sizeHintForColumn(column); }
+ QAbstractItemViewPrivate* aiv_priv() { return static_cast<QAbstractItemViewPrivate*>(d_ptr.data()); }
};
class tst_QTreeView : public QObject
@@ -2889,6 +2891,10 @@ void tst_QTreeView::styleOptionViewItem()
{
class MyDelegate : public QStyledItemDelegate
{
+ static QString posToString(QStyleOptionViewItemV4::ViewItemPosition pos) {
+ static const char* s_pos[] = { "Invalid", "Beginning", "Middle", "End", "OnlyOne" };
+ return s_pos[pos];
+ }
public:
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
{
@@ -2905,16 +2911,16 @@ void tst_QTreeView::styleOptionViewItem()
QCOMPARE(!(opt.features & QStyleOptionViewItemV2::HasCheckIndicator), !opt.text.contains("Checkable"));
if (opt.text.contains("Beginning"))
- QCOMPARE(opt.viewItemPosition, QStyleOptionViewItemV4::Beginning);
+ QCOMPARE(posToString(opt.viewItemPosition), posToString(QStyleOptionViewItemV4::Beginning));
if (opt.text.contains("Middle"))
- QCOMPARE(opt.viewItemPosition, QStyleOptionViewItemV4::Middle);
+ QCOMPARE(posToString(opt.viewItemPosition), posToString(QStyleOptionViewItemV4::Middle));
if (opt.text.contains("End"))
- QCOMPARE(opt.viewItemPosition, QStyleOptionViewItemV4::End);
+ QCOMPARE(posToString(opt.viewItemPosition), posToString(QStyleOptionViewItemV4::End));
if (opt.text.contains("OnlyOne"))
- QCOMPARE(opt.viewItemPosition, QStyleOptionViewItemV4::OnlyOne);
+ QCOMPARE(posToString(opt.viewItemPosition), posToString(QStyleOptionViewItemV4::OnlyOne));
if (opt.text.contains("Checked"))
QCOMPARE(opt.checkState, Qt::Checked);
@@ -2933,47 +2939,51 @@ void tst_QTreeView::styleOptionViewItem()
bool allCollapsed;
};
- QTreeView view;
+ PublicView view;
QStandardItemModel model;
view.setModel(&model);
MyDelegate delegate;
view.setItemDelegate(&delegate);
model.appendRow(QList<QStandardItem*>()
- << new QStandardItem("Beginning") << new QStandardItem("Middle") << new QStandardItem("Middle") << new QStandardItem("End") );
+ << new QStandardItem("Beginning") << new QStandardItem("Hidden") << new QStandardItem("Middle") << new QStandardItem("Middle") << new QStandardItem("End") );
QStandardItem *par1 = new QStandardItem("Beginning HasChildren");
model.appendRow(QList<QStandardItem*>()
- << par1 << new QStandardItem("Middle HasChildren") << new QStandardItem("Middle HasChildren") << new QStandardItem("End HasChildren") );
+ << par1 << new QStandardItem("Hidden") << new QStandardItem("Middle HasChildren") << new QStandardItem("Middle HasChildren") << new QStandardItem("End HasChildren") );
model.appendRow(QList<QStandardItem*>()
- << new QStandardItem("OnlyOne") << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Assert") );
+ << new QStandardItem("OnlyOne") << new QStandardItem("Hidden") << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Assert") );
QStandardItem *checkable = new QStandardItem("Checkable");
checkable->setCheckable(true);
QStandardItem *checked = new QStandardItem("Checkable Checked");
- checkable->setCheckable(true);
+ checked->setCheckable(true);
checked->setCheckState(Qt::Checked);
model.appendRow(QList<QStandardItem*>()
- << new QStandardItem("Beginning") << checkable << checked << new QStandardItem("End") );
+ << new QStandardItem("Beginning") << new QStandardItem("Hidden") << checkable << checked << new QStandardItem("End") );
model.appendRow(QList<QStandardItem*>()
- << new QStandardItem("Beginning Last") << new QStandardItem("Middle Last") << new QStandardItem("Middle Last") << new QStandardItem("End Last") );
+ << new QStandardItem("Beginning Last") << new QStandardItem("Hidden") << new QStandardItem("Middle Last") << new QStandardItem("Middle Last") << new QStandardItem("End Last") );
par1->appendRow(QList<QStandardItem*>()
- << new QStandardItem("Beginning") << new QStandardItem("Middle") << new QStandardItem("Middle") << new QStandardItem("End") );
+ << new QStandardItem("Beginning") << new QStandardItem("Hidden") << new QStandardItem("Middle") << new QStandardItem("Middle") << new QStandardItem("End") );
QStandardItem *par2 = new QStandardItem("Beginning HasChildren");
par1->appendRow(QList<QStandardItem*>()
- << par2 << new QStandardItem("Middle HasChildren") << new QStandardItem("Middle HasChildren") << new QStandardItem("End HasChildren") );
+ << par2 << new QStandardItem("Hidden") << new QStandardItem("Middle HasChildren") << new QStandardItem("Middle HasChildren") << new QStandardItem("End HasChildren") );
par2->appendRow(QList<QStandardItem*>()
- << new QStandardItem("Beginning Last") << new QStandardItem("Middle Last") << new QStandardItem("Middle Last") << new QStandardItem("End Last") );
+ << new QStandardItem("Beginning Last") << new QStandardItem("Hidden") << new QStandardItem("Middle Last") << new QStandardItem("Middle Last") << new QStandardItem("End Last") );
QStandardItem *par3 = new QStandardItem("Beginning Last");
par1->appendRow(QList<QStandardItem*>()
- << par3 << new QStandardItem("Middle Last") << new QStandardItem("Middle Last") << new QStandardItem("End Last") );
+ << par3 << new QStandardItem("Hidden") << new QStandardItem("Middle Last") << new QStandardItem("Middle Last") << new QStandardItem("End Last") );
par3->appendRow(QList<QStandardItem*>()
- << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Asser") );
+ << new QStandardItem("Assert") << new QStandardItem("Hidden") << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Asser") );
view.setRowHidden(0, par3->index(), true);
par1->appendRow(QList<QStandardItem*>()
- << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Asser") );
+ << new QStandardItem("Assert") << new QStandardItem("Hidden") << new QStandardItem("Assert") << new QStandardItem("Assert") << new QStandardItem("Asser") );
view.setRowHidden(3, par1->index(), true);
+ view.setColumnHidden(1, true);
+ const int visibleColumns = 4;
+ const int modelColumns = 5;
+ view.header()->swapSections(2, 3);
view.setFirstColumnSpanned(2, QModelIndex(), true);
view.setAlternatingRowColors(true);
@@ -2992,6 +3002,14 @@ void tst_QTreeView::styleOptionViewItem()
QApplication::processEvents();
QTRY_VERIFY(delegate.count >= 4);
+ // test that the rendering of drag pixmap sets the correct options too (QTBUG-15834)
+#ifdef QT_BUILD_INTERNAL
+ delegate.count = 0;
+ QItemSelection sel(model.index(0,0), model.index(0,modelColumns-1));
+ QRect rect;
+ view.aiv_priv()->renderToPixmap(sel.indexes(), &rect);
+ QTRY_VERIFY(delegate.count == visibleColumns);
+#endif
//test dynamic models
{
diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
index 03619f0c97..14f1f8736d 100644
--- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
index 94f4446b5b..b747586548 100644
--- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/kernel.pro b/tests/auto/widgets/kernel/kernel.pro
index d1f2304378..a68a9c2748 100644
--- a/tests/auto/widgets/kernel/kernel.pro
+++ b/tests/auto/widgets/kernel/kernel.pro
@@ -7,7 +7,6 @@ SUBDIRS=\
qdesktopwidget \
qformlayout \
qgridlayout \
- qinputcontext \
qlayout \
qstackedlayout \
qtooltip \
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index 846cba7ad6..d00828e8b0 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
index 406298807a..3946423dec 100644
--- a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
+++ b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro
index 216a9710c7..3aa363d796 100644
--- a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro
+++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro
@@ -5,10 +5,14 @@
TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += .
-wince*:TARGET = ../desktopsettingsaware
+DESTDIR = ./
# Input
QT += widgets
SOURCES += main.cpp
CONFIG += qt warn_on create_prl link_prl
CONFIG -= app_bundle
+
+# This app is testdata for tst_qapplication
+target.path = $$[QT_INSTALL_TESTS]/tst_qapplication/$$TARGET
+INSTALLS += target
diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp
index 9e2172829a..154e9262a3 100644
--- a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qapplication/modal/base.cpp b/tests/auto/widgets/kernel/qapplication/modal/base.cpp
index 2f7b4ad529..c8e6c63c99 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/base.cpp
+++ b/tests/auto/widgets/kernel/qapplication/modal/base.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qapplication/modal/base.h b/tests/auto/widgets/kernel/qapplication/modal/base.h
index e1f36e11bd..af520b916f 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/base.h
+++ b/tests/auto/widgets/kernel/qapplication/modal/base.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qapplication/modal/main.cpp b/tests/auto/widgets/kernel/qapplication/modal/main.cpp
index 53c6008eb5..70cc8545d2 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/modal/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qapplication/modal/modal.pro b/tests/auto/widgets/kernel/qapplication/modal/modal.pro
index 9ed69769bb..b13165bcda 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/modal.pro
+++ b/tests/auto/widgets/kernel/qapplication/modal/modal.pro
@@ -1,9 +1,13 @@
TEMPLATE = app
QT += widgets
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
SOURCES += main.cpp \
base.cpp
DESTDIR = ./
+CONFIG -= app_bundle
HEADERS += base.h
+
+# This app is testdata for tst_qapplication
+target.path = $$[QT_INSTALL_TESTS]/tst_qapplication/$$TARGET
+INSTALLS += target
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 81cdffe4e5..4cf15879cc 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,12 +45,26 @@
#include <QtTest/QtTest>
-#include "qabstracteventdispatcher.h"
-#include <QtGui>
-#include <QtWidgets>
+#include <QtCore/QAbstractEventDispatcher>
+#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
+#include <QtCore/QProcess>
+
+#include <QtGui/QFontDatabase>
+#include <QtGui/QClipboard>
+
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QInputContext>
+#include <QtWidgets/QStyleFactory>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QMainWindow>
+#include <QtWidgets/private/qapplication_p.h>
+#include <QtWidgets/private/qstylesheetstyle_p.h>
-#include "private/qapplication_p.h"
-#include "private/qstylesheetstyle_p.h"
#ifdef Q_OS_WINCE
#include <windows.h>
#endif
@@ -64,11 +78,11 @@ public:
virtual ~tst_QApplication();
public slots:
+ void initTestCase();
void init();
void cleanup();
private slots:
void sendEventsOnProcessEvents(); // this must be the first test
- void getSetCheck();
void staticSetup();
void alert();
@@ -140,6 +154,13 @@ public:
}
};
+void tst_QApplication::initTestCase()
+{
+ // chdir to our testdata path and execute helper apps relative to that.
+ const QString testdataDir = QFileInfo(QFINDTESTDATA("desktopsettingsaware")).absolutePath();
+ QVERIFY2(QDir::setCurrent(testdataDir), qPrintable("Could not chdir to " + testdataDir));
+}
+
void tst_QApplication::sendEventsOnProcessEvents()
{
int argc = 0;
@@ -153,38 +174,6 @@ void tst_QApplication::sendEventsOnProcessEvents()
QVERIFY(spy.recordedEvents.contains(QEvent::User + 1));
}
-class MyInputContext : public QInputContext
-{
-public:
- MyInputContext() : QInputContext() {}
- QString identifierName() { return QString("NoName"); }
- QString language() { return QString("NoLanguage"); }
- void reset() {}
- bool isComposing() const { return false; }
-};
-
-// Testing get/set functions
-void tst_QApplication::getSetCheck()
-{
- int argc = 0;
- QApplication obj1(argc, 0, QApplication::GuiServer);
- MyInputContext *var1 = new MyInputContext;
-
- // QApplication takes ownership, so check for reparenting:
- obj1.setInputContext(var1);
- QCOMPARE(var1->parent(), static_cast<QObject *>(&obj1));
-
- // Test for self-assignment:
- obj1.setInputContext(obj1.inputContext());
- QVERIFY(obj1.inputContext());
- QCOMPARE(static_cast<QInputContext *>(var1), obj1.inputContext());
-
- // Resetting the input context to 0 is not allowed:
- QTest::ignoreMessage(QtWarningMsg, "QApplication::setInputContext: called with 0 input context");
- obj1.setInputContext(0);
-
- QCOMPARE(static_cast<QInputContext *>(var1), obj1.inputContext());
-}
class CloseEventTestWindow : public QWidget
{
@@ -1463,19 +1452,14 @@ void tst_QApplication::desktopSettingsAware()
{
#ifndef QT_NO_PROCESS
QProcess testProcess;
+ const QString path = QStringLiteral("desktopsettingsaware/desktopsettingsaware");
#ifdef Q_OS_WINCE
int argc = 0;
QApplication tmpApp(argc, 0, QApplication::GuiServer);
- testProcess.start("desktopsettingsaware/desktopsettingsaware");
-#else
-#if defined(Q_OS_WIN) && defined(QT_DEBUG)
- testProcess.start("desktopsettingsaware/debug/desktopsettingsaware");
-#elif defined(Q_OS_WIN)
- testProcess.start("desktopsettingsaware/release/desktopsettingsaware");
-#else
- testProcess.start("desktopsettingsaware/desktopsettingsaware");
-#endif
#endif
+ testProcess.start(path);
+ QVERIFY2(testProcess.waitForStarted(),
+ qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString())));
QVERIFY(testProcess.waitForFinished(10000));
QCOMPARE(int(testProcess.state()), int(QProcess::NotRunning));
QVERIFY(int(testProcess.error()) != int(QProcess::Crashed));
@@ -1866,11 +1850,10 @@ void tst_QApplication::windowsCommandLine()
QFETCH(QString, expected);
QProcess testProcess;
-#if defined(QT_DEBUG)
- testProcess.start("wincmdline/debug/wincmdline", QStringList(args));
-#else
- testProcess.start("wincmdline/release/wincmdline", QStringList(args));
-#endif
+ const QString path = QStringLiteral("wincmdline/wincmdline");
+ testProcess.start(path, QStringList(args));
+ QVERIFY2(testProcess.waitForStarted(),
+ qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString())));
QVERIFY(testProcess.waitForFinished(10000));
QByteArray error = testProcess.readAllStandardError();
QString procError(error);
@@ -1941,23 +1924,52 @@ void tst_QApplication::touchEventPropagation()
// touch event behavior on a window
TouchEventPropagationTestWidget window;
window.setObjectName("1. window");
-
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ window.show(); // Must have an explicitly specified QWindow for handleTouchEvent,
+ // passing 0 would result in using topLevelAt() which is not ok in this case
+ // as the screen position in the point is bogus.
+ QTest::qWaitForWindowShown(&window);
+ // QPA always takes screen positions and since we map the TouchPoint back to QPA's structure first,
+ // we must ensure there is a screen position in the TouchPoint that maps to a local 0, 0.
+ pressedTouchPoints[0].setScreenPos(window.mapToGlobal(QPoint(0, 0)));
+ releasedTouchPoints[0].setScreenPos(window.mapToGlobal(QPoint(0, 0)));
+
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!window.seenTouchEvent);
QVERIFY(!window.seenMouseEvent);
window.reset();
window.setAttribute(Qt::WA_AcceptTouchEvents);
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(window.seenTouchEvent);
QVERIFY(!window.seenMouseEvent);
window.reset();
window.acceptTouchEvent = true;
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(window.seenTouchEvent);
QVERIFY(!window.seenMouseEvent);
}
@@ -1968,9 +1980,20 @@ void tst_QApplication::touchEventPropagation()
window.setObjectName("2. window");
TouchEventPropagationTestWidget widget(&window);
widget.setObjectName("2. widget");
-
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+ pressedTouchPoints[0].setScreenPos(window.mapToGlobal(QPoint(0, 0)));
+ releasedTouchPoints[0].setScreenPos(window.mapToGlobal(QPoint(0, 0)));
+
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(!window.seenTouchEvent);
@@ -1979,8 +2002,15 @@ void tst_QApplication::touchEventPropagation()
window.reset();
widget.reset();
widget.setAttribute(Qt::WA_AcceptTouchEvents);
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(!window.seenTouchEvent);
@@ -1989,8 +2019,15 @@ void tst_QApplication::touchEventPropagation()
window.reset();
widget.reset();
widget.acceptMouseEvent = true;
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(!window.seenTouchEvent);
@@ -1999,8 +2036,15 @@ void tst_QApplication::touchEventPropagation()
window.reset();
widget.reset();
widget.acceptTouchEvent = true;
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(!window.seenTouchEvent);
@@ -2010,8 +2054,15 @@ void tst_QApplication::touchEventPropagation()
widget.reset();
widget.setAttribute(Qt::WA_AcceptTouchEvents, false);
window.setAttribute(Qt::WA_AcceptTouchEvents);
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(window.seenTouchEvent);
@@ -2020,8 +2071,15 @@ void tst_QApplication::touchEventPropagation()
window.reset();
widget.reset();
window.acceptTouchEvent = true;
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(window.seenTouchEvent);
@@ -2031,8 +2089,15 @@ void tst_QApplication::touchEventPropagation()
widget.reset();
widget.acceptMouseEvent = true; // doesn't matter, touch events are propagated first
window.acceptTouchEvent = true;
- qt_translateRawTouchEvent(&window, device, pressedTouchPoints, 0);
- qt_translateRawTouchEvent(&window, device, releasedTouchPoints, 0);
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(pressedTouchPoints));
+ QWindowSystemInterface::handleTouchEvent(window.windowHandle(),
+ 0,
+ device,
+ QTest::QTouchEventSequence::touchPointList(releasedTouchPoints));
+ QCoreApplication::processEvents();
QVERIFY(!widget.seenTouchEvent);
QVERIFY(!widget.seenMouseEvent);
QVERIFY(window.seenTouchEvent);
@@ -2044,11 +2109,10 @@ void tst_QApplication::qtbug_12673()
{
QProcess testProcess;
QStringList arguments;
-#ifdef Q_OS_MAC
- testProcess.start("modal/modal.app", arguments);
-#else
- testProcess.start("modal/modal", arguments);
-#endif
+ const QString path = QStringLiteral("modal/modal");
+ testProcess.start(path, arguments);
+ QVERIFY2(testProcess.waitForStarted(),
+ qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString())));
QVERIFY(testProcess.waitForFinished(20000));
QCOMPARE(testProcess.exitStatus(), QProcess::NormalExit);
}
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
index d0f802231a..fc1f37047e 100644
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
index 3ba8f48167..9abeb1cc83 100644
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
+++ b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
@@ -1,8 +1,10 @@
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += widgets
SOURCES += main.cpp
+DESTDIR = ./
-
+# This app is testdata for tst_qapplication
+target.path = $$[QT_INSTALL_TESTS]/tst_qapplication/$$TARGET
+INSTALLS += target
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
index 088469d770..9da67183bc 100644
--- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp
index c66e0c1c61..5595e03252 100644
--- a/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index a4d2cccc8e..4b4c843115 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index c7411af716..9df387b18b 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qinputcontext/qinputcontext.pro b/tests/auto/widgets/kernel/qinputcontext/qinputcontext.pro
deleted file mode 100644
index fcfb15c5fb..0000000000
--- a/tests/auto/widgets/kernel/qinputcontext/qinputcontext.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qinputcontext
-QT += widgets testlib
-SOURCES += tst_qinputcontext.cpp
-
-mac*:CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/kernel/qinputcontext/tst_qinputcontext.cpp b/tests/auto/widgets/kernel/qinputcontext/tst_qinputcontext.cpp
deleted file mode 100644
index cb7d7eb9d2..0000000000
--- a/tests/auto/widgets/kernel/qinputcontext/tst_qinputcontext.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <qinputcontext.h>
-#include <qlineedit.h>
-#include <qplaintextedit.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qwindowsstyle.h>
-#include <qdesktopwidget.h>
-#include <qpushbutton.h>
-#include <qgraphicsview.h>
-#include <qgraphicsscene.h>
-
-#ifdef QT_WEBKIT_LIB
-#include <qwebview.h>
-#include <qgraphicswebview.h>
-#endif
-
-class tst_QInputContext : public QObject
-{
-Q_OBJECT
-
-public:
- tst_QInputContext() : m_phoneIsQwerty(false) {}
- virtual ~tst_QInputContext() {}
-
-public slots:
- void cleanupTestCase() {}
- void init() {}
- void cleanup() {}
-private slots:
- void maximumTextLength();
- void filterMouseEvents();
- void requestSoftwareInputPanel();
- void closeSoftwareInputPanel();
- void selections();
- void focusProxy();
-
-private:
- bool m_phoneIsQwerty;
-};
-
-void tst_QInputContext::maximumTextLength()
-{
- QLineEdit le;
-
- le.setMaxLength(15);
- QVariant variant = le.inputMethodQuery(Qt::ImMaximumTextLength);
- QVERIFY(variant.isValid());
- QCOMPARE(variant.toInt(), 15);
-
- QPlainTextEdit pte;
- // For BC/historical reasons, QPlainTextEdit::inputMethodQuery is protected.
- variant = static_cast<QWidget *>(&pte)->inputMethodQuery(Qt::ImMaximumTextLength);
- QVERIFY(!variant.isValid());
-}
-
-class QFilterInputContext : public QInputContext
-{
-public:
- QFilterInputContext() {}
- ~QFilterInputContext() {}
-
- QString identifierName() { return QString(); }
- QString language() { return QString(); }
-
- void reset() {}
-
- bool isComposing() const { return false; }
-
- bool filterEvent( const QEvent *event )
- {
- lastTypes.append(event->type());
- return false;
- }
-
-public:
- QList<QEvent::Type> lastTypes;
-};
-
-void tst_QInputContext::filterMouseEvents()
-{
- QLineEdit le;
- le.show();
- QApplication::setActiveWindow(&le);
-
- QFilterInputContext *ic = new QFilterInputContext;
- qApp->setInputContext(ic);
- QTest::mouseClick(&le, Qt::LeftButton);
-
- QEXPECT_FAIL("", "QTBUG-22564", Abort);
- QVERIFY(ic->lastTypes.indexOf(QEvent::MouseButtonRelease) >= 0);
-}
-
-class RequestSoftwareInputPanelStyle : public QWindowsStyle
-{
-public:
- RequestSoftwareInputPanelStyle()
- : m_rsipBehavior(RSIP_OnMouseClickAndAlreadyFocused)
- {
-#ifdef Q_OS_WINCE
- qApp->setAutoSipEnabled(true);
-#endif
- }
- ~RequestSoftwareInputPanelStyle()
- {
- }
-
- int styleHint(StyleHint hint, const QStyleOption *opt = 0,
- const QWidget *widget = 0, QStyleHintReturn* returnData = 0) const
- {
- if (hint == SH_RequestSoftwareInputPanel) {
- return m_rsipBehavior;
- } else {
- return QWindowsStyle::styleHint(hint, opt, widget, returnData);
- }
- }
-
- RequestSoftwareInputPanel m_rsipBehavior;
-};
-
-void tst_QInputContext::requestSoftwareInputPanel()
-{
- QStyle *oldStyle = qApp->style();
- oldStyle->setParent(this); // Prevent it being deleted.
- RequestSoftwareInputPanelStyle *newStyle = new RequestSoftwareInputPanelStyle;
- qApp->setStyle(newStyle);
-
- QWidget w;
- QLayout *layout = new QVBoxLayout;
- QLineEdit *le1, *le2;
- le1 = new QLineEdit;
- le2 = new QLineEdit;
- layout->addWidget(le1);
- layout->addWidget(le2);
- w.setLayout(layout);
-
- QFilterInputContext *ic = new QFilterInputContext;
- qApp->setInputContext(ic);
-
- w.show();
- QApplication::setActiveWindow(&w);
-
- // Testing single click panel activation.
- newStyle->m_rsipBehavior = QStyle::RSIP_OnMouseClick;
- QTest::mouseClick(le2, Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
- QEXPECT_FAIL("", "QTBUG-22564", Abort);
- QVERIFY(ic->lastTypes.indexOf(QEvent::RequestSoftwareInputPanel) >= 0);
- ic->lastTypes.clear();
-
- // Testing double click panel activation.
- newStyle->m_rsipBehavior = QStyle::RSIP_OnMouseClickAndAlreadyFocused;
- QTest::mouseClick(le1, Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
- QVERIFY(ic->lastTypes.indexOf(QEvent::RequestSoftwareInputPanel) < 0);
- QTest::mouseClick(le1, Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
- QVERIFY(ic->lastTypes.indexOf(QEvent::RequestSoftwareInputPanel) >= 0);
- ic->lastTypes.clear();
-
- // Testing right mouse button
- QTest::mouseClick(le1, Qt::RightButton, Qt::NoModifier, QPoint(5, 5));
- QVERIFY(ic->lastTypes.indexOf(QEvent::RequestSoftwareInputPanel) < 0);
-
- qApp->setStyle(oldStyle);
- oldStyle->setParent(qApp);
-}
-
-void tst_QInputContext::closeSoftwareInputPanel()
-{
- QWidget w;
- QLayout *layout = new QVBoxLayout;
- QLineEdit *le1, *le2;
- QRadioButton *rb;
- le1 = new QLineEdit;
- le2 = new QLineEdit;
- rb = new QRadioButton;
- layout->addWidget(le1);
- layout->addWidget(le2);
- layout->addWidget(rb);
- w.setLayout(layout);
-
- QFilterInputContext *ic = new QFilterInputContext;
- qApp->setInputContext(ic);
-
- w.show();
- QApplication::setActiveWindow(&w);
-
- // Testing that panel doesn't close between two input methods aware widgets.
- QTest::mouseClick(le1, Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
- QTest::mouseClick(le2, Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
- QVERIFY(ic->lastTypes.indexOf(QEvent::CloseSoftwareInputPanel) < 0);
-
- // Testing that panel closes when focusing non-aware widget.
- QTest::mouseClick(rb, Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
- QEXPECT_FAIL("", "QTBUG-22564", Abort);
- QVERIFY(ic->lastTypes.indexOf(QEvent::CloseSoftwareInputPanel) >= 0);
-}
-
-void tst_QInputContext::selections()
-{
- QLineEdit le;
- le.setText("Test text");
- le.setSelection(2, 2);
- QCOMPARE(le.inputMethodQuery(Qt::ImCursorPosition).toInt(), 4);
- QCOMPARE(le.inputMethodQuery(Qt::ImAnchorPosition).toInt(), 2);
-
- QList<QInputMethodEvent::Attribute> attributes;
- attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 5, 3, QVariant()));
- QInputMethodEvent event("", attributes);
- QApplication::sendEvent(&le, &event);
- QCOMPARE(le.cursorPosition(), 8);
- QCOMPARE(le.selectionStart(), 5);
- QCOMPARE(le.inputMethodQuery(Qt::ImCursorPosition).toInt(), 8);
- QCOMPARE(le.inputMethodQuery(Qt::ImAnchorPosition).toInt(), 5);
-}
-
-void tst_QInputContext::focusProxy()
-{
- QWidget toplevel(0, Qt::X11BypassWindowManagerHint); toplevel.setObjectName("toplevel");
- QWidget w(&toplevel); w.setObjectName("w");
- QWidget proxy(&w); proxy.setObjectName("proxy");
- QWidget proxy2(&w); proxy2.setObjectName("proxy2");
- w.setFocusProxy(&proxy);
- w.setAttribute(Qt::WA_InputMethodEnabled);
- toplevel.show();
- QApplication::setActiveWindow(&toplevel);
- QTest::qWaitForWindowShown(&toplevel);
- w.setFocus();
- w.setAttribute(Qt::WA_NativeWindow); // we shouldn't crash!
-
- proxy.setAttribute(Qt::WA_InputMethodEnabled);
- proxy2.setAttribute(Qt::WA_InputMethodEnabled);
-
- proxy2.setFocus();
- w.setFocus();
-
- QInputContext *gic = qApp->inputContext();
- QVERIFY(gic);
- QCOMPARE(gic->focusWidget(), &proxy);
-
- // then change the focus proxy and check that input context is valid
- QVERIFY(w.hasFocus());
- QVERIFY(proxy.hasFocus());
- QVERIFY(!proxy2.hasFocus());
- w.setFocusProxy(&proxy2);
- QVERIFY(!w.hasFocus());
- QVERIFY(proxy.hasFocus());
- QVERIFY(!proxy2.hasFocus());
- QCOMPARE(gic->focusWidget(), &proxy);
-}
-
-#ifdef QT_WEBKIT_LIB
-class AutoWebView : public QWebView
-{
- Q_OBJECT
-
-public:
- AutoWebView()
- : m_length(0)
- , m_mode(QLineEdit::Normal)
- {
- updatePage();
- }
- ~AutoWebView() {}
-
- void updatePage()
- {
- // The update might reset the input method parameters.
- bool imEnabled = testAttribute(Qt::WA_InputMethodEnabled);
- Qt::InputMethodHints hints = inputMethodHints();
-
- QString page = "<html><body onLoad=\"document.forms.testform.testinput.focus()\">"
- "<form name=\"testform\"><input name=\"testinput\" type=\"%1\" %2></form></body></html>";
- if (m_mode == QLineEdit::Password)
- page = page.arg("password");
- else
- page = page.arg("text");
-
- if (m_length == 0)
- page = page.arg("");
- else
- page = page.arg("maxlength=\"" + QString::number(m_length) + "\"");
-
- setHtml(page);
-
- setAttribute(Qt::WA_InputMethodEnabled, imEnabled);
- setInputMethodHints(hints);
- }
- void setMaxLength(int length)
- {
- m_length = length;
- updatePage();
- }
- void setEchoMode(QLineEdit::EchoMode mode)
- {
- m_mode = mode;
- updatePage();
- }
-
- int m_length;
- QLineEdit::EchoMode m_mode;
-};
-
-class AutoGraphicsWebView : public QGraphicsView
-{
- Q_OBJECT
-
-public:
- AutoGraphicsWebView()
- : m_length(0)
- , m_mode(QLineEdit::Normal)
- {
- m_scene.addItem(&m_view);
- setScene(&m_scene);
- m_view.setFocus();
- updatePage();
- }
- ~AutoGraphicsWebView() {}
-
- void updatePage()
- {
- // The update might reset the input method parameters.
- bool imEnabled = testAttribute(Qt::WA_InputMethodEnabled);
- Qt::InputMethodHints hints = inputMethodHints();
-
- QString page = "<html><body onLoad=\"document.forms.testform.testinput.focus()\">"
- "<form name=\"testform\"><input name=\"testinput\" type=\"%1\" %2></form></body></html>";
- if (m_mode == QLineEdit::Password)
- page = page.arg("password");
- else
- page = page.arg("text");
-
- if (m_length == 0)
- page = page.arg("");
- else
- page = page.arg("maxlength=\"" + QString::number(m_length) + "\"");
-
- m_view.setHtml(page);
-
- setAttribute(Qt::WA_InputMethodEnabled, imEnabled);
- setInputMethodHints(hints);
- }
- void setMaxLength(int length)
- {
- m_length = length;
- updatePage();
- }
- void setEchoMode(QLineEdit::EchoMode mode)
- {
- m_mode = mode;
- updatePage();
- }
-
- int m_length;
- QLineEdit::EchoMode m_mode;
- QGraphicsScene m_scene;
- QGraphicsWebView m_view;
-};
-#endif // QT_WEBKIT_LIB
-
-QTEST_MAIN(tst_QInputContext)
-#include "tst_qinputcontext.moc"
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index 6cfb2f2f2a..c0a8d9680b 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
index 2529ccf426..7939f12c0d 100644
--- a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
+++ b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
index d2126d4043..d8b0666880 100644
--- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 28daf0ac02..16bb5d345b 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -301,7 +301,7 @@ private slots:
void clean_qt_x11_enforce_cursor();
#endif
- void compatibilityChildInsertedEvents();
+ void childEvents();
void render();
void renderInvisible();
void renderWithPainter();
@@ -442,16 +442,6 @@ bool tst_QWidget::ensureScreenSize(int width, int height)
return (available.width() >= width && available.height() >= height);
}
-class MyInputContext : public QInputContext
-{
-public:
- MyInputContext() : QInputContext() {}
- QString identifierName() { return QString("NoName"); }
- QString language() { return QString("NoLanguage"); }
- void reset() {}
- bool isComposing() const { return false; }
-};
-
// Testing get/set functions
void tst_QWidget::getSetCheck()
{
@@ -587,13 +577,6 @@ void tst_QWidget::getSetCheck()
obj1.setAcceptDrops(true);
QCOMPARE(true, obj1.acceptDrops());
- // QInputContext * QWidget::inputContext()
- MyInputContext *var13 = new MyInputContext;
- qApp->setInputContext(var13);
- QCOMPARE((QInputContext *)0, obj1.inputContext()); // The widget by default doesn't have the WA_InputMethodEnabled attribute
- obj1.setAttribute(Qt::WA_InputMethodEnabled);
- QCOMPARE(static_cast<QInputContext *>(var13), obj1.inputContext());
-
// bool QWidget::autoFillBackground()
// void QWidget::setAutoFillBackground(bool)
obj1.setAutoFillBackground(false);
@@ -726,7 +709,7 @@ void BezierViewer::paintEvent( QPaintEvent* )
/* Write number of vertices */
painter.setPen( Qt::red );
- painter.setFont( QFont("Helvetica", 14, QFont::DemiBold, TRUE ) );
+ painter.setFont( QFont("Helvetica", 14, QFont::DemiBold, true ) );
QString caption;
caption.setNum( bezier.size() );
caption += QString::fromLatin1( " vertices" );
@@ -759,24 +742,24 @@ void tst_QWidget::fontPropagation()
childWidget->show();
QCOMPARE( font, childWidget->font() );
- font.setBold( TRUE );
+ font.setBold( true );
testWidget->setFont( font );
QCOMPARE( font, testWidget->font() );
QCOMPARE( font, childWidget->font() );
QFont newFont = font;
- newFont.setItalic( TRUE );
+ newFont.setItalic( true );
childWidget->setFont( newFont );
QWidget* grandChildWidget = new QWidget( childWidget );
QCOMPARE( font, testWidget->font() );
QCOMPARE( newFont, grandChildWidget->font() );
- font.setUnderline( TRUE );
+ font.setUnderline( true );
testWidget->setFont( font );
// the child and grand child should now have merged bold and
// underline
- newFont.setUnderline( TRUE );
+ newFont.setUnderline( true );
QCOMPARE( newFont, childWidget->font() );
QCOMPARE( newFont, grandChildWidget->font() );
@@ -1074,32 +1057,32 @@ void tst_QWidget::enabledPropagation()
QVERIFY( testWidget->isEnabled() );
QVERIFY( childWidget->isEnabled() );
- testWidget->setEnabled( FALSE );
+ testWidget->setEnabled( false );
QVERIFY( !testWidget->isEnabled() );
QVERIFY( !childWidget->isEnabled() );
- testWidget->setDisabled( FALSE );
+ testWidget->setDisabled( false );
QVERIFY( testWidget->isEnabled() );
QVERIFY( childWidget->isEnabled() );
QWidget* grandChildWidget = new QWidget( childWidget );
QVERIFY( grandChildWidget->isEnabled() );
- testWidget->setDisabled( TRUE );
+ testWidget->setDisabled( true );
QVERIFY( !testWidget->isEnabled() );
QVERIFY( !childWidget->isEnabled() );
QVERIFY( !grandChildWidget->isEnabled() );
- grandChildWidget->setEnabled( FALSE );
- testWidget->setEnabled( TRUE );
+ grandChildWidget->setEnabled( false );
+ testWidget->setEnabled( true );
QVERIFY( testWidget->isEnabled() );
QVERIFY( childWidget->isEnabled() );
QVERIFY( !grandChildWidget->isEnabled() );
- grandChildWidget->setEnabled( TRUE );
- testWidget->setEnabled( FALSE );
- childWidget->setDisabled( TRUE );
- testWidget->setEnabled( TRUE );
+ grandChildWidget->setEnabled( true );
+ testWidget->setEnabled( false );
+ childWidget->setDisabled( true );
+ testWidget->setEnabled( true );
QVERIFY( testWidget->isEnabled() );
QVERIFY( !childWidget->isEnabled() );
QVERIFY( !grandChildWidget->isEnabled() );
@@ -1162,7 +1145,7 @@ void tst_QWidget::isEnabledTo()
QVERIFY( childWidget->isEnabledTo( testWidget ) );
QVERIFY( grandChildWidget->isEnabledTo( testWidget ) );
- childWidget->setEnabled( FALSE );
+ childWidget->setEnabled( false );
QVERIFY( !childWidget->isEnabledTo( testWidget ) );
QVERIFY( grandChildWidget->isEnabledTo( childWidget ) );
QVERIFY( !grandChildWidget->isEnabledTo( testWidget ) );
@@ -1245,7 +1228,7 @@ void tst_QWidget::visible_setWindowOpacity()
QVERIFY( !testWidget->isVisible() );
testWidget->setWindowOpacity(0.5);
#ifdef Q_OS_WIN
- QVERIFY(::IsWindowVisible(winHandleOf(testWidget)) == FALSE);
+ QVERIFY(!::IsWindowVisible(winHandleOf(testWidget)));
#endif
testWidget->setWindowOpacity(1.0);
}
@@ -1638,12 +1621,12 @@ public:
void tab()
{
- focusNextPrevChild(TRUE);
+ focusNextPrevChild(true);
}
void backTab()
{
- focusNextPrevChild(FALSE);
+ focusNextPrevChild(false);
}
};
@@ -5806,7 +5789,7 @@ private:
EventList events;
};
-void tst_QWidget::compatibilityChildInsertedEvents()
+void tst_QWidget::childEvents()
{
EventRecorder::EventList expected;
bool accessibilityEnabled = false;
@@ -9128,23 +9111,10 @@ void tst_QWidget::openModal_taskQTBUG_5804()
delete win;
}
-class InputContextTester : public QInputContext
-{
- Q_OBJECT
-public:
- QString identifierName() { return QString(); }
- bool isComposing() const { return false; }
- QString language() { return QString(); }
- void reset() { ++resets; }
- int resets;
-};
-
void tst_QWidget::focusProxyAndInputMethods()
{
- InputContextTester *inputContext = new InputContextTester;
QWidget *toplevel = new QWidget(0, Qt::X11BypassWindowManagerHint);
toplevel->setAttribute(Qt::WA_InputMethodEnabled, true);
- qApp->setInputContext(inputContext); // ownership is transferred
QWidget *child = new QWidget(toplevel);
child->setFocusProxy(toplevel);
@@ -9167,20 +9137,24 @@ void tst_QWidget::focusProxyAndInputMethods()
// and that the input method gets the focus proxy passed
// as the focus widget instead of the child widget.
// otherwise input method queries go to the wrong widget
+ QInputContext *inputContext = qApp->inputContext();
+ if (inputContext) {
+ QCOMPARE(inputContext->focusWidget(), toplevel);
- QCOMPARE(inputContext->focusWidget(), toplevel);
+ child->setAttribute(Qt::WA_InputMethodEnabled, false);
+ QVERIFY(!inputContext->focusWidget());
- child->setAttribute(Qt::WA_InputMethodEnabled, false);
- QVERIFY(!inputContext->focusWidget());
-
- child->setAttribute(Qt::WA_InputMethodEnabled, true);
- QCOMPARE(inputContext->focusWidget(), toplevel);
+ child->setAttribute(Qt::WA_InputMethodEnabled, true);
+ QCOMPARE(inputContext->focusWidget(), toplevel);
- child->setEnabled(false);
- QVERIFY(!inputContext->focusWidget());
+ child->setEnabled(false);
+ QVERIFY(!inputContext->focusWidget());
- child->setEnabled(true);
- QCOMPARE(inputContext->focusWidget(), toplevel);
+ child->setEnabled(true);
+ QCOMPARE(inputContext->focusWidget(), toplevel);
+ } else {
+ qDebug() << "No input context set, skipping QInputContext::focusWidget() test";
+ }
delete toplevel;
}
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h
index d7bc3f33c7..5d07ebd381 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm
index 10e137c06c..404a3e989f 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index f25a383177..b6f62379a6 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
index 9b161ec5b8..7e2d3e3b9a 100644
--- a/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/shared/platforminputcontext.h b/tests/auto/widgets/shared/platforminputcontext.h
new file mode 100644
index 0000000000..a8b9a8c547
--- /dev/null
+++ b/tests/auto/widgets/shared/platforminputcontext.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qplatforminputcontext_qpa.h>
+
+class PlatformInputContext : public QPlatformInputContext
+{
+public:
+ PlatformInputContext() :
+ m_animating(false),
+ m_visible(false),
+ m_updateCallCount(0),
+ m_resetCallCount(0),
+ m_commitCallCount(0),
+ m_lastQueries(Qt::ImhNone),
+ m_action(QInputPanel::Click),
+ m_cursorPosition(0),
+ m_lastEventType(QEvent::None)
+ {}
+
+ virtual QRectF keyboardRect() const { return m_keyboardRect; }
+ virtual bool isAnimating() const { return m_animating; }
+ virtual void reset() { m_resetCallCount++; }
+ virtual void commit() { m_commitCallCount++; }
+
+ virtual void update(Qt::InputMethodQueries queries)
+ {
+ m_updateCallCount++;
+ m_lastQueries = queries;
+ }
+ virtual void invokeAction(QInputPanel::Action action, int cursorPosition)
+ {
+ m_action = action;
+ m_cursorPosition = cursorPosition;
+ }
+ virtual bool filterEvent(const QEvent *event)
+ {
+ m_lastEventType = event->type(); return false;
+ }
+ virtual void showInputPanel()
+ {
+ m_visible = true;
+ }
+ virtual void hideInputPanel()
+ {
+ m_visible = false;
+ }
+ virtual bool isInputPanelVisible() const
+ {
+ return m_visible;
+ }
+
+ bool m_animating;
+ bool m_visible;
+ int m_updateCallCount;
+ int m_resetCallCount;
+ int m_commitCallCount;
+ Qt::InputMethodQueries m_lastQueries;
+ QInputPanel::Action m_action;
+ int m_cursorPosition;
+ int m_lastEventType;
+ QRectF m_keyboardRect;
+};
diff --git a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
index 30e380ea1c..551fc6612a 100644
--- a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
+++ b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index 5dede997ae..1483189cd0 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -273,7 +273,7 @@ void tst_QStyle::drawItemPixmap()
QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG");
QPixmap actualPix = QPixmap::grabWidget(testWidget);
- QVERIFY(pixmapsAreEqual(&actualPix,&p));
+ QCOMPARE(actualPix, p);
testWidget->hide();
}
@@ -458,7 +458,7 @@ void comparePixmap(const QString &filename, const QPixmap &pixmap)
QImage oldFile = readImage(filename);
QPixmap oldPixmap = QPixmap::fromImage(oldFile);
if (!oldFile.isNull())
- QVERIFY(pixmapsAreEqual(&pixmap, &oldPixmap));
+ QCOMPARE(pixmap, oldPixmap);
else
writeImage(filename, pixmap.toImage());
}
diff --git a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
index c1d4bd8166..f1fac918bb 100644
--- a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
+++ b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index a1a27f538a..cf0e773905 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/styles/styles.pro b/tests/auto/widgets/styles/styles.pro
index 20a59dea45..7e931582db 100644
--- a/tests/auto/widgets/styles/styles.pro
+++ b/tests/auto/widgets/styles/styles.pro
@@ -1,7 +1,6 @@
TEMPLATE=subdirs
SUBDIRS=\
-# disabled in src/widgets/styles/styles.pri, so disable the test as well
-# qmacstyle \
+ qmacstyle \
qstyle \
qstyleoption \
qstylesheetstyle \
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 9d75131149..024e4ffa14 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
index a7912aedc1..8bf82e588e 100644
--- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
+++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
index 2d1cace929..846f282528 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
index 4d37daf681..a88b0168f2 100644
--- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
+++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
index 0d65c12326..eb8ebfe21a 100644
--- a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
+++ b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 5d4c346adb..1eb1a5abd3 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -182,9 +182,9 @@ void tst_QAbstractButton::cleanupTestCase()
void tst_QAbstractButton::init()
{
testWidget->setText("Test");
- testWidget->setEnabled( TRUE );
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setEnabled( true );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QKeySequence seq;
testWidget->setShortcut( seq );
@@ -257,16 +257,16 @@ void tst_QAbstractButton::setAutoRepeat()
break;
case 1:
// check if we can toggle the mode
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setAutoRepeat( true );
QVERIFY( testWidget->autoRepeat() );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setAutoRepeat( false );
QVERIFY( !testWidget->autoRepeat() );
break;
case 2:
// check that the button is down if we press space and not in autorepeat
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QTest::keyPress( testWidget, Qt::Key_Space );
QTest::qWait( REPEAT_DELAY );
@@ -295,9 +295,9 @@ void tst_QAbstractButton::setAutoRepeat()
QVERIFY(click_count > 1);
break;
case 4:
- // check that pressing ENTER has no effect when autorepeat is FALSE
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ // check that pressing ENTER has no effect when autorepeat is false
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QTest::keyPress( testWidget, Qt::Key_Enter );
QTest::qWait( REPEAT_DELAY );
@@ -312,9 +312,9 @@ void tst_QAbstractButton::setAutoRepeat()
QVERIFY( click_count == 0 );
break;
case 5:
- // check that pressing ENTER has no effect when autorepeat is TRUE
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( TRUE );
+ // check that pressing ENTER has no effect when autorepeat is true
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( true );
QTest::keyPress( testWidget, Qt::Key_Enter );
QTest::qWait( REPEAT_DELAY );
@@ -427,11 +427,11 @@ void tst_QAbstractButton::setIcon()
void tst_QAbstractButton::setEnabled()
{
- testWidget->setEnabled( FALSE );
+ testWidget->setEnabled( false );
QVERIFY( !testWidget->isEnabled() );
// QTEST( testWidget, "disabled" );
- testWidget->setEnabled( TRUE );
+ testWidget->setEnabled( true );
QVERIFY( testWidget->isEnabled() );
// QTEST( testWidget, "enabled" );
}
@@ -443,14 +443,14 @@ void tst_QAbstractButton::isCheckable()
void tst_QAbstractButton::setDown()
{
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isDown() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QTest::qWait(300);
QVERIFY( testWidget->isDown() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
// add some debugging stuff
QWidget *grab = QWidget::keyboardGrabber();
@@ -466,13 +466,13 @@ void tst_QAbstractButton::setDown()
void tst_QAbstractButton::isChecked()
{
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isChecked() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QVERIFY( !testWidget->isChecked() );
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
testWidget->toggle();
QVERIFY( testWidget->isChecked() == testWidget->isCheckable() );
}
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
index 542c3f58b3..c64c16bf85 100644
--- a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index e78844524e..32e0fbfc5e 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
index 93415b35cd..964fd27320 100644
--- a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
+++ b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
index 87163305b9..a554216300 100644
--- a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro b/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro
index d30685e652..127d78596a 100644
--- a/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro
+++ b/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro
@@ -3,4 +3,5 @@ TARGET = tst_qcalendarwidget
QT += widgets testlib
SOURCES += tst_qcalendarwidget.cpp
-
+# QTBUG-23615 - unstable test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
index 2098c95907..468497f7ae 100644
--- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
+++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
index 404f3f30b9..858586a20a 100644
--- a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
+++ b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -121,9 +121,9 @@ void tst_QCheckBox::cleanupTestCase()
void tst_QCheckBox::init()
{
- testWidget->setTristate( FALSE );
- testWidget->setChecked( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setTristate( false );
+ testWidget->setChecked( false );
+ testWidget->setAutoRepeat( false );
}
void tst_QCheckBox::cleanup()
@@ -158,17 +158,17 @@ void tst_QCheckBox::onToggled( bool /*on*/ )
void tst_QCheckBox::setChecked()
{
- testWidget->setChecked( TRUE );
+ testWidget->setChecked( true );
QVERIFY( testWidget->isChecked() );
QVERIFY( testWidget->isChecked() );
QVERIFY( testWidget->checkState() == Qt::Checked );
- testWidget->setChecked( FALSE );
+ testWidget->setChecked( false );
QVERIFY( !testWidget->isChecked() );
QVERIFY( !testWidget->isChecked() );
QVERIFY( testWidget->checkState() == Qt::Unchecked );
- testWidget->setChecked( FALSE );
+ testWidget->setChecked( false );
QTest::keyClick( testWidget, ' ' );
QVERIFY( testWidget->isChecked() );
@@ -178,34 +178,34 @@ void tst_QCheckBox::setChecked()
void tst_QCheckBox::setTriState()
{
- testWidget->setTristate( TRUE );
+ testWidget->setTristate( true );
QVERIFY( testWidget->isTristate() );
QVERIFY( testWidget->checkState() == Qt::Unchecked );
testWidget->setCheckState(Qt::PartiallyChecked);
QVERIFY( testWidget->checkState() == Qt::PartiallyChecked );
- testWidget->setChecked( TRUE );
+ testWidget->setChecked( true );
QVERIFY( testWidget->isChecked() );
QVERIFY( testWidget->checkState() == Qt::Checked );
- testWidget->setChecked( FALSE );
+ testWidget->setChecked( false );
QVERIFY( !testWidget->isChecked() );
QVERIFY( testWidget->checkState() == Qt::Unchecked );
testWidget->setCheckState(Qt::PartiallyChecked);
QVERIFY( testWidget->checkState() == Qt::PartiallyChecked );
- testWidget->setTristate( FALSE );
+ testWidget->setTristate( false );
QVERIFY( !testWidget->isTristate() );
testWidget->setCheckState(Qt::PartiallyChecked);
QVERIFY( testWidget->checkState() == Qt::PartiallyChecked );
- testWidget->setChecked( TRUE );
+ testWidget->setChecked( true );
QVERIFY( testWidget->checkState() == Qt::Checked );
- testWidget->setChecked( FALSE );
+ testWidget->setChecked( false );
QVERIFY( testWidget->checkState() == Qt::Unchecked );
}
@@ -237,10 +237,10 @@ void tst_QCheckBox::setText()
void tst_QCheckBox::setDown()
{
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QVERIFY( testWidget->isDown() );
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isDown() );
}
@@ -272,7 +272,7 @@ void tst_QCheckBox::pressed()
connect(testWidget, SIGNAL(released()), this, SLOT(onReleased()));
press_count = 0;
release_count = 0;
- testWidget->setDown(FALSE);
+ testWidget->setDown(false);
QVERIFY( !testWidget->isChecked() );
QTest::keyPress( testWidget, Qt::Key_Space );
@@ -315,12 +315,12 @@ void tst_QCheckBox::stateChanged()
QSignalSpy stateChangedSpy(testWidget, SIGNAL(stateChanged(int)));
connect(testWidget, SIGNAL(stateChanged(int)), this, SLOT(onStateChanged(int)));
cur_state = -1;
- testWidget->setChecked( TRUE );
+ testWidget->setChecked( true );
qApp->processEvents();
QCOMPARE( cur_state, (int)2 );
cur_state = -1;
- testWidget->setChecked( FALSE );
+ testWidget->setChecked( false );
qApp->processEvents();
QCOMPARE( cur_state, (int)0 );
diff --git a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
index 88b9d08557..03bb91f4c0 100644
--- a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
+++ b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
@@ -2,3 +2,6 @@ CONFIG += testcase
TARGET = tst_qcombobox
QT += widgets widgets-private gui-private core-private testlib
SOURCES += tst_qcombobox.cpp
+
+# QTBUG-23639 - unstable test (related QTBUG-1071)
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 807c99ff4e..95fee1f6c8 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index 7d550bcf9c..1a594138df 100644
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -154,11 +154,11 @@ void tst_QCommandLinkButton::cleanupTestCase()
void tst_QCommandLinkButton::init()
{
- testWidget->setAutoRepeat( FALSE );
- testWidget->setDown( FALSE );
+ testWidget->setAutoRepeat( false );
+ testWidget->setDown( false );
testWidget->setText("Test");
testWidget->setDescription("Description text.");
- testWidget->setEnabled( TRUE );
+ testWidget->setEnabled( true );
QKeySequence seq;
testWidget->setShortcut( seq );
@@ -215,17 +215,17 @@ void tst_QCommandLinkButton::setAutoRepeat()
QVERIFY( !tmp.autoRepeat() );
// check if we can toggle the mode
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setAutoRepeat( true );
QVERIFY( testWidget->autoRepeat() );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setAutoRepeat( false );
QVERIFY( !testWidget->autoRepeat() );
resetCounters();
// check that the button is down if we press space and not in autorepeat
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QTest::keyPress( testWidget, Qt::Key_Space );
QTest::qWait( 300 );
@@ -242,8 +242,8 @@ void tst_QCommandLinkButton::setAutoRepeat()
// check that the button is down if we press space while in autorepeat
// we can't actually confirm how many times it is fired, more than 1 is enough.
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( true );
QTest::keyPress( testWidget, Qt::Key_Space );
QTest::qWait(900);
QVERIFY( testWidget->isDown() );
@@ -257,8 +257,8 @@ void tst_QCommandLinkButton::setAutoRepeat()
// check that pressing ENTER has no effect
resetCounters();
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QTest::keyPress( testWidget, Qt::Key_Enter );
QTest::qWait( 300 );
@@ -272,8 +272,8 @@ void tst_QCommandLinkButton::setAutoRepeat()
// check that pressing ENTER has no effect
resetCounters();
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( true );
QTest::keyClick( testWidget, Qt::Key_Enter );
QTest::qWait( 300 );
QVERIFY( !testWidget->isDown() );
@@ -318,26 +318,26 @@ void tst_QCommandLinkButton::isCheckable()
void tst_QCommandLinkButton::setDown()
{
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isDown() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QVERIFY( testWidget->isDown() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QTest::keyClick( testWidget, Qt::Key_Escape );
QVERIFY( !testWidget->isDown() );
}
void tst_QCommandLinkButton::isChecked()
{
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isChecked() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QVERIFY( !testWidget->isChecked() );
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
testWidget->toggle();
QVERIFY( testWidget->isChecked() == testWidget->isCheckable() );
}
@@ -346,7 +346,7 @@ void tst_QCommandLinkButton::toggle()
{
// the pushbutton shouldn't toggle the button.
testWidget->toggle();
- QVERIFY( testWidget->isChecked() == FALSE );
+ QVERIFY(!testWidget->isChecked());
}
void tst_QCommandLinkButton::toggled()
@@ -432,7 +432,7 @@ void tst_QCommandLinkButton::clicked()
press_count = 0;
release_count = 0;
- testWidget->setDown(FALSE);
+ testWidget->setDown(false);
for (uint i=0; i<10; i++)
QTest::mouseClick( testWidget, Qt::LeftButton );
QCOMPARE( press_count, (uint)10 );
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index eb561b1dff..6514ed589c 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -1063,15 +1063,15 @@ void tst_QDateTimeEdit::enterKey()
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("9"));
QCOMPARE(testWidget->date(), QDate(2004, 5, 9));
+ // Current behaviour is that pressing the Enter key in a QDateTimeEdit
+ // causes the dateChanged() signal to be emitted, even if the date
+ // wasn't actually changed. While this behaviour is questionable,
+ // we include this test so a change to the behaviour can't go unnoticed.
QSignalSpy enterSpy(testWidget, SIGNAL(dateChanged(const QDate &)));
QTest::keyClick(testWidget, Qt::Key_Enter);
QCOMPARE(enterSpy.count(), 1);
-
-#if 0
QVariantList list = enterSpy.takeFirst();
- QCOMPARE(list.at(0).toDate(), QDate(2004, 9, 15));
-#endif
-
+ QCOMPARE(list.at(0).toDate(), QDate(2004, 5, 9));
}
void tst_QDateTimeEdit::specialValueText()
diff --git a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
index 568b82d28b..1479ee768d 100644
--- a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
+++ b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index b470edc38a..6a2517e0bb 100644
--- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index 41616dcfc1..ce86ea3dfc 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
index cc66eaae26..4dd0890fc0 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
+++ b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
@@ -2,3 +2,6 @@ CONFIG += testcase
TARGET = tst_qdoublespinbox
QT += widgets testlib
SOURCES += tst_qdoublespinbox.cpp
+
+# QTBUG-23641 - unstable test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index 8e3a9db824..51e91b40bd 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
index 6014ce5165..77f3b15184 100644
--- a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
index b17529845a..920e5401c4 100644
--- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
+++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
index 72b3dfe8ca..b80f50bc67 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
index a8dadf77e0..bd919d2c4a 100644
--- a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
index b7f4bd0061..bff3f59c50 100644
--- a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index 18da7fdf5f..f4775cae30 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -181,7 +181,7 @@ void tst_QLabel::init()
testWidget->setBuddy( 0 );
testWidget->setIndent( 0 );
testWidget->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
- testWidget->setScaledContents( FALSE );
+ testWidget->setScaledContents( false );
}
void tst_QLabel::cleanup()
diff --git a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
index 1341ab3d22..5ce4ac3dba 100644
--- a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
+++ b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 1e39e03e80..1fabc45cac 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 1ff21e923a..c9c627dffa 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index da587c0393..6a6d29cb9a 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index 9cc764b716..b66ffabfcd 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index 0714910faf..924c134736 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
index 3fb6ae61a8..6bacaa0d37 100644
--- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
+++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
@@ -2,3 +2,6 @@ CONFIG += testcase
TARGET = tst_qmenubar
QT += widgets testlib
SOURCES += tst_qmenubar.cpp
+
+# QTBUG-4965, QTBUG-11823 - unstable tests
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index ad7071f651..05ab9d014a 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -722,7 +722,7 @@ void tst_QMenuBar::check_homeKey()
{
// I'm temporarily shutting up this testcase.
// Seems like the behaviour i'm expecting isn't ok.
- QVERIFY( TRUE );
+ QVERIFY( true );
return;
QEXPECT_FAIL( "0", "Popupmenu should respond to a Home key", Abort );
@@ -760,7 +760,7 @@ void tst_QMenuBar::check_endKey()
{
// I'm temporarily silenting this testcase.
// Seems like the behaviour i'm expecting isn't ok.
- QVERIFY( TRUE );
+ QVERIFY( true );
return;
QEXPECT_FAIL( "0", "Popupmenu should respond to an End key", Abort );
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 96364446be..bfd7050df1 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
index 0844c2f5e2..97ccf60d27 100644
--- a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 3a0a320831..2f290cb4f1 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -152,10 +152,10 @@ void tst_QPushButton::cleanupTestCase()
void tst_QPushButton::init()
{
- testWidget->setAutoRepeat( FALSE );
- testWidget->setDown( FALSE );
+ testWidget->setAutoRepeat( false );
+ testWidget->setDown( false );
testWidget->setText("Test");
- testWidget->setEnabled( TRUE );
+ testWidget->setEnabled( true );
QKeySequence seq;
testWidget->setShortcut( seq );
@@ -206,17 +206,17 @@ void tst_QPushButton::autoRepeat()
QVERIFY( !tmp.autoRepeat() );
// check if we can toggle the mode
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setAutoRepeat( true );
QVERIFY( testWidget->autoRepeat() );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setAutoRepeat( false );
QVERIFY( !testWidget->autoRepeat() );
resetCounters();
// check that the button is down if we press space and not in autorepeat
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QTest::keyPress( testWidget, Qt::Key_Space );
QTest::qWait( 300 );
@@ -233,8 +233,8 @@ void tst_QPushButton::autoRepeat()
// check that the button is down if we press space while in autorepeat
// we can't actually confirm how many times it is fired, more than 1 is enough.
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( true );
QTest::keyPress( testWidget, Qt::Key_Space );
QTest::qWait(900);
QVERIFY( testWidget->isDown() );
@@ -248,8 +248,8 @@ void tst_QPushButton::autoRepeat()
// check that pressing ENTER has no effect
resetCounters();
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( FALSE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( false );
QTest::keyPress( testWidget, Qt::Key_Enter );
QTest::qWait( 300 );
@@ -263,8 +263,8 @@ void tst_QPushButton::autoRepeat()
// check that pressing ENTER has no effect
resetCounters();
- testWidget->setDown( FALSE );
- testWidget->setAutoRepeat( TRUE );
+ testWidget->setDown( false );
+ testWidget->setAutoRepeat( true );
QTest::keyClick( testWidget, Qt::Key_Enter );
QTest::qWait( 300 );
QVERIFY( !testWidget->isDown() );
@@ -307,26 +307,26 @@ void tst_QPushButton::isCheckable()
void tst_QPushButton::setDown()
{
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isDown() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QVERIFY( testWidget->isDown() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QTest::keyClick( testWidget, Qt::Key_Escape );
QVERIFY( !testWidget->isDown() );
}
void tst_QPushButton::isChecked()
{
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
QVERIFY( !testWidget->isChecked() );
- testWidget->setDown( TRUE );
+ testWidget->setDown( true );
QVERIFY( !testWidget->isChecked() );
- testWidget->setDown( FALSE );
+ testWidget->setDown( false );
testWidget->toggle();
QVERIFY( testWidget->isChecked() == testWidget->isCheckable() );
}
@@ -335,7 +335,7 @@ void tst_QPushButton::toggle()
{
// the pushbutton shouldn't toggle the button.
testWidget->toggle();
- QVERIFY( testWidget->isChecked() == FALSE );
+ QVERIFY( testWidget->isChecked() == false );
}
void tst_QPushButton::toggled()
@@ -421,7 +421,7 @@ void tst_QPushButton::clicked()
press_count = 0;
release_count = 0;
- testWidget->setDown(FALSE);
+ testWidget->setDown(false);
for (uint i=0; i<10; i++)
QTest::mouseClick( testWidget, Qt::LeftButton );
QCOMPARE( press_count, (uint)10 );
diff --git a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
index 79d3c8ef9a..19a5b62277 100644
--- a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
+++ b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp b/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp
index 2e245ab0c7..2bc04d74c0 100644
--- a/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp
+++ b/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
index ba4dc855ce..dbf8c9052e 100644
--- a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 3bd5da4649..65b46c1c0c 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
index 9b7d0a7f0b..5e37e21949 100644
--- a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
+++ b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
index 43942e96d8..09cc51c113 100644
--- a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
+++ b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index 620263bcb6..cc01642fc1 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index 7aa760bc22..2af62ceea0 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
index e5651ceebf..94ac78e038 100644
--- a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
+++ b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
index 56d7e7bedf..86f97d18d3 100644
--- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
+++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
index d43e17135a..2bea17f56f 100644
--- a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index de5080cdc2..a4d2739186 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
index ff3faeb1d3..6370c1ce51 100644
--- a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
+++ b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 9c90255da1..a350f4d862 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
index a796554d6b..e029f66cf2 100644
--- a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
index ca3fb34632..10d476f662 100644
--- a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
+++ b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -273,23 +273,23 @@ void tst_QToolBox::change()
QCOMPARE( currentIndex, 1 );
QCOMPARE( testWidget->currentIndex(), 1 );
- testWidget->setItemEnabled( testWidget->currentIndex(), FALSE );
+ testWidget->setItemEnabled( testWidget->currentIndex(), false );
QCOMPARE( currentIndex, 2 );
QCOMPARE( testWidget->currentIndex(), 2 );
currentIndex = -1;
- testWidget->setItemEnabled( testWidget->indexOf(lastItem), FALSE );
+ testWidget->setItemEnabled( testWidget->indexOf(lastItem), false );
QCOMPARE( currentIndex, -1 );
QCOMPARE( testWidget->currentIndex(), 2 );
- testWidget->setItemEnabled( testWidget->currentIndex(), FALSE );
+ testWidget->setItemEnabled( testWidget->currentIndex(), false );
QCOMPARE( currentIndex, 0 );
currentIndex = -1;
- testWidget->setItemEnabled( testWidget->currentIndex(), FALSE );
+ testWidget->setItemEnabled( testWidget->currentIndex(), false );
QCOMPARE( currentIndex, -1 );
- testWidget->setItemEnabled( 1, TRUE );
+ testWidget->setItemEnabled( 1, true );
}
void tst_QToolBox::clear()
diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
index 333b98b3be..8eef254837 100644
--- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
+++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp b/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp
index 28ffb4280f..8410a183cb 100644
--- a/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp
+++ b/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -303,7 +303,7 @@ void tst_QWorkspace::windowActivatedWithMinimize()
void tst_QWorkspace::accelActivated()
{
- accelPressed = TRUE;
+ accelPressed = true;
}
void tst_QWorkspace::showWindows()
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index 734d7b473b..b5dc2e6081 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -125,6 +125,8 @@ private slots:
void taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const;
void cloneDTD_QTBUG8398() const;
+ void DTDNotationDecl();
+ void DTDEntityDecl();
void cleanupTestCase() const;
@@ -166,7 +168,7 @@ void tst_QDom::setContent_data()
QTest::addColumn<QStringList>("featuresFalse");
QTest::addColumn<QString>("res");
-/* QTest::newRow( "01" ) << doc01
+ QTest::newRow( "01" ) << doc01
<< QStringList()
<< QString("http://trolltech.com/xml/features/report-whitespace-only-CharData").split(' ')
<< QString("<!DOCTYPE a1>\n"
@@ -238,7 +240,7 @@ void tst_QDom::setContent_data()
" </b3>\n"
"</a1>\n");
- */ QTest::newRow("05") << QString("<message>\n"
+ QTest::newRow("05") << QString("<message>\n"
" <body>&lt;b&gt;foo&lt;/b&gt;>]]&gt;</body>\n"
"</message>\n")
<< QStringList() << QStringList()
@@ -261,11 +263,11 @@ void tst_QDom::setContent()
QStringList::Iterator it;
for ( it = featuresTrue.begin(); it != featuresTrue.end(); ++it ) {
QVERIFY( reader.hasFeature( *it ) );
- reader.setFeature( *it, TRUE );
+ reader.setFeature( *it, true );
}
for ( it = featuresFalse.begin(); it != featuresFalse.end(); ++it ) {
QVERIFY( reader.hasFeature( *it ) );
- reader.setFeature( *it, FALSE );
+ reader.setFeature( *it, false );
}
QDomDocument domDoc;
@@ -386,7 +388,7 @@ void tst_QDom::hasAttributes_data()
}
/*
- This function tests that QDomNode::hasAttributes() returns TRUE if and only
+ This function tests that QDomNode::hasAttributes() returns true if and only
if the node has attributes (i.e. QDomNode::attributes() returns a list with
attributes in it).
*/
@@ -588,13 +590,13 @@ void tst_QDom::cloneNode_data()
QTest::addColumn<QList<QVariant> >("pathToNode");
QTest::addColumn<bool>("deep");
- QTest::newRow( "noDeep_01" ) << doc01 << nodeB1 << (bool)FALSE;
- QTest::newRow( "noDeep_02" ) << doc01 << nodeC1 << (bool)FALSE;
- QTest::newRow( "noDeep_03" ) << doc01 << nodeC2 << (bool)FALSE;
+ QTest::newRow( "noDeep_01" ) << doc01 << nodeB1 << false;
+ QTest::newRow( "noDeep_02" ) << doc01 << nodeC1 << false;
+ QTest::newRow( "noDeep_03" ) << doc01 << nodeC2 << false;
- QTest::newRow( "deep_01" ) << doc01 << nodeB1 << (bool)TRUE;
- QTest::newRow( "deep_02" ) << doc01 << nodeC1 << (bool)TRUE;
- QTest::newRow( "deep_03" ) << doc01 << nodeC2 << (bool)TRUE;
+ QTest::newRow( "deep_01" ) << doc01 << nodeB1 << true;
+ QTest::newRow( "deep_02" ) << doc01 << nodeC1 << true;
+ QTest::newRow( "deep_03" ) << doc01 << nodeC2 << true;
}
void tst_QDom::cloneNode()
@@ -732,14 +734,14 @@ void tst_QDom::ownerDocumentTask27424_data()
QTest::addColumn<bool>("insertLevel2AfterCstr");
QTest::addColumn<bool>("insertLevel3AfterCstr");
- QTest::newRow( "000" ) << (bool)FALSE << (bool)FALSE << (bool)FALSE;
- QTest::newRow( "001" ) << (bool)FALSE << (bool)FALSE << (bool)TRUE;
- QTest::newRow( "010" ) << (bool)FALSE << (bool)TRUE << (bool)FALSE;
- QTest::newRow( "011" ) << (bool)FALSE << (bool)TRUE << (bool)TRUE;
- QTest::newRow( "100" ) << (bool)TRUE << (bool)FALSE << (bool)FALSE;
- QTest::newRow( "101" ) << (bool)TRUE << (bool)FALSE << (bool)TRUE;
- QTest::newRow( "110" ) << (bool)TRUE << (bool)TRUE << (bool)FALSE;
- QTest::newRow( "111" ) << (bool)TRUE << (bool)TRUE << (bool)TRUE;
+ QTest::newRow( "000" ) << false << false << false;
+ QTest::newRow( "001" ) << false << false << true;
+ QTest::newRow( "010" ) << false << true << false;
+ QTest::newRow( "011" ) << false << true << true;
+ QTest::newRow( "100" ) << true << false << false;
+ QTest::newRow( "101" ) << true << false << true;
+ QTest::newRow( "110" ) << true << true << false;
+ QTest::newRow( "111" ) << true << true << true;
}
void tst_QDom::ownerDocumentTask27424()
@@ -858,14 +860,14 @@ void tst_QDom::documentCreationTask27424_data()
QTest::addColumn<bool>("insertLevel2AfterCstr");
QTest::addColumn<bool>("insertLevel3AfterCstr");
- QTest::newRow( "000" ) << (bool)FALSE << (bool)FALSE << (bool)FALSE;
- QTest::newRow( "001" ) << (bool)FALSE << (bool)FALSE << (bool)TRUE;
- QTest::newRow( "010" ) << (bool)FALSE << (bool)TRUE << (bool)FALSE;
- QTest::newRow( "011" ) << (bool)FALSE << (bool)TRUE << (bool)TRUE;
- QTest::newRow( "100" ) << (bool)TRUE << (bool)FALSE << (bool)FALSE;
- QTest::newRow( "101" ) << (bool)TRUE << (bool)FALSE << (bool)TRUE;
- QTest::newRow( "110" ) << (bool)TRUE << (bool)TRUE << (bool)FALSE;
- QTest::newRow( "111" ) << (bool)TRUE << (bool)TRUE << (bool)TRUE;
+ QTest::newRow( "000" ) << false << false << false;
+ QTest::newRow( "001" ) << false << false << true;
+ QTest::newRow( "010" ) << false << true << false;
+ QTest::newRow( "011" ) << false << true << true;
+ QTest::newRow( "100" ) << true << false << false;
+ QTest::newRow( "101" ) << true << false << true;
+ QTest::newRow( "110" ) << true << true << false;
+ QTest::newRow( "111" ) << true << true << true;
}
void tst_QDom::documentCreationTask27424()
@@ -961,9 +963,9 @@ bool tst_QDom::isDeepEqual(const QDomNode &n1, const QDomNode &n2)
}
/*
- Returns TRUE if \a doc1 and \a doc2 represent the same XML document, i.e.
+ Returns true if \a doc1 and \a doc2 represent the same XML document, i.e.
they have the same informational content. Otherwise, this function returns
- FALSE.
+ false.
*/
bool tst_QDom::compareDocuments( const QDomDocument &doc1, const QDomDocument &doc2 )
{
@@ -971,12 +973,12 @@ bool tst_QDom::compareDocuments( const QDomDocument &doc1, const QDomDocument &d
}
/*
- Returns TRUE if \a node1 and \a node2 represent the same XML node, i.e.
+ Returns true if \a node1 and \a node2 represent the same XML node, i.e.
they have the same informational content. Otherwise, this function returns
- FALSE.
+ false.
- If \a deep is TRUE, children of the nodes are also tested. If \a deep is
- FALSE, only \a node1 and \a node 2 are compared.
+ If \a deep is true, children of the nodes are also tested. If \a deep is
+ false, only \a node1 and \a node 2 are compared.
*/
bool tst_QDom::compareNodes( const QDomNode &node1, const QDomNode &node2, bool deep )
{
@@ -995,7 +997,7 @@ bool tst_QDom::compareNodes( const QDomNode &node1, const QDomNode &node2, bool
}
if ( node1.isNull() && node2.isNull() )
- return TRUE;
+ return true;
// ### I am not sure if this test is complete
bool equal = node1.nodeName() == node2.nodeName();
equal = equal && node1.nodeType() == node2.nodeType();
@@ -1923,5 +1925,52 @@ void tst_QDom::cloneDTD_QTBUG8398() const
domDocument2.save(stream, 0);
QCOMPARE(output, expected);
}
+
+void tst_QDom::DTDNotationDecl()
+{
+ QString dtd("<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<!DOCTYPE first [\n"
+ "<!NOTATION gif SYSTEM 'image/gif'>\n"
+ "<!NOTATION jpeg SYSTEM 'image/jpeg'>\n"
+ "]>\n"
+ "<first/>\n");
+
+ QDomDocument domDocument;
+ QVERIFY(domDocument.setContent(dtd));
+
+ const QDomDocumentType doctype = domDocument.doctype();
+ QCOMPARE(doctype.notations().size(), 2);
+
+ QVERIFY(doctype.namedItem(QString("gif")).isNotation());
+ QCOMPARE(doctype.namedItem(QString("gif")).toNotation().systemId(), QString("image/gif"));
+
+ QVERIFY(doctype.namedItem(QString("jpeg")).isNotation());
+ QCOMPARE(doctype.namedItem(QString("jpeg")).toNotation().systemId(), QString("image/jpeg"));
+}
+
+void tst_QDom::DTDEntityDecl()
+{
+ QString dtd("<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<!DOCTYPE first [\n"
+ "<!ENTITY secondFile SYSTEM 'second.xml'>\n"
+ "<!ENTITY logo SYSTEM \"http://www.w3c.org/logo.gif\" NDATA gif>"
+ "]>\n"
+ "<first/>\n");
+
+ QDomDocument domDocument;
+ QVERIFY(domDocument.setContent(dtd));
+
+ const QDomDocumentType doctype = domDocument.doctype();
+ QCOMPARE(doctype.entities().count(), 2);
+
+ QVERIFY(doctype.namedItem(QString("secondFile")).isEntity());
+ QCOMPARE(doctype.namedItem(QString("secondFile")).toEntity().systemId(), QString("second.xml"));
+ QCOMPARE(doctype.namedItem(QString("secondFile")).toEntity().notationName(), QString());
+
+ QVERIFY(doctype.namedItem(QString("logo")).isEntity());
+ QCOMPARE(doctype.namedItem(QString("logo")).toEntity().systemId(), QString("http://www.w3c.org/logo.gif"));
+ QCOMPARE(doctype.namedItem(QString("logo")).toEntity().notationName(), QString("gif"));
+}
+
QTEST_MAIN(tst_QDom)
#include "tst_qdom.moc"
diff --git a/tests/auto/xml/sax/qxml/tst_qxml.cpp b/tests/auto/xml/sax/qxml/tst_qxml.cpp
index 8a5e750563..afe219c635 100644
--- a/tests/auto/xml/sax/qxml/tst_qxml.cpp
+++ b/tests/auto/xml/sax/qxml/tst_qxml.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
index ba6d2922f3..5bc3a09fc5 100644
--- a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
+++ b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -41,7 +41,9 @@
#include <QDomDocument>
-#include <QHttp>
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
+#include <QNetworkRequest>
#include <QTcpServer>
#include <QTcpSocket>
#include <QTimer>
@@ -116,13 +118,16 @@ class ServerAndClient : public QObject
public:
ServerAndClient(QEventLoop &ev) : success(false)
, eventLoop(ev)
+ , isBody(false)
+ , bodyBytesRead(0)
+ , bodyLength(-1)
{
setObjectName("serverAndClient");
tcpServer = new QTcpServer(this);
connect(tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection()));
tcpServer->listen(QHostAddress::LocalHost, 1088);
- httpClient = new QHttp(this);
- connect(httpClient, SIGNAL(requestFinished(int, bool)), SLOT(requestFinished(int, bool)));
+ httpClient = new QNetworkAccessManager(this);
+ connect(httpClient, SIGNAL(finished(QNetworkReply*)), SLOT(requestFinished(QNetworkReply*)));
}
bool success;
@@ -132,25 +137,26 @@ public slots:
void doIt()
{
QUrl url("http://127.0.0.1:1088");
- httpClient->setHost( url.host(), 1088);
- QHttpRequestHeader req_head("POST", url.path());
- req_head.setValue("host", url.host());
- req_head.setValue("user-agent", "xml-test");
- req_head.setValue("keep-alive", "false");
+ QNetworkRequest req(url);
+ req.setRawHeader("POST", url.path().toAscii());
+ req.setRawHeader("user-agent", "xml-test");
+ req.setRawHeader("keep-alive", "false");
+ req.setRawHeader("host", url.host().toAscii());
QByteArray xmlrpc("<methodCall>\r\n\
<methodName>SFD.GetVersion</methodName>\r\n\
<params/>\r\n\
</methodCall>");
- req_head.setContentLength(xmlrpc.size());
- req_head.setContentType("text/xml");
+ req.setHeader(QNetworkRequest::ContentLengthHeader, xmlrpc.size());
+ req.setHeader(QNetworkRequest::ContentTypeHeader, "text/xml");
- httpClient->request(req_head, xmlrpc);
+ httpClient->post(req, xmlrpc);
}
- void requestFinished(int, bool isError)
+ void requestFinished(QNetworkReply *reply)
{
- QVERIFY(!isError);
+ QVERIFY(reply->error() == QNetworkReply::NoError);
+ reply->deleteLater();
}
private slots:
@@ -165,32 +171,43 @@ private slots:
void readyRead()
{
QTcpSocket *const s = static_cast<QTcpSocket *>(sender());
- int bodyLength = -1;
- while(s->canReadLine())
+ while (s->bytesAvailable())
{
const QString line(s->readLine());
- if(line.startsWith("content-length:"))
+ if (line.startsWith("Content-Length:"))
bodyLength = line.mid(15).toInt();
- if(line == "\r\n")
+ if (isBody)
{
- if(bodyLength == -1)
+ body.append(line);
+ bodyBytesRead += line.length();
+ }
+ else if (line == "\r\n")
+ {
+ isBody = true;
+ if (bodyLength == -1)
{
qFatal("No length was specified in the header.");
}
-
- QDomDocument domDoc;
- success = domDoc.setContent(s->read(bodyLength));
- eventLoop.exit();
}
}
+
+ if (bodyBytesRead == bodyLength)
+ {
+ QDomDocument domDoc;
+ success = domDoc.setContent(body);
+ eventLoop.exit();
+ }
}
private:
+ QByteArray body;
+ int bodyBytesRead, bodyLength;
+ bool isBody;
QTcpServer *tcpServer;
- QHttp* httpClient;
+ QNetworkAccessManager* httpClient;
};
void tst_QXmlInputSource::waitForReadyIODevice() const
diff --git a/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh b/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
index ae2a5ffb5c..b9895f8598 100755
--- a/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
+++ b/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
index 05d9ce6754..840f237875 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
index d1f1c3cfda..0089951d30 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -124,7 +124,7 @@ bool ContentHandler::startDocument()
m_result += nestPrefix();
m_result += "startDocument()\n";
++m_nest;
- return TRUE;
+ return true;
}
bool ContentHandler::endDocument()
@@ -132,7 +132,7 @@ bool ContentHandler::endDocument()
--m_nest;
m_result += nestPrefix();
m_result += "endDocument()\n";
- return TRUE;
+ return true;
}
bool ContentHandler::startElement(const QString &namespaceURI,
@@ -146,7 +146,7 @@ bool ContentHandler::startElement(const QString &namespaceURI,
+ "\", qName=\"" + escapeStr(qName)
+ "\", atts=[" + formatAttributes(atts) + "])\n";
++m_nest;
- return TRUE;
+ return true;
}
QString ContentHandler::escapeStr(const QString &s)
@@ -183,14 +183,14 @@ bool ContentHandler::endElement(const QString &namespaceURI,
m_result += "endElement(namespaceURI=\"" + escapeStr(namespaceURI)
+ "\", localName=\"" + escapeStr(localName)
+ "\", qName=\"" + escapeStr(qName) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::characters(const QString &ch)
{
m_result += nestPrefix();
m_result += "characters(ch=\"" + escapeStr(ch) + "\")\n";
- return TRUE;
+ return true;
}
void ContentHandler::setDocumentLocator(QXmlLocator *locator)
@@ -208,7 +208,7 @@ bool ContentHandler::startPrefixMapping (const QString &prefix, const QString &
m_result += "startPrefixMapping(prefix=\"" + escapeStr(prefix)
+ "\", uri=\"" + escapeStr(uri) + "\")\n";
++m_nest;
- return TRUE;
+ return true;
}
bool ContentHandler::endPrefixMapping(const QString &prefix)
@@ -216,14 +216,14 @@ bool ContentHandler::endPrefixMapping(const QString &prefix)
--m_nest;
m_result += nestPrefix();
m_result += "endPrefixMapping(prefix=\"" + escapeStr(prefix) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::ignorableWhitespace(const QString & ch)
{
m_result += nestPrefix();
m_result += "ignorableWhitespace(ch=\"" + escapeStr(ch) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::processingInstruction(const QString &target, const QString &data)
@@ -231,14 +231,14 @@ bool ContentHandler::processingInstruction(const QString &target, const QString
m_result += nestPrefix();
m_result += "processingInstruction(target=\"" + escapeStr(target)
+ "\", data=\"" + escapeStr(data) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::skippedEntity (const QString & name)
{
m_result += nestPrefix();
m_result += "skippedEntity(name=\"" + escapeStr(name) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::warning(const QXmlParseException & exception)
@@ -256,7 +256,7 @@ bool ContentHandler::warning(const QXmlParseException & exception)
+ "\", systemId=\"" + escapeStr(exception.systemId())
+ "\", message=\"" + escapeStr(exception.message())
+ "\"})\n";
- return TRUE;
+ return true;
}
bool ContentHandler::error(const QXmlParseException & exception)
@@ -274,7 +274,7 @@ bool ContentHandler::error(const QXmlParseException & exception)
+ "\", systemId=\"" + escapeStr(exception.systemId())
+ "\", message=\"" + escapeStr(exception.message())
+ "\"})\n";
- return TRUE;
+ return true;
}
bool ContentHandler::fatalError(const QXmlParseException & exception)
@@ -292,7 +292,7 @@ bool ContentHandler::fatalError(const QXmlParseException & exception)
+ "\", systemId=\"" + escapeStr(exception.systemId())
+ "\", message=\"" + escapeStr(exception.message())
+ "\"})\n";
- return TRUE;
+ return true;
}
bool ContentHandler::notationDecl ( const QString & name,
@@ -303,7 +303,7 @@ bool ContentHandler::notationDecl ( const QString & name,
m_result += "notationDecl(name=\"" + escapeStr(name) + "\", publicId=\""
+ escapeStr(publicId) + "\", systemId=\""
+ escapeStr(systemId) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::unparsedEntityDecl ( const QString & name,
@@ -317,7 +317,7 @@ bool ContentHandler::unparsedEntityDecl ( const QString & name,
+ "\", systemId=\"" + escapeStr(systemId)
+ "\", notationName=\"" + escapeStr(notationName)
+ "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::resolveEntity(const QString & publicId,
@@ -328,7 +328,7 @@ bool ContentHandler::resolveEntity(const QString & publicId,
m_result += "resolveEntity(publicId=\"" + escapeStr(publicId)
+ "\", systemId=\"" + escapeStr(systemId)
+ "\", ret={})\n";
- return TRUE;
+ return true;
}
bool ContentHandler::startDTD ( const QString & name, const QString & publicId, const QString & systemId )
@@ -338,7 +338,7 @@ bool ContentHandler::startDTD ( const QString & name, const QString & publicId,
+ "\", publicId=\"" + escapeStr(publicId)
+ "\", systemId=\"" + escapeStr(systemId) + "\")\n";
++m_nest;
- return TRUE;
+ return true;
}
bool ContentHandler::endDTD ()
@@ -346,7 +346,7 @@ bool ContentHandler::endDTD ()
--m_nest;
m_result += nestPrefix();
m_result += "endDTD()\n";
- return TRUE;
+ return true;
}
bool ContentHandler::startEntity ( const QString & name )
@@ -354,7 +354,7 @@ bool ContentHandler::startEntity ( const QString & name )
m_result += nestPrefix();
m_result += "startEntity(name=\"" + escapeStr(name) + "\")\n";
++m_nest;
- return TRUE;
+ return true;
}
bool ContentHandler::endEntity ( const QString & name )
@@ -362,7 +362,7 @@ bool ContentHandler::endEntity ( const QString & name )
--m_nest;
m_result += nestPrefix();
m_result += "endEntity(name=\"" + escapeStr(name) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::startCDATA ()
@@ -370,7 +370,7 @@ bool ContentHandler::startCDATA ()
m_result += nestPrefix();
m_result += "startCDATA()\n";
++m_nest;
- return TRUE;
+ return true;
}
bool ContentHandler::endCDATA ()
@@ -378,14 +378,14 @@ bool ContentHandler::endCDATA ()
--m_nest;
m_result += nestPrefix();
m_result += "endCDATA()\n";
- return TRUE;
+ return true;
}
bool ContentHandler::comment ( const QString & ch )
{
m_result += nestPrefix();
m_result += "comment(ch=\"" + escapeStr(ch) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::attributeDecl ( const QString & eName,
@@ -399,7 +399,7 @@ bool ContentHandler::attributeDecl ( const QString & eName,
+ escapeStr(aName) + "\", type=\"" + escapeStr(type)
+ "\", valueDefault=\"" + escapeStr(valueDefault)
+ "\", value=\"" + escapeStr(value) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::internalEntityDecl ( const QString & name,
@@ -408,7 +408,7 @@ bool ContentHandler::internalEntityDecl ( const QString & name,
m_result += nestPrefix();
m_result += "internatlEntityDecl(name=\"" + escapeStr(name)
+ "\", value=\"" + escapeStr(value) + "\")\n";
- return TRUE;
+ return true;
}
bool ContentHandler::externalEntityDecl ( const QString & name,
@@ -419,7 +419,7 @@ bool ContentHandler::externalEntityDecl ( const QString & name,
m_result += "externalEntityDecl(name=\"" + escapeStr(name)
+ "\", publicId=\"" + escapeStr(publicId)
+ "\", systemId=\"" + escapeStr(systemId) + "\")\n";
- return TRUE;
+ return true;
}
Parser::Parser()
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
index e3d95ce811..e91ec53d5a 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
index 5447e6f0eb..1478ae7e23 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/shared/baselineprotocol.cpp b/tests/baselineserver/shared/baselineprotocol.cpp
index e1ac2bddbd..e9adfae691 100644
--- a/tests/baselineserver/shared/baselineprotocol.cpp
+++ b/tests/baselineserver/shared/baselineprotocol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/shared/baselineprotocol.h b/tests/baselineserver/shared/baselineprotocol.h
index ffdbb39d67..cd40a1241b 100644
--- a/tests/baselineserver/shared/baselineprotocol.h
+++ b/tests/baselineserver/shared/baselineprotocol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/shared/lookup3.cpp b/tests/baselineserver/shared/lookup3.cpp
index 1ad2d371c4..4db5b3c622 100644
--- a/tests/baselineserver/shared/lookup3.cpp
+++ b/tests/baselineserver/shared/lookup3.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/shared/qbaselinetest.cpp b/tests/baselineserver/shared/qbaselinetest.cpp
index de3150e080..6e2491054c 100644
--- a/tests/baselineserver/shared/qbaselinetest.cpp
+++ b/tests/baselineserver/shared/qbaselinetest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/shared/qbaselinetest.h b/tests/baselineserver/shared/qbaselinetest.h
index 8594799447..84d40477b1 100644
--- a/tests/baselineserver/shared/qbaselinetest.h
+++ b/tests/baselineserver/shared/qbaselinetest.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/src/baselineserver.cpp b/tests/baselineserver/src/baselineserver.cpp
index 5ac78d4b32..7adc335fb2 100644
--- a/tests/baselineserver/src/baselineserver.cpp
+++ b/tests/baselineserver/src/baselineserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -101,7 +101,7 @@ QString BaselineServer::settingsFilePath()
return settingsFile;
}
-void BaselineServer::incomingConnection(int socketDescriptor)
+void BaselineServer::incomingConnection(qintptr socketDescriptor)
{
QString runId = QDateTime::currentDateTime().toString(QLS("MMMdd-hhmmss"));
if (runId == lastRunId) {
diff --git a/tests/baselineserver/src/baselineserver.h b/tests/baselineserver/src/baselineserver.h
index 333d9ed30b..a6065cc099 100644
--- a/tests/baselineserver/src/baselineserver.h
+++ b/tests/baselineserver/src/baselineserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -69,7 +69,7 @@ public:
static QString settingsFilePath();
protected:
- void incomingConnection(int socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor);
private slots:
void heartbeat();
diff --git a/tests/baselineserver/src/main.cpp b/tests/baselineserver/src/main.cpp
index 8e5fa4e669..685e853575 100644
--- a/tests/baselineserver/src/main.cpp
+++ b/tests/baselineserver/src/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/src/report.cpp b/tests/baselineserver/src/report.cpp
index 16f061c7e7..a726149d6a 100644
--- a/tests/baselineserver/src/report.cpp
+++ b/tests/baselineserver/src/report.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/baselineserver/src/report.h b/tests/baselineserver/src/report.h
index 610497c84b..b4488f1489 100644
--- a/tests/baselineserver/src/report.h
+++ b/tests/baselineserver/src/report.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
index 995b606892..1499eccd50 100644
--- a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
+++ b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
index 8f07587371..8f11dc792e 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
+++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
index 40a5d75f3f..9d7d60ebe0 100644
--- a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
+++ b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index cecd0de1da..4e4b9cbf0b 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
index af3be799c6..af3be799c6 100755..100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 8c9f1cc423..584eb32021 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
index 7e674e38e2..bef8115287 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index 11cd5c76b2..d291e3f412 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 42220bf09a..479737a353 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qiodevice/main.cpp b/tests/benchmarks/corelib/io/qiodevice/main.cpp
index f9e04a2204..e4244a71ef 100644
--- a/tests/benchmarks/corelib/io/qiodevice/main.cpp
+++ b/tests/benchmarks/corelib/io/qiodevice/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
index 0dff0ce86e..0dff0ce86e 100755..100644
--- a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
index c9f3a84365..c0f16068d7 100644
--- a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/io/qurl/main.cpp b/tests/benchmarks/corelib/io/qurl/main.cpp
index 7e5035f250..c92c841cc8 100644
--- a/tests/benchmarks/corelib/io/qurl/main.cpp
+++ b/tests/benchmarks/corelib/io/qurl/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/events/main.cpp b/tests/benchmarks/corelib/kernel/events/main.cpp
index 1b51b087b3..09f37616be 100644
--- a/tests/benchmarks/corelib/kernel/events/main.cpp
+++ b/tests/benchmarks/corelib/kernel/events/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro
index da3f0d609f..8b7d8c8f90 100644
--- a/tests/benchmarks/corelib/kernel/kernel.pro
+++ b/tests/benchmarks/corelib/kernel/kernel.pro
@@ -4,4 +4,5 @@ SUBDIRS = \
qmetaobject \
qmetatype \
qobject \
- qvariant
+ qvariant \
+ qcoreapplication
diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp b/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp
new file mode 100644
index 0000000000..e1e4e2cc9a
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Robin Burchell <robin+qt@viroteck.net>
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore>
+#include <qtest.h>
+#include <qcoreapplication.h>
+
+class QCoreApplicationBenchmark : public QObject
+{
+Q_OBJECT
+private slots:
+ void event_posting_benchmark_data();
+ void event_posting_benchmark();
+};
+
+void QCoreApplicationBenchmark::event_posting_benchmark_data()
+{
+ QTest::addColumn<int>("size");
+ QTest::newRow("50 events") << 50;
+ QTest::newRow("100 events") << 100;
+ QTest::newRow("200 events") << 200;
+ QTest::newRow("1000 events") << 1000;
+ QTest::newRow("10000 events") << 10000;
+ QTest::newRow("100000 events") << 100000;
+ QTest::newRow("1000000 events") << 1000000;
+}
+
+void QCoreApplicationBenchmark::event_posting_benchmark()
+{
+ QFETCH(int, size);
+
+ int type = QEvent::registerEventType();
+ QCoreApplication *app = QCoreApplication::instance();
+
+ // benchmark posting & sending events
+ QBENCHMARK {
+ for (int i = 0; i < size; ++i)
+ QCoreApplication::postEvent(app, new QEvent(QEvent::Type(type)));
+ QCoreApplication::sendPostedEvents();
+ }
+}
+
+QTEST_MAIN(QCoreApplicationBenchmark)
+
+#include "main.moc"
diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
new file mode 100644
index 0000000000..2c29fafca4
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
@@ -0,0 +1,9 @@
+QT += testlib
+
+TEMPLATE = app
+TARGET = tst_bench_qcoreapplication
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
index 4214a41f5c..8b68f032ea 100644
--- a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
index 36c88ea251..cee747316f 100644
--- a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp
index 13ba073eb4..905b21fca0 100644
--- a/tests/benchmarks/corelib/kernel/qobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/qobject/object.cpp b/tests/benchmarks/corelib/kernel/qobject/object.cpp
index 1c4a558b29..0b036d0139 100644
--- a/tests/benchmarks/corelib/kernel/qobject/object.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/object.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/qobject/object.h b/tests/benchmarks/corelib/kernel/qobject/object.h
index 707455e67c..c3cd23d6be 100644
--- a/tests/benchmarks/corelib/kernel/qobject/object.h
+++ b/tests/benchmarks/corelib/kernel/qobject/object.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
index 7dec7a8e74..151e78e5ce 100644
--- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
index 85d14b99b6..00e2684066 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
index a035cf3627..9e33655d18 100644
--- a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,6 +60,8 @@ private slots:
void fromByteArray();
void toRfc4122();
void fromRfc4122();
+ void createUuidV3();
+ void createUuidV5();
void toDataStream();
void fromDataStream();
void isNull();
@@ -129,6 +131,24 @@ void tst_bench_QUuid::fromRfc4122()
}
}
+void tst_bench_QUuid::createUuidV3()
+{
+ QUuid ns = QUuid::createUuid();
+ QByteArray name = QByteArray("Test");
+ QBENCHMARK {
+ QUuid uuid = QUuid::createUuidV3(ns, name);
+ }
+}
+
+void tst_bench_QUuid::createUuidV5()
+{
+ QUuid ns = QUuid::createUuid();
+ QByteArray name = QByteArray("Test");
+ QBENCHMARK {
+ QUuid uuid = QUuid::createUuidV5(ns, name);
+ }
+}
+
void tst_bench_QUuid::toDataStream()
{
QUuid uuid1, uuid2;
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
index 6f6085b7c7..9310a3dec8 100644
--- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index 7ded3a350d..6372b7a830 100644
--- a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index 6f77831acd..729b14067e 100644
--- a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
index 1b5536f0e5..3e9dfe3568 100644
--- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index ebcc0202ff..ae05a164a2 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qbytearray/main.cpp b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
index 2c9b9d0638..61a7855884 100644
--- a/tests/benchmarks/corelib/tools/qbytearray/main.cpp
+++ b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro
index 10fdc7261e..10fdc7261e 100755..100644
--- a/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro
+++ b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro
diff --git a/tests/benchmarks/corelib/tools/qchar/main.cpp b/tests/benchmarks/corelib/tools/qchar/main.cpp
index 5dcea7e03f..3abf7584bb 100644
--- a/tests/benchmarks/corelib/tools/qchar/main.cpp
+++ b/tests/benchmarks/corelib/tools/qchar/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
index 85b9e1d9aa..b6b064e012 100644
--- a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
+++ b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qhash/outofline.cpp b/tests/benchmarks/corelib/tools/qhash/outofline.cpp
index df7ff26dea..11a5f9e733 100644
--- a/tests/benchmarks/corelib/tools/qhash/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qhash/outofline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp b/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp
index c107633451..874a0c543a 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp
+++ b/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.h b/tests/benchmarks/corelib/tools/qhash/qhash_string.h
index cde42ae32d..94f142914b 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash_string.h
+++ b/tests/benchmarks/corelib/tools/qhash/qhash_string.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qlist/main.cpp b/tests/benchmarks/corelib/tools/qlist/main.cpp
index 22aaf49861..d3380b188c 100644
--- a/tests/benchmarks/corelib/tools/qlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qlist/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp
index 8f015ab353..59174e4f08 100644
--- a/tests/benchmarks/corelib/tools/qrect/main.cpp
+++ b/tests/benchmarks/corelib/tools/qrect/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp
index c6cfb1cc1b..32e8e72577 100644
--- a/tests/benchmarks/corelib/tools/qregexp/main.cpp
+++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qstring/data.h b/tests/benchmarks/corelib/tools/qstring/data.h
index 3f3fcd8321..925ce3663a 100644
--- a/tests/benchmarks/corelib/tools/qstring/data.h
+++ b/tests/benchmarks/corelib/tools/qstring/data.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist.pl b/tests/benchmarks/corelib/tools/qstring/generatelist.pl
index 1a29db4b47..1f10b638b2 100644
--- a/tests/benchmarks/corelib/tools/qstring/generatelist.pl
+++ b/tests/benchmarks/corelib/tools/qstring/generatelist.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
index 13b49314c3..ad6595ab5c 100644
--- a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
+++ b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# -*- mode: utf-8; tabs: nil -*-
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index 640bd7a625..ab23fa5f9b 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -75,6 +75,13 @@ private slots:
void fromLatin1Alternatives() const;
void fromUtf8Alternatives_data() const;
void fromUtf8Alternatives() const;
+
+ void toUpper_data();
+ void toUpper();
+ void toLower_data();
+ void toLower();
+ void toCaseFolded_data();
+ void toCaseFolded();
};
void tst_QString::equals() const
@@ -2601,6 +2608,89 @@ void tst_QString::fromUtf8Alternatives() const
}
}
-QTEST_MAIN(tst_QString)
+void tst_QString::toUpper_data()
+{
+ QTest::addColumn<QString>("s");
+
+ QString lowerLatin1(300, QChar('a'));
+ QString upperLatin1(300, QChar('A'));
+
+ QString lowerDeseret;
+ {
+ QString pattern;
+ pattern += QChar(QChar::highSurrogate(0x10428));
+ pattern += QChar(QChar::lowSurrogate(0x10428));
+ for (int i = 0; i < 300 / pattern.size(); ++i)
+ lowerDeseret += pattern;
+ }
+ QString upperDeseret;
+ {
+ QString pattern;
+ pattern += QChar(QChar::highSurrogate(0x10400));
+ pattern += QChar(QChar::lowSurrogate(0x10400));
+ for (int i = 0; i < 300 / pattern.size(); ++i)
+ upperDeseret += pattern;
+ }
+
+ QString lowerLigature(600, QChar(0xFB03));
+
+ QTest::newRow("600<a>") << (lowerLatin1 + lowerLatin1);
+ QTest::newRow("600<A>") << (upperLatin1 + upperLatin1);
+
+ QTest::newRow("300<a>+300<A>") << (lowerLatin1 + upperLatin1);
+ QTest::newRow("300<A>+300<a>") << (upperLatin1 + lowerLatin1);
+
+ QTest::newRow("300<10428>") << (lowerDeseret + lowerDeseret);
+ QTest::newRow("300<10400>") << (upperDeseret + upperDeseret);
+
+ QTest::newRow("150<10428>+150<10400>") << (lowerDeseret + upperDeseret);
+ QTest::newRow("150<10400>+150<10428>") << (upperDeseret + lowerDeseret);
+
+ QTest::newRow("300a+150<10400>") << (lowerLatin1 + upperDeseret);
+ QTest::newRow("300a+150<10428>") << (lowerLatin1 + lowerDeseret);
+ QTest::newRow("300A+150<10400>") << (upperLatin1 + upperDeseret);
+ QTest::newRow("300A+150<10428>") << (upperLatin1 + lowerDeseret);
+
+ QTest::newRow("600<FB03> (ligature)") << lowerLigature;
+}
+
+void tst_QString::toUpper()
+{
+ QFETCH(QString, s);
+
+ QBENCHMARK {
+ s.toUpper();
+ }
+}
+
+void tst_QString::toLower_data()
+{
+ toUpper_data();
+}
+
+void tst_QString::toLower()
+{
+ QFETCH(QString, s);
+
+ QBENCHMARK {
+ s.toLower();
+ }
+}
+
+void tst_QString::toCaseFolded_data()
+{
+ toUpper_data();
+}
+
+void tst_QString::toCaseFolded()
+{
+ QFETCH(QString, s);
+
+ QBENCHMARK {
+ s.toCaseFolded();
+ }
+}
+
+QTEST_APPLESS_MAIN(tst_QString)
#include "main.moc"
diff --git a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
index 7f936181a2..b1ec5dace8 100644
--- a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index a77cf87f73..696f0fc6da 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp
index 416155d52b..38c1f4ac46 100644
--- a/tests/benchmarks/corelib/tools/qvector/main.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
index 544d738bdf..a30a7e786a 100644
--- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
index 2cdabb30c5..3bd75164d5 100644
--- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h
+++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -527,7 +527,7 @@ void QRawVector<T>::append(const T &t)
}
template <typename T>
-Q_TYPENAME QRawVector<T>::iterator QRawVector<T>::insert(iterator before, size_type n, const T &t)
+typename QRawVector<T>::iterator QRawVector<T>::insert(iterator before, size_type n, const T &t)
{
int offset = int(before - m_begin);
if (n != 0) {
@@ -561,7 +561,7 @@ Q_TYPENAME QRawVector<T>::iterator QRawVector<T>::insert(iterator before, size_t
}
template <typename T>
-Q_TYPENAME QRawVector<T>::iterator QRawVector<T>::erase(iterator abegin, iterator aend)
+typename QRawVector<T>::iterator QRawVector<T>::erase(iterator abegin, iterator aend)
{
int f = int(abegin - m_begin);
int l = int(aend - m_begin);
diff --git a/tests/benchmarks/dbus/qdbusperformance/server/server.cpp b/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
index 3731be5fc4..d3c6f1f5ac 100644
--- a/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
+++ b/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/dbus/qdbusperformance/serverobject.h b/tests/benchmarks/dbus/qdbusperformance/serverobject.h
index 4e554e0fbf..dd4d9f4735 100644
--- a/tests/benchmarks/dbus/qdbusperformance/serverobject.h
+++ b/tests/benchmarks/dbus/qdbusperformance/serverobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp b/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp
index 216d1819f7..116268835a 100644
--- a/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp
+++ b/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/dbus/qdbustype/main.cpp b/tests/benchmarks/dbus/qdbustype/main.cpp
index 7c38fe594c..476bdc81c7 100644
--- a/tests/benchmarks/dbus/qdbustype/main.cpp
+++ b/tests/benchmarks/dbus/qdbustype/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
index a190a0337a..f7d085f759 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -55,7 +55,8 @@ void DummyAnimation::updateCurrentValue(const QVariant &value)
m_dummy->setRect(value.toRect());
}
-void DummyAnimation::updateState(State state)
+void DummyAnimation::updateState(State newstate, State oldstate)
{
- Q_UNUSED(state);
+ Q_UNUSED(newstate);
+ Q_UNUSED(oldstate);
}
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
index ecd4e0189e..caccebffc2 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -51,7 +51,7 @@ public:
DummyAnimation(DummyObject *d);
void updateCurrentValue(const QVariant &value);
- void updateState(State state);
+ void updateState(State newstate, State oldstate);
private:
DummyObject *m_dummy;
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
index 305cf58df0..c0c163214b 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.h b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
index 39c8769468..0da4aa60e1 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyobject.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/animation/qanimation/main.cpp b/tests/benchmarks/gui/animation/qanimation/main.cpp
index 9c016ba765..2ca58bd66b 100644
--- a/tests/benchmarks/gui/animation/qanimation/main.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
index 3443850bea..aa64b19ca0 100644
--- a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.h b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
index e0bb07f063..d8b20d5e6e 100644
--- a/tests/benchmarks/gui/animation/qanimation/rectanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
index e8019a946a..8565e1bff1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
index bc6fa32050..864d2889c2 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h
index 956c442fb4..f12bf84cbc 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
index 71b9bf1f77..82e7954145 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h
index 815f9c5098..97c2bd88e4 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
index a0dde8a299..b88ccb53f7 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
index 8aaeebc0f5..97269badf1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
index b4bb4b3bb7..993a533b38 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h
index ad17f65cee..c1628845f5 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
index 1d18942b01..ec3f4c0093 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
index e638034132..c9b154313a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
index 97b39fdb34..34737266b3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
index 88dc33c956..cb4b1853c1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
index b6592742bf..622cb22d5a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
index efad458d20..cbfc63937b 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
index d6528f5e47..60bebefcf2 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
index 4e8ae93fe1..75e75235bc 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
index 7731c3f446..cfa8ff63a8 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
index 5682db021f..d26641a4c3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
index 37198a3a91..53a745ba6a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
index 7bb6034249..818b480849 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
index 4ccdc4fa9d..6f3417e7c8 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
index e9c73e7875..87ce134267 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp
index 628202be0c..96c1e8cb47 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h
index cb3f936f8f..119633b557 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
index c0cd5018db..8f6a42dbca 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
index 8b71f27107..d203085cf7 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
index b68b347640..baeafaf6f3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h
index 6676cc992e..9bd6157710 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
index 3af5685916..b94097b21c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
index f646f03922..cee8f67870 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
index e35f931c0a..c7a088a730 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h
index afd7c256b3..6e9aab4417 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
index 7ff6c11eb9..aead236e84 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h
index dc6b3a6fbe..cd0a7a5228 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
index 2371750efa..9d6bcc98d1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h
index 70708751ff..0e6593d6f3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
index 2520d0ddc3..d8f3445d36 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
index 71c565e16f..17a3505b8e 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
index 90b2ceabad..7757bcc616 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
index ea9eb7d736..ea95a079cd 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
index ac01927442..9ee649438f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h
index 78d95198d2..a70eb19303 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
index 42b36f1595..04ab2fe229 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
index b74f0d8210..54236325d1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
index 66aa4703fd..7d05f858f3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
index 9b70cab5c9..c45a880a8e 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h
index 73dbb2c9fe..fb7162265d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h
index f7e807e374..bfb83757b0 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp
index 8cd1df1abb..ba153180e6 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
index b6184f26dc..0635231cb5 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
index 818822de27..be8c9d22ea 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
index e93d3ad5af..9a84407aed 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
index 0fd1eded63..1dba139fd2 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
index df0de040b2..5c7367991a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp
index ca96816573..76fd265986 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h
index f5373e0748..1b9e6e047c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
index f8c945c091..4cdd7f0123 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
index 8ee86121e6..86e2f1b0e8 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
index ff75adb7cc..09ff5d1394 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
index 8c85fa108e..c9ab96fbe8 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
index 1413585e15..cfff4903fd 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h
index 48f0104b91..9fad826363 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
index ae22835545..1a3a1613c1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 7475de1f0c..5f826a0141 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index df2d39288f..f0cdbe29c5 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index 055e4e395b..83ab96e5c3 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 629cd10c61..b52336dcd6 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index fd0e89e17f..e713ecf03f 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
index de41358aae..f82b66f4fa 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
index b6338d9916..49fccb42e5 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
index 2cb7990741..04aaa8b54b 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
index 4c6289ea95..f755976d55 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
index 56edfcd066..7042cb5bb3 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
index 90a8a25ebe..7ea4ffbe00 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
index 206d9fbf0f..9e22a98c32 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
index fd5317bea6..d02b034834 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
index 4aec0baed5..0b2e87fcaf 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
index 62ddcfc5ef..71e69fed9f 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
index 3e4ef6fe24..3ef2ef546f 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
index c6167e50cb..f106cbe4e3 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
index bcab432092..debb78ffbf 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 04d48f19e0..dd1d7a3934 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 756ded7d75..08e7c88a76 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/image/blendbench/main.cpp b/tests/benchmarks/gui/image/blendbench/main.cpp
index 062b91ef20..24cfba9012 100644
--- a/tests/benchmarks/gui/image/blendbench/main.cpp
+++ b/tests/benchmarks/gui/image/blendbench/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
index 73272d279f..7be221a5ec 100644
--- a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
+++ b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp b/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
index 1f904a355f..363e7df5ac 100644
--- a/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
index 904177bff7..110bcbbca4 100644
--- a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index f2189b1cbd..fa169cb0b1 100644
--- a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
index 8bd09e6040..1b8d1f2327 100644
--- a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/kernel/qapplication/main.cpp b/tests/benchmarks/gui/kernel/qapplication/main.cpp
index 63991683c4..6df3c5ac23 100644
--- a/tests/benchmarks/gui/kernel/qapplication/main.cpp
+++ b/tests/benchmarks/gui/kernel/qapplication/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 1d0a2d9330..2d5164eda9 100644
--- a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
index 30da54847a..64e481ab7d 100644
--- a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
index f145304c14..8bd0cb8a03 100644
--- a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
index de35c1d94b..6173870c10 100644
--- a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
index 7bce2a1776..b691b99455 100644
--- a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index 37a8329151..c659fa5af1 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/painting/qregion/main.cpp b/tests/benchmarks/gui/painting/qregion/main.cpp
index 92749da108..2a92387aa9 100644
--- a/tests/benchmarks/gui/painting/qregion/main.cpp
+++ b/tests/benchmarks/gui/painting/qregion/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
index 0f4ea7c023..53cac3d7b6 100644
--- a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
+++ b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
index dc3f1f900e..c58e53f267 100644
--- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
+++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp b/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
index 0bb586d85d..3d29482970 100644
--- a/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
+++ b/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
index a11af5a3dd..1ad44cca7a 100644
--- a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
index f44a29d16d..3f10459615 100644
--- a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
+++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
index 2bb32d737f..ab1d2944a0 100644
--- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp
+++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index a7da42e347..753021419d 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
index 54f0c71c1e..96b959ed70 100644
--- a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index a81c71550d..a6b5082f39 100644
--- a/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 9fc6147b00..81f9c1a3e8 100644
--- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -321,7 +321,7 @@ public:
return false;
}
- virtual bool reset() const{
+ virtual bool reset() {
return false;
}
@@ -690,15 +690,15 @@ public:
QSharedPointer<char> data = downloadBufferAttribute.value<QSharedPointer<char> >();
} else if (testType == DownloadBufferButUseRead) {
// We had a download buffer but we benchmark here the "legacy" read() way to access it
- char* replyData = (char*) qMalloc(uploadSize);
+ char* replyData = (char*) malloc(uploadSize);
QVERIFY(reply->read(replyData, uploadSize) == uploadSize);
- qFree(replyData);
+ free(replyData);
} else if (testType == NoDownloadBuffer) {
// We did not have a download buffer but we still need to benchmark having the data, e.g. reading it all.
// This should be the slowest benchmark result.
- char* replyData = (char*) qMalloc(uploadSize);
+ char* replyData = (char*) malloc(uploadSize);
QVERIFY(reply->read(replyData, uploadSize) == uploadSize);
- qFree(replyData);
+ free(replyData);
}
QMetaObject::invokeMethod(&QTestEventLoop::instance(), "exitLoop", Qt::QueuedConnection);
diff --git a/tests/benchmarks/network/kernel/qhostinfo/main.cpp b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
index 634e237d5d..bcab4e3894 100644
--- a/tests/benchmarks/network/kernel/qhostinfo/main.cpp
+++ b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
index e26406fe74..e26406fe74 100755..100644
--- a/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
+++ b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
index c5d47f1a56..7157a6c690 100644
--- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
index d3684837b7..3210a109c4 100644
--- a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/opengl/main.cpp b/tests/benchmarks/opengl/main.cpp
index 37d15f86ac..9be7f17146 100644
--- a/tests/benchmarks/opengl/main.cpp
+++ b/tests/benchmarks/opengl/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
index d65ca18e7e..d8b8fbc865 100644
--- a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
+++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp
index 87d4ebe3b8..b3ed0fa058 100644
--- a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp
+++ b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index c044476a8c..fd75c30438 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h
index 22c24cb42c..045d310f4a 100644
--- a/tests/manual/bearerex/bearerex.h
+++ b/tests/manual/bearerex/bearerex.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/datatransferer.cpp b/tests/manual/bearerex/datatransferer.cpp
index b170daf489..5184bccde9 100644
--- a/tests/manual/bearerex/datatransferer.cpp
+++ b/tests/manual/bearerex/datatransferer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/datatransferer.h b/tests/manual/bearerex/datatransferer.h
index 50fc416b19..ddbd89be2a 100644
--- a/tests/manual/bearerex/datatransferer.h
+++ b/tests/manual/bearerex/datatransferer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/main.cpp b/tests/manual/bearerex/main.cpp
index 9f3e9c68f4..e9bf03395f 100644
--- a/tests/manual/bearerex/main.cpp
+++ b/tests/manual/bearerex/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/xqlistwidget.cpp b/tests/manual/bearerex/xqlistwidget.cpp
index 162545c4e9..b236c41bc6 100644
--- a/tests/manual/bearerex/xqlistwidget.cpp
+++ b/tests/manual/bearerex/xqlistwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/bearerex/xqlistwidget.h b/tests/manual/bearerex/xqlistwidget.h
index 0d6d59b877..1715bec3ec 100644
--- a/tests/manual/bearerex/xqlistwidget.h
+++ b/tests/manual/bearerex/xqlistwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/cmake/CMakeLists.txt b/tests/manual/cmake/CMakeLists.txt
index 1f2bd3e80a..91ead649ec 100644
--- a/tests/manual/cmake/CMakeLists.txt
+++ b/tests/manual/cmake/CMakeLists.txt
@@ -25,8 +25,10 @@ macro(expect_fail _dir)
endif()
endmacro()
-# Requires a patched cmake for the automoc stuff. Will uncomment when it is released.
-# expect_pass(pass1)
+if(${CMAKE_VERSION} VERSION_GREATER 2.8.7)
+ # Requires CMAKE_AUTOMOC function in CMake 2.8.7
+ expect_pass(pass1)
+endif()
expect_pass(pass2)
expect_pass(pass3)
expect_fail(fail4)
diff --git a/tests/manual/cmake/pass1/CMakeLists.txt b/tests/manual/cmake/pass1/CMakeLists.txt
index c41a904d79..f11887e545 100644
--- a/tests/manual/cmake/pass1/CMakeLists.txt
+++ b/tests/manual/cmake/pass1/CMakeLists.txt
@@ -3,23 +3,23 @@ cmake_minimum_required(VERSION 2.8)
project(pass1)
-# Warning: requires cmake 2.8.7 due for release in December 2011
-# for automatic moc with Qt 5
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
macro(qt5_use_package _target _package)
- # TODO: Handle public/private keywords?
- find_package(Qt5${_package} ${ARG1})
+ if (NOT Qt5${_package}_FOUND)
+ find_package(Qt5${_package} ${ARG1})
+ endif()
if (Qt5${_package}_FOUND)
+ # TODO: Handle public/private keywords?
target_link_libraries(${_target} ${Qt5${_package}_LIBRARIES})
- include_directories(${Qt5${_package}_INCLUDE_DIRS})
+ # ### Requires CMake 2.8.8:
# set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_package}_INCLUDE_DIRS})
+ include_directories(${Qt5${_package}_INCLUDE_DIRS})
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_package}_COMPILE_DEFINITIONS})
- foreach(_dep ${_Qt5_MODULE_DEPENDENCIES})
- qt5_use_package(${_target} ${_dep} REQUIRED)
- endforeach()
+ else()
+ message(FATAL_ERROR "NOT FOUND: Qt5${_package}")
endif()
endmacro()
diff --git a/tests/manual/cmake/pass3/CMakeLists.txt b/tests/manual/cmake/pass3/CMakeLists.txt
index 8c39b4f4a3..11402e2e18 100644
--- a/tests/manual/cmake/pass3/CMakeLists.txt
+++ b/tests/manual/cmake/pass3/CMakeLists.txt
@@ -3,11 +3,10 @@ cmake_minimum_required(VERSION 2.8)
project(pass3)
-find_package(Qt5Core REQUIRED)
-find_package(Qt5Gui REQUIRED)
+# The module finds its dependencies
find_package(Qt5Widgets REQUIRED)
-include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
+include_directories(${Qt5Widgets_INCLUDE_DIRS})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/tests/manual/cocoa/qt_on_cocoa/main.mm b/tests/manual/cocoa/qt_on_cocoa/main.mm
new file mode 100644
index 0000000000..18b5c78993
--- /dev/null
+++ b/tests/manual/cocoa/qt_on_cocoa/main.mm
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtDeclarative>
+
+#include <QtWidgets/QtWidgets>
+#include <private/qwidgetwindow_qpa_p.h>
+#include <QtGui/qplatformnativeinterface_qpa.h>
+
+#include <QtGui/QPixmap>
+
+#include "window.h"
+
+#include <Cocoa/Cocoa.h>
+
+
+@interface FilledView : NSView
+{
+
+}
+@end
+
+
+@implementation FilledView
+
+- (void)drawRect:(NSRect)dirtyRect {
+ // set any NSColor for filling, say white:
+ [[NSColor redColor] setFill];
+ NSRectFill(dirtyRect);
+}
+
+@end
+
+@interface QtMacToolbarDelegate : NSObject <NSToolbarDelegate>
+{
+@public
+ NSToolbar *toolbar;
+}
+
+- (id)init;
+- (NSToolbarItem *) toolbar: (NSToolbar *)toolbar itemForItemIdentifier: (NSString *) itemIdent willBeInsertedIntoToolbar:(BOOL) willBeInserted;
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)tb;
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar;
+- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar;
+@end
+
+@implementation QtMacToolbarDelegate
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)tb
+{
+ Q_UNUSED(tb);
+ NSMutableArray *array = [[[NSMutableArray alloc] init] autorelease];
+// [array addObject : NSToolbarPrintItemIdentifier];
+// [array addObject : NSToolbarShowColorsItemIdentifier];
+ [array addObject : @"filledView"];
+ return array;
+}
+
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)tb
+{
+ Q_UNUSED(tb);
+ NSMutableArray *array = [[[NSMutableArray alloc] init] autorelease];
+// [array addObject : NSToolbarPrintItemIdentifier];
+// [array addObject : NSToolbarShowColorsItemIdentifier];
+ [array addObject : @"filledView"];
+ return array;
+}
+
+- (NSArray *)toolbarSelectableItemIdentifiers: (NSToolbar *)tb
+{
+ Q_UNUSED(tb);
+ NSMutableArray *array = [[[NSMutableArray alloc] init] autorelease];
+ return array;
+}
+
+- (IBAction)itemClicked:(id)sender
+{
+
+}
+
+- (NSToolbarItem *) toolbar: (NSToolbar *)tb itemForItemIdentifier: (NSString *) itemIdentifier willBeInsertedIntoToolbar:(BOOL) willBeInserted
+{
+ Q_UNUSED(tb);
+ Q_UNUSED(willBeInserted);
+ //const QString identifier = toQString(itemIdentifier);
+ //NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
+ //return toolbarItem;
+
+ //NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
+ NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
+ FilledView *theView = [[FilledView alloc] init];
+ [toolbarItem setView : theView];
+ [toolbarItem setMinSize : NSMakeSize(400, 40)];
+ [toolbarItem setMaxSize : NSMakeSize(4000, 40)];
+ return toolbarItem;
+}
+@end
+
+@interface WindowAndViewAndQtCreator : NSObject {}
+- (void)createWindowAndViewAndQt;
+@end
+
+@implementation WindowAndViewAndQtCreator
+- (void)createWindowAndViewAndQt {
+
+ // Create the window
+ NSRect frame = NSMakeRect(500, 500, 500, 500);
+ NSWindow* window = [[NSWindow alloc] initWithContentRect:frame
+ styleMask:NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO];
+
+ NSString *title = @"This the NSWindow window";
+ [window setTitle:title];
+
+ [window setBackgroundColor:[NSColor blueColor]];
+
+ // Create a tool bar, set Qt delegate
+ NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier : @"foobartoolbar"];
+ QtMacToolbarDelegate *delegate = [[QtMacToolbarDelegate alloc] init];
+ [toolbar setDelegate : delegate];
+ [window setToolbar : toolbar];
+
+ // Create the QWindow, don't show it.
+ Window *qtWindow = new Window();
+ qtWindow->create();
+
+ //QSGView *qtWindow = new QSGView();
+ //qtWindow->setSource(QUrl::fromLocalFile("/Users/msorvig/code/qt5/qtdeclarative/examples/declarative/samegame/samegame.qml"));
+ // qtWindow->setWindowFlags(Qt::WindowType(13)); // 13: NativeEmbeddedWindow
+
+ // Get the nsview from the QWindow, set it as the content view
+ // on the NSWindow created above.
+ QPlatformNativeInterface *platformNativeInterface = QGuiApplication::platformNativeInterface();
+ NSView *qtView = (NSView *)platformNativeInterface->nativeResourceForWindow("nsview", qtWindow);
+ [window setContentView:qtView];
+ [window makeKeyAndOrderFront:NSApp];
+}
+@end
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ // fake NSApplicationMain() implementation follows:
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ [NSApplication sharedApplication];
+
+ // schedule call to create the UI.
+ WindowAndViewAndQtCreator *windowAndViewAndQtCreator= [WindowAndViewAndQtCreator alloc];
+ [NSTimer scheduledTimerWithTimeInterval:0 target:windowAndViewAndQtCreator selector:@selector(createWindowAndViewAndQt) userInfo:nil repeats:NO];
+
+ [(NSApplication *)NSApp run];
+ [NSApp release];
+ [pool release];
+ exit(0);
+ return 0;
+}
+
+
+
diff --git a/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro b/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro
new file mode 100644
index 0000000000..d5399b543a
--- /dev/null
+++ b/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+
+OBJECTIVE_SOURCES += main.mm
+HEADERS += window.h
+SOURCES += window.cpp
+LIBS += -framework Cocoa
+
+QMAKE_INFO_PLIST = Info_mac.plist
+OTHER_FILES = Info_mac.plist
+QT += gui widgets widgets-private gui-private core-private
+
+QT += declarative
diff --git a/tests/manual/cocoa/qt_on_cocoa/window.cpp b/tests/manual/cocoa/qt_on_cocoa/window.cpp
new file mode 100644
index 0000000000..5d24ceb51f
--- /dev/null
+++ b/tests/manual/cocoa/qt_on_cocoa/window.cpp
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "window.h"
+
+#include <private/qguiapplication_p.h>
+
+#include <QBackingStore>
+#include <QPainter>
+#include <QtGui>
+
+static int colorIndexId = 0;
+
+QColor colorTable[] =
+{
+ QColor("#f09f8f"),
+ QColor("#a2bff2"),
+ QColor("#c0ef8f")
+};
+
+Window::Window(QScreen *screen)
+ : QWindow(screen)
+ , m_backgroundColorIndex(colorIndexId++)
+{
+ initialize();
+}
+
+Window::Window(QWindow *parent)
+ : QWindow(parent)
+ , m_backgroundColorIndex(colorIndexId++)
+{
+ initialize();
+}
+
+void Window::initialize()
+{
+ if (parent())
+ setGeometry(QRect(160, 120, 320, 240));
+ else {
+ setGeometry(QRect(10, 10, 640, 480));
+
+ setSizeIncrement(QSize(10, 10));
+ setBaseSize(QSize(640, 480));
+ setMinimumSize(QSize(240, 160));
+ setMaximumSize(QSize(800, 600));
+ }
+
+ create();
+ m_backingStore = new QBackingStore(this);
+
+ m_image = QImage(geometry().size(), QImage::Format_RGB32);
+ m_image.fill(colorTable[m_backgroundColorIndex % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());
+
+ m_lastPos = QPoint(-1, -1);
+ m_renderTimer = 0;
+}
+
+void Window::mousePressEvent(QMouseEvent *event)
+{
+ m_lastPos = event->pos();
+}
+
+void Window::mouseMoveEvent(QMouseEvent *event)
+{
+ if (m_lastPos != QPoint(-1, -1)) {
+ QPainter p(&m_image);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.drawLine(m_lastPos, event->pos());
+ m_lastPos = event->pos();
+ }
+
+ scheduleRender();
+}
+
+void Window::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (m_lastPos != QPoint(-1, -1)) {
+ QPainter p(&m_image);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.drawLine(m_lastPos, event->pos());
+ m_lastPos = QPoint(-1, -1);
+ }
+
+ scheduleRender();
+}
+
+void Window::exposeEvent(QExposeEvent *)
+{
+ scheduleRender();
+}
+
+void Window::resizeEvent(QResizeEvent *)
+{
+ QImage old = m_image;
+
+ //qDebug() << "Window::resizeEvent" << width << height;
+
+ int width = qMax(geometry().width(), old.width());
+ int height = qMax(geometry().height(), old.height());
+
+ if (width > old.width() || height > old.height()) {
+ m_image = QImage(width, height, QImage::Format_RGB32);
+ m_image.fill(colorTable[(m_backgroundColorIndex) % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());
+
+ QPainter p(&m_image);
+ p.drawImage(0, 0, old);
+ }
+
+ render();
+}
+
+void Window::keyPressEvent(QKeyEvent *event)
+{
+ switch (event->key()) {
+ case Qt::Key_Backspace:
+ m_text.chop(1);
+ break;
+ case Qt::Key_Enter:
+ case Qt::Key_Return:
+ m_text.append('\n');
+ break;
+ default:
+ m_text.append(event->text());
+ break;
+ }
+ scheduleRender();
+}
+
+void Window::scheduleRender()
+{
+ if (!m_renderTimer)
+ m_renderTimer = startTimer(1);
+}
+
+void Window::timerEvent(QTimerEvent *)
+{
+ render();
+ killTimer(m_renderTimer);
+ m_renderTimer = 0;
+}
+
+void Window::render()
+{
+ QRect rect(QPoint(), geometry().size());
+
+ m_backingStore->resize(rect.size());
+
+ m_backingStore->beginPaint(rect);
+
+ QPaintDevice *device = m_backingStore->paintDevice();
+
+ QPainter p(device);
+ p.drawImage(0, 0, m_image);
+
+ QFont font;
+ font.setPixelSize(32);
+
+ p.setFont(font);
+ p.drawText(rect, 0, m_text);
+
+ m_backingStore->endPaint();
+ m_backingStore->flush(rect);
+}
+
+
diff --git a/tests/auto/v8/v8main.cpp b/tests/manual/cocoa/qt_on_cocoa/window.h
index 091d2cae28..2fa2784427 100644
--- a/tests/auto/v8/v8main.cpp
+++ b/tests/manual/cocoa/qt_on_cocoa/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -39,28 +39,36 @@
**
****************************************************************************/
-#include "v8test.h"
-#include <stdio.h>
-#include <strings.h>
+#include <QWindow>
+#include <QImage>
-#define RUN_TEST(testname) { \
- if (argc == 1 || 0 == ::strcmp(argv[1], # testname)) { \
- if (!v8test_ ## testname()) \
- printf ("Test %s FAILED\n", # testname); \
- else \
- printf ("Test %s PASS\n", # testname); \
- } \
-}
-
-int main(int argc, char *argv[])
+class Window : public QWindow
{
- v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
+public:
+ Window(QWindow *parent = 0);
+ Window(QScreen *screen);
+
+protected:
+ void mousePressEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+
+ void keyPressEvent(QKeyEvent *);
+
+ void exposeEvent(QExposeEvent *);
+ void resizeEvent(QResizeEvent *);
+
+ void timerEvent(QTimerEvent *);
- RUN_TEST(eval);
- RUN_TEST(evalwithinwith);
- RUN_TEST(userobjectcompare);
- RUN_TEST(externalteardown);
- RUN_TEST(globalcall);
+private:
+ void render();
+ void scheduleRender();
+ void initialize();
- return -1;
-}
+ QString m_text;
+ QImage m_image;
+ QPoint m_lastPos;
+ int m_backgroundColorIndex;
+ QBackingStore *m_backingStore;
+ int m_renderTimer;
+};
diff --git a/tests/manual/gestures/graphicsview/gestures.cpp b/tests/manual/gestures/graphicsview/gestures.cpp
index e576f14871..4dde0f5cb7 100644
--- a/tests/manual/gestures/graphicsview/gestures.cpp
+++ b/tests/manual/gestures/graphicsview/gestures.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/graphicsview/gestures.h b/tests/manual/gestures/graphicsview/gestures.h
index 8f96eccf99..8104da640d 100644
--- a/tests/manual/gestures/graphicsview/gestures.h
+++ b/tests/manual/gestures/graphicsview/gestures.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/graphicsview/imageitem.cpp b/tests/manual/gestures/graphicsview/imageitem.cpp
index 73d56129d0..03e9946cf4 100644
--- a/tests/manual/gestures/graphicsview/imageitem.cpp
+++ b/tests/manual/gestures/graphicsview/imageitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/graphicsview/imageitem.h b/tests/manual/gestures/graphicsview/imageitem.h
index cdc1d8823e..d789a3e914 100644
--- a/tests/manual/gestures/graphicsview/imageitem.h
+++ b/tests/manual/gestures/graphicsview/imageitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp
index 952b495b76..f46d7139d8 100644
--- a/tests/manual/gestures/graphicsview/main.cpp
+++ b/tests/manual/gestures/graphicsview/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp
index 44b6794d87..778ba78a10 100644
--- a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp
+++ b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h
index e815a2d6a8..0e2684a285 100644
--- a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h
+++ b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/scrollarea/main.cpp b/tests/manual/gestures/scrollarea/main.cpp
index 7b2924c079..ec5176600e 100644
--- a/tests/manual/gestures/scrollarea/main.cpp
+++ b/tests/manual/gestures/scrollarea/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp
index c9c5d41c08..8231fe0e74 100644
--- a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp
+++ b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h
index e815a2d6a8..0e2684a285 100644
--- a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h
+++ b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/inputmethodhints/inputmethodhints.cpp b/tests/manual/inputmethodhints/inputmethodhints.cpp
index f302c36c43..1754a3cd26 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.cpp
+++ b/tests/manual/inputmethodhints/inputmethodhints.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h
index 839d5386af..6e2d934204 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.h
+++ b/tests/manual/inputmethodhints/inputmethodhints.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp
index f0807dec6f..a276cde1f2 100644
--- a/tests/manual/inputmethodhints/main.cpp
+++ b/tests/manual/inputmethodhints/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp
index f8debafe56..2edc67a426 100644
--- a/tests/manual/keypadnavigation/main.cpp
+++ b/tests/manual/keypadnavigation/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/lance/interactivewidget.cpp b/tests/manual/lance/interactivewidget.cpp
index f7bc67ea0b..fb480b1d0b 100644
--- a/tests/manual/lance/interactivewidget.cpp
+++ b/tests/manual/lance/interactivewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/lance/interactivewidget.h b/tests/manual/lance/interactivewidget.h
index f5e91c87dc..ac46a0ec36 100644
--- a/tests/manual/lance/interactivewidget.h
+++ b/tests/manual/lance/interactivewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp
index f63ac7a367..7ff8b1cf36 100644
--- a/tests/manual/lance/main.cpp
+++ b/tests/manual/lance/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/lance/widgets.h b/tests/manual/lance/widgets.h
index 033067d846..28ed34f653 100644
--- a/tests/manual/lance/widgets.h
+++ b/tests/manual/lance/widgets.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/mkspecs/test.sh b/tests/manual/mkspecs/test.sh
index 84f5b93852..d384df2098 100755
--- a/tests/manual/mkspecs/test.sh
+++ b/tests/manual/mkspecs/test.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
index 77589d350e..06e211738e 100644
--- a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
+++ b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/network_stresstest/minihttpserver.cpp b/tests/manual/network_stresstest/minihttpserver.cpp
index 8318f93b5b..d024fe0f06 100644
--- a/tests/manual/network_stresstest/minihttpserver.cpp
+++ b/tests/manual/network_stresstest/minihttpserver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/network_stresstest/minihttpserver.h b/tests/manual/network_stresstest/minihttpserver.h
index 0499c3b404..a622159ce6 100644
--- a/tests/manual/network_stresstest/minihttpserver.h
+++ b/tests/manual/network_stresstest/minihttpserver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp
index 8337118bbf..debae981ab 100644
--- a/tests/manual/network_stresstest/tst_network_stresstest.cpp
+++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qcursor/allcursors/main.cpp b/tests/manual/qcursor/allcursors/main.cpp
index c074f4c141..1b0d9a55bd 100644
--- a/tests/manual/qcursor/allcursors/main.cpp
+++ b/tests/manual/qcursor/allcursors/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qcursor/allcursors/mainwindow.cpp b/tests/manual/qcursor/allcursors/mainwindow.cpp
index 855229f3dc..8807f6f1d0 100644
--- a/tests/manual/qcursor/allcursors/mainwindow.cpp
+++ b/tests/manual/qcursor/allcursors/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qcursor/allcursors/mainwindow.h b/tests/manual/qcursor/allcursors/mainwindow.h
index df314ef3e6..d9dc3bcb78 100644
--- a/tests/manual/qcursor/allcursors/mainwindow.h
+++ b/tests/manual/qcursor/allcursors/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qcursor/grab_override/main.cpp b/tests/manual/qcursor/grab_override/main.cpp
index c074f4c141..1b0d9a55bd 100644
--- a/tests/manual/qcursor/grab_override/main.cpp
+++ b/tests/manual/qcursor/grab_override/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qcursor/grab_override/mainwindow.cpp b/tests/manual/qcursor/grab_override/mainwindow.cpp
index f1082d4d03..d6c671a642 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.cpp
+++ b/tests/manual/qcursor/grab_override/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qcursor/grab_override/mainwindow.h b/tests/manual/qcursor/grab_override/mainwindow.h
index 5c565a3cc6..e5a2042bb0 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.h
+++ b/tests/manual/qcursor/grab_override/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qdesktopwidget/main.cpp b/tests/manual/qdesktopwidget/main.cpp
index f42098f344..4982bd8321 100644
--- a/tests/manual/qdesktopwidget/main.cpp
+++ b/tests/manual/qdesktopwidget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicsitemgroup/customitem.cpp b/tests/manual/qgraphicsitemgroup/customitem.cpp
index 25b99b3d1c..2fb14d638a 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.cpp
+++ b/tests/manual/qgraphicsitemgroup/customitem.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicsitemgroup/customitem.h b/tests/manual/qgraphicsitemgroup/customitem.h
index e7ac8c2b45..c8416cf952 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.h
+++ b/tests/manual/qgraphicsitemgroup/customitem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicsitemgroup/main.cpp b/tests/manual/qgraphicsitemgroup/main.cpp
index 5c12a0cc51..c3310637b9 100644
--- a/tests/manual/qgraphicsitemgroup/main.cpp
+++ b/tests/manual/qgraphicsitemgroup/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicsitemgroup/widget.cpp b/tests/manual/qgraphicsitemgroup/widget.cpp
index 2788369517..1ff9e41c6a 100644
--- a/tests/manual/qgraphicsitemgroup/widget.cpp
+++ b/tests/manual/qgraphicsitemgroup/widget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicsitemgroup/widget.h b/tests/manual/qgraphicsitemgroup/widget.h
index 78468afa50..4e0489722f 100644
--- a/tests/manual/qgraphicsitemgroup/widget.h
+++ b/tests/manual/qgraphicsitemgroup/widget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicslayout/flicker/main.cpp b/tests/manual/qgraphicslayout/flicker/main.cpp
index c0fac45142..db9e53e302 100644
--- a/tests/manual/qgraphicslayout/flicker/main.cpp
+++ b/tests/manual/qgraphicslayout/flicker/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicslayout/flicker/window.cpp b/tests/manual/qgraphicslayout/flicker/window.cpp
index 63dfa380d7..01a1182013 100644
--- a/tests/manual/qgraphicslayout/flicker/window.cpp
+++ b/tests/manual/qgraphicslayout/flicker/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h
index 26a8f2ab5e..872a7469d8 100644
--- a/tests/manual/qgraphicslayout/flicker/window.h
+++ b/tests/manual/qgraphicslayout/flicker/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qhttpnetworkconnection/main.cpp b/tests/manual/qhttpnetworkconnection/main.cpp
index 502efcab9a..9998577997 100644
--- a/tests/manual/qhttpnetworkconnection/main.cpp
+++ b/tests/manual/qhttpnetworkconnection/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp
index 90f3a3ec51..bc1772bbcc 100644
--- a/tests/manual/qimagereader/main.cpp
+++ b/tests/manual/qimagereader/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp
index bd4756e998..8fadf68ea7 100644
--- a/tests/manual/qlocale/calendar.cpp
+++ b/tests/manual/qlocale/calendar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h
index b5bb3c9268..b03102f68d 100644
--- a/tests/manual/qlocale/calendar.h
+++ b/tests/manual/qlocale/calendar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/currency.cpp b/tests/manual/qlocale/currency.cpp
index 4ef157cba8..f5d69de6c2 100644
--- a/tests/manual/qlocale/currency.cpp
+++ b/tests/manual/qlocale/currency.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h
index 3a1255343c..fbee336da1 100644
--- a/tests/manual/qlocale/currency.h
+++ b/tests/manual/qlocale/currency.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/dateformats.cpp b/tests/manual/qlocale/dateformats.cpp
index 25b3e7a954..e23a2b8e52 100644
--- a/tests/manual/qlocale/dateformats.cpp
+++ b/tests/manual/qlocale/dateformats.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h
index f05ad2a27f..67b2ed4a02 100644
--- a/tests/manual/qlocale/dateformats.h
+++ b/tests/manual/qlocale/dateformats.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/info.cpp b/tests/manual/qlocale/info.cpp
index a4f6adfce0..2df46a22e3 100644
--- a/tests/manual/qlocale/info.cpp
+++ b/tests/manual/qlocale/info.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h
index b23ecf5a47..1fd2b753df 100644
--- a/tests/manual/qlocale/info.h
+++ b/tests/manual/qlocale/info.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/languages.cpp b/tests/manual/qlocale/languages.cpp
index 18d72d7dd9..189e6976b1 100644
--- a/tests/manual/qlocale/languages.cpp
+++ b/tests/manual/qlocale/languages.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h
index 18e503f648..b365b7e4e3 100644
--- a/tests/manual/qlocale/languages.h
+++ b/tests/manual/qlocale/languages.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp
index b14a44f7c6..e37113fdc2 100644
--- a/tests/manual/qlocale/main.cpp
+++ b/tests/manual/qlocale/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/miscellaneous.cpp b/tests/manual/qlocale/miscellaneous.cpp
index 89c80dc65a..fdf4d27f8e 100644
--- a/tests/manual/qlocale/miscellaneous.cpp
+++ b/tests/manual/qlocale/miscellaneous.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h
index 3b635b802f..42e4e4f982 100644
--- a/tests/manual/qlocale/miscellaneous.h
+++ b/tests/manual/qlocale/miscellaneous.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/numberformats.cpp b/tests/manual/qlocale/numberformats.cpp
index 7b5fce4082..99664f7e73 100644
--- a/tests/manual/qlocale/numberformats.cpp
+++ b/tests/manual/qlocale/numberformats.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h
index 4a3ab36506..79dcac0dc9 100644
--- a/tests/manual/qlocale/numberformats.h
+++ b/tests/manual/qlocale/numberformats.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/window.cpp b/tests/manual/qlocale/window.cpp
index 775023e5df..bb6aea3114 100644
--- a/tests/manual/qlocale/window.cpp
+++ b/tests/manual/qlocale/window.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h
index aee728fd9c..402cdd6259 100644
--- a/tests/manual/qlocale/window.h
+++ b/tests/manual/qlocale/window.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.cpp b/tests/manual/qnetworkaccessmanager/qget/qget.cpp
new file mode 100644
index 0000000000..4e1bc4a71a
--- /dev/null
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.cpp
@@ -0,0 +1,300 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qget.h"
+
+#include <QSslError>
+#include <QNetworkProxy>
+#include <QAuthenticator>
+#include <QDebug>
+#include <QCoreApplication>
+#include <QList>
+#include <QStringList>
+#include <QNetworkConfiguration>
+#include <QNetworkConfigurationManager>
+#include <QNetworkSession>
+
+DownloadManager::DownloadManager()
+{
+ connect(&nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(finished(QNetworkReply*)));
+ connect(&nam, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
+ connect(&nam, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
+ connect(&nam, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), this, SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
+}
+
+DownloadManager::~DownloadManager()
+{
+
+}
+
+void DownloadManager::get(const QUrl& url)
+{
+ //currently multiple downloads are processed in parallel.
+ //could add an option for serial using the downloads list as a queue
+ //which would require DownloadItem to hold a request rather than a reply
+ QNetworkReply* reply = nam.get(QNetworkRequest(url));
+ DownloadItem *dl = new DownloadItem(reply, nam);
+ downloads.append(dl);
+ connect(dl, SIGNAL(downloadFinished(DownloadItem*)), SLOT(downloadFinished(DownloadItem*)));
+}
+
+void DownloadManager::finished(QNetworkReply* reply)
+{
+}
+
+void DownloadManager::downloadFinished(DownloadItem *item)
+{
+ downloads.removeOne(item);
+ item->deleteLater();
+ checkForAllDone();
+}
+
+void DownloadManager::checkForAllDone()
+{
+ if (downloads.isEmpty()) {
+ qDebug() << "All Done.";
+ QCoreApplication::quit();
+ }
+}
+
+void DownloadManager::authenticationRequired(QNetworkReply* reply, QAuthenticator* auth)
+{
+ //provide the credentials exactly once, so that it fails if credentials are incorrect.
+ if (!httpUser.isEmpty() || !httpPassword.isEmpty()) {
+ auth->setUser(httpUser);
+ auth->setPassword(httpPassword);
+ httpUser.clear();
+ httpPassword.clear();
+ }
+}
+
+void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy& proxy, QAuthenticator* auth)
+{
+ //provide the credentials exactly once, so that it fails if credentials are incorrect.
+ if (!proxyUser.isEmpty() || !proxyPassword.isEmpty()) {
+ auth->setUser(proxyUser);
+ auth->setPassword(proxyPassword);
+ proxyUser.clear();
+ proxyPassword.clear();
+ }
+}
+
+void DownloadManager::sslErrors(QNetworkReply* reply, const QList<QSslError>& errors)
+{
+ qDebug() << "sslErrors";
+ foreach (const QSslError& error, errors) {
+ qDebug() << error.errorString();
+ qDebug() << error.certificate().toPem();
+ }
+}
+
+DownloadItem::DownloadItem(QNetworkReply* r, QNetworkAccessManager& manager) : reply(r), nam(manager)
+{
+ reply->setParent(this);
+ connect(reply, SIGNAL(readyRead()), this, SLOT(readyRead()));
+ connect(reply, SIGNAL(finished()), this, SLOT(finished()));
+}
+
+DownloadItem::~DownloadItem()
+{
+}
+
+void DownloadItem::readyRead()
+{
+ if (!file.isOpen()) {
+ qDebug() << reply->header(QNetworkRequest::ContentTypeHeader) << reply->header(QNetworkRequest::ContentLengthHeader);
+ QString path = reply->url().path();
+ path = path.mid(path.lastIndexOf('/') + 1);
+ if (path.isEmpty())
+ path = QLatin1String("index.html");
+ file.setFileName(path);
+ for (int i=1;i<1000;i++) {
+ if (!file.exists() && file.open(QIODevice::WriteOnly | QIODevice::Truncate))
+ break;
+ file.setFileName(QString(QLatin1String("%1.%2")).arg(path).arg(i));
+ }
+ if (!file.isOpen()) {
+ qDebug() << "couldn't open output file";
+ reply->abort();
+ return;
+ }
+ qDebug() << reply->url() << " -> " << file.fileName();
+ }
+ file.write(reply->readAll());
+}
+
+void DownloadItem::finished()
+{
+ if (reply->attribute(QNetworkRequest::RedirectionTargetAttribute).isValid()) {
+ QUrl url = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
+ url = reply->url().resolved(url);
+ qDebug() << reply->url() << "redirected to " << url;
+ if (redirects.contains(url)) {
+ qDebug() << "redirect loop detected";
+ } else if (redirects.count() > 10) {
+ qDebug() << "too many redirects";
+ } else {
+ //follow redirect
+ if (file.isOpen()) {
+ if (!file.seek(0) || !file.resize(0)) {
+ file.close();
+ file.remove();
+ }
+ }
+ reply->deleteLater();
+ reply = nam.get(QNetworkRequest(url));
+ reply->setParent(this);
+ connect(reply, SIGNAL(readyRead()), this, SLOT(readyRead()));
+ connect(reply, SIGNAL(finished()), this, SLOT(finished()));
+ redirects.append(url);
+ return;
+ }
+ }
+ if (file.isOpen()) {
+ file.write(reply->readAll());
+ file.close();
+ }
+ qDebug() << "finished " << reply->url() << " with http status: " << reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+ if (reply->error() != QNetworkReply::NoError)
+ qDebug() << "and error: " << reply->error() << reply->errorString();
+ emit downloadFinished(this);
+}
+
+void printShortUsage()
+{
+ qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << endl
+ << "Get one or more urls using QNetworkAccessManager" << endl
+ << "--help to display detailed usage" << endl;
+}
+
+void printUsage()
+{
+ qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << endl
+ << "Get one or more urls using QNetworkAccessManager" << endl
+ << "Options:"
+ << "--help This message" << endl
+ << "--http-user=<username> Set username to use for http 401 challenges" << endl
+ << "--http-password=<password> Set password to use for http 401 challenges" << endl
+ << "--proxy-user=<username> Set username to use for proxy authentication" << endl
+ << "--proxy-password=<password> Set password to use for proxy authentication" << endl
+ << "--proxy=on Use system proxy (default)" << endl
+ << "--proxy=off Don't use system proxy" << endl
+ << "--proxy=<host:port>[,type] Use specified proxy" << endl
+ << " ,http HTTP proxy (default)" << endl
+ << " ,socks SOCKS5 proxy" << endl
+ << " ,ftp FTP proxy" << endl
+ << " ,httpcaching HTTP caching proxy (no CONNECT method)" << endl;
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ if (argc < 2) {
+ printShortUsage();
+ return EXIT_FAILURE;
+ }
+
+ //use system proxy (by default)
+ QNetworkProxyFactory::setUseSystemConfiguration(true);
+
+ DownloadManager dl;
+ //arguments match wget where possible
+ foreach (QString str, app.arguments().mid(1)) {
+ if (str == "--help")
+ printUsage();
+ else if (str.startsWith("--http-user="))
+ dl.setHttpUser(str.mid(12));
+ else if (str.startsWith("--http-passwd="))
+ dl.setHttpPassword(str.mid(14));
+ else if (str.startsWith("--proxy-user="))
+ dl.setProxyUser(str.mid(13));
+ else if (str.startsWith("--proxy-passwd="))
+ dl.setProxyPassword(str.mid(15));
+ else if (str == "--proxy=off")
+ QNetworkProxyFactory::setUseSystemConfiguration(false);
+ else if (str == "--proxy=on")
+ QNetworkProxyFactory::setUseSystemConfiguration(true);
+ else if (str.startsWith("--proxy=")) {
+ //parse "--proxy=host:port[,type]"
+ QNetworkProxy proxy;
+ str = str.mid(8);
+ int sep = str.indexOf(':');
+ proxy.setHostName(str.left(sep));
+ str = str.mid(sep + 1);
+ sep = str.indexOf(',');
+ QString port;
+ if (sep < 0) {
+ port = str;
+ proxy.setType(QNetworkProxy::HttpProxy);
+ } else {
+ port = str.left(sep);
+ str = str.mid(sep + 1);
+ if (str == "socks")
+ proxy.setType(QNetworkProxy::Socks5Proxy);
+ else if (str == "ftp")
+ proxy.setType(QNetworkProxy::FtpCachingProxy);
+ else if (str == "httpcaching")
+ proxy.setType(QNetworkProxy::HttpCachingProxy);
+ else if (str == "http")
+ proxy.setType(QNetworkProxy::HttpProxy);
+ else {
+ qDebug() << "unknown proxy type";
+ return EXIT_FAILURE;
+ }
+ }
+ bool ok;
+ quint16 p = port.toUShort(&ok);
+ if (!ok) {
+ qDebug() << "couldn't parse proxy";
+ return EXIT_FAILURE;
+ }
+ proxy.setPort(p);
+ qDebug() << "proxy:" << proxy.hostName() << proxy.port() << proxy.type();
+ dl.setProxy(proxy);
+ }
+ else if (str.startsWith("-"))
+ qDebug() << "unsupported option" << str;
+ else
+ dl.get(QUrl::fromUserInput(str));
+ }
+ QMetaObject::invokeMethod(&dl, "checkForAllDone", Qt::QueuedConnection);
+ return app.exec();
+}
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.h b/tests/manual/qnetworkaccessmanager/qget/qget.h
new file mode 100644
index 0000000000..f66e3cd923
--- /dev/null
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QGET_H
+#define QGET_H
+
+#include <QNetworkAccessManager>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QFile>
+
+class DownloadItem : public QObject
+{
+ Q_OBJECT
+public:
+ DownloadItem(QNetworkReply* r, QNetworkAccessManager& nam);
+ ~DownloadItem();
+
+ QNetworkReply* networkReply() { return reply; }
+
+signals:
+ void downloadFinished(DownloadItem *self);
+private slots:
+ void readyRead();
+ void finished();
+private:
+ QNetworkAccessManager& nam;
+ QNetworkReply* reply;
+ QFile file;
+ QList<QUrl> redirects;
+};
+
+class DownloadManager : public QObject
+{
+ Q_OBJECT
+public:
+ DownloadManager();
+ ~DownloadManager();
+ void get(const QUrl& url);
+ void setProxy(const QNetworkProxy& proxy) { nam.setProxy(proxy); }
+ void setHttpUser(const QString& user) { httpUser = user; }
+ void setHttpPassword(const QString& password) { httpPassword = password; }
+ void setProxyUser(const QString& user) { proxyUser = user; }
+ void setProxyPassword(const QString& password) { proxyPassword = password; }
+
+public slots:
+ void checkForAllDone();
+
+private slots:
+ void finished(QNetworkReply* reply);
+ void authenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator);
+ void proxyAuthenticationRequired(const QNetworkProxy& proxy, QAuthenticator* authenticator);
+ void sslErrors(QNetworkReply* reply, const QList<QSslError>& errors);
+ void downloadFinished(DownloadItem *item);
+private:
+ QNetworkAccessManager nam;
+ QList<DownloadItem*> downloads;
+ QString httpUser;
+ QString httpPassword;
+ QString proxyUser;
+ QString proxyPassword;
+};
+
+#endif // QGET_H
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.pro b/tests/manual/qnetworkaccessmanager/qget/qget.pro
new file mode 100644
index 0000000000..80af8a556f
--- /dev/null
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+QT = core network
+CONFIG += console
+
+# Input
+SOURCES += qget.cpp
+HEADERS += qget.h
+
+symbian: TARGET.CAPABILITY += ReadUserData NetworkServices
+
diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp
index 8033251d06..bade33712e 100644
--- a/tests/manual/qnetworkreply/main.cpp
+++ b/tests/manual/qnetworkreply/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qssloptions/main.cpp b/tests/manual/qssloptions/main.cpp
index 21b5dab1d4..0b7b6b57bc 100644
--- a/tests/manual/qssloptions/main.cpp
+++ b/tests/manual/qssloptions/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/device_information/main.cpp b/tests/manual/qtabletevent/device_information/main.cpp
index 92e7ea4cd8..a8f42ab0a7 100644
--- a/tests/manual/qtabletevent/device_information/main.cpp
+++ b/tests/manual/qtabletevent/device_information/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
index 8b1eaab8e3..33b9fb9b0a 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.h b/tests/manual/qtabletevent/device_information/tabletwidget.h
index 0e93c41752..e1a9860f28 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.h
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/event_compression/main.cpp b/tests/manual/qtabletevent/event_compression/main.cpp
index 324dc17b52..d05f5cc55e 100644
--- a/tests/manual/qtabletevent/event_compression/main.cpp
+++ b/tests/manual/qtabletevent/event_compression/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp b/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp
index d04563fac4..d43bc50820 100644
--- a/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp
+++ b/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/event_compression/mousestatwidget.h b/tests/manual/qtabletevent/event_compression/mousestatwidget.h
index 623f39f814..1a71ca44a4 100644
--- a/tests/manual/qtabletevent/event_compression/mousestatwidget.h
+++ b/tests/manual/qtabletevent/event_compression/mousestatwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtabletevent/regular_widgets/main.cpp b/tests/manual/qtabletevent/regular_widgets/main.cpp
index 5d589c2cd9..1ecef826ee 100644
--- a/tests/manual/qtabletevent/regular_widgets/main.cpp
+++ b/tests/manual/qtabletevent/regular_widgets/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtbug-8933/main.cpp b/tests/manual/qtbug-8933/main.cpp
index 5c12a0cc51..c3310637b9 100644
--- a/tests/manual/qtbug-8933/main.cpp
+++ b/tests/manual/qtbug-8933/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtbug-8933/widget.cpp b/tests/manual/qtbug-8933/widget.cpp
index be0a02d05a..6a87857f91 100644
--- a/tests/manual/qtbug-8933/widget.cpp
+++ b/tests/manual/qtbug-8933/widget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtbug-8933/widget.h b/tests/manual/qtbug-8933/widget.h
index 5cee97e834..949cd2d11b 100644
--- a/tests/manual/qtbug-8933/widget.h
+++ b/tests/manual/qtbug-8933/widget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtouchevent/main.cpp b/tests/manual/qtouchevent/main.cpp
index 105f4a0302..6d5fbca6a6 100644
--- a/tests/manual/qtouchevent/main.cpp
+++ b/tests/manual/qtouchevent/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtouchevent/touchwidget.cpp b/tests/manual/qtouchevent/touchwidget.cpp
index 2dedc8bfac..c26ab50f14 100644
--- a/tests/manual/qtouchevent/touchwidget.cpp
+++ b/tests/manual/qtouchevent/touchwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qtouchevent/touchwidget.h b/tests/manual/qtouchevent/touchwidget.h
index e3005eccba..61ad0f9a68 100644
--- a/tests/manual/qtouchevent/touchwidget.h
+++ b/tests/manual/qtouchevent/touchwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp
index 5bbe3793a1..11e94bada3 100644
--- a/tests/manual/qwidget_zorder/main.cpp
+++ b/tests/manual/qwidget_zorder/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp
index 2cebecca45..5f1020aec6 100644
--- a/tests/manual/repaint/mainwindow/main.cpp
+++ b/tests/manual/repaint/mainwindow/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp
index e64304d2c0..e16866c4d6 100644
--- a/tests/manual/repaint/scrollarea/main.cpp
+++ b/tests/manual/repaint/scrollarea/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/shared/shared.h b/tests/manual/repaint/shared/shared.h
index f6a658688a..6cac04ee39 100644
--- a/tests/manual/repaint/shared/shared.h
+++ b/tests/manual/repaint/shared/shared.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp
index 8fe1cd2569..a5c329ed82 100644
--- a/tests/manual/repaint/splitter/main.cpp
+++ b/tests/manual/repaint/splitter/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp
index 6b88e4c9e4..25ccf5364e 100644
--- a/tests/manual/repaint/tableview/main.cpp
+++ b/tests/manual/repaint/tableview/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp
index 5f753f1af1..ac30142ef4 100644
--- a/tests/manual/repaint/task141091/main.cpp
+++ b/tests/manual/repaint/task141091/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/toplevel/main.cpp b/tests/manual/repaint/toplevel/main.cpp
index 3a5e813fe8..b5409a2fec 100644
--- a/tests/manual/repaint/toplevel/main.cpp
+++ b/tests/manual/repaint/toplevel/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp
index 300f0df1a4..1564bd2909 100644
--- a/tests/manual/repaint/widget/main.cpp
+++ b/tests/manual/repaint/widget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/socketengine/main.cpp b/tests/manual/socketengine/main.cpp
index 115a187385..c81e323df5 100644
--- a/tests/manual/socketengine/main.cpp
+++ b/tests/manual/socketengine/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp
index a02373f1c8..e3d061dd85 100644
--- a/tests/manual/textrendering/glyphshaping/main.cpp
+++ b/tests/manual/textrendering/glyphshaping/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/textrendering/textperformance/main.cpp b/tests/manual/textrendering/textperformance/main.cpp
index 654aecde4a..e4907e5ee1 100644
--- a/tests/manual/textrendering/textperformance/main.cpp
+++ b/tests/manual/textrendering/textperformance/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp
index 2694bb861d..f22ec5ec87 100644
--- a/tests/manual/windowflags/controllerwindow.cpp
+++ b/tests/manual/windowflags/controllerwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/windowflags/controllerwindow.h b/tests/manual/windowflags/controllerwindow.h
index 2ec91168ee..84c39c9d2b 100644
--- a/tests/manual/windowflags/controllerwindow.h
+++ b/tests/manual/windowflags/controllerwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/windowflags/main.cpp b/tests/manual/windowflags/main.cpp
index 6bd72b99f6..18d212b88c 100644
--- a/tests/manual/windowflags/main.cpp
+++ b/tests/manual/windowflags/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp
index 24583220b8..a3e6b49546 100644
--- a/tests/manual/windowflags/previewwindow.cpp
+++ b/tests/manual/windowflags/previewwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/manual/windowflags/previewwindow.h b/tests/manual/windowflags/previewwindow.h
index b58f589fc7..91e68ea6b5 100644
--- a/tests/manual/windowflags/previewwindow.h
+++ b/tests/manual/windowflags/previewwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index 14cd3a790b..8832574b54 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/configure_pch.h b/tools/configure/configure_pch.h
index edf7c04dff..8badb40de6 100644
--- a/tools/configure/configure_pch.h
+++ b/tools/configure/configure_pch.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index ad958e9d44..56b08d4b37 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -300,7 +300,6 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "BUILDTYPE" ] = "none";
dictionary[ "BUILDDEV" ] = "no";
- dictionary[ "BUILDNOKIA" ] = "no";
dictionary[ "SHARED" ] = "yes";
@@ -317,7 +316,6 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "LIBMNG" ] = "auto";
dictionary[ "FREETYPE" ] = "yes";
- dictionary[ "QT3SUPPORT" ] = "no";
dictionary[ "ACCESSIBILITY" ] = "yes";
dictionary[ "OPENGL" ] = "yes";
dictionary[ "OPENVG" ] = "no";
@@ -345,7 +343,6 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "SQL_SQLITE_LIB" ] = "qt";
dictionary[ "SQL_SQLITE2" ] = "no";
dictionary[ "SQL_IBASE" ] = "no";
- dictionary[ "GRAPHICS_SYSTEM" ] = "raster";
QString tmp = dictionary[ "QMAKESPEC" ];
if (tmp.contains("\\")) {
@@ -483,14 +480,6 @@ void Configure::parseCmdLine()
dictionary[ "SHARED" ] = "no";
else if (configCmdLine.at(i) == "-developer-build")
dictionary[ "BUILDDEV" ] = "yes";
- else if (configCmdLine.at(i) == "-nokia-developer") {
- cout << "Detected -nokia-developer option" << endl;
- cout << "Nokia employees and agents are allowed to use this software under" << endl;
- cout << "the authority of Nokia Corporation and/or its subsidiary(-ies)" << endl;
- dictionary[ "BUILDNOKIA" ] = "yes";
- dictionary[ "BUILDDEV" ] = "yes";
- dictionary["LICENSE_CONFIRMED"] = "yes";
- }
else if (configCmdLine.at(i) == "-opensource") {
dictionary[ "BUILDTYPE" ] = "opensource";
}
@@ -686,10 +675,6 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-style-cde")
dictionary[ "STYLE_CDE" ] = "no";
- // Qt 3 Support ---------------------------------------------
- else if (configCmdLine.at(i) == "-no-qt3support")
- dictionary[ "QT3SUPPORT" ] = "no";
-
// Work around compiler nesting limitation
else
continueElse[1] = true;
@@ -1000,8 +985,8 @@ void Configure::parseCmdLine()
++i;
if (i == argCount)
break;
- QFileInfo check(configCmdLine.at(i));
- if (!check.isDir()) {
+ QFileInfo checkDirectory(configCmdLine.at(i));
+ if (!checkDirectory.isDir()) {
cout << "Argument passed to -L option is not a directory path. Did you mean the -l option?" << endl;
dictionary[ "DONE" ] = "error";
break;
@@ -1140,25 +1125,6 @@ void Configure::parseCmdLine()
dictionary[ "MAKE" ] = configCmdLine.at(i);
}
- else if (configCmdLine.at(i) == "-graphicssystem") {
- ++i;
- if (i == argCount)
- break;
- QString system = configCmdLine.at(i);
- if (system == QLatin1String("raster")
- || system == QLatin1String("opengl")
- || system == QLatin1String("openvg")
- || system == QLatin1String("runtime"))
- dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i);
- }
-
- else if (configCmdLine.at(i) == "-runtimegraphicssystem") {
- ++i;
- if (i == argCount)
- break;
- dictionary["RUNTIME_SYSTEM"] = configCmdLine.at(i);
- }
-
else if (configCmdLine.at(i).indexOf(QRegExp("^-(en|dis)able-")) != -1) {
// Scan to see if any specific modules and drivers are enabled or disabled
for (QStringList::Iterator module = modules.begin(); module != modules.end(); ++module) {
@@ -1464,7 +1430,6 @@ void Configure::applySpecSpecifics()
dictionary[ "STYLE_MOTIF" ] = "no";
dictionary[ "STYLE_CDE" ] = "no";
dictionary[ "FREETYPE" ] = "no";
- dictionary[ "QT3SUPPORT" ] = "no";
dictionary[ "OPENGL" ] = "no";
dictionary[ "OPENSSL" ] = "no";
dictionary[ "STL" ] = "no";
@@ -1496,7 +1461,6 @@ void Configure::applySpecSpecifics()
dictionary[ "KBD_DRIVERS" ] = "tty";
dictionary[ "GFX_DRIVERS" ] = "linuxfb vnc";
dictionary[ "MOUSE_DRIVERS" ] = "pc linuxtp";
- dictionary[ "QT3SUPPORT" ] = "no";
dictionary[ "OPENGL" ] = "no";
dictionary[ "EXCEPTIONS" ] = "no";
dictionary[ "DBUS"] = "no";
@@ -1572,7 +1536,7 @@ bool Configure::displayHelp()
"[-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng]\n"
"[-qt-libpng] [-system-libpng] [-no-libtiff] [-qt-libtiff]\n"
"[-system-libtiff] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg]\n"
- "[-no-libmng] [-qt-libmng] [-system-libmng] [-no-qt3support] [-mmx]\n"
+ "[-no-libmng] [-qt-libmng] [-system-libmng] [-mmx]\n"
"[-no-mmx] [-3dnow] [-no-3dnow] [-sse] [-no-sse] [-sse2] [-no-sse2]\n"
"[-no-iwmmxt] [-iwmmxt] [-openssl] [-openssl-linked]\n"
"[-no-openssl] [-no-dbus] [-dbus] [-dbus-linked] [-platform <spec>]\n"
@@ -1581,7 +1545,6 @@ bool Configure::displayHelp()
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
"[-no-webkit] [-webkit] [-webkit-debug]\n"
- "[-graphicssystem raster|opengl|openvg]\n"
"[-no-directwrite] [-directwrite] [-qpa]\n\n", 0, 7);
desc("Installation options:\n\n");
@@ -1657,7 +1620,6 @@ bool Configure::displayHelp()
desc( "-system-sqlite", "Use sqlite from the operating system.\n");
- desc("QT3SUPPORT", "no","-no-qt3support", "Disables the Qt 3 support functionality.\n");
desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n");
desc("OPENGL", "no","-opengl <api>", "Enable OpenGL support with specified API version.\n"
"Available values for <api>:");
@@ -1683,11 +1645,6 @@ bool Configure::displayHelp()
desc( "-L <librarypath>", "Add an explicit library path.");
desc( "-l <libraryname>", "Add an explicit library name, residing in a librarypath.\n");
#endif
- desc( "-graphicssystem <sys>", "Specify which graphicssystem should be used.\n"
- "Available values for <sys>:");
- desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' ');
- desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' ');
- desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!\n", ' ');
desc( "-help, -h, -?", "Display this information.\n");
@@ -2464,9 +2421,6 @@ void Configure::generateOutputVars()
if (!dictionary["QT_LFLAGS_SQLITE"].isEmpty())
qmakeVars += "QT_LFLAGS_SQLITE += " + escapeSeparators(dictionary["QT_LFLAGS_SQLITE"]);
- if (dictionary[ "QT3SUPPORT" ] == "yes")
- qtConfig += "gui-qt3support";
-
if (dictionary[ "OPENGL" ] == "yes")
qtConfig += "opengl";
@@ -2692,7 +2646,7 @@ void Configure::generateCachefile()
for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) {
cacheStream << (*var) << endl;
}
- cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath no_private_qt_headers_warning QTDIR_build" << endl;
+ cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp depend_includepath no_private_qt_headers_warning QTDIR_build" << endl;
cacheStream.flush();
cacheFile.close();
@@ -2766,7 +2720,9 @@ void Configure::generateCachefile()
moduleStream << "decorations += "<<dictionary["DECORATIONS"]<<endl;
if (!dictionary["QMAKE_RPATHDIR"].isEmpty())
- moduleStream << "QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"];
+ moduleStream << "QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"]<<endl;
+
+ moduleStream << "CONFIG += create_prl link_prl" << endl;
moduleStream.flush();
moduleFile.close();
@@ -2926,8 +2882,6 @@ void Configure::generateConfigfiles()
tmpStream << endl << "// Compile time features" << endl;
tmpStream << "#define QT_ARCH_" << dictionary["ARCHITECTURE"].toUpper() << endl;
- if (dictionary["GRAPHICS_SYSTEM"] == "runtime" && dictionary["RUNTIME_SYSTEM"] != "runtime")
- tmpStream << "#define QT_DEFAULT_RUNTIME_SYSTEM \"" << dictionary["RUNTIME_SYSTEM"] << "\"" << endl;
QStringList qconfigList;
if (dictionary["STL"] == "no") qconfigList += "QT_NO_STL";
@@ -2961,7 +2915,10 @@ void Configure::generateConfigfiles()
if (dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS";
if (dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL";
if (dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG";
- if (dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL";
+ if (dictionary["OPENSSL"] == "no") {
+ qconfigList += "QT_NO_OPENSSL";
+ qconfigList += "QT_NO_SSL";
+ }
if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL";
if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS";
if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT";
@@ -2995,11 +2952,6 @@ void Configure::generateConfigfiles()
if (dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2";
if (dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE";
- if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG";
- if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL";
- if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER";
- if (dictionary["GRAPHICS_SYSTEM"] == "runtime") qconfigList += "QT_GRAPHICSSYSTEM_RUNTIME";
-
qconfigList.sort();
for (int i = 0; i < qconfigList.count(); ++i)
tmpStream << addDefine(qconfigList.at(i));
@@ -3256,8 +3208,6 @@ void Configure::displayConfig()
cout << "V8 support.................." << dictionary[ "V8" ] << endl;
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl;
- cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl;
- cout << "Qt3 compatibility..........." << dictionary[ "QT3SUPPORT" ] << endl;
cout << "DirectWrite support........." << dictionary[ "DIRECTWRITE" ] << endl << endl;
cout << "Third Party Libraries:" << endl;
@@ -3832,7 +3782,7 @@ void Configure::readLicense()
bool openSource = false;
bool hasOpenSource = QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL");
- if (dictionary["BUILDNOKIA"] == "yes" || dictionary["BUILDTYPE"] == "commercial") {
+ if (dictionary["BUILDTYPE"] == "commercial") {
openSource = false;
} else if (dictionary["BUILDTYPE"] == "opensource") {
openSource = true;
@@ -3872,7 +3822,7 @@ void Configure::readLicense()
#ifdef COMMERCIAL_VERSION
else {
Tools::checkLicense(dictionary, licenseInfo, firstLicensePath());
- if (dictionary["DONE"] != "error" && dictionary["BUILDNOKIA"] != "yes") {
+ if (dictionary["DONE"] != "error") {
// give the user some feedback, and prompt for license acceptance
cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " " << dictionary["EDITION"] << " Edition."<< endl << endl;
if (!showLicense(dictionary["LICENSE FILE"])) {
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index bae9056d9e..b489bd9daf 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 643e90425d..faf1dd3b2d 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/environment.h b/tools/configure/environment.h
index 9819e19889..4284678f32 100644
--- a/tools/configure/environment.h
+++ b/tools/configure/environment.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/main.cpp b/tools/configure/main.cpp
index bf68ad6b64..a53a676782 100644
--- a/tools/configure/main.cpp
+++ b/tools/configure/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp
index e1102d461c..8533eb40ee 100644
--- a/tools/configure/tools.cpp
+++ b/tools/configure/tools.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/configure/tools.h b/tools/configure/tools.h
index 6ab0880217..c4debdc6ef 100644
--- a/tools/configure/tools.h
+++ b/tools/configure/tools.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp
index 15622ee815..6398999a7f 100644
--- a/tools/shared/windows/registry.cpp
+++ b/tools/shared/windows/registry.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/shared/windows/registry_p.h b/tools/shared/windows/registry_p.h
index b19c0cdc46..1104b1cc78 100644
--- a/tools/shared/windows/registry_p.h
+++ b/tools/shared/windows/registry_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/accessibilityinspector/accessibilityinspector.cpp b/util/accessibilityinspector/accessibilityinspector.cpp
index d451ed4ac7..4f157bbdb1 100644
--- a/util/accessibilityinspector/accessibilityinspector.cpp
+++ b/util/accessibilityinspector/accessibilityinspector.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -67,9 +67,6 @@ void accessibilityUpdateHandler(QObject *object, int who, QAccessible::Event rea
if (updateHandlerRecursion)
return;
- if (!qobject_cast<QQuickItem *>(object))
- return;
-
updateHandlerRecursion = true;
if (sceneManager) {
@@ -109,14 +106,14 @@ void AccessibilityInspector::inspectWindow(QWindow *window)
accessibilityView = new QGraphicsView();
accessibilityView->setScene(accessibilityScene);
- accessibilityView->resize(1024, 768);
+ accessibilityView->resize(640, 480);
accessibilityView->scale(1.3, 1.3);
accessibilityTreeScene = new QGraphicsScene();
accessibilityTreeView = new QGraphicsView();
accessibilityTreeView->setScene(accessibilityTreeScene);
- accessibilityTreeView->resize(1024, 768);
+ accessibilityTreeView->resize(640, 480);
sceneManager = new AccessibilitySceneManager();
QObject::connect(optionsWidget, SIGNAL(optionsChanged()), sceneManager, SLOT(updateAccessibilitySceneItemFlags()));
diff --git a/util/accessibilityinspector/accessibilityinspector.h b/util/accessibilityinspector/accessibilityinspector.h
index 504fecd6b5..4174ace278 100644
--- a/util/accessibilityinspector/accessibilityinspector.h
+++ b/util/accessibilityinspector/accessibilityinspector.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -64,8 +64,6 @@ public:
void saveWindowGeometry();
signals:
-public slots:
-
private:
OptionsWidget *optionsWidget;
MouseInterceptingGraphicsScene *accessibilityScene;
diff --git a/util/accessibilityinspector/accessibilityscenemanager.cpp b/util/accessibilityinspector/accessibilityscenemanager.cpp
index 9c987271fc..0772468bfc 100644
--- a/util/accessibilityinspector/accessibilityscenemanager.cpp
+++ b/util/accessibilityinspector/accessibilityscenemanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -158,7 +158,7 @@ void AccessibilitySceneManager::handleUpdate(QObject *object, QAccessible::Event
m_animatedObjects.clear();
} else {
- qDebug() << "other update" << object;
+// qDebug() << "other update" << object;
}
}
@@ -273,7 +273,7 @@ QGraphicsRectItem * AccessibilitySceneManager::processInterface(QAccessibleInter
if (!m_rootItem)
m_rootItem = item;
- QString name = interface->text(QAccessibleInterface::Name);
+ QString name = interface->text(QAccessible::Name);
QString description; // = interface->text(QAccessibleInterface::Description, child);
QString role = translateRole(interface->role());
int childCount = interface->childCount();
diff --git a/util/accessibilityinspector/accessibilityscenemanager.h b/util/accessibilityinspector/accessibilityscenemanager.h
index 6f52049d48..e3e37f2f76 100644
--- a/util/accessibilityinspector/accessibilityscenemanager.h
+++ b/util/accessibilityinspector/accessibilityscenemanager.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/accessibilityinspector/main.cpp b/util/accessibilityinspector/main.cpp
index 215c0a9335..e95aa37ba7 100644
--- a/util/accessibilityinspector/main.cpp
+++ b/util/accessibilityinspector/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/accessibilityinspector/optionswidget.cpp b/util/accessibilityinspector/optionswidget.cpp
index 165d89151a..2c6dd6635a 100644
--- a/util/accessibilityinspector/optionswidget.cpp
+++ b/util/accessibilityinspector/optionswidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/accessibilityinspector/optionswidget.h b/util/accessibilityinspector/optionswidget.h
index 2cf8c6b84d..efbe949414 100644
--- a/util/accessibilityinspector/optionswidget.h
+++ b/util/accessibilityinspector/optionswidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/accessibilityinspector/screenreader.cpp b/util/accessibilityinspector/screenreader.cpp
index 3a73f21314..7593948b63 100644
--- a/util/accessibilityinspector/screenreader.cpp
+++ b/util/accessibilityinspector/screenreader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -97,30 +97,17 @@ void ScreenReader::processTouchPoint()
int hit = -2;
int guardCounter = 0;
const int guardMax = 40;
- while (hit != 0) {
+ while (currentInterface != 0) {
++guardCounter;
if (guardCounter > guardMax) {
qDebug() << "touchPoint exit recursion overflow";
return; // outside
}
- hit = currentInterface->childAt(m_currentTouchPoint.x(), m_currentTouchPoint.y());
- //qDebug() << "hit" << hit;
- if (hit == -1) {
- return; // outside
- } else if (hit == 0) {
- break; // found it.
- } else {
- QAccessibleInterface *childInterface = 0;
- int child = currentInterface->navigate(QAccessible::Child, hit, &childInterface);
- if (childInterface == 0) {
- return; // navigation error
- }
-
- if (currentInterface != m_rootInterface)
- delete currentInterface;
- currentInterface = childInterface;
- }
+ QAccessibleInterface * hit = currentInterface->childAt(m_currentTouchPoint.x(), m_currentTouchPoint.y());
+ if (!hit)
+ break;
+ currentInterface = hit;
}
m_selectedInterface = currentInterface;
diff --git a/util/accessibilityinspector/screenreader.h b/util/accessibilityinspector/screenreader.h
index b3ba91d284..6b2f354239 100644
--- a/util/accessibilityinspector/screenreader.h
+++ b/util/accessibilityinspector/screenreader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/accessibilityinspector/screenreader_mac.mm b/util/accessibilityinspector/screenreader_mac.mm
index 063cecd83b..59fc868420 100644
--- a/util/accessibilityinspector/screenreader_mac.mm
+++ b/util/accessibilityinspector/screenreader_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
- ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/corelib/qurl-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp
index 861546ce9e..01f0d700f2 100644
--- a/util/corelib/qurl-generateTLDs/main.cpp
+++ b/util/corelib/qurl-generateTLDs/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/configfile.cpp b/util/lexgen/configfile.cpp
index f64a9987c1..623b5f73d9 100644
--- a/util/lexgen/configfile.cpp
+++ b/util/lexgen/configfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/configfile.h b/util/lexgen/configfile.h
index b1ee7aa060..ca614c2eef 100644
--- a/util/lexgen/configfile.h
+++ b/util/lexgen/configfile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/generator.cpp b/util/lexgen/generator.cpp
index 429266dfbd..36e9febd82 100644
--- a/util/lexgen/generator.cpp
+++ b/util/lexgen/generator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/generator.h b/util/lexgen/generator.h
index b5b8c72ec8..a41a0f080c 100644
--- a/util/lexgen/generator.h
+++ b/util/lexgen/generator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/global.h b/util/lexgen/global.h
index e342565a20..a853538692 100644
--- a/util/lexgen/global.h
+++ b/util/lexgen/global.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/main.cpp b/util/lexgen/main.cpp
index bc4d61e611..eb2920241b 100644
--- a/util/lexgen/main.cpp
+++ b/util/lexgen/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/nfa.cpp b/util/lexgen/nfa.cpp
index 34d9ecb943..d64a540abc 100644
--- a/util/lexgen/nfa.cpp
+++ b/util/lexgen/nfa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/nfa.h b/util/lexgen/nfa.h
index 7a2e1ac995..43ec5d1061 100644
--- a/util/lexgen/nfa.h
+++ b/util/lexgen/nfa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/re2nfa.cpp b/util/lexgen/re2nfa.cpp
index 596476f121..c09e4de030 100644
--- a/util/lexgen/re2nfa.cpp
+++ b/util/lexgen/re2nfa.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/re2nfa.h b/util/lexgen/re2nfa.h
index a10ce3d525..5af6e0751a 100644
--- a/util/lexgen/re2nfa.h
+++ b/util/lexgen/re2nfa.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/tests/tst_lexgen.cpp b/util/lexgen/tests/tst_lexgen.cpp
index 70f5ab546d..1f50fd1f08 100644
--- a/util/lexgen/tests/tst_lexgen.cpp
+++ b/util/lexgen/tests/tst_lexgen.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/lexgen/tokenizer.cpp b/util/lexgen/tokenizer.cpp
index 11e112f982..2848a7de8d 100644
--- a/util/lexgen/tokenizer.cpp
+++ b/util/lexgen/tokenizer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py
index 41418e0e95..d046fb5dfa 100755
--- a/util/local_database/cldr2qlocalexml.py
+++ b/util/local_database/cldr2qlocalexml.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/util/local_database/dateconverter.py b/util/local_database/dateconverter.py
index 9955032f8d..9ca0b3deee 100755
--- a/util/local_database/dateconverter.py
+++ b/util/local_database/dateconverter.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py
index 7171d31100..b6027ac996 100644
--- a/util/local_database/enumdata.py
+++ b/util/local_database/enumdata.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py
index ced5fcc783..38cdc7663e 100755
--- a/util/local_database/qlocalexml2cpp.py
+++ b/util/local_database/qlocalexml2cpp.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/util/local_database/testlocales/localemodel.cpp b/util/local_database/testlocales/localemodel.cpp
index 0a1953bbd0..902729b794 100644
--- a/util/local_database/testlocales/localemodel.cpp
+++ b/util/local_database/testlocales/localemodel.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/local_database/testlocales/localemodel.h b/util/local_database/testlocales/localemodel.h
index 941d0f85d3..fafea8164f 100644
--- a/util/local_database/testlocales/localemodel.h
+++ b/util/local_database/testlocales/localemodel.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/local_database/testlocales/localewidget.cpp b/util/local_database/testlocales/localewidget.cpp
index 7145f53562..43b0c22f8d 100644
--- a/util/local_database/testlocales/localewidget.cpp
+++ b/util/local_database/testlocales/localewidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/local_database/testlocales/localewidget.h b/util/local_database/testlocales/localewidget.h
index 78e8caee12..5c31f49e1d 100644
--- a/util/local_database/testlocales/localewidget.h
+++ b/util/local_database/testlocales/localewidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/local_database/testlocales/main.cpp b/util/local_database/testlocales/main.cpp
index 8f749bd9af..f5ba360256 100644
--- a/util/local_database/testlocales/main.cpp
+++ b/util/local_database/testlocales/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py
index 73243850e9..68acf83d28 100644
--- a/util/local_database/xpathlite.py
+++ b/util/local_database/xpathlite.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/util/plugintest/main.cpp b/util/plugintest/main.cpp
index 445131e210..9f440694e6 100644
--- a/util/plugintest/main.cpp
+++ b/util/plugintest/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/bld.inf b/util/s60pixelmetrics/bld.inf
index 6b9f063ad1..0bccc8aa2d 100644
--- a/util/s60pixelmetrics/bld.inf
+++ b/util/s60pixelmetrics/bld.inf
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp
index 67e532e2f6..22c04d1ed9 100644
--- a/util/s60pixelmetrics/pixel_metrics.cpp
+++ b/util/s60pixelmetrics/pixel_metrics.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pixel_metrics.h b/util/s60pixelmetrics/pixel_metrics.h
index 663d740101..0137e4f403 100644
--- a/util/s60pixelmetrics/pixel_metrics.h
+++ b/util/s60pixelmetrics/pixel_metrics.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapper.hrh b/util/s60pixelmetrics/pm_mapper.hrh
index aa7ac8466b..eebc245b08 100644
--- a/util/s60pixelmetrics/pm_mapper.hrh
+++ b/util/s60pixelmetrics/pm_mapper.hrh
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapper.mmp b/util/s60pixelmetrics/pm_mapper.mmp
index 79b7af66eb..1ef31cdaf2 100644
--- a/util/s60pixelmetrics/pm_mapper.mmp
+++ b/util/s60pixelmetrics/pm_mapper.mmp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapper.pkg b/util/s60pixelmetrics/pm_mapper.pkg
index f5a2a9ba74..97a689ed70 100644
--- a/util/s60pixelmetrics/pm_mapper.pkg
+++ b/util/s60pixelmetrics/pm_mapper.pkg
@@ -5,7 +5,7 @@
; SIS creation.
; Version :
;
-; Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+; Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
; This material, including documentation and any related
; computer programs, is protected by copyright controlled by
; Nokia Corporation. All rights are reserved. Copying,
diff --git a/util/s60pixelmetrics/pm_mapper.rss b/util/s60pixelmetrics/pm_mapper.rss
index fb679d0ab4..4ee8935933 100644
--- a/util/s60pixelmetrics/pm_mapper.rss
+++ b/util/s60pixelmetrics/pm_mapper.rss
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapper_reg.rss b/util/s60pixelmetrics/pm_mapper_reg.rss
index 615dcfce43..7e9784cbf9 100644
--- a/util/s60pixelmetrics/pm_mapper_reg.rss
+++ b/util/s60pixelmetrics/pm_mapper_reg.rss
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapperapp.cpp b/util/s60pixelmetrics/pm_mapperapp.cpp
index 51210a4b09..7b8a4bd0b6 100644
--- a/util/s60pixelmetrics/pm_mapperapp.cpp
+++ b/util/s60pixelmetrics/pm_mapperapp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapperapp.h b/util/s60pixelmetrics/pm_mapperapp.h
index b55db77f4e..0f17d67d38 100644
--- a/util/s60pixelmetrics/pm_mapperapp.h
+++ b/util/s60pixelmetrics/pm_mapperapp.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapperview.cpp b/util/s60pixelmetrics/pm_mapperview.cpp
index 0f9cebd702..5d805fb5bc 100644
--- a/util/s60pixelmetrics/pm_mapperview.cpp
+++ b/util/s60pixelmetrics/pm_mapperview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60pixelmetrics/pm_mapperview.h b/util/s60pixelmetrics/pm_mapperview.h
index 88ca04816d..b0ebb2bd15 100644
--- a/util/s60pixelmetrics/pm_mapperview.h
+++ b/util/s60pixelmetrics/pm_mapperview.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60theme/main.cpp b/util/s60theme/main.cpp
index d39d0b1769..702b36731b 100644
--- a/util/s60theme/main.cpp
+++ b/util/s60theme/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60theme/s60themeconvert.cpp b/util/s60theme/s60themeconvert.cpp
index 99f41c2a7b..b7c103696f 100644
--- a/util/s60theme/s60themeconvert.cpp
+++ b/util/s60theme/s60themeconvert.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/s60theme/s60themeconvert.h b/util/s60theme/s60themeconvert.h
index 40d9c44064..8f855c1efd 100644
--- a/util/s60theme/s60themeconvert.h
+++ b/util/s60theme/s60themeconvert.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/scripts/make_qfeatures_dot_h b/util/scripts/make_qfeatures_dot_h
index 63cfc5348f..e15590b76a 100755
--- a/util/scripts/make_qfeatures_dot_h
+++ b/util/scripts/make_qfeatures_dot_h
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
@@ -132,7 +132,7 @@ open OUT, ">$qtbase/src/corelib/global/qfeatures.h"
print OUT
'/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/unicode/codecs/big5/main.cpp b/util/unicode/codecs/big5/main.cpp
index f056f00c6a..49b7ffb275 100644
--- a/util/unicode/codecs/big5/main.cpp
+++ b/util/unicode/codecs/big5/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index e3727a0629..58a65aa53a 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -2643,7 +2643,7 @@ int main(int, char **)
QByteArray header =
"/****************************************************************************\n"
"**\n"
- "** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).\n"
"** All rights reserved.\n"
"** Contact: Nokia Corporation (qt-info@nokia.com)\n"
"**\n"
diff --git a/util/unicode/writingSystems.sh b/util/unicode/writingSystems.sh
index 45dd914f0e..c4af431bb3 100755
--- a/util/unicode/writingSystems.sh
+++ b/util/unicode/writingSystems.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
diff --git a/util/xkbdatagen/main.cpp b/util/xkbdatagen/main.cpp
index 9833546d92..1371378534 100644
--- a/util/xkbdatagen/main.cpp
+++ b/util/xkbdatagen/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -416,7 +416,7 @@ int main(int argc, char **argv)
// copyright and stuff
printf("/****************************************************************************\n"
"**\n"
- "** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).\n"
"** All rights reserved.\n"
"** Contact: Nokia Corporation (qt-info@nokia.com)\n"
"**\n"